CICS-PPT-1-Introduction - Online Business Environment V1.1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

MAINFRAMES

CICS–CUSTOMER INFORMATION
CONTROL SYSTEM
NAGARAJU DOMALA
CICS–CUSTOMER INFORMATION
CONTROL SYSTEM

Online Business Environment

Session 1

Nagaraju Domala
Session Objectives

Upon completion of this session, the participant will be able to:


 ONLINE AND BATCH
 CICS ENVIRONMENT
 PSEUDO-CONVERSATIONAL CONCEPTS

Nagaraju Domala
Introduction

 Customer Information Control System -CICS developed in late 1960s as a DB/DC


control system
 CICS provides an interface between the Operating System and application
programs
 Macro Level CICS - initial version Assembler macro to request CICS services
 Command Level CICS - high level lang. version - commands to request CICS
services - Single command can replace series of macros

Nagaraju Domala
Online System

 Online processing allows a user to interact with a computer and access its
resources via a terminal
 Examples
 railway reservation system
 sales processing system
 costing system

Nagaraju Domala
DIFFERENCE BETWEEN ONLINE & BATCH
SYSTEMS
BATCH SYSTEM ONLINE SYSTEM

Requesting program Initiated by terminal users


Scheduled for a
execution particular when program’s
particular time in a
services are needed
sequence

Program I/P Grouped together as a Supplied by terminal user and


batch of transactions representing a single request

Response to user Immediate via terminal


Delayed via print out

Program usually has


File Processing exclusive control of Files are shared program has
the Database exclusive use of one record
only

Nagaraju Domala
CICS & Operating System

Operating System

CICS
Enter
Code :
User’s
App.Prg

Files &
Database

Nagaraju Domala
CICS System Services

 Data-Communication Functions

 Data-Handling Functions

 Application Program Services

 System Services

 Monitoring Functions

Nagaraju Domala
Task &Transaction

 Task :- A basic unit of work which is scheduled by the


 operating system or CICS

 Ex -Read from and write to the terminal

 Transaction :- An entity which initiates execution of a task. In CICS,


transaction is identified by the transaction identifier (Trans-id)

Nagaraju Domala
INITIATION OF CICS TRANSACTION
IDENTIFIER
 By a transaction identifier entered in a terminal with ENTER key.
 By a transaction identifier associated with a terminal for pseudo-conversation.
 By the START command. (Starting a transaction after a specified interval)
 By the Automatic Task Initiation
 By associating Transaction identifiers to attention identifiers

Nagaraju Domala
Application Programming Concepts

 Pseudo-Conversational

 Multitasking

 Multithreading

 Quasi-Reentrancy

Nagaraju Domala
Conversational technique

 A mode of dialogue between program and terminal based on a combination of


sending message and receiving message within the same task

 Since human response is slower than the CPU speed, a significant amount of
resource will be wasted just waiting

Nagaraju Domala
Conversational Technique –
Example
 PROCEDURE DIVISION.
 :
 FIRST-PROCESS.
 EXEC CICS RECEIVE ---- <= TSK1,12345
 END-EXEC.
 : process
 EXEC CICS SEND ----- <= EMP(12345) Details
 END-EXEC.
 * - - - - - - Program Waits For Response - - - - -
 SECOND PROCESS.
 EXEC CICS RECEIVE ----- <= User Enters Data
 END-EXEC.
 : process

Nagaraju Domala
Pseudo-Conversational

 A mode of dialogue between program and terminal which appears to the operator
as a continuous conversation but which is actually carried by a series of tasks

Nagaraju Domala
Pseudo-Conversational
Example Transaction TSK2
Program PROG2
 Transaction TSK1
 Program PROG1 PROCEDURE DIVISION.
 PROCEDURE DIVISION. : :
 EXEC CICS RECEIVE
 END-EXEC.
EXEC CICS RECEIVE
 : END-EXEC.
 EXEC CICS SEND :
 END-EXEC. EXEC CICS SEND
 EXEC CICS RETURN
END-EXEC.
 TRANSID (‘TSK2’)
 END-EXEC. EXEC CICS RETURN
END-EXEC.

Nagaraju Domala
CICS Components

 Control Programs (or Management Modules)


 Programs that interface between OS and app. pgm
 Handle the general functions that are crucial to operation of CICS
 Control Tables
 Define the CICS environment
 Functionally associated with the management module
 Control Blocks (or Areas)
 Contain system type information. Eg. Task Control Area contains information about
the task

Nagaraju Domala
Management Pgms. & Ctrl.
Tables
 Tables
 Programs
 Processing Program Table PPT
 Program Control PCP  File Control Table FCT
 File control FCP  Terminal Control TableTCT
 Terminal Control TCP  Program Control Table PCT
 Task Control KCP  Temp. Storage Table TST
 Temporary Storage TSP  Destin. Control Table DCT

 Transient Data TDP


 Storage Control SCP
 Interval Control ICP
 Journal Control JCP

Nagaraju Domala
Management Pgms. & Ctrl.
Tables
 FCT: Registers all files to be used in CICS
 FCP : Manages all input/output operations of files under CICS
 PPT: Registers all programs and maps to be used in CICS
 PCP: Manages the flow of CICS application programs
 PCT: Registers all CICS transactions
 KCP: Controls the flow of CICS tasks
 TCT: Registers all terminals used under CICS
 TCP: Manages data exchange between terminals and CICS application programs

Nagaraju Domala
Management Pgms. & Ctrl.
Tables
 TST: Registers all Temporary Storage Queues (TSQs) which requires recovery or
security check.
 TSP: Manages all input/output operations of Temporary Storage Queues.
 DCT: Registers all Transient Data Queues
 TDP: Manages all input/output operations of Transient Data queues
 SCP: Manages requests of dynamic storage by CICS control programs and
application programs.
 ICP: Provides all time-related services under CICS.
 JCP: Performs logging of (journaling) data onto external files called journals

Nagaraju Domala
CICS Program Considerations

 Considerations
 Must eventually return control to CICS
 Can’t modify procedure division instructions ‘cause CICS programs may be shared
by many tasks
 Can modify working storage since a unique copy of working storage is created for
each task

Nagaraju Domala
CICS Program Restrictions

 Restrictions

 No CONFIG. SECTION, I/O SECTION to be specified in the ENVIRONMENT DIVISION.

 FILE SECTION, OPEN, CLOSE, and non-CICS READ & WRITE statements are not
permitted because file management is handled by CICS.

 COBOL commands such as ACCEPT, DISPLAY, EXHIBIT, TRACE, STOP RUN, GOBACK
are avoided. (STOP RUN & GOBACK are sometimes included in order to eliminate
compiler diagnostic but never executed)

Nagaraju Domala
Sample CICS Program

 IDENTIFICATION DIVISION.
 PROGRAM-ID. SAMPLE.
 ENVIRONMENT DIVISION.
 DATA DIVISION.
 WORKING-STORAGE SECTION.
 01 WS-INPUT.
 05 WS-TRANSID P IC X(4).
 05 FILLER PIC X(1).
 05 WS-IN-EMP-CD PIC X(4) VALUE ALL ‘X’.
 01 WS-OUTPUT.
 05 FILLER PIC X(16) VALUE ‘EMP CODE : ‘.
 05 WS-OUT-EMP-CD PIC X(4).
 01 WS-LENGTH PIC S9(4) COMP.
 LINKAGE SECTION.

Nagaraju Domala
Sample Program Contd.

PROCEDURE DIVISION.

000-MAINLINE.

PERFORM 100-RECV-INPUT.

PERFORM 200-SEND-OUTPUT.

EXEC CICS RETURN END-EXEC.

STOP RUN.

100-RECV-INPUT.

MOVE 9 TO WS-LENGTH.

EXEC CICS RECEIVE

INTO (WS-INPUT) LENGTH (WS-LENGTH)

END-EXEC.

MOVE WS-IN-EMP-CODE TO WS-OUT-EMP-CODE

200-SEND-OUTPUT.

EXEC CICS SEND

FROM (WS-OUTPUT) LENGTH (20) ERASE

END-EXEC.

Nagaraju Domala

You might also like