Introduction to z/OS Basics
Chapter 11: Transaction managers on z/OS
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Chapter objectives
 Be able to:
2

Describe the role of large systems in a
typical online business.

List the attributes common to most
transactional systems.

Explain the role of CICS in online
transaction processing

Describe CICS programs, CICS
transactions, and CICS tasks

Explain what conversational and pseudoconversational programming is

Explain CICS and Web-enabling

Discuss the IMS components
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Key terms in this chapter
 BMP
 task/thread
 BMS
 region
 conversational
 PSB
 CICS TS
 IMS TM
 CICS command
 IRLM
 multithreading
 multitasking
3
 transaction
 unit of work
 two-phase commit
 wireless access point
(WAP)
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CSMG
4
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of online processing: a travel agency
 Mainframe applications designed for:
– employee and customer information
– contacts with car rental companies
– hotels
– airline schedules
 Changes must be immediately reflected to
application end-users (in real time)
 Contrast with batch processing
5
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of online processing (continued)
C a r R e n ta l A g e n cy
A irlin e
H o te l
W AP
HTTP
Tra v e l A g e n cy
6
© 2006 IBM Corporation
Chapter 11 Transactional Systems
A practical example
Car
R e n ta l
A g e n cy
H o te l
A irlin e
Tra v e l
A g e n cy
HTTP
W AP
7
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Transactional systems
 Requirements: ACID
Atomicity
Consistency
Isolation
Durability
8
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Transactional systems: terminology
 Commit and roll back
 Multitasking
 Multithreading
 Thread
 Reentrancy
9
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Online Systems and Operating Systems
 Managing and Dispatching tasks
 Controlling user access
 Managing use of memory
 Managing concurrency to data
 Providing device independence
10
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Characteristics of a transactional systems
M a n y u s e rs
R e p e titive
S h o rt in te ra c tio n s
S h a re d d a ta
D a ta in te g rity
L o w c o s t / tra n s a c tio n
11
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Two-phase commit
P hase 1
A
B
C
IN IT IA T O R
Agent of A
Agent of B
U p d a te lo c a l re s o u rc e s
U p d a te lo c a l re s o u rc e s
U p d a te lo c a l re s o u rc e s
P re p a re
R e c e iv e
P re p a re
R e c e iv e
S Y N C P O IN T
C o m m it
S Y N C P O IN T
C o m m it
Phase 2
S Y N C P O IN T
12
© 2006 IBM Corporation
Chapter 11 Transactional Systems
You can manage indoubt UOW
13
© 2006 IBM Corporation
Chapter 11 Transactional Systems
What is CICS?
 Customer Information Control System
 Transactional subsystem of z/OS which:
– run online applications
– the same time, many users, same application(s)
– manages the sharing of resources
– integrity of data
– prioritization of execution, with fast response.
14
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS in a z/OS system
z /O S
Tra n s a c tio n a l
s ys te m
D A TA
A p p lic a tio n
Program
User
15
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Languages & Platforms
 Languages:
- COBOL
- C
- zSeries (z/OS,
OS/390, VSE)
- C++
- Intel servers
- JAVA (JCICS)
- TXSeries (AIX, HPUX, Solaris and
Windows)
- OO COBOL
- PL/I
- Assembler
16
 Platforms:
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Generating a CICS Application Program
Example: COBOL
1)
Translated
Program
2)
Object
Module
Link
Edit
3)
Load
Module
Program
Library
17
//DFHRPL DD DSN=CICSV3.SDFHLOAD1,DISP=SHR
//
DD DSN=CICSV3.SDFHLOAD2,DISP=SHR
//
DD DSN=CICSV3.ULOADLIB,DISP=SHR
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Programming roadmap
 Design application
 Write & test program (includes compiling)
 Define program & transaction in CICS resources
 Define other resources (files, queues, etc…) in
CICS resources (via RDO – CEDA)
 Make resources known to CICS
18
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS in one or multiple LPARS
SYS 1
LPAR
AB
LPAR
LPAR C
Other
Subsyst
Other
Subsyst
CIC
S
CIC
Other
S
TOR
CIC
S
Other
CIC Subsyst
S
CIC
Other S
Subsyst
19
FOR
AOR
WOR
AOR
Subsyst
CIC
S
AOR
Terminals
Programs } one address space
containing all functions
Files
* A CICS subsystem may be composed of one or more
address spaces to isolate functionality, administration
and throughput. As an example:
- TOR = Terminal Owning Region
- AOR = Application Owning Region
- FOR = File Owning Region
- WOR = Web Owning Region
- ROR = Routing Owning region
* This is a configuration known as:
Multi Region Operation (MRO)
SYS 2
PPT
TCT
FCT
PCT
CICS
ROR
CICS
Inter-System Communication (ISC)
CICS
* CICS has strong flexibility
for business configuration
needs thru table definitions
Other
Subsyst
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Programs, Transactions, Tasks and Tables
Transaction
Program Control Table (PCT)
Application Program
Program Processing Table (PPT)
Files
File Control Table (FCT)
Terminals
Terminal Control Table (TCT)
TCT
PPT
FCT
PCT
****
Table Definitions are usually performed by the CICS Systems
Programmer through a CICS facility called Resource Definition
On-Line (RDO). It is invoke through a CICS Transaction by
entering CEDA (CEDB,CEDC).
20
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Batch RDO
Batch
RDO
21
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Features
•Transaction Driven
•Multitasking
CICS
•Multithreading
CICS
CICS
•Quasi-reentrant
22
© 2006 IBM Corporation
Chapter 11 Transactional Systems
A Task executing in Multi-Tasking
• Task Control
• Application Program(s)
• Basic Mapping Support
• File Control
• Program Control
• Temporary Storage Control
• Transient Data Control
• Journal Control (logging)
• Trace Control
• Dump Control
• Interval Control
• Storage Control
23
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Terminal Control uses Basic Mapping Support
SEND API = displaying a screen to the terminal
RECEIVE API = reading data from a screen from
the terminal
Example
:
* EXEC CICS
*
SEND MAP (‘ORCHM01’)
During CICS program compile the API Commands are
*
MAPSET (‘ORCHM01’)
checked for syntax and commented out. They are
then transformed into a starndard “CALL” to the
*
ERASE
CICS Stub-routines.
*
END-EXEC.
MOVE ‘ORCHM01’ TO DFHEIV1 MOVE ‘ORCHS01’
TO DFHEIV2 CALL ‘DFHEI1’ USING DFHEIV0
DFHEIV1 DFHEIV99 . . . .
* EXEC CICS
The DFHEIVxx variables are copied in automatically
*
RECEIVE MAP (‘ORCHM01’)
by the CICS translator into WORKING STORAGE
*
MAPSET(‘ORCHM01’)
i.e. DFHEIVAR COPYBOOK
*
INTO (workstorage area)
* END-EXEC.
MOVE ‘ORCHM01’ TO DFHEIV1 MOVE ‘ORCHM01’
CALL ‘DFHEI1’ USING DFHEIV0 DFHEIV1 …..
24
© 2006 IBM Corporation
Chapter 11 Transactional Systems
An example of BMS map definition
The MAPS are composed of three simple macros:
Note: You can have several maps
DFHMSD – name of mapset
within a mapset definition
DFHMDI – name of map identification
DFHMDF – field screen definitions and location
ORCHM01
ORCHM01
ORDER#
25
PRINT NOGEN
DFHMSD TYPE=MAP,MODE=INOUT,CNRL=FREEKB,LANG=COBOL,TIOAPFX=YES
DFHMDI SIZE=(24,80)
DFHMDF POS=(01,01),LENGTH=01,ATTRB=(ASKIP,DRK,FSET),
INITIAL=‘1’
DFHMDF POS=(01,25),LENGTH=3,ATTRB=(ASKIP,BRT),
INITIAL=‘PURCHASE ORDER - - - FILE INQUIRY’
DFHMDF POS(03,30),LENGTH=13,ATTRB=ASKIP,
INITIAL=‘ORDER NUMBER ’
DFHMDF POS=(03,44),LENGTH=10,ATTRB=(NUM,BRT,IC)
DFHMDF POS=(04,32),LENGTH=11,ATTRB=ASKIP,INITIAL=‘DEPARTMENT’
*
*
*
*
*
DFHMSD TYPE=FINAL
x
x
x
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Conversational
Pseudo-Conversational
C o n v e r s a tio n a l:
User
M enu
Ty p e s
In p u ts
E n te r a c c o u n t _ _ _ _ _ _
PROGV000
F u n c tio n c o d e _ _ _ _ _ _
SEND MAP
W A IT
M enu
E n te r a c c o u n t 1 2 3 4 _
F u n c tio n c o d e M _ _ _ _
R e c o rd U p d a te
User
Ty p e s
Changes
E n te r a c c o u n t 1 2 3 4
N a m e : S m ith
A m o u n t: $ 1 0 .0 0
D a te : 0 5 /2 8 /0 4
M enu
R E C E IV E M A P
R E A D F IL E U P D A TE
SEND MAP
W A IT
R E C E IV E M A P
R E W R ITE F IL E
SEND MAP
R E TU R N
E n te r a c c o u n t _ _ _ _ _ _
F u n c tio n c o d e _ _ _ _ _ _
"U p d a te c o n firm e d "
26
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Conversational

Pseudo-Conversational
P s e u d o -C o n v e r s a tio n a l:
P ROGV 000
User
M enu
Typ e s
In p u ts
E n te r a c c o u n t _ _ _ _ _ _
S E N D M A P ...
R E TU R N T R A N S ID (V 0 0 1 )....
F u n c tio n c o d e _ _ _ _ _ _
P ROGV 001
M enu
R E C E IV E M A P ...
E n te r a c c o u n t 1 2 3 4 _
....
F u n c tio n c o d e M _ _ _ _
R E A D F IL E ...
....
S E N D M A P ...
...
R e c o rd U p d a te
User
Typ e s
Changes
E n te r a c c o u n t 1 2 3 4
N a m e : S m ith
A m o u n t: $ 1 0 .0 0
D a te : 0 5 /2 8 /0 4
M enu
E n te r a c c o u n t 1 2 3 4
N a m e : S m ith
A m o u n t: $ 9 9 .5 0
D a te : 0 5 /2 8 /0 4
" U p d a te C o n firm e d "
27
R E T U R N T R A N S ID
(V 0 0 2 )....
PROGV002
R E C E IV E M A P ...
....
R E A D F IL E U P D A T E ....
R E W R IT E F IL E ....
....
S E N D M A P ...
...
R E T U R N TR A N S ID (V 0 0 0 )...
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Programming commands
 General format:



EXECUTE CICS (or EXEC CICS) + command
e.g. in COBOL:
EXEC CICS function option option ... END-EXEC.
 CICS command example :


EXEC CICS
READ FILE(‘ACCTFIL’)
RIDFLD(ACCTC)
UPDATE ...

28
END-EXEC.
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS transaction flow
O p e r a tin g S ys te m
ABCD
Te r m in a l
S ys te m
C o n tr o l
S e r vic e s
2
3
Program
L ibra ry
S to r a g e
M g m t.
1
F ile or D B
29
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS transaction flow (Cont…)
O p e r a tin g S ys te m
Program
L ibra ry
(m en u
s c reen )
F ile
BM S
5
Program
ABCD01
C o n tro l
F ile or D B
4
30
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS transaction flow (Cont…)
O p e r a tin g S ys te m
Program
L ibra ry
U s e r 's
N e xt
In p u t
6
F ile
C o n tro l
8
Program
ABCD01
7
F ile or D B
BM S
31
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS services for Application Programs
 Application program interface: use CICS
commands
 Terminal control services: use Basic Mapping
Support (BMS)
 File & database control services:
– CICS file control (mainly VSAM)
– Database control (DL/I & DB2)
 Other CICS Services: Task Control
- Program Control Temporary Storage (TS) & Transient Data Control (TD) Interval Control - Storage Control - Dump & Trace Control
32
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Defining the screens
 BMS macros: a form of assembler language
 Result of an assembles : Physical Map
 Physical map contains info to :
– build the screen
– merge variable data between program & screen
– send variables back to program
33
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Program Control
RETURN
XCTL
LINK
LOAD
RELEASE
L e ve l
C IC S
0
C IC S
L e ve l
1
L e ve l
2
EXEC CICS LINK
PROGRAM(PROGRAM-2)
END_EXEC.
P ro g ra m 1
L IN K
...R E T U R N
P ro g ra m 2
XC TL
P ro g ra m 3
L IN K
...R E T U R N
L e ve l
3
EXEC CICS XCTL
PROGRAM(PROGRAM-3)
END_EXEC.
P ro g ra m 4
.....R E T U R N
34
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS COMMUNICATION AREA (COMMAREA)
This area of a program is used to pass information between
other programs and transactions.
• It is automatically provided to you via the Translator phase
• In COBOL it is part of the DATA DIVISION / LINKAGE SECTION
• It initially provides you one byte to be used as a programming SW
although it can range up to 32K bytes in size
O1 DFHCOMMAREA.
05 PROCESS-SW
88 INITIAL-ENTRY
88 VERIFICATION
05 ACCOUNT-NUMBER
PIC X.
VALUE ‘0’.
VALUE ‘1’.
PIC X(10).
*
*
*
EXEC LINK PROGRAM(ACCTPGM)
COMMAREA(DFHCOMMAREA)
LENGTH(11)
END-EXEC.
35
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of CICS application user screen
ABC D
A ve ra g e s a la ry b y d e p a rtm e n t
T yp e a d e p a rtm e n t n u m b e r a n d p re s s e n te r.
D e p a rtm e n t n u m b e r: A 0 2
A ve ra g e s a la ry($ ):
5 8 2 1 1 .5 8
F 3 : E x it
You can program PF, PA, CLEAR Keys to perform any transaction functionality
i.e. EXEC CICS HANDLE AID PF3(EXIT-PGM) . . . .END-EXEC.
36
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of ABEND Codes
37
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Language Examples
38
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS JCL Startup
39
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of CICS Startup Messages on MVS Console
Type
Of
Startup
Temp
Stg.
Init
RDO
Grouplist
being loaded
Good
Morning
Msg
Storage
Size
acquired
40
Java
Enabled
*
Web
Listener
enabled
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of CICS Shutdown Message from MVS Console
Logs
who is
shutting
down
CICS
Closing
Network
No Outstanding
Tasks
41
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of CICS Statistics Collected (DFHSTUP)
42
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS and Web-enabling
 4 major elements of web-enabled applications:
 Presentation logic
 Integration logic
 Business logic
 Data logic
43
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Web support
W eb
B ro w s e r
D ire c t
c o n n e c tio n
C IC S re g io n
C IC S
T C P /IP
lis te n e r
W e b -a w a re
p re s e n ta tio n
lo g ic
C
C
W
C
O
M
M
A
R
E
A
S
S
IB M H TTP
S e rve r fo r O S /3 9 0
C IC S
W e bS e rv e r
P lu g in
44
EXCI
3270
W eb
b r id g e
C IC S
a p p lic a tio n
3270
p re s e n ta tio n
lo g ic
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Transaction Gateway
C IC S
Tra n s a c tio n
G a te w a y
C o n fig u ra tio n
to o l
J a v a c lie n t
a p p lic a tio n
G a te w a y
daem on
C TG .IN I
c tg c fg
JNI
ECI EPI
ESI
C lie n t
daem on
C IC S
s e rve r
Tra n s p o rt
d rive rs
N e tw o rk
45
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS Transaction Gateway and WebSphere Application Server
46
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CICS COMMANDS /DEMOS
CEMT – Master Terminal Commands
* INQUIRE (set file)
* SET (disable a program)
* PERFORM (Statistics)
CECS – Command Syntax Check
CECI – Command Initiation
CEDF – EXECUTE DIAGNOSTIC FACILITY
CEDA/B/C – Resource updating via RDO
(See utility DFHCSDUP*)
CEBR – Temporary Storage Browser
CETR – Trace
CSMG - Messages
CSFE PRINT
JCL SDSF
* See next slide
47
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CECI
48
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CEDA
49
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CEDA EXPAND LIST(DFHLIST)
50
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CEDA Functions for Resource Definitions
51
© 2006 IBM Corporation
Chapter 11 Transactional Systems
CEDA/CEDB/CEDC
52
Summary
© 2006 IBM Corporation
Chapter 11 Transactional Systems
The DFHCSDUP utility provides:
53
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Example of Terminal Interactions
54
© 2006 IBM Corporation
Chapter 11 Transactional Systems
What is IMS?
 Information Management System
 3 components:
– The Transaction Manager (TM)
– the Database Manager (DB)
– Set of system services, providing common services to the
other 2
55
© 2006 IBM Corporation
Chapter 11 Transactional Systems
IMS overview
IM S
Logs
z/O S
C o n so le
IM S S yste m
Tra n s a ctio n
D a ta b a se
M anager
M anager
IM S
M e ssa g e
Q ueues
56
IM S
D a ta b a se s
© 2006 IBM Corporation
Chapter 11 Transactional Systems
IMS Transaction Manager messages
 Four types of messages:
– Transactions
– To go to another logical destination
– Commands for IMS
– For the IMS APPC feature to process
57
© 2006 IBM Corporation
Chapter 11 Transactional Systems
Summary
 Interaction with the computer happens online through the help of a
transaction manager.
 The continued growth of the Internet has caused many
corporations to consider the best ways to make their legacy
systems available to users on the Internet.
 CICS is a transactional processing subsystem. CICS applications
are traditionally run by submitting a transaction request.
 Information Management System (IMS) consists of three
components:
– Transaction Manager (TM)
– Database Manager (DB)
– A set of system services common to both TM and DB
58
© 2006 IBM Corporation
Descargar

Slide 1