Previous topic |
Next topic |
Contact z/OS |
Submitting FTP requests in batch
z/OS Communications Server: IP User's Guide and Commands
FTP is usually run interactively by starting and entering commands from your terminal. You can also run FTP as a batch job, but you must supply the JCL file. You can use batch when you know what functions you want to perform, when you want a hardcopy of the results, or when you want to perform an FTP function many times.
Rules: When coding the data set, file, or input stream for the ddname INPUT statement as described in Figure 1, the following rules apply:
See Logging in to FTP, and each subcommand that you code in your batch job for additional information.
Figure 1 shows an example of the JCL required to submit a batch job by referring to data sets for input and output.
Figure 1. JCL to run FTP in batch using data sets
As shown in Figure 1, to run FTP in batch mode, you must include the following three DD statements:
You can use the user_id.NETRC data set, as defined by the NETRC DD statement in Figure 1, to provide user ID, password or password phrase, and account information for a batch-processed remote login. You can also specify the user ID, password or password phrase, and account information in the INPUT DD data set.
Figure 2 shows the records in an INPUT DD data set that contains the FTP subcommands to be executed.
Figure 2. Contents of an INPUT DD data set
The first line of Figure 2 contains the name of the remote host that you want FTP to log into. The second line contains the user ID followed by its password. The next three lines contain the FTP subcommands that you want FTP to perform. In this example,
Any client messages and server replies to the subcommands you execute appear in the OUTPUT DD data set. The SYSPRINT can contain some additional messages that relate to the execution of your FTP session.
Tip: If you do not want your password or password phrase to be copied to the output file, specify your user ID, and password or password phrase on separate input lines. See Figure 1 for an example.
Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).