On 04/18/2012 08:46 AM, Paul Gilmartin wrote:
On Wed, 18 Apr 2012 09:30:59 -0400, Veilleux, Jon L wrote:
According to the JCL manual that won't work:
The following keywords are the only keywords supported by IBM and recommended
for use in relational-expressions. Any other keywords, even if accepted by the
system, are not intended or supported keywords. Also you need to change DNS to
DSN....
...
You will have to get more creative. Perhaps pass a parm that causes an abend in
a first step?
Or contrive a JCL symbol that evaluates to one of the supported forms.
-- gil
The syntax as "formally" described in the JCL Reference (z/OS 1.12) is
demonstrably incomplete just based on the supplied examples. Something like
// IF (&SYM = value) THEN
is clearly valid by the manual's description if &SYM has a numeric value
and "value" is also some numeric constant or if "&SYM" resolves to a
legal keyword value for which "value" is compatible, as legal operands
are described as keywords or numeric values, and "&SYM" in this context
would not be a keyword but simply whatever value replaces it.
But, in their own examples IBM uses as valid constant values things
like "Unnn", "Snnn", "TRUE", "FALSE", none of which are described as
keywords and which clearly are not numeric in the normal sense of the
word! Obviously some special alphanumeric constants are acceptable,
which begs the question why other arbitrary alphanumeric constants that
can't be confused with keywords should not be explicitly allowed as
operands as well. (Maybe they work even though undocumented, but usage
in that case would be risky!)
If the relational expressions directly supported by JCL are found too
restrictive, one could always write a fairly trivial utility (perhaps
CBT site already has one) that would accept as a PARM value or an input
record a more general relational expression (which could include
parameter references) with syntax that fully supports character string
comparison and produces a 0|1 (false|true) step condition code that
could be tested by subsequent conditional JCL statements. Such a
utility could even be generalized to allow conditional setting of
arbitrary step completion codes or even conditionally ABENDing with some
user ABEND code.
--
Joel C. Ewing, Bentonville, AR jcew...@acm.org
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN