Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Standard header

&pagelevel(4)&pagelevel

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)SC1MaincodeMeaning
00000000Function executed successfully. There is no additional
information for MAINCODE.
01000000Function executed successfully. No further actions were
necessary.
0001FFFFThe requested function is not supported (invalid specification for
UNIT or FUNCTION in the standard header). This error cannot
be rectified.
0002FFFFThe requested function is not available. This error cannot be
rectified.
0003FFFFThe specified interface version is not supported (invalid version
specification in the standard header). This error cannot be
rectified.
0004FFFFThe parameter list is not aligned on a word boundary
0041FFFFThe subsystem does not exist; it must be generated explicitly.
0042FFFFThe calling task is not connected to this interface; it must be
connected explicitly.
0081FFFFThe subsystem is currently not available.
0082FFFFThe 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'.