Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Symbolic parameters HLASM Language Reference SC26-4940-06 |
|
Symbolic parameters let you receive values into the body of a macro definition from the calling macro instruction. You declare these parameters in the macro prototype statement. They can serve as points of substitution in the body of the macro definition and are replaced by the values assigned to them by the calling macro instruction. By using symbolic parameters with meaningful names, you can indicate the purpose for which the parameters (or substituted values) are used. Symbolic parameters must be valid variable symbols. A symbolic parameter consists of an ampersand followed by an alphabetic character and from 0 to 61 alphanumeric characters. Here are valid symbolic parameters:
Here are invalid symbolic parameters:
Symbolic parameters have a local scope; that is, the name and value they are assigned only applies to the macro definition in which they have been declared. The value of the parameter remains constant throughout the processing
of the containing macro definition during each call of that definition.
Notes:
The two kinds of symbolic parameters are:
Each positional or keyword parameter used in the body of a macro definition must be declared in the prototype statement. Here is an example of a macro definition with symbolic parameters.
Here is a macro instruction that calls this macro. The characters HERE, FIELDA,
and FIELDB of the MOVE macro instruction
correspond to the symbolic parameters &NAME, &TO,
and &FROM, of the MOVE prototype
statement.
If the macro instruction is used in a source program, these assembler
language statements are generated:
|
Copyright IBM Corporation 1990, 2014
|