Automated file transfer from AS400 to Word?

Microsoft Excel
Microsoft Word
Spool files
A reader wrote in with this question: I need to take a spool file (say a Collection Letter) generated from RPGIV. I can copy this spool file to a physical file if needed. I want to automatically import or send this file to Microsoft Word for editing purposes. I have used the 'ADD-INs' for Excel to bring data from the AS400 into Excel. Is there something like that for Word? Also, I cannot remember the command for accessing a PC program from the 400.

Answer Wiki

Thanks. We'll let you know when a new response is added.


you may do another way.
Create a model file in word (.DOT file) with the fixed text.

Export the variable part of your data into a file that will be available for Excel PC importation using Excel ADD-in of better, integrated SQL.

Now modify your .DOT file for mail merge using the created Excel file from I5 data.

And you’ll get probably what you want. (I hope).

To my knowledge, there is no add-in in Word to include data from AS400. This is probably due to the fact that Word is not a tool to handle data.

To initiate a pc command from I5 platform, just use STRPCCMD command.


Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Bigmac46
    Don't know for sure if this is exactly what you are looking for but it works, The file is created through another job stream and user is notified it is ready. User then runs this to download file and open it with word as soon as it it done. the transfer need to be set to run transfer request automatically to prevent having to run and close it .Then it just works but it must be done interactive. It is possible this could be improved on but it is working so we leave it alone.
                 DCL        VAR(&STRCMD) TYPE(*CHAR) LEN(55) +             
                 DCL        VAR(&PCCMD) TYPE(*CHAR) LEN(55)                
                 STRPCO     PCTA(*NO)                                      
                 MONMSG     MSGID(IWS4010)                                 
                 STRPCCMD   PCCMD(&STRCMD) PAUSE(*NO)                      
                 CRTDTAARA DTAARA(QTEMP/STRPCO) TYPE(*CHAR) LEN(1) +       
                    TEXT('START PCO DATA ARE')                             
                 MONMSG CPF0000                                            
                 STRPCO PCTA(*NO)                                          
                 MONMSG MSGID(IWS4010)                                     
       ENDIT: ENDPGM                                                       
    1,000 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: