External function calls
You can use the new SETAF and SETCF instructions to call your own routines to provide values for SET symbols. The routines, which are called external functions, can be written in any programming language that conforms to standard OS linkage conventions. The format of the SETAF and SETCF instructions is the same as a SETx instruction, except that the first operand of SETAF is a character string.
The assembler calls the external function load module, and passes it the address of an external function parameter list. Each differently named external function called in the same assembly is provided with a separate parameter list.
- SETAF instruction:
- You use the SETAF instruction to pass parameters containing arithmetic values to the external function module. The symbol in the name field of the instruction is assigned the fullword integer value returned by the external function module.
- SETCF instruction:
- You use the SETCF instruction to pass parameters containing character values to the external function module. The symbol in the name field of the instruction is assigned the character string value returned by the external function module. The length of the returned character string can be from 0 to 1024 bytes.