Previous Topic: Return CodeNext Topic: Customizing the Exit


Default Processing

Sample Code

Sample code has been provided as commented out blocks of code. This is as an example only. To use the sample code, you must remove the comments. Sections that are specific to a particular system, such as IMS, are indicated by comments preceding and following the code. Common code that should be used by both examples is also indicated.

The sample code provides the ability to respond to request code 1 (get system date) and request code 7 (get current timestamp). The date information is read from a file and is used to change the year, month, and day. The timestamp information (hours, minutes, seconds, microseconds) is read and left unchanged.

Delivery Configuration

As configured, the sample code will read the required date from a file when generated for IMS. This exit can also obtain values from DB2 table lookups.

To use this facility, you must change the source code to set a local variable as appropriate. If IMS mode, use the assembler but do not use the preprocessor.

Registers

Register 14 contains the address that control is to be returned to, and Register 13 contains the address of a save area set up for the exit’s usage. All registers must be saved on entry. Register 15 must be updated with the return code and all other registers must be saved and restored on return.