Help/Systems SEQUEL Software PowerTech Skybot Software
Help/Systems
The World's Leader in IBM iSeries Software Solutions

Retrieving a Spooled File from the iSeries to a Client

Before You Begin

When you need to retrieve a spooled file from the iSeries to a client, you have the option of using one of two methods.

  • Using IBM Operations Navigator
  • Using FTP to transfer the file to the PC

Retrieving a Spooled File

Use one of the following methods to retrieve a spooled file from your iSeries.

Method 1

The easiest method is to use IBM’s Operations Navigator, which is part of the IBM Client Access package.

Using Operations Navigator, select your iSeries system on the My Connections pane on the left. Select Basic Operations, and then select Printer Output.

Operations Navigator lists the spooled files assigned to your iSeries user profile.

To copy a spooled file to your client (in this case, a PC running Microsoft Windows), select the spooled file from the Printer Output display in the right pane and drag it to your desktop. Operations Navigator copies the spooled file to your desktop and creates a text file of the same name.

Method 2

In the second method, you must copy the spooled file to a physical file and then use FTP to retrieve and rename the physical file from the iSeries to a text file on your client machine.

On the iSeries

  1. Before you start, you need to obtain the spooled file attributes of the file you want to retrieve. Use the WRKSPLF command to display a list of spooled files assigned to your iSeries user profile.
  2. Enter option 8, Attributes, next to the file name to display the Work with Spooled File Attributes panel. Make a note of the Job, User, and Number fields in the upper left corner of the panel. You will need this information later.
  3. At an iSeries command line, enter the following command:
  4. CRTPF FILE(<your_iseries_lib_name>/<name_of_file>) RCDLEN(132)

    where:

    <your_iSeries_lib_name> is a library of your choosing (not QTEMP) and <name_of_file> is a file name of your choosing.

    Note: There is no DDS source to use to create this physical file, so specify a record length of 132.

  5. After you create the physical file, enter the following command to copy the contents of the iSeries spooled file to the newly created physical file:
  6. CPYSPLF FILE(<spooled_file_name>) TOFILE(<your_iSeries_lib_name>/<name_of_file>) JOB (<job_number>/<user_profile>/<job_name>)

    where:

    <spooled_file_name> is the name of the spooled file,

    <your_iSeries_lib_name> and <name_of_file> are the library and file names you selected when you created the physical file

    <job_number>, <user_profile>, and <job_name> are the values you copied from the Work with Spooled File Attributes panel.

  7. When the CPYSPLF command comp

On the Client

  1. Create a folder to hold the text file after it is transferred from the iSeries.
  2. Use FTP to connect to the iSeries.
  3. At the FTP prompt, use the following command to change to the iSeries library that contains the physical file:
  4. CD <your_iSeries_lib_name>

    FTP should respond by telling you the directory was changed to the iSeries library.

  5. Enter the following command at the FTP prompt:
  6. LCD

    FTP responds by showing your local working directory. This is the folder/directory where FTP will place the spooled file when it is transferred to your local client.

  7. Enter the following command at the FTP prompt:
  8. GET <name_of_file> new_text_file_name.TXT>

    where new_text_file_name is the name you want the file to have on your client.

    FTP will transfer the physical file from your iSeries and rename it to a text file on your local client. You then can view it using a text file utility, such as Notepad.

Updated April 28, 2003