I am working on a CL program to move source code around from DEV to PROD. I want to create a backup of current stuff 'just in case'
So I wrote a cl program to put the names of the programs I want to save into a parm. When I run the SAVOBJ command, it puts a single quote at the start which causes it to fail.
SAVOBJ OBJ(&PGMLIST) LIB(&FROMLIB) DEV(*SAVF) +
SAVF(&SAVEFILE)
here is the job log. First SAVOBJ is if I write the list out manually and it works as expected. Second SAVOBJ uses the cl parm (as listed above) and fails. It seems to be trying to chunk it into 10 character parms.
I am not sure how the quotes are getting in there, let alone how to remove them.
7800 - SAVOBJ OBJ(LOB20CP LOB20M1 LOB20M2 LOB20V1 LOB20V2 LOB20V3
LOB20V4 LOB20FM VERSION) LIB(LSILIB) DEV(*SAVF) SAVF(SLIT122320)
9 objects saved from library LSILIB.
8200 - SAVOBJ OBJ('LOB20CP LOB20M1 LOB20M2 LOB20V1 LOB20V2 LOB20V3
LOB20V4 LOB20FM VERSION') LIB(LSILIB) DEV(*SAVF) SAVF(SLIT122320)
Value 'LOB20CP LO' for OBJ not a name or generic name.
I am using %trim to remove a leading blank, but it failed either with or without the leading blank.
oh yeah, here is the parm DCL &PGMLIST *CHAR 500
So I wrote a cl program to put the names of the programs I want to save into a parm. When I run the SAVOBJ command, it puts a single quote at the start which causes it to fail.
SAVOBJ OBJ(&PGMLIST) LIB(&FROMLIB) DEV(*SAVF) +
SAVF(&SAVEFILE)
here is the job log. First SAVOBJ is if I write the list out manually and it works as expected. Second SAVOBJ uses the cl parm (as listed above) and fails. It seems to be trying to chunk it into 10 character parms.
I am not sure how the quotes are getting in there, let alone how to remove them.
7800 - SAVOBJ OBJ(LOB20CP LOB20M1 LOB20M2 LOB20V1 LOB20V2 LOB20V3
LOB20V4 LOB20FM VERSION) LIB(LSILIB) DEV(*SAVF) SAVF(SLIT122320)
9 objects saved from library LSILIB.
8200 - SAVOBJ OBJ('LOB20CP LOB20M1 LOB20M2 LOB20V1 LOB20V2 LOB20V3
LOB20V4 LOB20FM VERSION') LIB(LSILIB) DEV(*SAVF) SAVF(SLIT122320)
Value 'LOB20CP LO' for OBJ not a name or generic name.
I am using %trim to remove a leading blank, but it failed either with or without the leading blank.
oh yeah, here is the parm DCL &PGMLIST *CHAR 500
Comment