Here is one example that might help you…goode luck!!
On the AS/400 create a flat physical file. This file will contain the User ID and Password to sign for the system, the FTP command will be executed. This file will also contain the FTP commands (PUT, GET..).
Example Flat File Containing the FTP Commands
put Library/File Library/File
Replace the USERID and PASSWORD in the example file with a valid User ID and Password for the system the FTP will be executing to.
Now to execute the FTP file defined above in a batch job, you need to override the file created above to a file name of INPUT. Then all you need to do is execute FTP with the System Name or IP Address.
Example CL Commands to Execute the FTP
OVRDBF FILE(INPUT) TOFILE(FILECREATEDABOVE)