If you have AFP installed, one possible way to do this is by creating an "overlay" for your document.
Think of this as a form that you are merging with your standard RPG output. This would allow you to place the logo on a page in a consistent location, and have the data be a variable.
An easy way to do this is to create a document in a program like msWord that has the placement of the logo and any other constant "form" data that you want to place in the output. Then use the AFP printer (that was installed during iSeries Operations Navigator installation) to print the document to a file.
Then go into iseries navigator, AFP Manager, PSF Configurations, and uder AFP Manager tasks you will see "import an overlay". Follow that wizard to upload the object to the iSeries.
In your printer DDS, you will add a record format with the following coding :
A R RCD011 TEXT('Overlay selection')
A OVERLAY(&LIBL/&OVLN &POSD +
A &POSA)
A*
A LIBL 10A P TEXT('Overlay Library')
A OVLN 8A P TEXT('OverLay name')
A POSD 5S 3P TEXT('Position offset down')
A POSA 5S 3P TEXT('Position offset Across')
Compile the printer file as an *AFPDS
In your program just populate the all the variables (I usually use zeros for the 2 position codes), and then "print" this record format at the same time you print your headings.
You can get more information about this from the iSeries infocenter...
Phil C
Last Wiki Answer Submitted: October 29, 2008 3:00 pm by Pcatlin200 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
There really isn’t much more to it… It feels a little like “hocus pocus” but it actually works pretty well.
The true key to this is getting the msWord document created correctly as an overlay using the AFP printer driver. Once that’s done, the rest of the process is very simple.
We semi automated the process by allowing the end user to create the word document, and save it to the IFS. We then created an import screen that copies the IFS file to a physical file and calls the CRTOVL command. Once they run it, the program starts using it.
You might also be able to do this without modifying your program by placing the overlay name in an OVRPRTF command. I haven’t tried it that way but it should work.
please improve u r answer ,when u r aswreing imagine that u r in company and give answer
126…
There really isn’t much more to it… It feels a little like “hocus pocus” but it actually works pretty well.
The true key to this is getting the msWord document created correctly as an overlay using the AFP printer driver. Once that’s done, the rest of the process is very simple.
We semi automated the process by allowing the end user to create the word document, and save it to the IFS. We then created an import screen that copies the IFS file to a physical file and calls the CRTOVL command. Once they run it, the program starts using it.
You might also be able to do this without modifying your program by placing the overlay name in an OVRPRTF command. I haven’t tried it that way but it should work.