I'm calling a CL and passing the file name I need to retrieve from the IFS as a parameter.
CALL PGM(MYPROGS/MYCLPROG) +
PARM('/ifsdirctory/thisismyfile')
I can't seem to correctly define the string I need to represent the following statement:
** MYPROGS/MYCLPROG
DCL VAR(&FILEIN) TYPE(*CHAR) LEN(75)
DCL VAR(&STRING) TYPE(*CHAR) LEN(200)
DCL VAR("E) TYPE(*CHAR) LEN(1)
/* Here's what the statement should be: */
CPYFRMIMPF +
FROMSTMF('/ifsdirctory/thisismyfile') +
TOFILE(MYLIB/MYFILE) +
MBROPT(*REPLACE) RCDDLM(*CRLF) +
ERRRCDOPT(*REPLACE) RPLNULLVAL(*FLDDFT)
/*********************************************/
/* here's my latest effort */
CHGVAR VAR("E) VALUE('''')
CHGVAR VAR(&STRING) VALUE(' ')
CHGVAR VAR(&STRING) VALUE('FROMSTMF(')
CHGVAR VAR(&STRING) VALUE(&STRING *CAT "E *CAT +
&FILEIN *CAT "E *CAT ')')
CHGVAR VAR(&STRING) VALUE(&STRING *TCAT +
' TOFILE(BILLIB/EXRUNSUM)' *CAT +
' MBROPT(*REPLACE) RCDDLM(*CRLF)')
/* the result is this: */
....5...10...15...20...25...30...35...40...45...50 ...55...60
1 'FROMSTMF( TOFILE(BILLIB/EXRUNSUM) MBROPT(*REPLACE) RCDDLM(*C'
61 'RLF)'
No matter what I do I can't seem to insert the IFS file name including quotes into &STRING.
Can anyone help? Thanks.
CALL PGM(MYPROGS/MYCLPROG) +
PARM('/ifsdirctory/thisismyfile')
I can't seem to correctly define the string I need to represent the following statement:
** MYPROGS/MYCLPROG
DCL VAR(&FILEIN) TYPE(*CHAR) LEN(75)
DCL VAR(&STRING) TYPE(*CHAR) LEN(200)
DCL VAR("E) TYPE(*CHAR) LEN(1)
/* Here's what the statement should be: */
CPYFRMIMPF +
FROMSTMF('/ifsdirctory/thisismyfile') +
TOFILE(MYLIB/MYFILE) +
MBROPT(*REPLACE) RCDDLM(*CRLF) +
ERRRCDOPT(*REPLACE) RPLNULLVAL(*FLDDFT)
/*********************************************/
/* here's my latest effort */
CHGVAR VAR("E) VALUE('''')
CHGVAR VAR(&STRING) VALUE(' ')
CHGVAR VAR(&STRING) VALUE('FROMSTMF(')
CHGVAR VAR(&STRING) VALUE(&STRING *CAT "E *CAT +
&FILEIN *CAT "E *CAT ')')
CHGVAR VAR(&STRING) VALUE(&STRING *TCAT +
' TOFILE(BILLIB/EXRUNSUM)' *CAT +
' MBROPT(*REPLACE) RCDDLM(*CRLF)')
/* the result is this: */
....5...10...15...20...25...30...35...40...45...50 ...55...60
1 'FROMSTMF( TOFILE(BILLIB/EXRUNSUM) MBROPT(*REPLACE) RCDDLM(*C'
61 'RLF)'
No matter what I do I can't seem to insert the IFS file name including quotes into &STRING.
Can anyone help? Thanks.
Comment