Previous Topic Next topic Print topic


TERM

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.

Targets:

  • CICS
  • DLG
  • IMS DC

Syntax:

[TP-]TERM

General Rules: for CICS

  1. AMB generates a CICS RETURN without a TRANSID or COMMAREA. Program control returns to either the next higher-level linked program or to CICS.
  2. 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.
  3. Call does not terminate an active PSB that is passed via LINK.

General Rules: for IMS DC

  1. 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
Previous Topic Next topic Print topic