Академический Документы
Профессиональный Документы
Культура Документы
SESSION BREAKUP
Day 1 2 3 4 5 Session & Topic 1 File Handling 2 File Handling (contd.) 1 Terminal Handling 2 Temporary Storage 1 Interval & Task Control 2 Program & Storage Control 1 Error Processing 1 Intercommunication 2 Intercommunication (contd.)
March 18,2000
Day 1 - Session 1
File Handling
File Handling
Sequential Processing using BROWSE
commands VSAM Alternate Index Generic Key Mass Insert CICS Data Tables
March 18,2000 BNG Version 2.0 4
March 18,2000
STARTBR Command
STARTBR DATASET(filename) RIDFLD(data-area) REQID(data-value) [RRN | RBA] [GTEQ | EQUAL] [GENERIC] [KEYLENGTH(data-value)] RESP(data-area)
END-EXEC
March 18,2000 BNG Version 2.0 6
STARTBR Command
DATASET RIDFLD
RRN RBA GTEQ
EQUAL
March 18,2000
The file name from the file control table The field identifying the record where the browse operation will start The file is relative record file The file is a ESDS The browse operation will start at the first record whose key is greater than or equal to the value in RIDFLD The browse operation will start at the record whose key value is equal to the value in RIDFLD BNG Version 2.0
STARTBR Command
GENERIC Only part of the key in the RIDFLD field should be used KEYLENGTH A binary half word or literal value that indicate the length of the key RESP A binary full word item
March 18,2000
READNEXT Command
READNEXT DATASET(filename) INTO(data-area) RIDFLD (data-area) [RRN | RBA] [GENERIC] [KEYLENGTH(data-value)]
END-EXEC
March 18,2000
READNEXT Command
DATASET INTO
RIDFLD RRN RBA GENERIC
The file name from the File Control Table The area that will contain the record being read Must specify the same data name specified in the STARTBR command The file is a relative record file The file is a ESDS Only a part of the key in the RIDFLD should be used
BNG Version 2.0 10
March 18,2000
READNEXT Command
KEYLENGTH A binary half word or literal value that indicates the length of the key.
March 18,2000
11
before issuing the next READNEXT command Applied only for forward browsing VSAM reads forward in the index from the current position Faster for relatively close but not adjacent records If the records are very far, the response time will increase. In such cases, RESTBR should be used
March 18,2000 BNG Version 2.0 12
READPREV Command
READPREV DATASET(filename) INTO(date-area) RIDFLD(data-area) [RRN | RBA] [GENERIC] [KEYLENGTH(data-value)]
BNG Version 2.0 13
March 18,2000
READPREV Command
DATASET INTO
RIDFLD RRN RBA GENERIC
The file name from the File Control Table The area that will contain the record being read Must specify the same data name specified in the STARTBR command The file is a relative record file The file is an ESDS Only part of the key in the RIDFLD field should be used
BNG Version 2.0 14
March 18,2000
READPREV Command
KEYLENGTH A binary half word or literal value that indicates the length of the key.
March 18,2000
15
ENDBR Command
ENDBR DATASET(filename)
operation can be performed on the file. Other wise the results are un-predictable Syncpoint should be preceeded by ENDBR command. Basically Browing is a LUW. Always use to avoid dead locks
March 18,2000 BNG Version 2.0 16
RESETBR Command
RESETBR DATASET(file name) RIDFLD(data-area) [RRN | RBA] [GTEQ | EQUAL] [GENERIC] [KEYLENGTH(data-value)]
BNG Version 2.0 17
March 18,2000
RESETBR Command
DATASET RIDFLD
RRN RBA GTEQ
EQUAL
March 18,2000
The file name from the File Control table The field identifying the record where the browse operation will be repositioned The file is a relative record file The file is as ESDS The browse operation will be repositioned at the first record whose key is greater than or equal to the value in RIDFLD The browse operation will be repositioned at the record whose key is equal to the value id RIDFLD BNG Version 2.0
18
RESETBR Command
GENERIC Only a part of the key in the RIDFLD field should be used KEYLENGTH A binary half word or literal value that indicates the length of the key.
March 18,2000
19
Exceptional Conditions
DSIDERR ENDFILE ILLOGIC INVREQ
IOERR LENGERR NOTFND NOTOPEN
March 18,2000
The data set is not in the FCT There are no more records to be read A VSAM error has occurred The browse request is invalid (not specified in FCT) An I/O error has occurred A length error has occurred The record specified in a STARTBR command does not exist The data set is not open
BNG Version 2.0 20
Exceptional Conditions
DUPKEY Indicate that more records exist with the same key (AIX)
March 18,2000
21
Day 1 - Session 2
File Handling (contd.)
March 18,2000
23
key records DATASET option to have the Path name STARTBR command to have EQUAL option
Check for NOTFND condition
March 18,2000
24
STARTBR Example
STARTBR DATASET(INVPATH) RIDFLD(CM-CUSTOMER-NO) EQUAL RESP(RESPONSE-CODE)
March 18,2000
25
identify records in a KSDS Has to begin at the first byte of the complete key The length can not be equal to the complete key of the KSDS RIDFLD should be large enough to hold the complete key Forward browsing only is possible. READPREV will raise INVREQ condition
March 18,2000 BNG Version 2.0 26
key INVREQ is raised if KEYLENGTH is not less than the length of the complete key When used with STARTBR command the effect is similar to GTEQ GENERIC option can be used in READ & DELETE commands also Length March 18,2000 could be changed BNGusing Version RESETBR 2.0 27
March 18,2000
28
29
MASSINSERT
Used when more than one record is to be
written to the same point in a file Makes insertion more efficient Applicable for KSDS, ESDS & PATH UNLOCK command has to be used to end the MASSINSERT operation No file control command can be issued before the MASSINSERT ends.
March 18,2000 BNG Version 2.0 30
MASSINSERT example
WRITE DATASET(CUSTINV) FROM(INVOICE-REC) RIDFLD(INV-REC-KEY) MASSINSERT RESP(RESPONSE-CODE)
March 18,2000
31
frequently A virtual storage copy of a KSDS file The KSDS is copied to the table at CICS startup Types of Data Tables
CICS maintained tables (CMT)
CICS automatically updates the source data set whenver an update takes place & vice versa User program need not have to wait till the update is completed in the source data set
reserved for exclusive use Use MASSINSERT if you are inserting multiple records at the same position of the file. Use skip sequential if records are not together but they are relatively close. Use GENERIC option to delete records with keys starting with the same string.
March 18,2000 BNG Version 2.0 34
Day 2 - Session 1
Terminal Handling
Terminal Handling
Printer Output Message Routing RECEIVE Command SEND Command March 18,2000 BNG Version 2.0
36
March 18,2000
43
Name of the field that contains the data to be added to the logical message Length of the FROM field. Build a logical page Pages to be written to temporary storage for later retrieval under operator control Erase terminal buffer as each page is sent during page retrieval Name of the field containing header information Name of the field containing trailer information
BNG Version 2.0 46
Specify a non blank value in the third byte of the prefix. This charcter is used as part of the header or trailer message to indicate the position for displaying the page number When an overflow condition occurs BMS scans the header & trailer data & replaces this particular character with the page number Maximum 5 bytes for page number
BNG Version 2.0 48
March 18,2000
TRAILER (TR-AREA)
March 18,2000 BNG Version 2.0 49
SEND PAGE
Ensures that the last page of data is written to
temporary storage even if it is not complete Specifies when the user can retrieve the message by issuing retrieval commands It is mandatory after the last SEND TEXT command Syntax: SEND PAGE OPERPURGE
March 18,2000 BNG Version 2.0 50
SEND PAGE
SEND PAGE [OPERPURGE] [RETAIN | RELEASE]
OPERPURGE Operator must issue a message termination to delete the logical message Control returns to the application program when the user finishes viewing the message Control never returns to the program
BNG Version 2.0 51
RETAIN
RELEASE
March 18,2000
Map Definition
Format name DFHMDI SIZE=(lines,columns), [LINE=line number | NEXT,] [COLUMN=col.no,] [JUSTIFY=FIRST | LAST,] [HEADER=YES | TRAILER=YES] SIZE=(2,80), LINE=NEXT, COLUMN=1, TRAILER=YES
BNG Version 2.0 53
March 18,2000
LINE=NEXT Map positioning is done mostly by specifying JUSTIFY=FIRST (normally for header map) or JUSTIFY=RIGHT (normally for trailer map) JUSTIFY parameter controls the positioning of header & trailer map HEADER & TRAILER parameters are used to control overflow processing
March 18,2000 BNG Version 2.0 54
Overflow Condition
SEND MAP does not send HEADER & TRAILER automatically An OVERFLOW condition is raised when a detail map & the largest
trailer map will not fit into the current page The program should check the OVERFLOW condition & send the trailer & header map While sending the header page,
The page buffer is written into the temporary storage Page buffer is cleared Header map is sent
March 18,2000
56
No control over
overflow prcessing
March 18,2000
57
Printer Output
Printer Concepts
The printer has a printer buffer similar to
page buffer. It is the intermediate storgae between the host system & the printers print mechanism When the BMS page buffer is full, the message is sent to the printer buffer The page overflow features can not be used. It has to be done by keeping track of a line March 18,2000 BNG Version 2.0 59 counter
Printing Considerations
Overflow processing is to be done by the program.
Hence no need to specify HEADER & TRAILER options FORMFEED option is to be used to skip pages PAGING option is not to be used if the message is to be directly printed SEND PAGE is to be issued to force the last page of the message to be sent
March 18,2000 BNG Version 2.0 62
Message Routing
ROUTE Command
Syntax ROUTE
LIST(data-name) INTERVAL(hhmmss) | TIME(hhmmss) [NLEOM] Example ROUTE LIST(ROUTE-LIST) TIME(173000)
March 18,2000
64
ROUTE Command
01 ROUTE-LIST 05 LIST-ENTRY-1. 10 LE1-TERM-ID 10 FILLER 05 LIST-ENTRY-2. 10 LE2-TERMI-ID 10 FILLER 05 FILLER
PIC X(4) VALUE L1P1. PIC X(12) VALUE SPACES. PIC X(4) VALUE L2P3. PIC X(12) VALUE SPACES. PIC S9(4) VALUE -1 COMP.
March 18,2000
65
RECEIVE Command
RECEIVE Command
Syntax RECEIVE INTO(data-area) LENGTH(data-area) RESP(data-area) Example RECEIVE INTO(CMD-LINE) LENGTH(CMD-LENGTH) March 18,2000 BNG Version 2.0 RESP(RESPONSE-CODE)
67
SEND Command
SEND Command
Syntax SEND
FROM(data-name) [LENGTH(data-value)] [CTLCHAR(data-name)] [ERASE]
69
Day 2 - Session 2
Temporary Storage & Transient Data
Temporary Storage
Temporary Storage
Temporary storage is divided into Temporary Storage
queues (TS Queues) Each TS queue can contain one or more records Each TS Queue is identified by a queue name (of 1 to 8 characters) Each record is assigned an item number Access could be
Sequential (in item number sequence) Random (by specifying the item no)
WRITEQ TS Command
Syntax WRITEQ
TS QUEUE(name) FROM(data-area) LENGTH(data value) [ITEM(data-area) | REWRITE] [MAIN | AUXILIARY]
Example WRITEQ
TS
March 18,2000
READQ TS Command
Syntax READQ TS QUEUE(name) INTO(data-area) LENGTH(data-area) [ITEM(data-value) | NEXT] QUEUE(TSQ-NAME) INTO(TSQ-REC) LENGTH(TSQ-LENGTH) ITEM(TSQ-ITEM-NO) RESP(RESP-CODE)
BNG Version 2.0 74
Example READQ TS
March 18,2000
DELETEQ TS Command
Syntax DELETEQTS Example DELETEQTS
QUEUE(NAME) QUEUE(TSQ-NAME)
processing, it exists indefinitely No provision to delete a2.0single record March 18,2000 BNG Version
75
Control Table (DCT). DCT contains the queue name (or destination id) & the queues characteristics Record gets deleted when it is read from the queue Two types of transient data queues
Extra partition data queue Intra partirion data queue
March 18,2000 BNG Version 2.0 77
apart from CICS Mainly used for capturing data online & process later by batch programs It is a sequential file (QSAM) It need not have to be in disk only; It can be on tape also.
March 18,2000 BNG Version 2.0 78
queue It is stored in a VSAM file named DFHNTRA. (all queues) Provides a facility for Auomatic Transaction Initiation (ATI).
A triger level is defined in DCT & the corresponding transaction When the number of records reach the triger level, the transaction is initiated automatically
BNG Version 2.0
March 18,2000
79
WRITEQ TD Command
Syntax WRITEQ TD QUEUE(name) FROM(data-area) [LENGTH(data-value)] Example WRITEQ TD QUEUE(L86P) FROM (PRINT-AREA)
March 18,2000 BNG Version 2.0 80
READQ TD Command
Syntax READQ
TD QUEUE(name) INTO(data-area) [LENGTH(data-area)] QUEUE(L86P) INTO(PRINT-AREA) LENGTH(PRT-LEN) BNG Version 2.0 RESP(RESP-CODE)
Example READQ
TD
March 18,2000
81
DELETEQ TD Command
Syntax DELETEQ RD QUEUE(name) Example DELETEQ TD QUEUE(L86P) Though the records are delelted on completion of the read opertaion, the space occupied by the queue is not release. Hence it can be deleted to release the space. DCT entry is not removed DELETEQ command is not valid for extra partition destination
March 18,2000 BNG Version 2.0 82
Day 3 - Session 1
Interval Control and Task Control
Interval Control
ASKTIME Command
Syntax ASKTIME
[ABSTIME(data-area)]
ABSTIME 15 byte packed decimal field where CICS places an abslute time value representing the number of milliseconds that have elapsed since Jan 1 1900 Example ASKTIME ABSTIME(ABSOLUTE-TIME)
March 18,2000 BNG Version 2.0 85
FORMATTIME command
FORMATTIME ABSTIME(data-area) [DATE(data-area) [DATEFORM(data-area)]] [MMDDYY(data-area)] [DDMMYY(data-area)] [YYMMDD(date-area)] [YYDDMM(data-area)] [YYDD(data-area)] [DATESEP[(data-value)]] [DAYCOUNT(data-area)] [DAYOFWEEK(data-area)] [DAYOFMONTH(data-area)] [MONTHOFYEAR(data-area)] [YEAR(data-area)] [TIME(data-area) [TIMESEP[(data-value)]]
BNG Version 2.0
March 18,2000
86
FORMATTIME command
ABSTIME DATE DATEFORM MMDDYY DDMMYY YYMMDD YYDDMM YYDDD DATESEP
March 18,2000
Data area containing the absolute time Date formated in installation specific form Installation standard is returned Date in MMDDYY Format Date in DDMMYY Format Date in YYMMDD format Date in YYDDMM format Date in YYDDD format Separator between day, month & year
BNG Version 2.0 87
FORMATTIME command
DAYCOUNT DAYOFWEEK
DAYOFMONTH MONTHOFYEAR YEAR TIME TIMESEP
March 18,2000
No of days from Jan 1 1900 The number that corresponds to the day of the week Day in the current month Number that corresponds to the month in current year full year (4 digits) Time in hhmmsss format Separator used for time
BNG Version 2.0 88
START Command
START TRANSID(name) INTERVAL(hhmmss) TIME(hhmmss) AFTER [HOURS(hh)] [MINUTES(mins)] [SECONDS(secs)] AT [HOURS(hh)] [MINUTES(mins)] [SECONDS(secs)] [TERMID(name)] [FROM(data-area) [LENGTH(data-value)]] [RTERMID(name)] [RTRANSID(name)] [QUEUE(name)] [REQID(name)]
BNG Version 2.0 89
March 18,2000
March 18,2000
90
RETRIEVE COMMAND
Syntax RETRIEVE
March 18,2000
CANCEL Command
CANCEL REQID(name)
REQID Specifies the 8 byte value that identifies the START command to be canceled
March 18,2000
92
Task Control
SUSPEND Command
SUSPEND
March 18,2000
94
ENQ Command
ENQ RESOURCE(data area) LENGTH(data value) RESOURCE 1 to 255 byte long character string that identifies the resource to be ENQed Length of the RESOURCE field. Half word binary
BNG Version 2.0 95
LENGTH
March 18,2000
DEQ Command
DEQ RESOURCE(data area) LENGTH(data value) RESOURCE 1 to 255 byte long character string that identifies the resource to be DEQed Length of the RESOURCE field. Half word binary
BNG Version 2.0 96
LENGTH
March 18,2000
Day 4 - Session 1
Error Processing
ABEND Processing
99
ABEND Command
Syntax ABEND
[ABCODE(data-value)] [CANCEL]
Recovery Processing
Recovery Processing
Logging
Dynamic Transaction Backout Emergency Restart Logical Unit of Work SYNCPOINT Command
March 18,2000
102
Day 4 - Session 2
Error Processing (contd)
Journal Control
March 18,2000
105
March 18,2000
106
Day 5 - Session 1
Inter communication
Inter Communication
Transaction Routing
Function Shipping Distributed Program Link Asynchronous Processing Distributed Transaction Processing
March 18,2000
108
Communication Mechanisms
Multi Region Operation (MRO) InterRegion Communication Access Method
Unique to CICS Depends on Supervisor Calls
Cross-Memory Services
Data exchanged directly between address spaces No overhead of supervisor call
Interystem Communication (ISC) Connected through VTAM March 18,2000 BNG Version 2.0
109
Transaction Routing
A terminal owned by one CICS system run a transaction in
some other system PCT Entry in TOR DFHPCT TYPE=REMOTE, TRANSID=INQ1, SYSIDENT=CTSC PCT Entry in AOR DFHPCT TYPE=ENTRY TRANSID=INQ1 PROGRAM=CUSTINQ
March 18,2000 BNG Version 2.0 110
Transaction Routing
CEDF expects the transaction to be owned
111
Function Shipping
A program in one CICS system access
March 18,2000
Function Shipping
FCT Entry in AOR DFHFCT TYPE=REMOTE DATABASE=CUSTMAS SYSIDNT=CTSC LRECL=80 KEYLEN=4 TYPE=DATASET DATASSET=CUSTMAS ACCMETH=(VSAM,KSDS) SERVREQ=(BROWSE,DELETE,UPDATE) RECFORM=(FIXED,BLOCKED)
BNG Version 2.0 113
March 18,2000
Function Shipping
SYSID in CICS commands READ DATASET(CUSTMAS) INTO(CUST-REC) RIDFLD(CUST-NO) SYSID(CTSC) LENGTH(CMAS-LEN) KEYLENGTH(4) March 18,2000 BNG Version 2.0 RESP(RESP-CODE)
114
issue a LINK command that invokes a program in another CICS system Easy way to implement client-server applications Can be used to avoid long sequence of function shipping requests
March 18,2000 BNG Version 2.0 115
Asynchronous Processing
Distributed START command.
START command includes a SYSID option or the
PPT of the transaction table specifies a remote system. All the START command options can be used. The task that issued the START command & the started task are treated as separate LUW. If one fails, the other is not affected.
March 18,2000 BNG Version 2.0 117
systems communicate with each other. This is called conversation The program that initiates the transaction is called front end The other program is called back end This is CICS implementation of APPC
March 18,2000 BNG Version 2.0 118
THANK YOU