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.
**************************************** ********************