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).
- On the AS/400, create an empty physical file using the following command
- Locate the spool file to copy using the following command.
- When you find the file, press F10 to see the job details of the spool file.
- Copy the spool file to the physical file you created in step 1 using the following command.
- Wait for a message indicating that everything worked correctly. Verify using the following command.
- Go to the destination location on the PC by using the MS DOS shell.
- Copy the file from your AS/400 to the PC using one of the following FTP commands.
- Type your login and password when prompted.
- 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.
- Type cd name to go to your library.
- Type get splf.splf to download the file.
- Remove the physical file from the AS/400 after transferring it to your PC using the following command.
- Use the file on your PC. You can view it, attach it to e-mail, import it to a database, and so forth.
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
WRKSPLF
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
DSPPFM FILE(NAME/SPLF)
FTP (AS/400 IP-Address) or FTP (AS/400 Name)
Note: FTP commands are all lowercase.
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.
DLTF FILE(NAME/SPLF)
Updated July 2, 1999




