AFPRSC is your friend
The way to do it :
1. save the Word doc template as a jpg file (other formats are available I
2. load the jpg file to a dir in the IFS (i.e /home/test)
3. add a AFPRSC keyword to the PRTF record
like AFPRSC('Template.jpg' *JFIF 0.0 0.0 (*PATH '/home/test'))
4. compile the PRTF with DEVTYPE(*AFPDS)
That's it, no need to deal with create overlay and such
if you do not want to change the current records in the PRTF
just a new record "Template" to the PRTF , affix the AFPRSC to it
and issue a corresponding WRITE in the RPG Program
date: Fri, 22 Apr 2022 11:33:19 -0500
from: DEnglander--- via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>[from
subject: RE: RPG or SQL how to generate letters from a Word Document
The only way I know of to do that is to use overlays. The last time I did
that [it's been awhile] there was a printer driver I had to install in
word. You would print the template to that printer, which created a file
you copy to the system. Then I think I ran the CRTOVL command to create
the overlay from that template, and used an OVRPRTF in the CL that calls
the RPG program specifying the overlay created by the CRTOVL command
Not sure if that scenario still works, but it did quite nicely at the
Hope this helps.
"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the
accompanying it) contain confidential information belonging to thesender.
The information is intended only for the use of the intended recipient.If
you are not the intended recipient, you are hereby notified that anythe
disclosure, copying, distribution or the taking of any action in reliance
on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the law.
If you have received this transmission in error, please promptly notify
sender by reply e-mail, and then destroy all copies of the transmission."--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our affiliate
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.