On 11/8/2013 3:17 PM, rob@xxxxxxxxx wrote:
I use this:
CHGVAR VAR(&APOS) VALUE(X'7D')
Of course, this upsets the chest thumpers who say that if you can't figure
out the quotes you've no place programming.
I haven't much of a chest to thump, but thankfully, counting to 2 is not
beyond my very limited capabilities. 'Escaping' delimiters is one of
the earliest things to trip up a programmer. I distinctly recall the
System/3 RPG II manual's example of how to specify a literal like
O'CLOCK, and it looked like this 'O''CLOCK'.
The first delimiter indicates 'here comes a literal'.
The next delimiter is escaped - there are two of them - so this
indicates 'here is an apostrophe'.
The next delimiter indicates 'here ends a literal'.
I'm a simpleton, and so I rely on simplistic things like counting on my
fingers - it's true. In OPs original battle then, I would say something
like this:
CHGVAR VAR(&DEVICE) VALUE('/QSYS.LIB/' +
*TCAT +
&LIBNAME *TCAT '.LIB/' *TCAT &SAVEFILE +
*TCAT '.FILE' || ''')' )
begin literal /qsys.lib end literal
append libname
append begin literal .lib end literal
append savefile
append begin literal .file end literal
append begin literal ') end literal
The final literal is apostrophe, close paren because the quote is
escaped: doubled up, resulting in a single apostrophe.
With respect to the hex value, this may not work in Unicode encoded XML.
--buck
As an Amazon Associate we earn from qualifying purchases.