Maybe you want to specify ''''
I think you must repeat (aka "escape") the single quote to
"tell" CL you want to "have" a single quote character.

Maybe easier to define a variable, much less grief

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Friday, November 08, 2013 12:47 PM
To: Midrange Systems Technical Discussion
Subject: battle with CL quotes

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 ______________________________________________________________________
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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.