IBM AS/400 Service


Technical Document



Document Number - 8013247
____________________________________________________________

Functional Area:

Print

Product:

Operating System/400 - OS/400 - PRINT/SPOOL (5716SS1SP)
Operating System/400 - OS/400 - PRINT/SPOOL (5763SS1SP)
Operating System/400 - OS/400 - PRINT/SPOOL (5769SS1SP)

Release:

ALL

Last Update:

11/11/97

____________________________________________________________

TITLE: ... Using CPYSPLF to Re-Create a Spoolfile or Create a PC File


Using CPYSPLF to Re-Create a Spoolfile or Create a PC File

This document shows a couple of uses of the CPYSPLF command including how to re-create a spoolfile with different attributes or how to create a PC file from an existing spoolfile.

The CPYSPLF command does not work on *AFPDS, *IPDS, or spoolfiles with control characters and replace unprintables set to *NO in the spoolfile attributes.

Example I. Re-Creating a Spoolfile with Different Attributes

First thing needed is a database file. This is assuming the spoolfile record length is 132. Remember that the database member uses the first column for a control character to preserve line spacing of the spoolfile. Therefore, make the record length one greater than the largest spoolfile written to the database.

On the OS/400 command line, type the following:

CRTPF library/name RCDLEN(133) MAXMBRS(*NOMAX) +
SIZE(*NOMAX) LVLCHK(*NO)

Then, copy the spoolfile to the database member. The copy command requires the following information: job qualifier, file name, and spoolfile number. This information can be viewed from Option 2 on the WRKSPLF or WRKOUTQ screen. The first five parameters that can not be changed are what you are looking for.

Once you have this information, on the OS/400 command line type the following:

CPYSPLF FILE( ) JOB( ) TOFILE(the_database_file) +
TOMBR(use_splf_name) CTLCHAR(*FCFC)

The spoolfile is now in a database file. You can save to media with the
SAVOBJ command or write back to a spoolfile with different attributes.

Here is an example using the OVRPRTF command to change some attributes. The important attributes are the CTLCHAR and CHLVAL parameters. These preserve the line spacing integrity of the spoolfile.

On the OS/400 command line, type the following:

OVRPRTF QSYSPRT CTLCHAR(*FCFC) CHLVAL(*NORMAL) +
PAGRTT(0) OUTQ(library/outq)

CPYF FROMFILE(pf_from_1.) FROMMBR( ) TOFILE(QSYSPRT)


Example II. Creating a PCFILE from a Spoolfile

Create the database file and use the CPYSPLF command as documented in Example I.

Use the
CPYTOPCD command to copy to a PC file in a Client Access shared folder. The default parameters should work. Or, use the file transfer function in Client Access.

Document Info

Related APARs/PMRs:

Keywords:

____________________________________________________________
IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright (c) 1994, 1995, 1996, 1997 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.