Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Generating form letters from AS400 data from MS Word

190 views
Skip to first unread message

Al

unread,
Apr 23, 2001, 5:32:35 AM4/23/01
to
Hello,

We send out letters to the membership of our association. The letters are
produced by an RPG pgm & they print in plain Courier on a laser printer.
We'd like to enhance the letters to use other fonts, print certain fields in
bold, etc. These letters contain AS/400 data.

One of 5 different form letters can be generated, the RPG pgm deciding
which letter to print by checking fields in the membership record. All the
letters are printed together in one spool file.

We envision using MS Word to setup the different form letters, and merge
data from the AS/400. But its not clear how to automate this process so: the
job can be submitted, the output spooled, and the letters printed like
before. I know you can go to a particular document in MS Word, and mail
merge it with AS/400 data, but several different letters are available in
this case---we dont have to run mail merge on each letter one-by-one do we?
How can we have the various letters generated as each record is read in and
processed on the AS/400..

Can someone please point us in the right direction.

Al


Nick Roux

unread,
Apr 23, 2001, 8:09:46 AM4/23/01
to
If your laser printer understands PCL (most do) you can include
control codes to change font, pitch, layout etc. directly in your RPG
program.

For a simple example, have a look here

http://home.yebo.co.za/~10302602/tipprtpcl.html

and here for predefined RPG constants of some of the most often used
PCL codes

http://home.yebo.co.za/~10302602/images/pcl.zip

Nick

Hawkins' Theory of Progress:
"Progress does not consist of replacing a theory that
is wrong with one that is right, but of replacing one
that is wrong with one that is more subtly wrong".

Walter

unread,
Apr 24, 2001, 2:40:36 AM4/24/01
to
We tried this too, and gave it up. We print some hundred pages per day, once
per month 15000, and also wanted to enhance the layout. It never worked
stable with Word, nearly no day without problems the employees could not
manage, always work for the IT departement. Word or Windows deadlocks,
connection interrupts and so on.

We are now testing some graphic printing programs for AS/400. They take
normal spool files and change the font as often per page as you want, put in
graphics, frames, shadow backgrounds, even with if...then rules depending on
words in the spool file.
We think we're on a better way now compared to a PC / Word connection. Until
now we found these programs:
Prout
Toolmaker / Forms-Manager
roha / Spoolmaster
sss-Software / Report Designer400
rjssoft / WinSpool400
Also in OS400 V5R1 some new printing stuff is said to be in.


Walter
"


Ugo Gagliardelli

unread,
Apr 24, 2001, 7:49:54 AM4/24/01
to
Nick Roux wrote:
>
> If your laser printer understands PCL (most do) you can include
> control codes to change font, pitch, layout etc. directly in your RPG
> program.
>
> For a simple example, have a look here
>
> http://home.yebo.co.za/~10302602/tipprtpcl.html
This example uses a technique called "partial ASCII transparent" coding
that's non generally supported, for example Personal Communications
emulated printer does not, Host print transform does not, I'm not aware
of any print-server that do it. So we can say that's not a device
independent technique.
--
Dr. Ugo Gagliardelli, Modena, Italy
Spaccamaroni andate a cagare/Spammers not welcome

Oscar

unread,
Apr 24, 2001, 7:42:24 PM4/24/01
to
Al:

Have you looked into overlays and AFP printing on the AS/400 ? We have similar
requirements and it works well for us. I currently have over 200 forms that are
dynamically selected based on requirements. We use Host Print Transform and the
output is consistent on all of our laser printers. You can develop the generic
overlay part in MS word, and make an overlay out of it. I am a very big fan of
this method. If you haven't looked into it I would suggest you do.

My 2¢ worth.

Oscar

Ralph McClusky

unread,
Apr 25, 2001, 9:05:57 PM4/25/01
to
Hi Al,

We solved it in a very unique way. I accept it may be overly complicated but


it works well for us.

We create a form letter in MS-Word and put all lovely bold, underline stuff
in it even with pictures.
In the letter we put tags ie <@USER@>
So a letter could look like this.
Dear Mr <@USER@>,

ra ra ra

The file is then saved as an RTF file and saved onto the as400 in a physical
file.
An RPG program then scans the file and does a replace on the tag.
The file then is saved and passed to the qdls via CPYPCTOD command.
a RUNRMTCMD is issued via CA's CWBRXD and a macro called that calls MS-WORD
with the document in the
string. Of course your printer for this stuff is the default windows
printer...even postscipt! (if you have the PC drivers)

The advantage of my way is that it is "lego" technology. All you need is
A Pc with. MS-WORD, TCP-IP + static IP, Client Access with CWBRXD in startup
(different with NT)
Simce you are doing a tag replace you can get real smart and complicated
within the RPG program, since a tag doesn't
have to be a database field but whatever you want.

There is heaps more you can do such as why print when you can SMS or
email...all from the command line in RUNRMTCMD.
You could even write html and put it up on the web via ftp, thats how I do
our footy tipping comp.


Hope it helps.

Ralph

"Al" <adu...@yahoo.com> wrote in message
news:TESE6.32583$IJ1.2...@bgtnsc05-news.ops.worldnet.att.net...

0 new messages