•
Keyword
parameters
(These
need
not
be
specified
on
the
EXEC
statement)
•
Here
is
the
procedure
statement
for
a
CLIST
data
set
called
PR2:
PROC
0
KEY1
KEY2()
KEY3(10)
(The
zero
indicates
there
are
no
positional
parameters)
Figure
14.1
describes
the
results
of
substitution
within
the
command
procedure:
r------------------------------------------TT--------------------------,
I
EXEC
COMMAND
II
VALUES
SUBSTITUTED
FOR
I
I
ENTERED
AT
TERMINAL I I
&KEY1
&KEY2
&KEY3
I
.------------------------------------------ft--------.--------T--------~
I
exec
pr2
I I
null
I
null
I
10
I
I
II
string
I
string
I I
.------------------------------------------++--------1--------+--------~
I
exec
pr2
'key1
key
2
key3'
II
KEY1
I
null
I
null
I
I
II
I
string
I
string
I
.------------------------------------------+t--------1--------+--------~
I
exec
pr2
'key1(8)
key2(input)
key3
(5)'
II
(not
I INPUT I 5 I
I I I
va
lid)
I I I
l.
__________________________________________
.J..J.
________
-'--
_______
.J.
________
J
Figure
14.1.
substitution
Using
Keyword
Parameters
TESTING CONDITIONS
FOR
TERMINATION
The
programs
invoked
with
a CALL
or
LOADGO
command
can
issue
a
return
code
(a
number)
to
indicate
its
relative
"success".
The
return
codes
of
IBM-supplied
programs
are
listed
in
the
publications
associated
with
the
program.
Only
those
user
progr
ams
wr
i
tten
in
the
asserobler
language
or
PL/I
can
issue
return
codes.
(For
description
of
how
to
issue
return
codes,
see
Assembler
F
Programmer's
Guide
and
PL/I
(F)
Programmer's
Guide.)
User
return
codes
are
usually
standardized
in
each
installation.
You
can
insert
a
WHEN
statement
after
any
CALL
or
LOADGO
command
or
a
processor
(such
as
a
compiler
or
link
editor)
in
the
command
procedure
to
test
its
return
code.
If
the
test
you
request
is
true,
you
have
the
option
of
ending
the
command
procedure
or
of
executing
another
procedure
or
another
command.
If
the
test
you
request
is
not
true,
the
command
procedure
will
continue
its
course.
The
test
is
specified
with
the
SYSRC
operand
of
the
WHEN
statement.
For
example,
assume
that
you
want
to
end
a
procedure
named
proc4
if
a
given
CALL
command
produces
a
return
code
of
8.
Enter
the
following
WHEN
statement
after
the
command
you
want
to
test:
call
'sys1.linklib(ieqcb100)'
'nodeck'
when
sysrc(eq
8)
end
Using
and
Writing
Command
Procedures
85