We were sending files to an FTP server daily. The files were numbered
sequentially ( Fil001, Fil002,Fil003, ...)
What I did was run a sql update statement against the script file:
update script set text = "put localfile remotefile" where text like "put%"
Then run the ftp session against the script.
Worked for me.
Jim Mattheiss
Kevin wrote in message ...
You may need to use an RPG/ SQL program to build your ftp commands file in
qtemp (for this job) - he's the guy you give the parameter to.
Regards,
Bryan
"Kevin" <kemd...@bellsouth.net> wrote in message
news:Cpnn5.13110$KD1....@news1.atl...
-Kevin
Bryan Douglas-Henry wrote in message <8nqel5$jqs$1...@ctb-nnrp2.saix.net>...
Yup - build it on the fly - using a CMD to input the parameters, which will
then use a CL to build a work file in QTEMP, do the overrides and call the
RPG program to populate the work file.
OVRDBF FILE(INPUT) TOFILE(QTEMP/FTPINP) MBR(*FIRST)
OVRDBF FILE(OUTPUT) TOFILE(QTEMP/FTPOUT) MBR(*FIRST)
CALL PGM(RPGPGM) PARM(&USRPWD &CMD &FULLFILE +
&LIB &DIR)
STRTCPFTP RMTSYS(&SERVER) /* <== This line does the actual FTP */
You can then call another RPG to read QTEMP/FTPOUT to check the FTP job went
through ok.
Here's my QRPGSRC member - I pass 5 parameters to him (using a cmd and cl
front-end)
File FTPINP has one field called FTPDTA - 60 long.
FFTPINP O E DISK
C *ENTRY PLIST
C PARM USRPWD 20
C PARM CMD 10
C PARM FILE 43
C PARM LIB 10
C PARM DIR 20
* WRITE USER & PWD
C MOVE *BLANKS FTPDTA
C MOVELUSRPWD FTPDTA
C WRITEFTPFIL
* CHANGE DIRECTORY
C DIR IFNE *BLANK
C MOVE *BLANKS FTPDTA
C MOVEL'cd ' TXT3 3
C TXT3 CAT DIR FTPDTA
C WRITEFTPFIL
C END
* CHANGE LOCAL DIRECTORY
C MOVE *BLANKS FTPDTA
C MOVEL'lcd ' TXT4 4
C TXT4 CAT LIB FTPDTA
C WRITEFTPFIL
* PUT/ GET FILE
C MOVE *BLANKS FTPDTA
C MOVELCMD TXT10 10
C TXT10 CAT FILE FTPDTA
C WRITEFTPFIL
C SETON LR
--
Regards,
Bryan Douglas-Henry
br...@mediscor.co.za
Send your spam to: rhu...@fcc.gov jqu...@fcc.gov sn...@fcc.gov
rch...@fcc.gov
"Kevin" <kemd...@bellsouth.net> wrote in message
news:7kko5.3616$Ez6....@news3.atl...
> So you are basically saying I have to build my ftp script on the fly?
More
> work than I was hoping for but I guess it will have to do. Thanks for the
> help.
>
> -Kevin
>
>
> Bryan Douglas-Henry wrote in message <8nqel5$jqs$1...@ctb-nnrp2.saix.net>...
mf