So hab ich es mal gemacht.
Hoffe das hilft dir etwas weiter.
(Ist nicht perfekt aber fürn start sicher gut genug )
Code:
/Free                                                                     
                                                                          
   // Log erstellen                                                       
   Exec SQL Create Table qtemp/Ftp_Output                                 
                  (Feld1 Char (1024) Not Null With Default '');           
   Exec SQL Delete From Ftp_Output;                                       
                                                                          
   // Liste erstellen                                                     
   Exec SQL Create Table qtemp/Ftp_Liste                                  
                  (Feld1 Char (1024) Not Null With Default '',            
                   Feld2 Char (1024) Not Null With Default '',            
                   Status Char (2)   Not Null With Default 'OK');         
   Exec SQL Delete From Ftp_Liste;                                        
                                                                          
   // FTP-Befehle erstellen                                               
   Exec SQL Create Table qtemp/Ftp_Input                                  
                  (Feld1 Char (1024) Not Null With Default '');           
   Exec SQL Delete From Ftp_Input;                                        
                                                                          
   Exec SQL Insert Into Ftp_Input (Feld1) Values ('blalba');
  
/End-Free
Code:
             DLTOVR     FILE(*ALL)
             MONMSG     MSGID(CPF0000)

             OVRDBF     FILE(INPUT) TOFILE(FTP_INPUT) MBR(*FIRST)
             OVRDBF     FILE(OUTPUT) TOFILE(FTP_OUTPUT) MBR(*FIRST)
             OVRDBF     FILE(LSOUTPUT) TOFILE(FTP_LISTE) MBR(*FIRST)

             FTP        RMTSYS(&VSYSTEM) PORT(&VPRT) SECCNN(&VSSL)
lg Andreas