Home > Ask the AS/400 Experts > iSeries i5/OS and OS/400 Questions & Answers > Copying a physical file back to a spool file
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Copying a physical file back to a spool file

Ken Graap EXPERT RESPONSE FROM: Ken Graap

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 03 April 2008
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?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries i5/OS and OS/400
Will overloaded discs impact iSeries performance?
Error CWBCO1049 on AS/400
Recovering from DST QSECOFR password disablement on V5R4
Enrolling a user profile in the i5/OS system distribution directory
How to resolve a CPI93B8 error message: LIC problem data has been logged for #MSTRTNS
Checking if a local port is used by another job on AS/400
Restricting specific user command line access
Print private authorities (PRTPVTAUT) command for user objects in a library with *public exclude
Getting modules to adopt authorities from the main program
See who's browsing secret file records

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


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.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts