The following procedure describes how to copy a IBM i spool file (print file) to a PC using File Transfer Protocol (FTP).

  1. On the IBM i, create an empty physical file using the following command:

    CRTPF FILE(NAME/SPLF) RCDLEN(132)

    where:

    NAME can be your personal library.

    Record length (RCDLEN) is 132 to allow enough room for the spool file records.

  2. Locate the spool file to copy using the following command:

    WRKSPLF

  3. When you find the file, press F10 to see the job details of the spool file.

  4. Copy the spool file to the physical file you created in step 1 using the following command:

    CPYSPLF FILE(PRTFPROMOT) TOFILE(NAME/SPLF) JOB(034025/NAME/ACMSPROMOT)

    where:

    PRTFPROMOT is the spool file in our example.

    JOB(number/user name/job name) is your job number, user name, and job name.

  5. Wait for a message indicating that everything worked correctly. Verify using the following command:

    DSPPFM FILE(NAME/SPLF)

  6. Go to the destination location on the PC by using the MS DOS shell.

  7. Copy the file from your IBM i to the PC by entering one of the following FTP commands:

    ftp (powersystems_ip_address)
    ftp (powersystems_name)

    Note: FTP commands are all lowercase.

  8. Type your login and password when prompted.

  9. Type ascii to make sure that you're in ASCII mode. You need to be in ASCII mode to guarantee that the data will be converted from EBCDIC (Power Systems) to ASCII (PC) when you transfer the file.

  10. Type cd name to go to your library.

  11. Type get splf.splf to download the file.

    Note: The syntax in FTP for downloading data from the IBM i is {filname}.{membername}. Since we created an empty physical file and used *FIRST (the default) for the membername when we copied the spool file, membername and filename are the same.

  12. Remove the physical file from the IBM i after transferring it to your PC using the following command:

    DLTF FILE(NAME/SPLF)

  13. Use the file on your PC. You can view it, attach it to email, import it to a database, and so forth.

 


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: March 08, 2018