Define Application Program
Summary
What is Application Program?
CICS application program is a CICS program written in standard programming languages supported by CICS. CICS supported programming languages are COBOL, C, C++, Java, PL/I or assembly language.
Most of the processing logic coded in standard programming language. The CICS application program has the basic structure and it must be coded based on the set of rules of standard programming language.
Multithreading -
Multithreading is a technique that allows a single copy of an application program to be processed by several transactions concurrently. Multithreading requires all CICS application programs be quasi-reentrant means they must be serially reusable between entry and exit points.
CICS application programs using the EXEC CICS interface to follow this rule automatically. The application programs are required to be compiled and link-edited as reentrant, CICS also identifies programs as being either quasi-reentrant or thread safe.
Quasi-reentrant application programs -
CICS runs user programs (application programs, user-replaceable modules, global user exits and task-related user exits) under a managed task control block (TCB). If the programs are defined as quasi-reentrant, CICS always invokes them under the CICS quasi-reentrant (QR) TCB.
The requirements for a quasi-reentrant program in a multithreading context are less stringent than if the program were to execute concurrently on multiple TCBs.
CICS requires an application program is reentrant so that it guarantees consistent conditions. CICS quasi-reentrant user programs are given control by the CICS dispatcher under the quasi-reentrant QR TCB.
CICS obtains a separate copy of working storage for each execution of an application program to ensure that programs cannot interfere with each others working storage. Quasi-reentrancy allows programs to access globally shared resources.
CICS Application Program Interface -
In CICS programs, most of the processing logic is expressed in standard language statements. CICS application programming interface (API) used to access program resources managed by CICS and to request CICS services.
The CICS API provides a rich set of commands that can use to write applications make best use of the CICS environment. The API protects the user from the difficulties of the transaction processing environment. The CICS API has three formats -
The EXEC CICS command format –
General syntax to request CICS services:
EXEC CICS command-name option1 option2 ...
This format can be used in programs written in COBOL, C, C++, PL/I and Assembler.
The Java class library for CICS (JCICS) -
JCICS is a class library. JCICS provides most of the functions of the CICS API to use them in a CICS program written in Java.
The C++ class library for CICS -
The C++ class library is an alternative to the EXEC CICS format for object-oriented programs written in C++.
How to define a application program -
Below process is to define a application program MTHPROG1 in CICS region.
Step-1 -Define application program using CEDA command.
Step-2 -Install application program using CEDA command.