Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Exit address in the FCB

Pointer to a global program routine

The global routine is responsible for processing all errors which can occur. In this case, the address must be enclosed in parentheses, i.e. EXIT=(addr).

The exit routine can evaluate the FCB fields ID1XITB and ID1ECB: ID1XITB indicates the cause of the error, while ID1ECB contains a DMS error code (see “Error message codes” in the appendix of the “DMS Macros” manual [1 (Related publications)]).

The routine can also be used to terminate the program normally (closing the files) or to request memory dumps (using the CDUMP2 or TERM, DUMP=Y macros, see the “Executive Macros” manual [2 (Related publications)]).

Pointer to the EXLST macro

The exit address in the FCB can also address an EXLST macro. In this case, the address in the EXIT operand must be specified without parentheses, i.e. EXIT=addr. The EXLST macro can be used, for example, to check for specific events or errors and to initiate the necessary special measures, while all other events and errors are handled globally in a common routine.

Events for which no separate EXLST exit is to be defined can be intercepted by means of the COMMON operand. The COMMON routine then executes error handling, etc. Specification of the COMMON operand also avoids abortion of the program if an event occurs for which no separate EXLST exit is defined.


Note

If the FCB is found to be incorrect at OPEN time (e.g. storage area not allocated, currently active file processing with the same FCB address, etc.), this mechanism does not take effect. In such a case the program is always terminated abnormally with error code DMS0D9F.