Beruflich Dokumente
Kultur Dokumente
Once this is done, go to Dsn and type the name of the physical file name you want to
allocate in place of the existing file name.
Now again change the status to Ope and Ena from Clo and Dis. If the file is existing and
has consistent properties you will see the message as normal to your right. Else it will
give a message OPEN/CLOSE FAILED. Note that even if the the file does not exist, the
status can be changed to Ena from Dis but it will give an error when you are trying to
open the file.
Also CICS wont allow you to allocate a new physical file unless the status of the
existing file is closed and disabled.
Example-2 PROGram:
CEMT I PROG(PROGNAME) <ENTER>
Result:
I PROG(PROGNAME)
STATUS: RESULTS - OVERTYPE TO MODIFY
Prog(PROGNAME) Len(0000000000) Ass Pro Ena Pri
Res(000) Use(0000000000) Any Cex Ful Qua
Ced
Ass tells us that the program is written in Assembler. This can also be Cob (COBOL) or
Pli.
Pro tells us that this is a program. This can also be Map (MAP/MAPSET)
Ena tells us that this program is enabled. This can also be Dis (Disabled)
For us to execute any program its status should be enabled.
If you want to see the detailed description, place your cursor on the resource name or its
status fields and press Enter. You will be able to see the detailed descriptions for that
resource. This is true for all resources.
Example-3 TRAnsaction:
CEMT I TRA(TRNX) <Enter>
Result:
I TRA(TRNX)
STATUS: RESULTS - OVERTYPE TO MODIFY
Tra(TRNX) Pri( 001 ) Pro(PROGNAME ) Tcl( DFHTCL00 ) Ena Sta
Prf(DFHCICSA) Uda Bel Iso
Bac Wai
Pri tells us the priority of the transaction. Higher the value, least is the priority.
Pro tells us the name of the program that is associated with this transaction. i.e., when we
trigger this transaction program PROGNAME will get executed.
Ena tell us that the status is enabled. This can also be disabled.
For us to run any transaction, the transaction, and the program associated with that
transaction and all the resources likes files that the program uses should be enabled. Also
the files should be open.
CEBR:
Another useful system transaction is CEBR. This is used to browse through the TSQ
records.
Syntax:
CEBR TSQ-Name <Enter>
This will display all the records present in the TSQ.
CECI:
Another system transaction that can prove handy is CECI. This is a command level
interpreter. Using this transaction we can execute any CICS command with out having to
write an entire program. Example:
I want to execute ASKTIME.
CECI <enter> This will display all the options commands we can execute. In this we
can find an option ASKtime.
Type Ask and press Enter. The next screen that shows up is as follows:
ASK
STATUS: ENTER ONE OF THE FOLLOWING OR HIT ENTER FOR DEFAULT
Abstime
Now enter ABSTIME as follows:
ASK ABSTIME and hit enter.
It will show the following screen:
ASK ABSTIME ASK
STATUS: ABOUT TO EXECUTE COMMAND
EXEC CICS ASKtime Abstime()
NAME= DEFAULT
Now again press enter. The command will get executed and result will be obtained.
ASK ABSTIME
STATUS: COMMAND EXECUTION COMPLETE
EXEC CICS ASKtime Abstime( +003281070156140 )
NAME=
CEDF: This is a diagnostic facility available in CICS which executes all CICS
commands present in the program interactively showing the state of the program before
and after the execution of the Command. But having XPEDITOR we dont have to
concern ourselves with this.
CESF: To logoff from the region.
EIBTIME
EIBDATE
EIBTASKN
EIBTRNID
EIBTRMID
EIBAID
EIBCPOSN
EIBCALEN
EIBDS
EIBFN
EIBRCODE
Exceptional Conditions.
Handle
Ignore
Nohandle
FROM (record-layout)
RIDFLD(key-field)
KEYLENGTH(length of key-field)
MASSINSERT
END-EXEC
MASSINSERT is very rarely used. Do not use this unless you know the complete
implications of this option.
+ Delete
EXEC CICS DELETE
DATASET(ddname)
RIDFLD(key-field)
KEYLENGTH(length of key-field)
GENERIC
NUMREC(data-area)
END-EXEC
If we have already issued a READ with UPDATE and then want to delete the record, then
DO NOT mention RIDFLD and KEYLENGTH. We mention RIDFLD only if we want to
delete the record directly with out issuing a READ with UPDATE.
GENERIC We cannot use this option when we issue a READ with UPDATE
command. If we want to use GENERIC then we should directly issue the DELETE
command. And the rules of RIDFLS and KEYLENGTH are same as for READ. If we use
this option, all the records whose key start with that mentioned in RLDFLD gets deleted.
When this option is used, if we specify NUMREC then after the command is
executed, data-area will hold the value of number of records that have been deleted.
+ Rewrite
EXEC CICS REWRITE
DATASET (ddname)
FROM (record-layout)
Length (length of record-layout)
END-EXEC
We issue this command only after a successful READ with UPDATE command.
+ Unlock
EXEC CICS UNLOCK
DATASET (ddname)
END-EXEC
When a READ with UPDATE is issued the records gets locked. This lock gets released
only when a REWRITE or DELETE is issued. (Of course the lock gets released even
when the task completes). But after we issue a READ with UPDATE, if we feel the
record needs no update then we can release the lock over the record by issuing this
command.
END-EXEC
If we do not do a ENDBR CICS does it for us as soon as the task terminates.
+Resetbr
EXEC CICS RESETBR
DATASET (ddname)
RIDFLD (key-field)
KEYLENGTH (length of key-field)
REQID (data-value)
GENERIC
GTEQ/EQUAL
END-EXEC
If we want to do a STARTBR with doing an ENDBR then we use RESETBR.
TSQ CONTROL COMMANDS
+WRITEQ
EXEC CICS WRITEQ TS
QUEUE (Queue-name)
FROM (Queue-record-layout)
LENGTH (length of Queue-record-layout)
ITEM (data-area)
REWRITE
MAIN/AUXILIARY
END-EXEC
The queue-record-layout does not include the Queue-Name and Item-nbr in it.
We mention REWRITE when we want to rewrite an existing TSQ record. There is no
READ with UPDATE command for TSQ as is for files.
+DELETEQ
EXEC CICS DELETEQ TS
QUEUE (Queue-name)
END-EXEC
+READQ
EXEC CICS READQ TS
QUEUE (Queue-name)
INTO (record-layout)
LENGTH (length of record-layout)
ITEM (data-value)/NEXT
END-EXEC
We can read the TSQ records sequentially, by mentioning NEXT instead of ITEM option.
It will start reading from 1st record.
We can read the TSQ records randomly, by mentioning the item number of the record we
want to read against the ITEM option.
We can combine both of above, first READQ TS with ITEM option followed by READQ
TS with NEXT option to achieve dynamic read of records.