There is currently a limitation in conditional expression
processing that built-in functions with a character result are
only recognized within an expression that is already known to be
of character type.  Whoever wrote the code to handle these
functions added it to the character expression parser, but the
parser for a logical expression normally expects values to be
logical or arithmetic values unless they start with a quote.

This can be worked around by ensuring that the comparison starts
with something which is clearly a character value, for example:

         AIF   ('Flag' EQ SYSATTRP('&FLAG')).GEN_IT
 or
         AIF   (''.SYSATTRP('&FLAG') EQ 'Flag').GEN_IT

I wouldn't use the program type value for this special case.
I feel it is more appropriate to use it as part of a systematic
data typing scheme, for example for debugging tools.  And I feel
that the constraint of needing the definition to precede the
reference is an unnecessary complication.

Jonathan Scott, HLASM
IBM, Hursley

Reply via email to