The installation defines the intended content for each of the USERDATA
values. The following examples are intended to provide samples of
the allowable syntax for the USERDATA keyword. The resulting value
(or portions of the value) are enclosed in parentheses to help distinguish
them.
Example 1 //OUTDS1 OUTPUT USERDATA=USERVALUE
In this example, the USERDATA keyword contains a single parameter
value (USERVALUE). Note that the value does not require enclosing
apostrophes, because it contains only characters that are valid without
them.
Example 2 //OUTDS2 OUTPUT USERDATA='Installation data'
In this example, the USERDATA keyword contains a single parameter
value within apostrophes (Installation data).
Example 3 //OUTDS3 OUTPUT USERDATA='LOCALKEY=Installation data'
In this example, the USERDATA keyword contains a single parameter
value within the apostrophes (LOCALKEY=Installation data). The single
parameter value contains a string within the apostrophes that could
be used to identify an installation-defined keyword (LOCALKEY) and
its parameter value (Installation data).
Example 4 //OUTDS4 OUTPUT USERDATA='USERKEY1=User''s value'
In this example, the USERDATA keyword contains a single parameter
value containing a string within the apostrophes that could be used
to identify an installation defined keyword (USERKEY1) and its parameter
value (User's value).
Example 5 //OUTDSA OUTPUT USERDATA=('non-keyword data',
// 'SOMEKEY=Some data',
// 'PARM3=Parm3''s value',
// LASTVALUE)
In this example, the USERDATA keyword contains four parameter values.
- The first parameter value contains a string within the apostrophes
(non-keyword data). An installation can consider this type of parameter
a positional parameter. It is recommended that positional parameters
be clearly indicated by the installation to allow for easier specification,
recognition, and processing.
- The second parameter value contains a string within the apostrophes
that could be used to identify an installation defined keyword (SOMEKEY)
and its parameter value (Some data).
- The third parameter value contains a string within the apostrophes
that could be used to identify an installation defined keyword (PARM3)
and its parameter value (Parm3's value).
- The fourth parameter value contains a string without any enclosing
apostrophes (LASTVALUE).
Example 6 //OUTDSB OUTPUT USERDATA=('Installation_Keyword=Installation
// defined keyword value',
// 'PARM2=Parm2''s value (second option)')
In this example, the USERDATA keyword contains two parameter values.
- The first parameter value contains a string within the apostrophes
that could be used to identify an installation defined keyword (Installation_Keyword)
and its parameter value (Installation defined keyword value), assuming
the 'd' was specified in column 71 on the first statement.
- The second parameter value contains a string within the apostrophes
that could be used to identify an installation defined keyword (PARM2)
and its parameter value (Parm2's value (second option)).
Example 7 //PROCC PROC PARM1=POSITIONAL,SOMEDATA=SOMETHING
//STEPC EXEC PGM=MYPGM
//OUTDSC OUTPUT USERDATA=(&PARM1,
// SOMEKEY-&SOMEDATA)
In this example, the USERDATA keyword contains two parameter values.
If the installation allows a format of keyword-value, where the hyphen
(-) is interpreted as an equal sign (=), then the parameter values
do not need to be enclosed within apostrophes. Symbolic substitution
of the parameter values is more straightforward.
- The first parameter value contains a string that could be used
to identify an installation defined parameter value that is defined
as a symbolic parameter. The procedure default for the value is taken
from the PROC statement (POSITIONAL).
- The second parameter value contains a string that could be used
to identify an installation defined keyword (SOMEKEY), the hyphen
is considered an equal sign (by the installation), and the parameter
value that is defined as a symbolic parameter. The procedure default
for the value is taken from the PROC statement (SOMETHING).
Example 8 //PROCD PROC PARM1=POSITIONAL,SOMEDATA=SOMETHING
//STEPD EXEC PGM=MYPGM
//OUTDSD OUTPUT USERDATA=('&PARM1',
// 'SOMEKEY-&SOMEDATA')
In this example, the USERDATA keyword contains two parameter values.
If the installation allows a format where an installation-defined
keyword=value format requires the entire parameter value to be enclosed
within apostrophes, symbolic substitution of the parameter values
is less straightforward than in the previous example.
- The first parameter value contains a string within the apostrophes
that could be used to identify an installation defined parameter value
that is defined as a symbolic parameter. Since the parameter is enclosed
within apostrophes, the &PARM1 symbolic is not resolved so the
parameter value is left unchanged (&PARM1).
- The second parameter value contains a string that could be used
to identify an installation defined keyword (SOMEKEY), and the parameter
value that is defined as a symbolic parameter. However, since the
entire parameter is enclosed within apostrophes, the &SOMEDATA
symbolic is not resolved so the entire parameter is left unchanged
(SOMEKEY=&SOMEDATA).