First create two source files.
You can name them whatever you want. I use FTPINPUT & FTPOUTPUT
Create a member in FTPINPUT. Enter all information that you would normally have to key in if you did the FTP interactively. From your USRPRF to the QUIT command
In a CL program you would need these statements:
OVRDBF File(Input) Tofile(FTPINPUT) MBR(your member)
OVRDBF File(Output) Tofile(FTPOUTPUT) MBR(your member)
FTP xxxxx Where xxxx is the target of your FTP process
once completed, file FTPOUTPUT will contain a log of the FTP process