Recording file .txt...

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

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

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

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
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

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

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.

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

Grateful …

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.

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

Thank you