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 a large number of 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 a 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 8 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, respectively.

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.

[ Top of Page | Previous Page | Next Page | Contents | Index ]