|
Hi,
I need to FTP a file several times a day. This file needs a unique name. I set up a script and I am trying to change the PUT command using SQL in an RPG program. If I put it in debug, the statements look ok, but when I view the script, it has not changed.
This is my code:
D PutWrd C CONST('''PUT''') D Put1 C CONST('PUT V64BPCSPGM/HTZ MTRIndex')
D Put3 C CONST('.CSV') D Udt1 C 'UPDATE V64BPCSUSR/FTPMTRINDX SET + D FTPINPUT = ' D Ware C 'WHERE SUBSTR(FTPINPUT,1,3) = '
C EVAL PutCmd = Put1 + DatTmA + Put3 C EVAL SqlSmt = C Udt1 + PutCmd + Ware + PutWrd C****************************** C/EXEC SQL C+ PREPARE STMT FROM :SQLSMT C/END-EXEC C****************************** C/EXEC SQL C+ EXECUTE STMT C/END-EXEC C******************************
And this is my script:
CD MTR PUT V64BPCSPGM/HTZ MTRINDEX.CSV QUIT
There is a USER line at the beginning. MTRINDEX.CSV should be MTRINDEX20090105091532
Any ideas what I am doing wrong? Thanks!
<===================================================>
Terri Harteau
Felker Brothers Corporation
****************
"Do not follow where the path may lead. Go instead where there is no path and leave a trail." Ralph Waldo Emerson
****************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.