The command that allows a file to be transferred between AS/400's using FTP is called GETRMTF.
This command supports "native" LFS (Library File System) or IFS (Integrated File System) types of files. This command pulls the file from a remote machine to the local one.
An example of an AS/400 (LFS) to AS/400 transfer looks like the following:
GET Remote File (GETRMTF)
Type choices, press Enter.
Remote user profile . . . . . . YOURSELF Name, *CURRENT
Remote user password . . . . . . Character value
Remote system . . . . . . . . . SAPTEST_____________________________________
________________________________________________________________________________
________________________________________________________________________________
____________________________________________________
From file type (AS/400 / IFS) . *AS400 *AS400, *IFS
To file type (AS/400 / IFS) . . *AS400 *AS400, *IFS
From file (remote system) . . . YOURFILE Name
Library . . . . . . . . . . . DTALIB Name, *CURLIB
Member . . . . . . . . . . . . *FILENAME Name, *FILENAME, *ALL
To file (local system) . . . . . *FROMFILE Name, *FROMFILE
Library . . . . . . . . . . . DTATST Name, *CURLIB, *FROMFILE
Member . . . . . . . . . . . . *FROMFILE Name, *FROMFILE
Is remote file a save file? . . *NO *YES, *NO
Replace file data . . . . . . . *YES *YES, *NO
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
An example of an IFS to AS/400 (LFS) transfer looks like the following:
GET Remote File (GETRMTF)
Type choices, press Enter.
Remote user profile . . . . . . YOURSELF Name, *CURRENT
Remote user password . . . . . . Character value
Remote system . . . . . . . . . SAPTEST_____________________________________
________________________________________________________________________________
________________________________________________________________________________
____________________________________________________
From file type (AS/400 / IFS) . *IFS *AS400, *IFS
To file type (AS/400 / IFS) . . *AS400 *AS400, *IFS
From file (remote system) . . . '/usr/data/outbox/filename'_________________
____________________________________
To file (local system) . . . . . YOURFILE Name, *FROMFILE
Library . . . . . . . . . . . DTATST Name, *CURLIB, *FROMFILE
Member . . . . . . . . . . . . *FROMFILE Name, *FROMFILE
Is remote file a save file? . . *NO *YES, *NO
Replace file data . . . . . . . *YES *YES, *NO
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
You must also answer the question "Is remote file a save file?" with *YES if the file on the remote system is an AS/400 save file. This is because FTP does not allow the program to retrieve object information on target systems.
You can also specify *NO to not allow the target file data to be replaced if it already exists.