This document of the Natural CICS Interface documentation explains special Natural CICS functionality.
It covers the following sections:
One of the first actions a Natural task does at its start, is to
activate an exit for abnormal termination processing. This exit is used to
release all resources including the thread in the case of an abnormal
termination. Therefore, a non-Natural program must not issue
CICS ABEND CANCEL or the equivalent macro level request, as such
a request cancels the current session ignoring any active exit. If so, Natural
is not able to clean up its resources, and the thread and the roll facility are
A thread is assigned to a Natural task whenever a Natural program is active. This is also true when non-Natural programs are called (following CICS linkage conventions).
Therefore, such programs should not do excessive I/O and other work
load without Natural receiving control in between. If a non-Natural program is
doing conversational screen I/O, you can code a
SET CONTROL 'P=V'
statement in the Natural program that calls the non-Natural program before the
calling statement: this indicates that parameter data are copied out of the
thread and the session is rolled out before calling the non-Natural
A non-Natural program is invoked (CALLed) by Natural in the way programs are invoked within the underlying operating and/or TP-monitor system.
In CICS, non-Natural programs are invoked by means of
EXEC CICS LINK requests. However, when, for example,
the same subroutine program (not issuing any CICS or operating system request)
is to be used for both batch and online processing, a non-Natural program may
also be invoked by using CICS standard linkage conventions; that is, via
By default, non-Natural programs are called with the addresses of
the request parameter lists (see the description of the
CALL statement in the
Natural Statements documentation) passed in the TWA and/or
a COMMAREA (depending on the setting of the
A more CICS-like method is to pass the parameter values in a CICS COMMAREA or a CICS Container (see Natural CICS Interface Support for CICS Channels and Containers), particularly when the called program resides in another CICS region - Distributed Program Link (DPL) -, as addresses within the "calling" region are not accessible by the "called" region.
This functionality requires
CALLRPL to be set to
When the parameter values are passed in a CICS COMMAREA or CICS
container, no parameter list pointers are passed in the CICS TWA, regardless of
SET CONTROL 'QO' statement is placed before a
Natural statement that causes a screen I/O, the terminal output is not executed
by Natural under CICS. Consequently, both the Enter key and user
input are not passed back to Natural.
This functionality may be useful in the following situations:
When leaving pseudo-conversational screen I/O to non-Natural
programs called by Natural. The non-Natural program performs the
EXEC CICS SEND operation and returns to Natural. Due
SET CONTROL 'QO' statement, the next Natural screen I/O
terminates the task of a pseudo-conversational session. Upon screen input,
Natural receives control and invokes the non-Natural program again, which then
EXEC CICS RECEIVE.
When changing the Natural pseudo-conversational transaction ID "in-flight" without requiring a terminal operator intervention:
MOVE *INIT-ID TO termid CALLNAT 'CMTRNSET' trnid /* change the restart transaction ID * starting a task on your terminal forces an interrupt as if * pressing any attention identifier CALL 'CMTASK' USING trnid H'0000' H'00000000' termid SET CONTROL 'QO' INPUT 'DUMMY' /* dummy I/O, which you will never see WRITE 'HELLO' *INIT-PROGRAM /* now the new transaction ID is active
When switching to an application outside Natural, perhaps even in another CICS AOR (application-owning region), without requiring a terminal operator intervention:
* starting a task on your terminal forces an interrupt as if * pressing any attention identifier CALL 'CMTASK' USING trnid data-length start-data termid SET CONTROL 'QO' INPUT 'DUMMY' /* dummy I/O, which you will never see WRITE 'HELLO' *INIT-PROGRAM /* now the new transaction ID is active
In this case, it is the responsibility of the application being invoked to stack the Natural restart data when they are passed in a CICS COMMAREA, as a COMMAREA most likely is used by the new (pseudo-conversational) application, too.
NCISTART (that is, the Natural CICS nucleus with
NCISTART as entry point) is eligible to be placed into the CICS
PLTSD for CICS quiesce stage 1 or 2 execution.
When executed in quiesce stage 1,
force-terminates all active Natural sessions prior to performing the
SYSTP snapshot function (described in
Utility in the Natural Utilities
When executed in quiesce stage 2,
SYSTP snapshot function.
NCISTART holds logic to be called (via a CICS LINK) by
a node error program with the relevant CICS terminal entry address either in
the CICS COMMAREA or at the beginning of the TWA.