HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SETAF instruction

HLASM Language Reference
SC26-4940-06

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.

The SETAF instruction can be used anywhere that a SETA instruction can be used.
Read syntax diagramSkip visual syntax diagram
>>-variable_symbol--SETAF--'function─name'---------------------->

>--+-----------------+-----------------------------------------><
   | .-------------. |   
   | V             | |   
   '---,expression-+-'   

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.

The function name must be enclosed in single quotes. For example:
&MAX_VAL   SETAF  'MAX',7,4         Calls the external function  X
                                    MAX, passing values 7 and    X
                                    4 as operands.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014