Hola a todos:

He le�do los correos anteriores referentes al uso de comandos FTP en CL y me he creado 
el CL anexo.

Al ejecutarlo, llega un momento que me abre la sesi�n de FTP y me pide el usuario y la 
contrase�a, cuando todo lo tengo escrito en un miembro del fichero de texto (lo 
inserto como comentario en el CL).

�Qu� me falta o hago mal?.

Gracias de antemano,

Francisco Rubio Enr�quez
Cibernos Consulting, SAU



-- Disclaimer ------------------------------------
Ce message ainsi que les eventuelles pieces jointes constituent une correspondance 
prive et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si 
vous n'etes pas le destinataire du present message ou une personne susceptible de 
pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou 
copie de cette transmission est strictement interdite. Si vous avez recu ce message 
par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui 
retourner le present message, puis d'effacer immediatement ce message de votre systeme.
***
This e-mail and any attachments is a confidential correspondence intended only for use 
of the individual or entity named above. If you are not the intended recipient or the 
agent responsible for delivering the message to the intended recipient, you are hereby 
notified that any disclosure, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please notify 
the sender by phone or by replying this message, and then delete this message from 
your system.
/* *******************************************************************
/* Este programa CL ejecuta el comando GET contra el AS400/Produccion*
/* *******************************************************************
             PGM                                                      
/* Fichero fuente donde est�n los comandos FTP a ejecutar */          
             DCL        VAR(&BIBLIOTE) TYPE(*CHAR) LEN(10)            
/* Biblioteca donde est� el fichero anterior */                       
             DCL        VAR(&FICHERO) TYPE(*CHAR) LEN(10)             
/* Miembro donde est�n los comandos FTP a ejecutar */                 
             DCL        VAR(&COMANDOS) TYPE(*CHAR) LEN(10)            
/* Direcci�n IP del AS/400 remoto */                                  
             DCL        VAR(&DIRECCIP) TYPE(*CHAR) LEN(20)            
                                                                      
/* Rellenamos las variables */                                        
                                                                      
              CHGVAR     VAR(&BIBLIOTE) VALUE('PS00221')              
              CHGVAR     VAR(&FICHERO)  VALUE('QFTPSRC')              
              CHGVAR     VAR(&COMANDOS) VALUE('FTPGET')               
              CHGVAR     VAR(&DIRECCIP) VALUE('138.21.179.77')        

/* Leemos los comandos FTP */                                      
/* Esto es lo que tiene el miembro fuente: */                      
                                                                   
/* USER USUARIO CONTRASE                              */           
/* BINARY                                             */           
/* GET PS00221/FICHEROFTP PS00221/FICHEROFTP (REPLACE */           
/* QUIT                                               */           
                                                                   
             OVRDBF     FILE(ENTRADA) TOFILE(&BIBLIOTE/&FICHERO) + 
                          MBR(&COMANDOS)                           
                                                                   
/*  Salida (LOG) de los comandos */                                
                                                                   
             OVRDBF     FILE(SALIDA) TOFILE(&BIBLIOTE/QLOGFTP) +   
                          MBR(FTPLOG)                              
/*           CLRPFM     FILE(&BIBLIOTE/QLOGFTP) MBR(FTPLOG) */     
                                                                   
/* Arrancamos FTP */                                               
                                                                   
             FTP        RMTSYS(&DIRECCIP) 
/* */                                               
                                                    
             DLTOVR     FILE(ENTRADA SALIDA)        
                                                    
             ENDPGM                                                         
                                                                   
                                                                      

Responder a