×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Whij so many quotes and closing parenthesis at the end of the first CHGVAR? ''')' Don't see an opening one.

Regards,
Carel Teijgeler

On 8-11-2013 20:46, Stone, Joel wrote:
I am attempting to make a CL pgm with variables to run a SAV command.


CHGVAR VAR(&DEVICE) VALUE('/QSYS.LIB/' +
*TCAT +
&LIBNAME *TCAT '.LIB/' *TCAT &SAVEFILE +
*TCAT '.FILE' || ''')' )
CHGVAR VAR(&OBJPARM2) VALUE('OBJ' || '((' || +
&OBJPARM || ' ' *TCAT ')')

CLRSAVF FILE(&LIBNAME/&SAVEFILE)
chgvar &SavString (&DEVICE || &OBJPARM2)
SAV &SavString
ENDPGM
Here is the resulting error:

3000 - SAV DEV('/QSYS.LIB/PBACKUP.LIB/NRTEST.FILE'')
OBJ((/HOME/CONTRACTS/NATHANTEST3)')
Matching quote not found in path name.
Error found on SAV command.



So I need to remove one of the quotes in the ''.
I try the following after removing two quote marks after the FILE


CHGVAR VAR(&DEVICE) VALUE('/QSYS.LIB/' +
*TCAT +
&LIBNAME *TCAT '.LIB/' *TCAT &SAVEFILE +
*TCAT '.FILE' || ')' )
CHGVAR VAR(&OBJPARM2) VALUE('OBJ' || '((' || +
&OBJPARM || ' ' *TCAT ')')

CLRSAVF FILE(&LIBNAME/&SAVEFILE)
chgvar &SavString (&DEVICE || &OBJPARM2)
SAV &SavString
ENDPGM


2700 - SAV DEV('/QSYS.LIB/PBACKUP.LIB/NRTEST.FILE)
OBJ((/HOME/CONTRACTS/NATHANTEST3)')
Path name too long.
Specified value on DEV parameter not valid.



Now BOTH quotes are gone!! I think I need to end up with ONE quote, but I can only get zero or TWO quotes.

How can I change CHGVAR to result in ONE quote at the end of the DEV string?

Is there a better way to accomplish a variable parm input to the SAV command? This seems klunky for 1980 era, it is really ridiculous that this is so messy in 2013.

Thanks!





______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.