|
#1
|
|||
|
|||
|
Generate spool file from PF with OVERLAY or Page Definition and Form Definition
Hi All,
I have a problem with Overlay. I refer to old theard but still cannot solve my problem. Here how i execute my program Step 1) Copy spool file to pf Code:
CPYSPLF FILE(&PRTF) TOFILE(&OUTF) SPLNBR(*LAST) +
TOMBR(&PRTF) CTLCHAR(*PRTCTL)
Code:
OVRPRTF FILE(QSYSPRT) DEVTYPE(*LINE) +
PAGESIZE(&LPP &PPL) LPI(&LPI) CPI(&CPIN) +
OVRFLW(&OVRFLW) PAGDFN(BOSSTM/CAPST) +
FORMDF(BOSSTM/CAPST) PRTTXT(&REPTXT) +
OUTQ(&DSTLIB/&DSTOUT) FORMTYPE(&REPFRM) +
COPIES(©N) HOLD(&HOLD) SAVE(&SAVE) +
USRDTA(&REPDTA) SPLFNAME(&DSTPRT)
Step 3) Call the program to generate the spool file. Code below is how my program look alike. Code:
FSPOOL IF E DISK USROPN FQSYSPRT O F 198 PRINTER OFLIND(*INOF) F USROPN F PRTCTL(CTL:*compat) D CTL DS D SPACEB 1 1 D SPACEA 2 2 D SKIPB 3 4 D SKIPA 5 6 D CURLIN 7 9 0 D DS D PLINE 1 198 D DIST 1 50 C* C *ENTRY PLIST C PARM DSTNAM 50 C PARM REPFRM 10 C* OPEN C OPEN SPOOL C OPEN QSYSPRT C READ RSPOOL 33 C* C *IN33 DOWEQ '0' C* C MOVE LSKIP SKIPB C MOVE LSPACE SPACEB C* C* C EXCEPT LINE C* C READ RSPOOL 33 C END C* CLOSE C CLOSE SPOOL C CLOSE QSYSPRT C* C RETURN C* OQSYSPRT E LINE O PLINE 198 After all these step, i go to WRKSPLF and i see my spool file "Total Pages" value is 12*. But from what i understand, spool file with overlay must have extra 1 page. It should be 13*. Is it i have to do something before i close QSYSPRT ? Hopefully anyone out there can help me. Thanks. Last edited by azmir.silverlake; 10-21-2009 at 08:07 AM. Reason: Update source code |
|
#2
|
||||
|
||||
|
I don't see where you are specifying that you want to use an overlay?! You aren't specifying it on your OVRPRTF.
Furthermore -- you said something about an overlay making your report 1 page longer. I don't see why it would change the number of pages? An overlay is an image that overlays the text on the page. So it doesn't change the number of pages, it prints on the same pages with your existing text. Try adding the following to your OVRPRTF Code:
DEVTYPE(*AFPDS) FRONTOVL(mylib/myoverlay 0 0) |
|
#3
|
|||
|
|||
|
Thanks for reply Scott.
1) I didn't specify Overlay because i use Page Definition and Form Definition. I given to understand that Page Definition and Form Definition are same as Overlay. Am i wrong? Please let me know. 2) Even if i add in Code:
DEVTYPE(*AFPDS) FRONTOVL(BOSSTM/CAPST) 3) IT Operator told me that i should have extra 1 page. Am i wrong again ? 4) This is for distribution function. That why i copy and reprint again to distribute the new spool file to specify *OUTQ. For example, spool file content report for multiple department. So what i do is regenerate spool file for each department. Thanks for your time. I only have 2 years experience on RPG. Please guide me. |
|
#4
|
|||
|
|||
|
1) I found something weird .
i add in Code:
DEVTYPE(*AFPDS) FRONTOVL(BOSSTM/CAPST) i print at HP Laserjet 3050, yeah its working. i can see my overlay. But when i print at IBM IP300, my overlay not printed. Do i need to change anything on IP300 ? 2) Refer to my attachment 1st spool file i use Code:
DEVTYPE(*AFPDS) FRONTOVL(BOSSTM/CAPST) IBM IP300 : Nope. i didn't see any overlay. 2nd spool file i use Code:
DEVTYPE(*LINE) PAGDFN(BOSSTM/CAPST) +
FORMDF(BOSSTM/CAPST)
HP Laserjet 3050 : Cannot print at all. IBM IP300 : Perfect. Everything look nice. 3rd spool file i use Code:
EVTYPE(*AFPDS) PAGDFN(BOSSTM/CAPST) +
FORMDF(BOSSTM/CAPST) FRONTOVL(BOSSTM/CAPST)
IBM IP300 : Nope. i didn't see any overlay. 4th spool file i use Code:
DEVTYPE(*AFPDS) PAGDFN(BOSSTM/CAPST) +
FORMDF(BOSSTM/CAPST)
IBM IP300 : Nope. i didn't see any overlay. Anyone out there facing similar issue, please speak up. Hope you can enlighten me. Thanks everyone. |
|
#5
|
||||
|
||||
|
Quote:
How are those two printers defined? If I remember correctly, host print transform TRANSFORM(*YES) doesn't handle overlays applied to a spool with the FRONTOVL() attribute. For that you need an IPDS printer. Others in this forum will correct me if I'm wrong. At least for our printers, I can't use the FRONTOVL() attribute. Instead, I have to use the OVERLAY keyword in the AFP print file definition. You would have to have a generic AFP print file (instead of QSYSPRT) that you use to write the overlay anytime you have a page break, and write your 198-char field for each record read as you are already doing. BTW, is there a reason you're trying to apply an overlay after-the-fact like this? Can you not change the program that creates the first spool to add the overlay at that time? --Bryan |
|
#6
|
||||
|
||||
|
Quote:
Quote:
Quote:
Quote:
Code:
CPYSPLF FILE(&PRTF) TOFILE(&OUTF) SPLNBR(*LAST) +
TOMBR(&PRTF) CTLCHAR(*PRTCTL)
Thanks for reply bryan. Hope i answer all your question. |
|
#7
|
||||
|
||||
|
Quote:
Quote:
Quote:
Quote:
Code:
OVRPRTF QSYSPRT FRONTOVL(youroverlay) /* other parms, etc */ Also, if you need the overlay to work on a NON-IPDS printer, using TRANSFORM(*YES), I believe you'll NEED to create a specific *AFP spool file with the OVERLAY keyword in the DDS, rather than using FRONTOVL() on an *SCS print file. --Bryan |
![]() |
| Tags |
| form definition, overlay, page definition, printing |
| Thread Tools | |
| Display Modes | |
|
|