IBM Support

Copying a Spooled File to a Document

Troubleshooting


Problem

This document contains the steps to copy a spooled file into a document.

Resolving The Problem

To copy a spooled file into a document, you should do the following:

1.

On the operating system command line, type the following:

WRKSPLF

Press the Enter key.
2.A list of all spooled files waiting to be printed is shown. Find the one you want to put into a document (you can use Option 5 = Display to ensure that you have selected the correct spooled file). When you have found the correct file, select Option 3 = Hold to place this file on hold.
3.Press F10 = View 3, and make note of the following information:

File:
File Number:
Job:
User:
Number:
4.On the operating system command line, type the following:

CRTPF

Press F4 to prompt.
5.Type a file name and the name of a library to store the file in. Set Record Length, if no DDS to 75. Press the Enter key.
6.On an operating system command line, type the following:

CPYSPLF

Press F4 to prompt.
7.For Spooled file, type the file name from Step 1 above. For To data base file and Library, type the file and library names from Step 2 above. For Job name, User, and Number, type the job name, user, and number from Step 1 above. For Spooled file number, type the file number from Step 1 above. Press the Enter key.
8.On the operating system command line, type the following:

WRKQRY

Press the Enter key.
9.Select Option 2 to revise a query named HPSDATA in library QS36F, and press the Enter key.
10.On the Define Query screen, type 1 next to Specify file selection, and press the Enter key. For File name and Library, type the file and library names from Step 2 above, and press the Enter key two times to confirm the file specified. Press F3 to end, save, and run the query.
11.On the operating system command line, type the following:

CRTPF

Press F4 to prompt.
12.Type a new file name and the name of a library to store the file in. Set Record Length, if no DDS to 75. Change File Type to *SRC. Press the Enter key.
13.On the operating system command line, type the following:

CPYF

Press F4 to prompt.
14.For From file and Library type SAMPLE.1 for the file and IDHRLIBR for the library name. For To file and Library, type the file and library names from Step 5 above. Change Replace or add records to *REPLACE. Press F10 = Additional parameters, and page down four times. Change Record format field mapping to *CVTSRC. Press the Enter key.
15.Create a document (or revise an existing document). Press F5 , type dl, and press the Enter key. In the Line spacing/Justification screen, for Adjust line ending, specify N. Press the Enter key. Press F14 = Get. For File and Library, type the file and library names from Step 6 above. Complete as follows:
-- For Member, type: *FIRST
-- For Get Option (to get the screen directly into the document, type: 1

Press the Enter key. Now that the data is in the document, the data names must be added to the top of this fill-in document.
16.If you do not need to put this same spooled file into another document, delete both of the files you created (in Steps 2 and 4 above). To delete both files, type DLTF on a command line, press F4 = Prompt, and type the file and library names.
17.Repeat this process for each spooled file you want to put into a document.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

15775427

Document Information

Modified date:
18 December 2019

UID

nas8N1018078