SETAF instruction
Use the SETAF instruction to call an external function to assign any number of arithmetic values to a SETA symbol. You can assign many parameters—the exact number depending on factors such as the size of the program and of virtual storage—to pass to the external function routine.
- variable symbol
- Is a variable symbol.
A global variable symbol in the name field must have been previously declared as a SETA symbol in a GBLA instruction. Local SETA symbols need not be declared in an LCLA instruction. The assembler considers any undeclared variable symbol found in the name field of a SETA instruction as a local SET symbol.
The variable symbol is assigned a type attribute value of N.
- function_name
- The name of an external function load module. The name must be
specified as a character expression, and must evaluate to a valid
module name no longer than eight bytes.
See the chapter
Providing External Functions
in the HLASM Programmer's Guide for information about external function load modules. - expression
- Is an arithmetic expression evaluated as a signed 32 bit arithmetic value. The minimum and maximum allowable values of the expression are -231 and +231-1.
See SETA instruction for further information about setting SETA symbols, and ways to specify arithmetic expressions.
&MAX_VAL SETAF 'MAX',7,4 Calls the external function X
MAX, passing values 7 and X
4 as operands.