# Recording file .txt...

**URL:** <https://techcommunity.softwareag.com/t/recording-file-txt/178228>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Adabas-Natural-Community-Edition, Natural-on-Windows-Unix\
**Created:** [August 24, 2014, 1:51am UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228 "2014-08-24T01:51:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Viana](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@Sergio\_Viana](https://techcommunity.softwareag.com/u/Sergio_Viana)\
**Post date:** [August 24, 2014, 1:51am UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/1 "2014-08-24T01:51:50Z")

</div>

How to add several records on “WORK FILE 1 '%temp%\test.txt '” or accumulate the data, then perform sequential read in NATURAL as a sequential file…

DEFINE DATA LOCAL  
01 #STUFF (A100) INIT\<‘hello, workfiles’\>  
END-DEFINE  
DEFINE WORK FILE 1 ‘%temp%\test.txt’  
WRITE WORK FILE 1 #STUFF  
END

---

<div class="post-metadata">

**Author:** ![Sergio\_Viana](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@Sergio\_Viana](https://techcommunity.softwareag.com/u/Sergio_Viana)\
**Post date:** [August 24, 2014, 1:57am UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/2 "2014-08-24T01:57:07Z")

</div>

I’m learning NATURAL WINDOWS XP … how to write a DB table ADABAS to use in my testing programs … a step by step … …

---

<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:** [August 24, 2014, 2:28am UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/3 "2014-08-24T02:28:33Z")

</div>

With Adabas, Software AG provides a sample file called EMPLOYEES.

```auto
DEFINE DATA LOCAL
1 EMP VIEW EMPLOYEES
  2 PERSONNEL-ID
  2 NAME
1 #W
  2 #ID (A9)
  2 #NAME (A25)
1 #I (I4)
END-DEFINE
LIMIT 10
READ EMP BY PERSONNEL-ID
  WRITE WORK FILE 1 PERSONNEL-ID
                    NAME
END-READ
*
READ WORK 1 #ID
            #NAME
  ADD 1 TO #I
  DISPLAY #I
          #ID
          #NAME
END-WORK
END
```

```auto
Page 1 08/23/14 17:27:45
 
    #I #ID #NAME
----------- --------- -------------------------
 
          1 11100102S CHINDLER
          2 11100105S CHIRM
          3 11100106S CHMITT
          4 11100107S CHMIDT
          5 11100108S CHNEIDER
          6 11100109S CHNEIDER
          7 11100110B UNGERT
          8 11100111T HIELE
          9 11100112T HOMA
         10 11100113T REIBER
```

---

<div class="post-metadata">

**Author:** ![Sergio\_Viana](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@Sergio\_Viana](https://techcommunity.softwareag.com/u/Sergio_Viana)\
**Post date:** [August 24, 2014, 2:45am UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/4 "2014-08-24T02:45:41Z")

</div>

I want to CREATE a DB ADABAS NEW for my program …WITH DO

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [August 24, 2014, 5:35pm UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/5 "2014-08-24T17:35:08Z")

</div>

First, you have to define the file to Adabas. This is done in the DBA Workbench. If you have the Demo database installed, usually DB 12, you could add a file to that DB. If you want you could start a new DB.

Then, in Natural, you will have to create a new DDM for the file using SYSEXDDM.

With all that done, you will then be able to STORE new records in the file.

---

<div class="post-metadata">

**Author:** ![Sergio\_Viana](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@Sergio\_Viana](https://techcommunity.softwareag.com/u/Sergio_Viana)\
**Post date:** [August 24, 2014, 5:52pm UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/6 "2014-08-24T17:52:22Z")

</div>

Steve you could do a walkthrough of how to create a new record in the DB…

Grateful …

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [August 25, 2014, 1:16pm UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/7 "2014-08-25T13:16:48Z")

</div>

In the DBA workbench, double click on the demo DB (usually DB12).  
Click on New.  
There will be a lot of boxes to be filled in for each field.  
TYPE … ignore for now  
Level … use 1 for all fields  
Short name … start with AA then AB etc  
format/length … for now create several fields all A 10  
suppresion … none  
long alpha … none  
Descriptor … make one field a descriptor so you can practice

After you have created a file, go to Natural . click on sysexddm (in system libraries).  
specify the dbid and file number of the file you just created.  
enter "user friendly " names for the fields AA AB etc.  
stow the ddm

you are now ready to STORE records in the file.

Let me repeat what Ralph Zbrog said on another thread when answering one of your questions. This is not a training site.

That means this is not a site for people trying to learn enough Adabas/Natural to get a job. You will not learn enough to fool anyone.

If you are working for a company that uses Adabas/Natural you should ask your colleagues first. If they cannot answer a question, post it to the forum.

If you are in a Natural/Adabas class, and the questions pertain to homework, shame on you. Posting to the forum would be the same as copying from someone sitting next to you in a test.

---

<div class="post-metadata">

**Author:** ![Sergio\_Viana](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@Sergio\_Viana](https://techcommunity.softwareag.com/u/Sergio_Viana)\
**Post date:** [August 25, 2014, 3:28pm UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/8 "2014-08-25T15:28:20Z")

</div>

I thought it was any help, even for those just starting out … thanks, I won’t bother more …

Thank you

---

<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:31pm UTC](https://techcommunity.softwareag.com/t/recording-file-txt/178228/9 "2021-04-02T15:31:54Z")

</div>


