Version 4.2.6 for Mainframes (Update)
 —  TP Monitor Interfaces  —

CICS Node Error Program Considerations for Natural

This document discusses CICS node error program considerations.

The following topics are covered:

See also:


Normal Situation

Whenever a Natural session is active, CICS resources such as thread storage, roll facility entries (that is, records in a VSAM RRDS file or in a CICS temporary storage queue), swap pool slots etc. are used.

If these resources are under the control of the Natural CICS interface, they are correctly released whenever a session terminates normally or abnormally.

Top of page

Situations Not under Control of Natural CICS Interface

The following cases cannot be controlled by the Natural CICS interface:

  1. A non-Natural program called by Natural issues an EXEC CICS ABEND CANCEL command or the equivalent CICS macro request: the CICS task is canceled without the Natural CICS interface receiving control to properly release all session resources.

  2. Some CICS monitor products offer tools to purge CICS tasks, bypassing any abnormal termination exit set by the application. If a Natural task is canceled this way, the Natural CICS interface has no chance to release the resources still owned by the session.

  3. A user disconnects a terminal from the CICS region (by switching the power off or using an adequate session manager function) while a Natural session is currently not active in CICS (pseudo-conversational screen I/O).

Top of page

Recovery Mechanisms

The Natural CICS interface provides some recovery mechanisms to recover from such situations; for example:

Whenever a new Natural session is to be started, a table is scanned for another Natural session still active with the same terminal ID. If such a session exists, it is logically terminated, and all its resources are released prior to starting the new one.

However, it may take quite a long time between logically terminating the session and releasing its resources, and there may also be a security concern:

When the NCIPARM generation parameter COMARET is set to NO, the information to resume a Natural session is kept in a CICS temporary storage record with the terminal ID being part of the temporary storage queue name. If another CICS user tries to start Natural with this terminal ID, he/she will resume the old Natural session rather than starting a new one.

The third case in the above list is the most crucial one. CICS provides a node error program (NEP) exit interface, which can be used in these cases to trigger the Natural CICS interface to terminate the lost session. An appropriate program called NCIZNEP is provided in the Natural CICS source library (see Natural CICS Sample Programs); it must be called by a DFHZNEP node error program.

Top of page

Special Considerations

There are still some items to be considered:

Top of page

Example Dummy Program

If you want to know how many times and with what error codes DFHZNEP is invoked on certain actions and how the TCTTE should look, write a dummy node error program, which only issues CICS trace requests showing the requested information.

The following sample enables a DFHZNEP error processor to receive control for all possible error codes passed to DFHZNEP:

     .
    
     DFHSNEP TYPE=INITIAL
    
     ORG NEPTT
    
     DC 256X'03' invoke error processor '3' for ALL error codes
    
     ORG ,
    
     DFHSNEP TYPE=ERRPROC,GROUP=3,CODE=49    
     .
     
     set up requested information and issue trace request(s)

Top of page