All new macros and, generally, all macros extended to handle the 31-bit interface use the standard header to identify their interface.
The standard header is an 8-byte field at the beginning of the operand list (parameter list) with the (standardized) designation of the interface and 4 bytes to contain the return code. The standard header is generated and initialized, i.e. filled with the valid values for UNIT, FUNCTION and VERSION by the macro. For E form macros which refer to the operand list, the user may have to initialize the standard header. Further details can be found in the macro description.
Format of the standard header:
Byte | Contents and meaning |
0 - 1 2 3 4 5 6 - 7 | Name of the function unit (UNIT) with the required function Name of the function (FUNCTION) within the function unit Name of the version (VERSION) of the function Subvalue 2 of the return code (SC2). Subvalue 1 of the return code (SC1). Main value of the return code (Maincode). |
The following return code values are conventions:
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
00 | 00 | 0000 | Function executed successfully. There is no additional information for MAINCODE. |
01 | 00 | 0000 | Function executed successfully. No further actions were necessary. |
00 | 01 | FFFF | The requested function is not supported (invalid specification for UNIT or FUNCTION in the standard header). This error cannot be rectified. |
00 | 02 | FFFF | The requested function is not available. This error cannot be rectified. |
00 | 03 | FFFF | The specified interface version is not supported (invalid version specification in the standard header). This error cannot be rectified. |
00 | 04 | FFFF | The parameter list is not aligned on a word boundary |
00 | 41 | FFFF | The subsystem does not exist; it must be generated explicitly. |
00 | 42 | FFFF | The calling task is not connected to this interface; it must be connected explicitly. |
00 | 81 | FFFF | The subsystem is currently not available. |
00 | 82 | FFFF | The subsystem is in the DELETE or HOLD state. |
The maincode shows the result of execution of the function. SC1 classifies the maincode. SC2 either subdivides the errors into error classes or contains additional diagnostic information.
In all new macros introduced since BS2000 V9.0, the return code should only ever be passed in the standard header. However, for a transitional period it can, for certain macro interfaces, also be passed in register R15 or in both the standard header and register R15. In order to check whether a return code was passed in the standard header, the return code field should be preset to X'FFFFFFFF'.