hi,
how to use a printer file in a program cobol.
i have the following:
(I wanna know if the write part is correct)
MOVE M1DESC TO M1DESC-DSP. MOVE M1DESC-DSP TO R1DESC-PRT. MOVE PRINTER-LINE TO HIPR01R-RECORD.
WRITE HIPR01R-RECORD FROM PRINTER-LINE.
Regards
Sylvana.
Software/Hardware used:
os/400
ASKED:
November 9, 2009 5:50 PM
UPDATED:
November 27, 2009 8:45 AM
It depends on the printer file. Without seeing the printer file definition of the print line identified as HIPR01R-RECORD, there’s no way to know. (AFTER ADVANCING 1 LINE would be the default behavior.)
How many record formats are defined? Is the printer file externally described?
Tom
BTW, if you have this line:
…then this line:
…should only need to be:
You don’t need the FROM if you’ve already done the MOVE. Also, if you do use the FROM, then you don’t need the MOVE. Use one or the other rather than using both.
Tom