>          AIF       ('&SYSOPT_CURR_OPTABLE' LT 'Z14').NOEXEC

Comparing OPTABLE names by alphabetical sequence (which is what
this does) is never going to produce reliable results.

For a start, OPTABLE(Z14) is supported (since PH03536) as an
alternative name for OPTABLE(ZS8), but the above test would
consider ZS8 as being a lower hardware level then Z14.

If you want to know whether an instruction is supported by the
selected instruction set, the operation code attribute, for
example O'AGH, is the way to go.  This will of course fail to
allow for users who go with the default of OPTABLE(UNI) and
hence allow new opcodes to be picked up by accident.

If you want to test a HLASM system symbol that may not be
present in the current level, there is a trick which can be
used to give it a "default" value in that case, which is to
initialise it using created symbol syntax:

&(SYSOPT_CURR_OPTABLE) SETC 'OLD'

A subsequent reference by the standard form of the symbol name
will then pick up the system symbol if it exists or the created
symbol if not. This method originally worked by accident, but
the documentation of created SET symbols has been updated to
make this technique official.

Jonathan Scott, HLASM
IBM Hursley, UK

Reply via email to