On 7/29/2014 2:06 PM, Miguel Soltero Diaz wrote:
> Thanks Alan,
> I didn't get any difference. I guess I need to review carefully.
Right, Alan's SAFE() routine gives the same results in cases where you
don't have any problems. The difference it makes is preventing problems
that might be caused by special characters in the strings.
/* Values like these would cause problems: */
thishost = 'oops/ 1 | literal Ow! | specs /--'
crdate = ' record / 1 number n /.'
'PIPE (endchar ?)',
'< AUDIT EXTRCT1',
'| SPECS /'thishost'/ 1' ,
'1-* Next',
'/'crdate'/ Next' ,
'| cons'
SAFE() changes the values to hex notation so they can't accidentally
contain special characters that you're using as delimiters or pipeline
characters.
(Unfortunately, there's no perfectly safe way to represent the null
string. You can't represent it in hex, any special character you choose
to delimit it might be in use as a pipeline character, and any
alphanumeric you choose might form a valid keyword for the stage. The
delimitedstring syntax element does have a STRING keyword, so the form
"STRING XX" should be good for any built-in stage, but there's a risk
that user-written stages might not understand it.)
¬R