Professional Documents
Culture Documents
. System
Customer Information Control
Training Material
HCL TECHNOLOGIES
1
Customer Information Control System
2
Customer Information Control System
SESSION # 1
3
Batch System V/S Online System
4
Batch System V/S Online System
5
INTRODUCTION TO CICS
6
INTRODUCTION TO CICS (contd...)
CICS / OS / 2 OS/2
7
FEATURES OF CICS
Easy to customize.
Continued ...
8
FEATURES OF CICS(Contd...)
Device independence.
Data independence.
9
VSAM
Disk
CICS Appln.
Program
Files
VTAM / TCAM
Terminal Users
10
OPERATING SYSTEM
Other
Database Systems
Access Data Access Telecommunication
Method Method Access Method
(DL/1,DB2) (VSAM, BDAM) (VTAM, TCAM)
Data
Storage
CICS / MVS
System
Services Terminals
Monitoring
Data-handling Functions Data-Comm
Functions Functions
Application
Program
Services
11
VOCABULARY
Multi User
Multi Tasking
Multi Programming
Multi Threading
Job
Task
Transaction
Reentrancy
Quasi Reentrancy
12
MULTITASKING
13
MULTITHREADING
14
REENTRANCY
15
CICS COMPONENTS
Control Tables
Control Blocks
16
Control Program Control Tables
File Control Program File Control Table
Interval Control Program Interval Control Table
Journal Control Program Journal Control Table
Program Control Program Processing Program Table
Task Control Program Program Control Table
Storage Control Program Storage Control Table
Terminal Control Program Terminal Control Table
Temporary Storage Program Temporary Storage Table
Transient Data Program Destination Control Table
17
CONTROL BLOCKS
Continued...
18
EIB INFORMATION (contd...)
Continued...
19
EIB INFORMATION (contd...)
20
CICS STARTUP:
Starting up of an CICS system involves executing a job
(JCL) like any other batch-job.
Main job-step is System Initialization Program (SIP).
SIP loads corresponding System Initialization Table (SIT),
based on which SIP further loads all control programs and tables
and performs initial house-keeping tasks.Then CICS is ready to
execute CICS transactions within its own region.
CICS SHUTDOWN :
The computer operator terminates CICS job by entering
Master Terminal Transaction (CEMT) with shut-down option.
Then CICS job produces various logs, statistics, dumps &
reports
21
GENERAL SYNTAX OF CICS STATEMENT
22
Basic Steps in CICS Application Program
Development :
23
Additional Preparation Required
24
STEPS IN APPLICATION DEVELOPMENT
COBOL Program with CICS
CICS Statements Preprocessor
COBOL Source
Code
Load
Linker
Module
25
INITIATION OF CICS TRANSACTION
26
USER ENTERS TRANS-ID (AAAA)
PCT
Transaction Program
CICS locates trans-id
AAAA AAAPGM1 AAAA in program
BBBB BBBPGM1 control table
CCCC CCCPGM2
CICS Address
PPT Space
Program Location
CICS locates program
AAAPGM1 in the
AAAPGM1 On Disk processing program
BBBPGM1 In Storage BBBPGM1
table
CCCPGM2 On Disk
27
SIGN ON -
The primary function of CICS SIGN ON is to associate CICS
user identifier with CICS system in terms of security, Priority
and other functions.
CESN or CSSN is CICS supplied transaction which prompts
SIGN ON screen as shown.
Complete SIGN ON by giving
CICS/VS SIGNON - correct USERID & PASSWORD
enter userid Unless SIGN ON process is
complete NO CICS transaction can
USERID:
be invoked.
PASSWORD:
SIGN OFF- Primary functions of SIGN OFF is to disassociate
CICS user identifier from CICS Region. For SIGN OFF use
CICS supplied transaction CSSF.
28
CICS SERVICES
Terminal Control
Program Control
File Control
Storage Control
29
TERMINAL CONTROL SERVICE
SESSION # 2
30
INTRODUCTION
31
TERMINAL CONTROL COMMANDS IN CICS
32
SEND COMMAND SYNTAX
EXEC CICS
SEND FROM (Literal / Variable)
LENGTH (Literal / Variable)
END-EXEC.
33
RECEIVE COMMAND SYNTAX
EXEC CICS
RECEIVE INTO (Variable)
LENGTH (Literal / Variable)
END-EXEC.
Continued...
35
CONVERSE COMMAND SYNTAX
EXEC CICS
CONVERSE FROM (Literal/Variable)
[FROMLENGTH (Length)]
INTO (Variable)
[TOLENGTH (Length)]
[ERASE]
END-EXEC.
36
ISSUE PRINT COMMAND
Syntax:
EXEC CICS
ISSUE PRINT
END-EXEC.
37
ISSUE COPY COMMAND
Syntax:
EXEC CICS
ISSUE COPY
TERMID (Terminal Name)
END-EXEC.
38
HANDLE AID COMMAND SYNTAX
EXEC CICS
HANDLE AID
Attention Key1 (Routine1)
Attention Key2 (Routine2)
Attention Key3 (Routine3)
END-EXEC.
39
SOME TIPS ON HANDLE AID COMMAND
Continued …
40
TIPS ON HANDLE AID COMMAND(contd...)
In WORKING-STORAGE SECTION.
* DFHAID is Copy Book to be included.
COPY DFHAID.
41
PROGRAM CONTROL
SESSION # 3
42
PROGRAM CONTROL IN CICS
OBJECTIVES :
43
PROGRAM CONTROL
Program Control Program is responsible for managing the use
of all application programs
44
INTERPROGRAM COMMUNICATION
Passing data between programs
45
PASSING DATA BETWEEN PROGRAMS
RETURN
TRANSID(TRN2)
COMMAREA(COM) » EIBCALEN contains the Size of COM
46
COMMANDS FOR PROGRAM CONTROL
47
LOAD command
Continued...
48
LOAD command Syntax
49
LOAD command Syntax
Important Parameters :
50
LOAD command
Example:
EXEC CICS LOAD
PROGRAM (‘lodprg’)
SET (ptrvar)
LENGTH (lenvar)
END-EXEC .
Exceptions:
PGMIDERR – Program not found
LENGERR – Load module > 32 K
NOAUTH – Security check error
51
RELEASE command
52
RELEASE command Syntax
Parameters :
53
LINK command
54
LINK command syntax
55
LINK command Syntax
Important Parameters :
56
LINK flow of control
CICS SYSTEM
57
XCTL command
58
XCTL command Syntax
59
XCTL command Syntax
Important Parameters :
60
XCTL flow of control
CICS SYSTEM
61
DIFFERENCE BETWEEN LINK & XCTL
Program 1.
LINK CICS
Program 2.
Program 1.
XCTL CICS
Program 2.
62
RETURN command syntax
63
RETURN command syntax
Important Parameters :
64
Modes of Application Programming
CONVERSATIONAL
NON CONVERSATIONAL
PSEUDO CONVERSATIONAL
65
Modes of Application Programming
Conversational
Direct interaction of user with the system
System waits for the user input
Non Conversational
Only 1 request from user to system
Continued...
66
Modes of Application Programming
Pseudo Conversation
67
RESTRICTIONS in COBOL when using CICS
IDENTIFICATION DIVISION
No restrictions
ENVIRONMENT DIVISION
• SELECT Statement
Continued...
68
RESTRICTIONS in COBOL when using CICS
DATA DIVISION
• FD Entry
• REPORT SECTION
PROCEDURE DIVISION
• SORT
• RELEASE
• RETURN
Debugging Statements
• EXHIBIT
• TRACE
Continued...
69
RESTRICTIONS in COBOL when using CICS
PROCEDURE DIVISION
I/O Statements
• ACCEPT
• DISPLAY
70
RESTRICTIONS in COBOL when using CICS
PROCEDURE DIVISION
Program Termination commands
• STOP RUN
• EXIT PROGRAM
• GOBACK
71
RESTRICTIONS in COBOL when using CICS
PROCEDURE DIVISION
Calendar commands
• CURRENT-DATE
• DATE
• DAY
72
FILE CONTROL
SESSION # 4
73
INTRODUCTION
INPUT-OUTPUT SECTION
SELECT statement
FD entry
OPEN/CLOSE
JCL
Continued...
75
FILE CONTROL SERVICE(contd)
Continued...
76
FILE CONTROL SERVICE(contd)
Available Commands -
77
READ COMMAND SYNTAX
78
EXAMPLE
BO001
BC001
DC001
DC002
NY000
NY001
NY002
PH001
PH002
79
WORKING-STORAGE SECTION.
77 WK-LEN PIC S9(4) COMP.
01 FILE-IOAREA.
05 REC-A.
10 REC-A-KEY
15 REC-A-KEY-CITY PIC XX.
15 REC-A-KEY-SEQ PIC 999.
10 REC-A-DETAIL PIC X (30).
.
.
PROCEDURE DIVISION.
MOVE 35 TO WK-LEN.
MOVE ‘NY001’ TO REC-A-KEY.
EXEC CICS READ
DATASET(‘FILEAAA’)
INTO(FILE-IOAREA)
RIDFLD(REC-A-KEY)
LENGTH(WK-LEN)
END-EXEC.
80
READ COMMAND SYNTAX
EXCEPTIONS:
81
REWRITE COMMAND
82
REWRITE COMMAND SYNTAX
83
WRITE COMMAND SYNTAX
EXEC CICS WRITE
FROM (rec-area)
LENGTH (length)
DATASET (filename)
RIDFLD (key-area)
MASSINSERT // Allows group of records
END-EXEC. // simultaneously
Eg: EXEC CICS WRITE
FROM (FILE-IOAREA)
LENGTH (WK-LEN)
DATASET (‘FILEAAA’)
RIDFLD(REC-A-KEY)
END-EXEC.
84
DELETE COMMAND SYNTAX
85
UNLOCK COMMAND SYNTAX
86
BROWSE COMMANDS
STARTBR
READNEXT
READPREV
RESETBR
ENDBR
Continued...
87
ORDER OF BROWSE OPERATION
EVENTS COMMANDS
1. Start.
2. Establish starting position STARTBR
3. Retrieve a record. READNEXT
OR READPREV
4. If processing of the record is required,
then process and go to step 3.
5. If more records are required,
then go to step 3.
6. If it is required to establish another position,
then restablish the new position and go to step 3. RESETBR
7. Terminate the BROWSE operation. ENDBR
8. End.
88
STARTBR COMMAND SYNTAX
89
READNEXT COMMAND SYNTAX
90
READPREV COMMAND SYNTAX
91
RESETBR COMMAND SYNTAX
92
ENDBR COMMAND SYNTAX
93
BASIC MAPPING SUPPORT
SESSION # 5
94
BASIC MAPPING SUPPORT in CICS
OBJECTIVES :
To know about...
Terminal Control
Introduction to SDF
95
IBM TERMINALS
96
IBM TERMINALS
A few examples....
97
IBM TERMINALS
98
NMDS for an IBM 3270 terminal
Output Data Stream
C Info. Addr SF Attr Byte Text Data
Field 1
Input Data Stream
C. Info Addr Attr Byte Text Data
Field1
C Info. Field 1 Field 2.....
99
IBM TERMINALS
10
0
BASIC MAPPING SUPPORT
MAP
MAPSET
10
3
TYPES OF MAPS
PHYSICAL MAP
10
4
TYPES OF MAPS
SYMBOLIC MAP
10
5
GENERATION OF MAPS
BMS Macro
ASSEMBLE
Link - Edit
10
6
USING MAPS IN A PROGRAM
Source
Code CICS Translator
Copy Library
Symbolic
COBOL Compiler
map
Load Module
Link Edit &
Physical map
Load Library
10
7
Coding an Assembler macro
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .... 70 71 72
10
8
Coding an Assembler macro
10
9
Coding a BMS macro
DFHMSD
defines a Mapset
one per mapset / BMS file
DFHMDI
defines a Map
one per Map & one or more Maps per Mapset
DFHMDF
defines a Field
one per field & one or more Fields per Map
11
0
DFHMSD
Continued...
11
1
DFHMSD Syntax
Continued...
11
3
DFHMDI Syntax
11
4
DFHMDF
11
5
DFHMDF Syntax
11
6
DFHMDF ATTRIBUTES
11
7
MODIFIED DATA TAG (MDT)
11
8
Sample BMS Coding...
1 10 1617 72
MAPSETA DFHMSD TYPE=MAP,MODE=INOUT, X
CTRL=(FREEKB,FRSET), X
LANG=COBOL,TERM=3270
MAP1 DFHMDI SIZE=(24,80),TIOAPFX=Y
DFHMDF POS=(1,10),LENGTH=6, X
INITIAL = ‘T I L.’
DATE DFHMDF POS=(1,20),LENGTH=8
DFHMDF POS=(3,10),LENGTH=10, X
INITIAL=‘ENTER NAME’
NAME DFHMDF POS=(3,25),LENGTH=20, X
ATTRB = IC
MAP2 ......
MAP3 ......
DFHMSD TYPE=FINAL //Indicates end of Mapset declaration
END
11
9
SENDING MESSAGE TO SCREEN
EXEC CICS
SEND MAP (‘MAP1’)
MAPSET (‘MAPSETA’)
END-EXEC.
SYMBOLIC PHYSICAL
MAP MAP
OUTPUT DATA
STREAM
12
0
SENDING MESSAGE (MAPONLY)
EXEC CICS
SEND MAP (‘MAP1’)
MAPSET (‘MAPSETA’)
MAPONLY
END-EXEC.
PHYSICAL
MAP
OUTPUT DATA
STREAM
12
1
SENDING MESSAGE (DATAONLY)
EXEC CICS
SEND MAP (‘MAP1’)
MAPSET (‘MAPSETA’)
DATAONLY
END-EXEC.
SYMBOLIC
MAP
OUTPUT DATA
STREAM
12
2
COMMON ERRORS WITH MAPS
MAPFAIL
More predominant error.
Normally occurs when there is no data to be
transmitted but the user uses any AID keys and
receives the input.
INVREQ
Receive Command executed without a map on
the screen.
INVMPSZ
Size of the map specified is larger than the
screen.
12
3
COPY BOOKS TO BE INCLUDED FOR USING
BMS
.........
WORKING-STORAGE SECTION.
COPY DFHAID.
//TO USE FUNCTION KEY RESPONSES
COPY DFHBMSCA.
//BMS COMMON WORK AREA
COPY SYMBMAP1.
//USER DEFINED MAP
PROCEDURE DIVISION.
....
12
4
SCREEN DEFINITION FACILITY (SDF)
SESSION # 6
12
6
EXCEPTION HANDLING IN CICS
RESP
HANDLE CONDITION
IGNORE CONDITION
HANDLE AID
HANDLE ABEND
12
7
RESP OPTION
12
8
The following is the procedure to use the RESP option in a CICS
command :
12
9
Example :
WORKING-STORAGE SECTION.
77 WS-RETCODE PIC S9(8) COMP.
PROCEDURE DIVISION.
.
.
EXEC CICS SEND
FROM (_____)
LENGTH(___)
ERASE
RESP(WS-RETCODE)
END-EXEC.
.
IF WS-RETCODE = DFHRESP(NORMAL)
GO TO NORMAL-PARA.
IF WS-RETCODE = DFHRESP(LENGERR)
GO TO LENGERR-PARA.
GO TO GENERAL-ERR-PARA.
NORMAL-PARA.
LENGERR-PARA.
13
0
During the execution of this program, the following will occur :
13
1
HANDLE CONDITION COMMAND
13
2
EXAMPLE
13
3
IGNORE CONDITION COMMAND
13
4
Syntax :
13
5
EXAMPLE
13
6
HANDLE AID COMMAND
Used to execute a routine depending on a key pressed
Always used with RECEIVE command
Syntax :
EXEC CICS HANDLE AID
attention id1 (ROUTINE1)
attention id2 (ROUTINE2)
attention id3 (ROUTINE3)
END-EXEC.
13
7
EXAMPLE
13
8
HANDLE ABEND COMMAND
13
9
Syntax :
14
1
EXEC CICS HANDLE ABEND
CANCEL
END-EXEC.
EXEC CICS ABEND
ABCODE(‘9999’)
END-EXEC.
14
2
TRANSIENT DATA QUEUES
SESSION # 7
14
3
TRANSIENT DATA QUEUE
OBJECTIVES
14
4
TRANSIENT DATA CONTROL
Continued ...
14
5
TRANSIENT DATA CONTROL
14
6
TRANSIENT DATA CONTROL
Types of TD Queues...
14
8
TRANSIENT DATA CONTROL
Continued ...
15
0
TRANSIENT DATA CONTROL
Continued ...
15
1
TRANSIENT DATA CONTROL
15
2
TRANSIENT DATA CONTROL
TDQ Commands
15
3
TRANSIENT DATA CONTROL
WRITEQ TD Syntax
EXCEPTIONS
QIDERR - DCT entry not found for the ‘Q’
LENGERR - length specified is greater than
maximum length given in DCT
NOSPACE - no space available in TDQ
15
4
TRANSIENT DATA CONTROL
READQ TD Syntax
EXCEPTIONS
QIDERR - DCT entry not found for the ‘Q’
LENGERR - length specified is not the same
as that specified in DCT
QZERO - no more items to read in the ‘Q’
15
5
TRANSIENT DATA CONTROL
DELETEQ TD Syntax
EXCEPTIONS
15
6
DESTINATION CONTROL TABLE
15
7
AUTOMATIC TASK INITIATION (ATI)
Continued ...
15
8
AUTOMATIC TASK INITIATION (ATI)
Applications...
Message Switching
Messages can be accumulated in a TDQ
(Intra Partition) and at certain level, say 1000,
another transaction may be started to route the
messages to a different destination
Report Print
Similarly records can be accumulated,
and at certain trigger level another transaction can
be started to print the records
15
9
TEMPORARY STORAGE QUEUES
SESSION # 8
16
0
TEMPORARY STORAGE CONTROL
Characteristics of TSQs :
Continued ...
16
1
CHARACTERISTICS OF TSQS (contd...)
Typical Applications :
Continued... 16
3
TSQ AVAILABLE COMMANDS
16
4
EXAMPLE
WORKING-STORAGE SECTION.
01 TSQ-QID.
05 TSQ-QID-DIV PIC X VALUE ‘A’.
05 TSQ-QID-TERM PIC X(4).
05 TSQ-QID-APPL PIC X.
05 TSQ-QID-NUM PIC 99.
01 TSQ-DATA.
05 TSQ-FIELD1 PIC X(50).
05 TSQ-FIELD2 PIC X(150).
77 TSQ-LEN PIC S9(4) COMP.
77 TSQ-ITEM PIC S9(4) COMP.
PROCEDURE DIVISION.
....................
CONSTRUCT QID.
MOVE EIBTRMID TO TSQ-QID-TERM.
MOVE ‘I’ TO TSQ-QID-APPL.
MOVE 1 TO TSQ-QID-NUM.
...................(Edit TSQ data)..................
MOVE 200 TO TSQ-LEN.
Contd...............
16
5
EXAMPLE ........(Contd.)
WRITE A QUEUE.
N.B. : If a TSQ with this QID does nort exist, a TSQ will be created with QID=AttttI01,
where tttt is the terminal id.
16
6
INTERVAL & TASK CONTROL
SESSION # 9
16
7
INTERVAL CONTROL & TASK CONTROL
OBJECTIVES
16
8
INTERVAL CONTROL
16
9
INTERVAL CONTROL
17
0
INTERVAL CONTROL
17
2
TASK CONTROL
17
3
TASK CONTROL
17
4
INTERCOMMUNICATION
SESSION # 10
17
5
INTER COMMUNICATION
OBJECTIVES
17
6
INTER COMMUNICATION
17
7
MULTI REGION OPERATION (MRO)
17
8
Accounting MRO Example
database Multiple Departmental System
Processor 1
Operating System
Accounting
System CICS 1
Sales Inventory
System CICS 3 System CICS 2
Sales Inventory
database database
17
9
MULTI REGION OPERATION (MRO)
ADVANTAGES
Functional Independence
Since operation of the CICS systems are
independent of each other, the owner can have
total control over his system
Reliability
Even if one system fails, other system(s) can
support the functions of the failed system
Performance Enhancement
System performance can be tuned independently
for each system based on the relative
requirements and priority thus improving the
overall efficiency Continued ...
18
0
MULTI REGION OPERATION (MRO)
ADVANTAGES (cont.)
Security
Systems being independent, greater security is
achieved
Non Redundant
Same data is shared by all the systems so there
are no multiple copies
Project Phasing
Since there are different systems present, the
projects can be easily divided and developed
individually
Continued ...
18
1
MULTI REGION OPERATION (MRO)
Disadvantages
18
2
Inter System Communication (ISC)
ADVANTAGES
We can develop complex distributed systems
relatively easily
Transparency of Distance
Physically distant resources are shared through
ISC
Hardware/Software Independence
To local CICS, it is transparent on what hardware
& software the remote system is existing on
18
4
Accounting
Typical example ISC
database Distributed Corporate System
Operating System
CITY 1
Accounting
System CICS
Processor 1
Operating System Operating System
Sales Inventory
System CICS SNA System CICS
Processor 2 Processor 3
CITY 2 CITY 3
Sales Inventory
database database
18
5
SESSION # 11
18
6
DEBUGGING
CICS EXECUTION DIAGNOSTIC FACILITY
( CEDF )
OBJECTIVES
18
7
DEBUGGING UTILITIES
Transaction Dump
18
8
EXECUTION DIAGNOSTIC FACILITY (EDF)
EDF is a CICS supplied diagnostic facility to debug
CICS applications in IBM Mainframe environment
Functions of EDF...
EDF manipulates a transaction by executing and
suspending a task and displays the status at
different points
At any point of interruption, information about
the values of EIB, program`s WS area mapping
and application screens (current, previous and
next) and many more can be obtained
At any point EDF can be cancelled and normal
functioning can be resumed
EDF is activated by entering CEDF Trans-id along with
the transaction-id which has to debugged
18
9
EFFICIENT CICS PROGRAMMING
SESSION # 12
19
0
EFFICIENT CICS PROGRAMMING
OBJECTIVES
19
1
EFFICIENT CICS PROGRAMMING
Processing Requirements
Screen requirements
Continued ...
19
2
EFFICIENT CICS PROGRAMMING
User Friendliness
19
3
EFFICIENT CICS PROGRAMMING
Continued ...
19
4
EFFICIENT CICS PROGRAMMING
- END -
19
6