Return to the FTP Tips
Transferring savefiles between AS/400s with FTP.
Contrary to popular belief,this task does not require you to first create an empty save file on the target AS/400. When you use FTP to transfer save files between AS/400s the same target release rules apply as if you were transferring the save file over tape. To transfer a save file with FTP:
1. Create the save file (being mindful of the target release) 2. Start FTP on the client machine 3. Start FTP by using the command FTP 'xxx.xxx.xxx.xxx' sign in with a valid password and user ID. 4. Issue the FTP commands: BINARY NAMEFMT 1 PUT /qsyslib.lib/fromlib.lib/fromsavef.savf/qsyslib.lib/tolib.lib/tosavef.savfThis step puts FTP in binary mode, sets NAMEFMT to 1 and then uses the PUT command to put the save file on the remote computer. Note the use of the .SAVF suffix is very important here. Used in this fashion, the target save file does not need to exist on the target AS/400.
Simple file copy. To copy a single file from one AS/400 to another, you can skip the save file step. After starting and signing into FTP, use these FTP commands to copy a single file between AS/400s (this only works between AS/400s, not foreign computers):
NAMEFMT 0 EBCDIC MODE B PUT fromlib/fromfile.frommbr tofile.tombrThis step sets NAMEFMT to 0, sets file transfer type to EBCDIC (because both computers in this case are EBCDIC), specifies block mode (for slightly faster performance) and then also uses PUT to actually perform the transfer. To copy multiple members, investigate the MPUT and MGET FTP commands.
Using FTP on Multiple Members
ftp> mget qgpl/qrpgsrcFTP will prompt you to download each member in the file QRPGSRC in QGPL.
Each member will be a separate file in your download directory.
MGET will work in batch if you include a PROMPT command before the MGET.
This turns prompting off and all members in the source library will be downloaded.
Ftp from IFS to PC
open 1.1.1.1 // your as400 user user-name // your user id pass password // your password binary cd /home get ifs-file pc-file quit
[report a broken link by clicking here]