Stowing programs outside the Editor. Working with work Files

Hello, I’m using Natural V 6.1.1 Pl 15 on Linux. (i have made this post to the open source but i think is better to put it here).I know this is long post, so if you want to answer only one of my questions, I would be very happy :slight_smile:

I had this idea of creating Natural programs from outside the editor to do simple tasks as reading some Adabas fields. Simple as:

000090 1 PRO_TABLES VIEW OF PRO_TABLES
000100 2 COMP
000110 2 TAB_NO
000120 2 TAB_KEY
000130 2 TAB_DATA(1:1)
000140 END-DEFINE
000360 READ PRO_TABLES BY TAB_SUP1 EQ ‘X124’
000410 WRITE WORK FILE 1 TAB_NO ‘,’ TAB_KEY ‘,’ TAB_DATA(*)
000430 END-READ

Let say i generate that source as ‘read.nsp’. then i want to call something like:

natural parm=PRODIS bp=nat31 etid=$i “stack=(logon PRODIS;READ;FIN)”

[b]1) I need a way to save the file under Natural database and stow it programmaticaly, can it be achieved?

  1. Is there any way to save the workfile under other name? how can i change the file output without messing with the Natural configuration?

  2. Is there a way to output to the stdout without having those “MORE” prompts? Then, i could capture the stdout without having to store all my data on disk.

  3. Is there a way of READING a file that has not the name of a workfile?

  4. Is there any Natural language construct that could let me store data (as in a linked list) whitout having to store it on disk? If this could be done, it would be very helpfull.[/b]

Thank you very much!