Escolar Documentos
Profissional Documentos
Cultura Documentos
Identification Division.
No differences
Environment Division
MUST be EMPTY in CICS Program! No SELECT statements allowed!
Data Division
No FILE SECTION (No SELECTS)
CICS-Prg
CICS-Prg
CICS-Prg
CICS-Prg
If you dont code it, CICS Will! The commarea (if any) placed here! EIBCALEN gives length of commarea 0 (ZERO) means there is NO commarea
CICS-Prg
CICS-Prg
10
CICS-Prg
11
END-EXEC
CICS-Prg
12
END-EXEC
CICS-Prg 13
END-EXEC
CICS-Prg
14
END-EXEC
CICS-Prg 15
CICS-Prg
16
CICS-Prg
18
END-EXEC
CICS-Prg
20
END-EXEC NOTES: Record MUST be READ with UPDATE! data-area - NOT have to match Read
CICS-Prg 21
CICS-Prg
22
CICS-Prg
23
Exception Conditions
Most Common Exceptions:
DISABLED DUPREC FILENOTFND INVREQ IOERR NOTAUTH NOTFND Dataset disabled Record already exists Dataset not in FCT Invalid request File I/O error User not authorized Record not in file
CICS-Prg
24
DETECT
Save copy and compare before updating OR Add Maint-Timestamp and check it Notify User to get latest version of data
CICS-Prg
26
Avoiding Deadlock
Sometimes called Deadly Embrace Happens when records from multiple files must be updated as a unit
Withdraw from Savings Deposit to Check Crash after withdraw? Wheres money?
CICS-Prg
27
CICS-Prg
28
END-EXEC NOTE: Program name must be in PPT. Works like COBOL PERFORM statement.
CICS-Prg 29
CICS-Prg
30
Terminal Handling
CURSOR Positioning (in SEND MAP)
IC option in DFHMDF Macro (ATTRB Parm)
If more than one LAST position is used.
CICS-Prg
31
CICS-Prg
32
CICS-Prg
33
Attribute Modification
Symbolic Map includes Attribute byte Field Name with A appended Cryptic bit codes and names used Copy library supplied by IBM (Horrible) Most shops have their own copy book We dont have extended attributes!
CICS-Prg
34
CICS-Prg
37
CICS-Prg
38
END-EXEC NOTE: HANDLE AID sets up RECEIVE MAP! Not executed when encountered! In OLD Progs.
CICS-Prg 39
Error Processing
There are over 70 CICS error Conditions Mercifully only a few are handled TWO Methods of handling exceptions:
HANDLE CONDITION (Old Method)
Similar in function to HANDLE AID
CICS-Prg
40
CICS-Prg
41
CICS-Prg
42
HANDLE CONDITION
Common CONDITIONS
DUPREC Record already exists MAPFAIL No data sent by user NOSPACE No space left in file NOTOPEN Data set not OPEN NOTFND Record not in file PGMIDERR Program not in PPT ERROR ALL conditions not coded
CICS-Prg
43
CICS-Prg
46
CICS-Prg
47
LINKAGE SECTION
Used to access data left by previous execution of a program Data should be moved to your W/S! Each execution starts with initial W/S Define COMMAREA in Working-Storage DEFINE DFHCOMMAREA in Linkage RETURN references Working-Storage
CICS-Prg 48
Most kept current by CICS (Page 212) You can update a few of them-EIBTRNID
CICS-Prg
49
Last CICS Command Completion Status More Completion Status Response Code (OLD) Recent Resource Name
Map Name Program Name Data Set Name
CICS-Prg 51
Common System Area Transaction Work Area Terminal Control Table User Area Must establish Addressability if needed
CICS-Prg 52
CICS-Prg
53
CICS-Prg
54