IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is DFHVALUE in CICS and what is the Use of it


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srrao_kilari

New User


Joined: 28 Nov 2005
Posts: 12
Location: New Delhi

PostPosted: Tue May 23, 2006 12:07 pm
Reply with quote

Can anybody please expalain DFHVALUE in CICS and what is the practical purpose of it.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue May 23, 2006 2:32 pm
Reply with quote

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
View user's profile Send private message
gskulkarni

New User


Joined: 01 Mar 2006
Posts: 70

PostPosted: Tue May 23, 2006 2:51 pm
Reply with quote

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
View user's profile Send private message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Fri Nov 17, 2006 8:29 pm
Reply with quote

Do anyone know what are the possible values of DFHRESP? like NORMAL, NTFND..etc?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Nov 19, 2006 9:34 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top