1. TD & TS queue compare
QueueNAME PREDEFINE read update
TD1-4 BYTENEED only 1 timeno
TS1-8 BYTESNO NEEDServal timesyes
2. return and return transid(EIBTRNID)
ITEMCOMPARE
RETURNRETURN TO previous trans, if return run at leave 1,
then teminate the task, user can enter another trans id
RETURN TRNSID(EIBTRANID)end taks, but continue a preudoconversation application
3.COMM-AREA & DFHCOMMAREA
COMM-AREA - this is ur working storage variable which could be given any name as u might know.
It contains values which u want to use for the next execution(pseudo-conversational programs) of same program or any other program ur calling.
To retain the value for the next execution of the same program u have to write the following code during return...
EXEC CICS
RETURN TRANSID('Transaction-ID')
COMMAREA(COMM-AREA)
END-EXEC
DFHCOMMAREA- it is defined in the linkage section which receives the values passed from the first execution of the same program or from some other program which has linked to this program.
u can use the values from DFHCOMMAREA directly or by moving to COMM-AREA variables.
4.SYBOLIC MAP
A. NO extended attributes
12 byte FILLER |xx |x |xxxxx |xx|x|xxxxxxxxxxxxx
TIOA |DATFLDL |DATFLDF |DATFLDI
12 byte FILLER |xx |x |xxxxx |xx|x|xxxxxxxxxxxxx
TIOA |FILLER |DATFLDA |DATFLDO
B.extended attributed-color
12 byte FILLER |xx |x |x |xxxxx |xx|x|xxxxxxxxxxxxx
TIOA |DATFLDL |DATFLDF |FILLER | DATFLDI
12 byte FILLER |xx |x |x |xxxxx |xx|x|xxxxxxxxxxxxx
TIOA |FILLER |DATFLDA |DATFLDC | DATFLDO
5. MAP-DFHMDF OCCURS
TELNO DFHMDF POS=(7,1),LENGTH=9,ATTRB=NORM,OCCURS=40
The description of these fields in the symbolic map looks like this in COBOL:
02 TELNOG OCCURS 40.
03 FILLER PICTURE X(2).
03 TELNOA PICTURE X.
03 TELNOO PIC X(9).
This structure lets you fill the map from an array in your program (or any other source) as follows:
PERFORM MOVENO FOR I FROM 1 THROUGH 40.
...
MOVENO.
MOVE AVAIL-NO (I) TO TELNOO (I).
IF DAYS-SINCE-USE (I) < 90, MOVE DFHBMBRY to TELNOA (I).
6. Symblic MAP - DRK
PHYSICAL MAP- DFHMDF which have no name
Symblic map- DFHMDF which have name
when send map merge -> symblic map + DRK will not display because it is symblic map.
When send dataonly-> symblic map + DRK will display
7. normal return VS return transid
retrun-> return to previsou logic program, when it is in LEVEL 1. then it teminate the task
RETRURN TRANSID-> END THE TASK , but continue the pseudoconversation.
8. Link & COMMEARA
LINK -> Pass control to anoth program.
RETURN -> Linked program back to linked program
COMMEARA-> define in working storage in linking program-> define in linkage section in linked program. The change in linked program for commarea are accessible for lining program
9. EXEC CICS ASSIGN USERID(USER) STARTCODE(STARTCODE) END-CICS
ASSIGN gets values from outside the local environment of the application program. The data obtained depends on the specified options
returns an 8-byte userid of the signed-on user. If no user is explicitly signed on, CICS returns the default userid. Special considerations apply if you are using an intercommunication environment. See the CICS Intercommunication Guide for more information about the ASSIGN command for LUTYPE6.1, APPC, and MRO.
returns a 2-byte indicator showing how the transaction issuing the request was started. It can have the following values:
Code
Transaction started by
D
A distributed program link (DPL) request that did not specify the SYNCONRETURN option. The task cannot issue I/O requests against its principal facility, nor can it issue any syncpoint requests.
DS
A distributed program link (DPL) request, as in code D, that did specify the SYNCONRETURN option. The task can issue syncpoint requests.
QD
Transient data trigger level.
S
START command without data.
SD
START command with data.
SZ
FEPI START command.
TD
Terminal input or permanent transid.
U
User-attached task.
10. LINK
linking program
PROGRAM1 PROGRAM2
DATA DIVISION. DATA DIVISION.
WORKING-STORAGE LINKAGE-SECTION.
01 PASSED-TO-PROGRAM2. 01 DFHCOMMAREA.
Bitmap 05 NAMEA PIC X(20) VALUE '1111'. 05 NAMEB PIC X(20) .
PROCEDURE DIVISION. PROCEDURE DIVISION.
EXEC CICS LINKAGE PROGRAM('PROGRAM2'). Move '2222' to NAMEB.
END-EXEC. EXEC CICS RETURN END-EXEC.
EXEC CICS SEND FROM (NAMEA) END-EXEC
RESULT- 2222
Note: a. The name can be different in commarea
b. Auto copy commarea's data to linked program. When the data in linked SRC changed, it will be accessable by linking SRC(auto copy the data to linking SRC)
11. link & XCTL
Bitmap Bitmap Bitmap LEVEL 0 CICS SYSTEM
LEVEL 1 PROGRAM1 PROGRAM3
EXEC CICS LINK PROGRAM('PROGRAM2') END EXEC EXEC CICS RETURN END-EXEC
EXEC CICS XCTL PROGRAM('PROGRAM3') END EXEC
LEVEL2 PROGRAM2
EXEC CICS RETRUN END-EXEC
12. TD & TS
TD TS
Maximum length queue name 4 8 or16
Must queues be predefined? Yes No
sequential read Yes Yes
Direct read NO Yes
RECORD UPDATE NO YES
AUTOMATION DELETION INTRA NO
AUTOMATION TRANS INITIATION INTRA NO
Record can be read outsid cics EXTRA NO
14. read/write/rewrite/DELETE TS QUEUE
14.1 wirte Ts exameple-WRITE A TS RECORD WITH ITME
WORING-STORAGE.
05 TS-ID PIC X(8).
PROCEDURE DIVISION.
STRING EIBTRMID EIBTRNID DELIMITED BY SIZE INTO TS-ID
EXEC CICS
WREITEQ TS QUEUE(TS-ID)
FROM (TS-REC)
LENGTH(TS-RECL) -> TS-RECL can <= or > the length of TS-REC-> IF > THEN Constaint of TS-REC + BLAINK will be writed into ts queue->if < then trancate ts-rec and write into TSQ
ITEM(TS-ITEMNO) -> WRITE TS QUEUE+ MOVE CURRENT ITEMNO TO TS-ITEMNO
RESP(TS-ERR-CODE)
END-EXEC
14.1 UPDATE A SPECIFIC TS RECORD WITH ITEM
MOVE 20 TO TS-ITEMNO
EXEC CICS WRITEQ TS QUEUE(TS-ID)
FROM (TS-REC)
REWRITE
LENGTH(TS-RECL)
ITEM(TS-ITEMNO)
RESP(TS-ERR-CODE)
END-EXEC
Note : 1. when write no LENGERR
2. LENGTH IS DATA-VALUE(DATA-AREA OR CONSTAINT VALUE)
3.TS -THE LENGTH IS VARIABLE . So every time, we can write different length
14.3 READ TS EXAMPLE- Sequential and Diretly retrieve
a. read sequential
EXEC CICS READQ TS QUEUE (TS-ID)
INTO (TS-REC)
LENGTH(TS-RECL) -> the length of expected receive -> if the length of TSQ item > TS-RECL -> then LENGERR -> no relation with the length of TS-REC
NEXT -> SEQUENTIAL read. First time get the first ITEM of TSQ. Second time get the second itme of TSQ ect.
RESP(TS-ERR-CODE)
END-EXEC
b. read directly
EXEC CICS READQ TS QUEUE (TS-ID)
INTO(TS-REC)
LENGTH(TS-RECL)
ITEM(ITEMNO) -> EXAMPLE -> MOVE 2 TO ITEMNO. THEN it will get the second item of TSQ.
RESP(TS-ERR-CODE)
END-EXEC
NOTE: 1. LENGTH MUST DATE-AREA(CAN'T BE COSNTAINT) FOR READQ
14.4 DELETE TS QUEUE
EXEC CICS DELETEQ TS QUEUE(TS-ID) END-EXEC -> usually run before write TSQ
15. Read TD QUEUE
EXEC CICS
READQ TD QUEUE('TDQ1')
INTO (WK-VAR1)
LENGTH(TDQ-LENGTH)
END-EXEC
Note 1. TDQ can noly sequential read.(so it no item) . And if 1 record read. Can' read again(detructive read).
2. execute first time get the first record. Execute again get the second record
EXEC CICS
DELTEQ TD QUEUE('TDQ1') -> DELETE TDQ'S RECORDS. CAN'T DELETE THE DEFINITION AND ISTALL TDQ. SO WHEN DELETEQ TD QUEUE, WE CAN CONTINUE WRITE RECORDS INTO TDQ
END-EXEC
Note 1. TDQ must define and install in cics group.
2. DELETEQ TD QUEUE->ONLY DELETE THE RECORDS IN TDQ