The CL program for batch FTP will look like the following example on system RCHASM01:Ĭolumns. On the operating system command line, type the following: If it is not a real host name, these entries are not required, and the first entry should be an OPEN subcommand to connect to the desired server system.įTP processes the input file and writes messages to the output file (FTPLOG).Īfter the FTP application ends, delete the overrides. If it is a real name, the first entry in the input commands file must be a user ID and a password, and the second entry must be the CLOSE subcommand. This dummy name may be a fictitious host name or a real host name. However, if one wants to specify the remote systems in the input commands file instead of the CL program file, then a dummy host name must be specified for the STRTCPFTP command to satisfy the required syntax. OVRDBF FILE(OUTPUT) TOFILE(GERRYLIB/QCLSRC) +Ī host name or an Internet address is a required parameter for the STRTCPFTP command that is included in the CL program file. ![]() OVRDBF FILE(INPUT) TOFILE(GERRYLIB/QCLSRC) + We use the OVRDBF command to overwrite these files with the ones to be used in batch. To create a CL program to start FTP, do the following:Īs we have seen in the previous example, FTP uses the display station for command INPUT and message OUTPUT, and this needs to be overridden for use in batch mode. Retrieve files from hosts RCHRS001 (RS/6000) and MVAX (VAX).Īfter retrieving the file from RCHRS001, the file should be transferred to RCHASM02 (another IBM iSeries family of servers system) using FTP.įrom there, the file is to be sent using SNA to OS/400 or i5/OS RCHAS149. User GWIL on OS/400 or i5/OS RCHASM03 wants to do the following: The following example shows how to retrieve files from several remote hosts to a central IBM OS/400 or IBM i5/OS system in batch mode:įigure 8-31. FTP error messages have numbers that start with a 4 or 5. It is a straightforward matter to write a program to process this file and display an error message on QSYSOPR message queue if there are any error messages. ![]() > GET QCLSRC.BATCHFTP QCLSRC.BATCHFTP (REPLACEġ50 Retrieving member BATCHFTP in file QCLSRC in library ITSOLIB1.Ģ50 File transfer completed successfully.ġ47 bytes transferred in 0.487 seconds. The Output Messages File (member type should be TXT)Ģ20 Connection will close if idle more than 5 minutes.Ģ15 OS/400 is the remote operating system. The FTP subcommands required are shown in the FTPCMDS file. GET QCLSRC.BATCHFTP QCLSRC.BATCHFTP (REPLACE The Input Commands File (member type should be TXT) The BATCHFTP program overrides the INPUT parameter to the source physical file ITSOLIB2/QCLSRC MBR(FTPCMDS). OVRDBF FILE(OUTPUT) TOFILE(ITSOLIB2/QCLSRC) MBR(OUT) OVRDBF FILE(INPUT) TOFILE(ITSOLIB2/QCLSRC) MBR(FTPCMDS) ![]() The Output Messages File (an output file of FTP messages) - member type should be TXT. The Input Commands File (an input file of FTP commands, MAX record length of 2000) - member type should be TXT. The following is a simple example of a batch file transfer involving the successful transfer of one file from a remote system and the unsuccessful transfer of one file from a remote system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |