Holy cow, I'm going beserk!!!
I wrote a simple little report and I can't get it to print headings at OF!
I turn on OF at program initialization to print them the first time but after that, they don't print again until the end, Total lines.
I have tried everything, DLTOVR at CL call, OVRPRTF before RPG call, nothing gets them to print!
Here's the code
Some of you might recognized this from an earlier post, and you would be correct. At that time, the report was only 1 page so I didn't see this problem until I ran it and got 20+ pages with heading for page 1 (at the begining) and page 2 (at the end with the total lines).
I wrote a simple little report and I can't get it to print headings at OF!
I turn on OF at program initialization to print them the first time but after that, they don't print again until the end, Total lines.
I have tried everything, DLTOVR at CL call, OVRPRTF before RPG call, nothing gets them to print!
Here's the code
Code:
FF0083 IF E K DISK FF00821 IF E K DISK FQSYSPRT O F 132 OF PRINTER * E KYS 5 15 E ARR 15 1 * I 'ABCDEFGHIJKLMNOPQRS -C HI I 'TUVWXYZ' I 'abcdefghijklmnopqrs -C LO I 'tuvwxyz' * I DS I 1 77 KYWRD I B 1 20ENTRY I 3 17 KYWRD1 I 18 32 KYWRD2 I 33 47 KYWRD3 I 48 62 KYWRD4 I 63 77 KYWRD5 * C KEY KLIST C KFLD MTMNI C KFLD MTMNI C KFLD MTSELN * C MOVE KYWRDS KYWRD C MOVEAKYWRD1 KYS,1 C MOVEAKYWRD2 KYS,2 C MOVEAKYWRD3 KYS,3 C MOVEAKYWRD4 KYS,4 C MOVEAKYWRD5 KYS,5 * C *LOVAL SETLLI0083 C DO *HIVAL C READ I0083 99 C 99 LEAVE C LO:HI XLATEMTMNTX $$MNTX 40 C DO ENTRY X 10 C MOVEAKYS,X KYWD 15 C LO:HI XLATEKYWD $KYWD 15 C $KYWD IFNE *BLANKS C EXSR SR001 C $KYWD:Y SCAN $$MNTX:1 98 C *IN98 IFEQ *ON C KEY CHAINI00821 99 C EXCPTPRINT C ADD 1 COUNT 40 C ENDIF C ENDIF C ENDDO C ENDDO * C MOVE *BLANKS $$KYWD 75 C DO ENTRY X C MOVEAKYS,X KYWD C 01 $$KYWD CAT ',':0 $$KYWD C $$KYWD CAT KYWD:1 $$KYWD C SETON 01 C ENDDO * C SETON LR * CSR *INZSR BEGSR C *ENTRY PLIST C PARM KYWRDS 77 * C TIME TIMDAT 120 C MOVELTIMDAT @TIME 60 C MOVE TIMDAT @DATE 60 * C SETON OF CSR ENDSR * CSR SR001 BEGSR C MOVEA$KYWD ARR C Z-ADD15 Y 20 C DO *HIVAL C ARR,Y COMP ' ' 90 95 C 90 LEAVE C 95 SUB 1 Y C 95 ITER C ENDDO CSR ENDSR * OQSYSPRT H 1 OF O @TIME ' : : ' O @DATE + 2 O 127 'Page:' O PAGE Z 132 O H 2 OF O 72 'Menu Selections Based On' O ' Search Phrases' O H 1 OF O 'Menu ' O + 2 'Option#' O + 2 'Text ' O ' ' O + 2 'Pgm Name ' O + 2 'Menu Name ' O H 1 OF O '----------' O + 2 '-------' O + 2 '---------------------' O '---------------------' O + 2 '----------' O + 2 '----------' O E 1 PRINT O MTMNI O MTSELNZ + 3 O MTMNTX + 3 O MZJTOE 75 O MZMTOE + 2 O T 11 O '* Number Listed:' O COUNT Z + 2 O T 1 O '** Search Phrases:' O $$KYWD + 2
Some of you might recognized this from an earlier post, and you would be correct. At that time, the report was only 1 page so I didn't see this problem until I ran it and got 20+ pages with heading for page 1 (at the begining) and page 2 (at the end with the total lines).





Comment