How To Guide

Using a Local Client to Retrieve a Spooled File from an IBM i

Last Updated:
August 25, 2016

Before You Begin

When you need to use your local client to retrieve a spooled file from your IBM i, you have three options. You can:

  • Use the Robot Schedule Explorer (the graphical user interface)
  • Use the IBM System i Navigator (or iSeries Navigator).
  • Use FTP to transfer the file to the PC.

Retrieving a Spooled File

Use one of the following three methods to retrieve a spooled file from your IBM i.

Method 1

The easiest method is to use Robot Schedule Explorer.

  1. Connect to the system where the printer output exists.

  2. On the Explorer toolbar, click the icon for Work with a list of spooled files on this system.

    Showing the Robot SCHEDULE Explorer toolbar icon for Working with Spooled Files.

  3. Right-click the spooled file you want to retrieve and select Save selected. You're asked whether or not you wish to save the headers. Select Yes or No. Then, select the location and save the file.

    Showing the right-click menu on the Work with Spooled Files window.


Method 2

Another method is to use IBM’s System i Navigator (or iSeries Navigator), which is part of the IBM Client Access package. Note: Throughout the rest of this topic, we'll use System i Navigator to mean either the System i Navigator or the iSeries Navigator.

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

    Showing the Printer Output in the System i Navigator window.

    In the right-hand pane, the System i Navigator lists the spooled files assigned to your IBM i user profile.

  2. 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. The System i Navigator copies the spooled file to your desktop and creates a text file of the same name.


Method 3

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

On the IBM i

  1. Before you start, you need to obtain the spooled file attributes of the file you want to retrieve. Enter the following command to display a list of spooled files assigned to your Power Systems 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 IBM i command line, enter the following command:

    CRTPF FILE(your_IBMi_lib_name/name_of_file) RCDLEN(132)


    your_IBMi_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.

  4. After you create the physical file, enter the following command to copy the contents of the IBM i spooled file to the newly created physical file:

    CPYSPLF FILE(spooled_file_name) TOFILE(your_IBMi_lib_name/name_of_file)JOB (job_number/user_profile/job_name)


    spooled_file_name is the name of the spooled file.

    your_IBMi_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.

  5. When the CPYSPLF command is completed, follow the steps under "On the Client" below.

On the Client

  1. Create a folder to hold the text file after it is transferred from the IBM i.

  2. Use FTP to connect to the IBM i. At a DOS prompt on your PC, issue the FTP command:

    FTP system_name user_name password

    You can use the IP address instead of the system_name.

  3. At the FTP prompt, enter the following command to change to the IBM i library that contains the physical file:

    CD your_IBMi_lib_name

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

  4. Enter the following command to change the local working directory on your PC. This is the folder/directory where the spooled file will be transferred to your local client.

    LCDdirectory name

  5. Enter the following command to transfer the file:

    GET name_of_file new_text_file_name.txt

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

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