View previous topic :: View next topic
|
Author |
Message |
srrao_kilari
New User
Joined: 28 Nov 2005 Posts: 12 Location: New Delhi
|
|
|
|
Can anybody please expalain DFHVALUE in CICS and what is the practical purpose of it. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
In COBOL/CICS, some options and codes are stored as fullword binary values.
For example:
Code: |
EXEC CICS INQUIRE FILE(FILE-NAME)
OPENSTATUS(FILE-STAT)
RESP(INQ-RESP)
END-EXEC |
The value received in FILE-STAT is just a number. In order to safely check its value, use DFHVALUE:
Code: |
IF FILE-STAT = DFHVALUE(CLOSED) THEN |
It is very similar to DFHRESP. Using the same example:
Code: |
IF INQ-RESP = DFHRESP(FILENOTFOUND) THEN |
In both cases, the sentence is replaced by a valid COBOL value during the CICS precompile. |
|
Back to top |
|
|
gskulkarni
New User
Joined: 01 Mar 2006 Posts: 70
|
|
|
|
DFHVALUE is a translator routine used by CICS. There are options on a number of commands that describe or define a resource. CICS supplies, in CICS-value data areas, the values associated with these options. The options are shown in the syntax of the commands with the term ?cvda? in parentheses. You pass a cvda value in two different ways: v You can assign a cvda value with the translator routine DFHVALUE. This allows you to change a cvda value in the program as the result of other run-time factors. For example:
Code: |
MOVE DFHVALUE(NOTPURGEABLE) TO AREA-A.
EXEC CICS WAIT EXTERNAL ECBLIST() NUMEVENTS() PURGEABILITY(AREA-A) |
If the required action is always the same, you can declare the value directly. For example:
Code: |
EXEC CICS WAITCICS ECBLIST() NUMEVENTS() PURGEABLE |
You receive a cvda value by defining a fullword binary data area and then testing the returned value with the translator routine DFHVALUE. For example:
Code: |
EXEC CICS CONNECT PROCESS .... STATE(AREA-
IF AREA-A = DFHVALUE(ALLOCATED) ....
IF AREA-A = DFHVALUE(CONFFREE) .... |
|
|
Back to top |
|
|
avelayudhan
New User
Joined: 30 Nov 2005 Posts: 26
|
|
|
|
Do anyone know what are the possible values of DFHRESP? like NORMAL, NTFND..etc? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Each EXEC CICS command have its own conditions.
If you want to know exactly, you have to look at the book.
Here are some example:
RECEIVE MAP have the following conditions: EOC, EODS, INVMPSZ, INVPARTN, INVREQ, MAPFAIL, PARTNFAIL, RDATT, UNEXPIN
WRITEQ TS have the following conditions: INVREQ, IOERR, ISCINVREQ, ITEMERR, LENGERR, LOCKED, NOSPACE, NOTAUTH, QIDERR, SYSIDERR |
|
Back to top |
|
|
|