Terminate programs and transaction operations. Under DLG, performs internal program cleanup, terminate the program via GOBACK
statement, and return control to the calling program.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
General Rules: for CICS
- AMB generates a CICS RETURN without a TRANSID or COMMAREA. Program control returns to either the next higher-level linked
program or to CICS.
- Code TERM in a linked-to program that returns to the calling program and ensures that TP-COMMAREA data is passed back. When
returning to a calling program, TP-COMMAREA moves to DFHCOMMAREA.
- Call does not terminate an active PSB that is passed via LINK.
General Rules: for IMS DC
- Use TERM after sending output messages (SEND or MSG-SW) with CONTINUE. Do not use TERM prior to sending at least one response;
this causes a user terminal in response mode to remain locked, awaiting a response.
Example:
Terminate a program when SCRA-FUNCTION = 'E' or PF3 is pressed.
IF SCRA-FUNCTION = 'E' OR PF3
TERM