print form linux

Hi,

We run in batch:


natural bp=x parm=x batchmode stack=/("logon a;write1;write1;fin") cmprnt01=/tmp/1.prt

where write1 is a simple program:


define data
local
1 #a (a10)
end-define
define printer (1)
write (1) "hello"
end

I assume we will get twice “hell” in the printer file (on the ibm/vse is working like that),
but we get only once “hello”.
The second program override our printnig file.

Can someone help?

Hezi

Can you try defining the print file to append ?

DISP KEEP

How can I do it in Linux?

I don’t have aceess to open systems right now to try myself.
check out the manual
http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat6314unx/sm/definepr_uw.htm#define_printer_disp_definepr_uw

There is no option like this for PRINT files, only for work files as in


DEFINE WORK FILE n '/tmp/1.prt' ATTRIBUTES 'APPEND'

I have an idea but cannot test it, as I have restricted access under Unix. It works under Windows. Perhaps you can find the equivalent under Linux. Give it a try.

Running the Natural Configuration utility (NATPARM), I select a member and open Natural Execution Configuration → Device/Report Assignments. Under Devices I click on Setup for LPT1 and a window pops up in which I specify the Physical specification of “>> C:\Print1.prt”, and I check the box for Print to file.

All my Natural output written to (01) is appended to c:\Print1.prt.

Nice Information Provided.