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

Using FTP to Copy Spool Files to a PC

The following procedure describes the steps to copy an AS/400 spool file (print file) to a PC using File Transfer Protocol (FTP).

  1. On the AS/400, create an empty physical file using the following command
  2. 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

  3. Locate the spool file to copy using the following command.
  4. WRKSPLF

  5. When you find the file, press F10 to see the job details of the spool file.
  6. Copy the spool file to the physical file you created in step 1 using the following command.
  7. 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

  8. Wait for a message indicating that everything worked correctly. Verify using the following command.
  9. DSPPFM FILE(NAME/SPLF)

  10. Go to the destination location on the PC by using the MS DOS shell.
  11. Copy the file from your AS/400 to the PC using one of the following FTP commands.
  12. FTP (AS/400 IP-Address) or FTP (AS/400 Name)

  13. Type your login and password when prompted.
  14. Type ascii to make sure that you are in ASCII mode. You need to be in ASCII mode to guarantee that the data will be converted from EBCDIC (AS/400) to ASCII (PC) when you transfer the file.
  15. Note: FTP commands are all lowercase.

  16. Type cd name to go to your library.
  17. Type get splf.splf to download the file.
  18. Note: The syntax in FTP for downloading data from the AS/400 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.

  19. Remove the physical file from the AS/400 after transferring it to your PC using the following command.
  20. DLTF FILE(NAME/SPLF)

  21. Use the file on your PC. You can view it, attach it to e-mail, import it to a database, and so forth.

Updated July 2, 1999