We ftp files in batch on a regular basis. We do it through the use of source files to get the actual commands to run. I am attaching the CL and the source file we use to do this as an example.
OVRDBF FILE(INPUT) TOFILE(FABRICLIB/QTXTSRC) +
OVRDBF FILE(OUTPUT) TOFILE(FABRICLIB/QTXTSRC) +
FTP RMTSYS(FTP.INTFABGRP.COM) /* SEND FILES TO +
THE FTP SERVER */
The input source file contains the following
PUT FABGPL/MAHRECVP MAHRECVP.TXT
The top 2 lines are the user id and password. The output source file contains the ftp log so you can view any errors etc. Hope this helps.