As400 batch FTP

Source: Internet
Author: User
In the SNA network connection, can two AS/400 Ethernet cards be backed up to each other?
Solution: AS/400 FTP provides the batch FTP function. You do not need to enter an FTP sub-command in the FTP interactive environment.

The entire process consists of three parts:

1. clProgram-Samplib/sampfile batchftp
2. FTP sub-command file-samplib/sampfile using FTP
3. Output of FTP command execution result-samplib/sampfile outftp

Example:
CL program:

**************************************** ********************
Samplib/sampfile batchftp:
----------------------
PGM
Ovrdbf file (input) tofile (samplib/sampfile) MBR (batchftp)
Ovrdbf file (output) tofile (samplib/sampfile) MBR (outftp)
FTP rmtsys (sysxxx)
Endpgm
**************************************** ********************

FTP sub-command:

**************************************** ********************
Samplib/sampfile using FTP:
---------------------
Userid Password
CD samplib
Syscmd chgcurlib samplib2
Get qclsrc. batchftp qclsrc. batchftp (replace
Quit
**************************************** ********************

FTP command output:

**************************************** ********************
FTP output redirected to a file
FTP input from overridden File
Connecting to host name sysxxx
At address X. XXX. XX. xxx using port 21.
220-qtcp at sysxxx
220 connection will close if idle more than 5 minutes.
215 OS/400 is the remote operating system.
The TCP/IP version is "v4r1m0"
Enter Login ID (userid ):
> Userid Password
331 enter password.
230 userid logged on.
250 now using naming format "0 ".
257 "qgpl" is current library.
Enter an FTP subcommand.
> Cd samplib
Enter an FTP subcommand.
250 current library changed to samplib.
> Syscmd chgcurlib samplib2
Enter an FTP subcommand.
> Get qclsrc. batchftp qclsrc. batchftp (replace
200 port subcommand request successful.
150 retrieving member batchftp in file qclsrc in library samplib.
250 file transfer completed successfully.
147 bytes transferred in 0.487 seconds. Transfer Rate 0.302 KB/sec.
Enter an FTP subcommand.
> Quit
221 quit subcommand received ed.
**************************************** ********************

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.