# Help in work with file

**URL:** <https://techcommunity.softwareag.com/t/help-in-work-with-file/100968>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [July 16, 2012, 9:37pm UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968 "2012-07-16T21:37:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claudio\_Muller](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/claudio_muller/32/518_2.png) [@Claudio\_Muller](https://techcommunity.softwareag.com/u/Claudio_Muller)\
**Post date:** [July 16, 2012, 9:37pm UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968/1 "2012-07-16T21:37:39Z")

</div>

Hi,  
i try to learn Natural.

I know Cobol 17 years.

I have a question.

In COBOL i have COBOL-datafiles to save my informations (vendors, customers, sales, sale items, products, etc).

There is a natural ability to create data files natives NATURAL?  
Or just data files in adabas or connections to databases?

Cláudio, from Brazil.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [July 16, 2012, 10:13pm UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968/2 "2012-07-16T22:13:19Z")

</div>

COBOL’s WORKING-STORAGE SECTION is replaced with a DEFINE DATA statement. Because Natural does not have a FILE SECTION, you code READ without an INTO clause and WRITE without a FROM clause. WORK files (as they are called in Natural) are read from and written to disk or tape. They are sequential files, processed essentially the same way as with COBOL

Refer to the following in the statements manual:

READ WORK FILE  
WRITE WORK FILE  
DEFINE WORK FILE  
CLOSE WORK FILE

To access data base files, such as in Adabas, is a little more complicated - for a newbie, that is. The complexities are mostly in the set-up.

---

<div class="post-metadata">

**Author:** ![Claudio\_Muller](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/claudio_muller/32/518_2.png) [@Claudio\_Muller](https://techcommunity.softwareag.com/u/Claudio_Muller)\
**Post date:** [July 17, 2012, 12:05am UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968/3 "2012-07-17T00:05:20Z")

</div>

Hi Ralph,

So:  
in Cobol there are data-files (native-Cobol-files) indexed, sequential, etc… —\> In Natural only sequential, ok?

in Cobol there are access to DB → In Natural there are access to Adabas or DBs…, ok?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 17, 2012, 9:27am UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968/4 "2012-07-17T09:27:10Z")

</div>

On OpenSystems Natural can only deal with “sequential” workfiles and database files.

What “indexed” files are you talking about in relation to an OpenSystems environment ?

That would typically be VSAM files on a mainframe, I suppose, and Natural can deal with  
these (requires the Natural for VSAM addon, though), but there is no such thing on  
OpenSystems “natively”.

---

<div class="post-metadata">

**Author:** ![Claudio\_Muller](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/claudio_muller/32/518_2.png) [@Claudio\_Muller](https://techcommunity.softwareag.com/u/Claudio_Muller)\
**Post date:** [July 17, 2012, 12:38pm UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968/5 "2012-07-17T12:38:47Z")

</div>

Thanks.  
I will try use sequential file in Natural.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:02pm UTC](https://techcommunity.softwareag.com/t/help-in-work-with-file/100968/6 "2021-04-02T15:02:10Z")

</div>


