× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 ...

Follow-Ups:

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.