Q

Copying a physical file back to a spool file

ISeries expert Ken Graap explains how to copy a physical file back to a spool file.

You can use the CPYSPLF (Copy Spool File) command to copy a spool file to a physical file. How do you copy it back...

to a spool file?

The basic commands to copy a spool file to a database file and back again are as follows:

1. Create a physical file large enough to hold the data and the format control character
CRTPF FILE(QTEMP/TEST) RCDLEN(133)

2. Copy the spool file into this file along with the format control characters
CPYSPLF FILE(QPRINT) TOFILE(QTEMP/TEST) JOB(123456/User/Jobn) SPLNBR(1) CTLCHAR(*FCFC)

3. To create a spool file again, use the CPYF command
CPYF FROMFILE(QTEMP/TEST) TOFILE(QSYSPRT)

When this spool file is sent to a printer, the printer will recognize the data in Column 1 as format control characters and print the file correctly.

This was last published in April 2008

Dig Deeper on Data backup, storage and retrieval on iSeries

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close