|
INTRODUCTION
Customer Information Control System ( CICS ) is introduced by IBM in 1960s
to support online programming on Mainframes. CICS acts like a sub-operating
system, it manages its own memory space, control the concurrent execution of
multiple applications. CICS is it self is a batch job running on Mainframe to
enable application programes to respond to online requests. You can see the
CICS job running on mainframe, by checking in the spool.System operators daily
run this CICS job. We can observe multiple instances of CICS jobs are running
on mainframe. We call each CICS instance as CICS region.
As depicted in above picture, CICS is a high priority batch job running on
mainframe Operating System (OS) along with other batch jobs. CICS acts as a
interface between OS and Online Application programs. Online programs get
triggered by the user by entering a peace of data on terminals. Online
programs need to be designed in such way that these programs respond to user
instantly with required data.
Online Reservation Systems showed in the picture allows users to enter train
no,date. When user enters required data and press F1,this data will be passed
to CICS on Mainframes. CICS then trigger corresponding online progam ( Online
program1 in the picture) send back the data to user. This process is called
Transaction. In CICS, every transaction type is defined by 1 to 4 character
word called TRANSACTION ID. One program is attached to this TRANSACTION ID. We
define this mapping in CICS Table called PCT (Program Control Table).
Batch VS Online Programming
Batch COBOL programs executed OS by submitting jcl to operating system, this
process is called batch processing.
COBOL programs ( which contains CICS commands ) get executed by CICS, this
process is called Online processing.
Batch jobs may run for hours, once job is completed, it will end. Whereas in
online programming, program is normally written to respond within secs.
Sample CICS command
If you know how to write batch COBOL program, by reading this tutorial,you will
learn , how to write online-COBOL programs.
CICS Program format
IDENTIFICATION DIVISION.
PROGRAM-ID. XXXX.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE DIVISION.
...
...
...
LINKAGE SECTION.
...
...
PROCEDURE DIVISIO
...
MOVE...
....
EXEC CICS RECEIVE
....
...
END-EXEC.
...
...
EXEC CICS READ
...
...
...
END-EXEC.
...
...
EXEC CICS RETURN
END-EXEC.
...
...
GOBACK.
|
In above sample CICS program, you can see there are few CICS commands coded in
COBOL program. RECEIVE command is used to receive data from terminal, READ com-
mand is used to read the data from VSAM file. RETURN command is used to return
the control back to calling program or to CICS itself. If you observe in this
sample program, CICS commands are used to talk with external world like
terminals, files, databases, storage control. Actual logic of the program is
written using normal COBOL Verbs. We dont use some COBOL Verbs in CICS programs
for example.. OPEN,READ,WRITE,REWRITE,CLOSE. Instead we use CICS commands like
CICS READ,WRITE etc..
|
|