The FTP input file must contain all the FTP client subcommands necessary to connect and log on to the FTP server, set up and complete the file transfers, close the connection, and end the client session. This example shows the subcommands used for transferring files to two different remote systems.
By using the code examples, you agree to the terms of the Code license and disclaimer information.
Columns . . . : 1 71 Browse GERRYLIB/QCLSRC SEU==> FTPCMDS FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5...+... 6 ...+... 7 *************** Beginning of data************************************* 0001.00 gwil **** 0002.00 close 0003.00 open sysnamrs 0004.00 user root root 0005.00 ascii 0006.00 syscmd dltf file(gerrylib/rs6) 0007.00 get /Itsotest gerrylib/rs6.rs6 0008.00 close 0009.00 open mvax 0010.00 user tester tester 0011.00 get screen1.file gerrylib/vax.vax (replace 0012.00 close 0013.00 open sysnam02 0014.00 user gwil **** 0015.00 ebcdic 0016.00 put gerrylib/rs6.rs6 gerrylib/rs6.rs6 0017.00 quote rcmd sndnetf file(gerrylib/rs6) tousrid((gwilsysnam14)) 0018.00 close 0019.00 quit ****************** End of data**************************************** F3=Exit F5=Refresh F9=Retrieve F10=Cursor F12=Cancel F16=Repeat find F24=More keys
The following explanation can help you to understand the FTP client subcommands shown in Figure 1. The line numbers on the display correspond to the numbers that follow.
When running FTP in batch mode, the USER subcommand must follow an OPEN subcommand. Both the logon user ID and password parameters for the USER subcommand should be provided. This is different when operating FTP interactively online. When FTP is run interactively online, and then the client will automatically initiate a USER subcommand and prompt you for a logon ID. There is no automatic USER subcommand when running FTP in batch mode.