Copying Spoolfiles

pts.
Tags:
Application development
Backup & recovery
DataCenter
RPG
RPGLE
Security
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.

Tom

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following