Batch FTP from a PC to an AS/400
To automatically transfer files from a PC to an AS/400 in
batch via FTP, first create a file containing FTP subcommands.
For example, to transfer file C:\PCTEST.CSV to file PCTEST
in library MYLIB on AS/400 MYAS400 with user profile MYUSER
and password PASSIT, enter the following directives in a
DOS script file called UPTO:
Then, at the DOS command line, execute the batch process with
the following command:
You can code any valid FTP commands in the script file. Note
that the user ID and password must be stored in the FTP command
file, so be sure to secure that file appropriately.
To automatically transfer files from a PC to an AS/400 in
batch via FTP, first create a file containing FTP subcommands.
For example, to transfer file C:\PCTEST.CSV to file PCTEST
in library MYLIB on AS/400 MYAS400 with user profile MYUSER
and password PASSIT, enter the following directives in a
DOS script file called UPTO:
Code:
open MYAS400 Myuser PASSIT put c:\pctest.csv MYLIB/PCTEST quit
the following command:
Code:
ftp -s:UPTO
You can code any valid FTP commands in the script file. Note
that the user ID and password must be stored in the FTP command
file, so be sure to secure that file appropriately.

