Copying Spoolfiles

Application development
Backup and Recovery
Hi, I would like to know, How to copy spoolfiles from one AS400 machine to another AS400 machine? Thanks in Advance Rama Krishna

Answer Wiki

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

1) Create a file to transfer the spool file data on the source system. RCDLEN is (at least) 1 char larger than width of report.
? CRTPF FILE(library/file) RCDLEN(length)
2) Save the spool file data to the transfer file on the source system.
? CPYSPLF FILE(splfname) TOFILE(library/file) JOB(jobnbr/user/jobname) SPLNBR(splfnbr) CTLCHAR(*FCFC) MBROPT(*REPLACE)
3) Send the transfer file from the source system to the target system via FTP, SAVF transfer, etc.
4) Set printer file to have the proper attributes (QSYSPRT for standard 132 char or less, otherwise create a printer file with the correct PAGESIZE and OVRFLW) and copy the spool file data to it from the transfer file.
? OVRPRTF FILE(prtf) OUTQ(outq) FORMTYPE(formtype) USRDTA(userdata) HOLD(hold) SAVE(save) SPLFNAME(splfname) CTLCHAR(*FCFC)
? CPYF FROMFILE(library/file) TOFILE(prtf)


SNDNETSPLF can be used if SNA Distribution Services is configured. This is what option 1=Send does from a WRKSPLF list.

More often nowadays, SNDTCPSPLF can be used to copy a spooled file to an output queue on another AS/400. The receiving system needs to have the proper server started – STRTCPSVR *LPD — in order to get the request across. The command can also send spooled files to other kinds of systems including PCs.

If automation is needed, remote output queues work through the same LPR/LPD protocol that is used by SNDTCPSPLF.


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.
  • Ashnirody
    Have you tried Send Network Spooled File (SNDNETSPLF). If your AS/400?s are on the same network and you are enrolled in the directories you can use this command easily. Conversely, you can access this command by a WRKSPLF and option 1 next to the file you wish to transfer. Required parameters are USERID and ADDRESS.
    100 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: