Hi all, first timer with printer files..
I have created a PF in QTEMP and put data inside of it in my RPGLE program. I want to write the contents in that PF into a spool file.
The direction I was given was "read that PF file in the program and print by using 'except' so that spool file will be generated"
EDIPF = PF in QTEMP
EMDID, EMBOX, MBCODE, EMDAT = field names
I am making the printer file, like so:
I was able to get this far. It is compiling successfully. Am I correct in doing this? Just the fact that its my first time, I am not 100% sure this is all correct.
second thing is, in my RPGLE program I have to "read and print"
the directions for this was : Print the heading, Read the first record, See if the page is full. If so, print the heading.
what I don't understand is where the CSREC came from, from the code I got, it is only found in these 2 places...and since I don't know the general procedure, I have no idea!
why does it read the first record out of nowhere when it will read again after the "Write Detail" and what exactly does Write Detail do?
I have created a PF in QTEMP and put data inside of it in my RPGLE program. I want to write the contents in that PF into a spool file.
The direction I was given was "read that PF file in the program and print by using 'except' so that spool file will be generated"
EDIPF = PF in QTEMP
EMDID, EMBOX, MBCODE, EMDAT = field names
I am making the printer file, like so:
Code:
0000.04 A REF(EDIPF) 0000.06 A R HDG1 0000.10 A 0000.11 A SKIPB(001) 0000.12 A 4 0000.13 A 'DOC NAME' 0000.15 A 10 0000.16 A 'MAILBOX ID' 0000.17 A 3 0000.18 A 'DISPLAY CODE' 0000.19 A 10 0000.20 A 'MAIL DATE' 0000.57 A*%%********************************************************* 0000.58 A R DETAIL 0000.59 A SPACEA(001) 0000.60 A EMDID R O 4 0000.61 A EMBOX R O 10 0000.62 A MBCODE R O 3 0000.63 A EMDAT R O 10 0001.04 A*%%*********************************************************************** 0001.05 A R FOOTER 0001.09 A SPACEB(001) 0001.10 A 1 0001.11 A '----------------------------------- 0001.12 A End of Report----------------------- 0001.13 A -----------------------' 0001.14 A SPACEB(001)
second thing is, in my RPGLE program I have to "read and print"
the directions for this was : Print the heading, Read the first record, See if the page is full. If so, print the heading.
Code:
DCL-F EDIPRINT Printer OFLIND(*In10); . . . Creates QTEMP/EDIPF with data in it . . . Print the heading 0009.00 C Write Hdg1 Read the first record 0013.00 C Read CSREC 90 See if the page is full. If so, print the heading. 0017.00 C If *In10 = *On 0018.00 C Write Hdg1 0021.00 C Eval *In10 = *Off 0022.00 C EndIf 0023.00 C Write Detail 0024.00 C Read CSREC 90 0025.00 C EndDo 0026.00 C* 0027.00 C Eval *InLR = *On
why does it read the first record out of nowhere when it will read again after the "Write Detail" and what exactly does Write Detail do?






Comment