yo lo hago asi
DCL VAR(&CAMPO) TYPE(*CHAR) LEN(250)
CRTSRCPF FILE(QTEMP/FTPENV) RCDLEN(262) MBR(ENTRADA)
OVRDBF FILE(INPUT) TOFILE(qtemp/FTPENV) MBR(ENTRADA)
OVRSCOPE(*JOB)
Crea Fisico Fuente temporal */
CHGVAR VAR(&CAMPO) +
VALUE('
')
CHGVAR VAR(&CAMPO) VALUE(&USUARIO *BCAT &PASSW)
CALLPRC PRC(PASARGRB) PARM(&CAMPO)
CHGVAR VAR(&CAMPO) VALUE('BIN')
CALLPRC PRC(PASARGRB) PARM(&CAMPO)
CHGVAR VAR(&CAMPO) VALUE('PUT SBPRU')
CALLPRC PRC(PASARGRB) PARM(&CAMPO)
CHGVAR VAR(&CAMPO) VALUE('CLOS')
CALLPRC PRC(PASARGRB) PARM(&CAMPO)
CHGVAR VAR(&CAMPO) VALUE('QUIT')
CALLPRC PRC(PASARGRB) PARM(&CAMPO)
/* PGM que carga archivo FTPENV temporal */
ADDPFM FILE(qtemp/FTPENV) MBR(SALIDA)
OVRDBF FILE(OUTPUT) TOFILE(qtemp/FTPENV) MBR(SALIDA) +
OVRSCOPE(*JOB)
STRTCPFTP RMTSYS(&WSIP1)
/* Conecta y envia archivo *savf proceso tipo Batch*/
DLTOVR FILE(*ALL) LVL(*JOB)
RMVM FILE(qtemp/FTPENV) MBR(ENTRADA)
RMVM FILE(QTEMP/FTPENV) MBR(SALIDA)
DLTF FILE(qtemp/FTPENV) H DATEDIT(*YMD) FFTPENV O A E DISK RENAME(FTPENV:RFTP) * Record en texto D SRCDS e DS INZ D EXTNAME(ftpenv) D* SRCSEQ 1 6 0 D* SRCDAT 7 12 0 D* SRCDTA 13 152 * Parametros de entradas C *ENTRY PLIST C PARM campo 250 * grabar en fichero C MOVEL campo SRCDTA C EXSR WRTSRC C seton lr Pedro Pinedo Hernandez TIPO Programmer/Analyst & AS400 Analista-Programador Departamento de Informática / IT Department tfno.:+34 941 28 60 90 - 941 03 01 39 fax: +34 941 03 01 39 Amcor Flexibles T +34 941 286 090 F +34 941 207 543 www.amcor.com P Antes de imprimir, piensa en el MEDIO AMBIENTE P From: [email protected] To: "Foro AS/400" <[email protected]> Date: 23/02/2010 11:34 Subject: Ejecutar mandatos FTP Hola a todos. Para enviar un archivo por FTP a un servidor he creado un miembro con los mandatos a ejecutar algo como esto: USUARIO CONTRASEÑA ASCII PUT BIBLITECA/ARCHIVO RUTA_SERVIDOR/FICHERO QUIT El tema es que el nombre del fichero es variable ¿Alguien me puede decir cómo podría pasar ese nombre como un parámetro? Gracias de antemano. Emma Bedoya ____________________________________________________ © Publicaciones Help400, S.L. - Todos los derechos reservados http://www.help400.es ---------------------------------------------------- Para darte de baja visita la siguente URL: http://listas.combios.es/mailman/listinfo/forum.help400 ______________________________________________________ Amcor - Creating a new world of packaging ______________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Amcor immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Amcor .
<<image/gif>>
____________________________________________________ © Publicaciones Help400, S.L. - Todos los derechos reservados http://www.help400.es ---------------------------------------------------- Para darte de baja visita la siguente URL: http://listas.combios.es/mailman/listinfo/forum.help400

