Variable substitution
BMC AMI Defender for z/OS supports variable substitution in text messages supplied in diagnostic records. Such that, you could define a message as:
Place the record count in binary in the field CZ1DiagWord1 and have the message print as shown in the following example:
Code a diagnostic record with minor type CZ1DiagMinSubstA if you want to use variable substitution, or with minor type CZ1DiagMinSubstNo otherwise.
Variable substitution is particularly helpful for reentrant assembler programs. The method of variable substitution will be familiar to C programmers and to anyone with any C programming exposure.
To substitute a variable into a message, the form of the specification is:
%n$w.pt
- % is the required substitution indicator
- n is the variable number (see CZAPI1DG for the variable numbers that correspond to each variable field)
- $ is a required delimiter
- w is an optional width (described below)
- .p (note the preceding period) is an optional precision (described below)
- t is a required type code (described below)
The specifications are case sensitive, so %1$d is not the same as %1$D.
See the comments on each of the variable fields in CZAPI1DG for the basic substitution specification for each.
The maximum size of the message text after variable substitution is 250 characters.
Related topic