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

RESP value if the record present in the VSAM file.


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

New User


Joined: 21 Jul 2005
Posts: 23

PostPosted: Tue Jun 05, 2007 8:01 pm
Reply with quote

Hi Guys,

I reading a A VSAM file in Online CICS program and has some quries about the same.

EXEC CICS
READ DATASET ('FILE1')
INTO (FILE-REC)
RIDFLD (FILE-ID)
RESP (WS-RESP)
END-EXEC.

EVALUATE WS-RESP
WHEN 0

THROUGH A ERROR SAYING THE KEY ALREADY EXISTS.

WHEN 13 --> NOT FOUND

WRITE THE FILE-REC IN THE FILE.

WHEN OTHER

ABEND THE TRANSACTION.

My question to u guys is,

What will the numeric value of WS-RESP, when the record NOT found in the VSAM file?

Is it 13 or 14 or some other value. Please confirm as in our installation we only chek the value of RESP not
DFHRESP (NORMAL) or DFHRESP (NOTFND).

Thanks,
Gops
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 8:42 pm
Reply with quote

Gops wrote:
Is it 13 or 14 or some other value. Please confirm as in our installation we only chek the value of RESP not
DFHRESP (NORMAL) or DFHRESP (NOTFND).
Well, why can't you continue using DFHRESP (NORMAL) or DFHRESP (NOTFND)?
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Wed Jun 06, 2007 8:27 am
Reply with quote

You can look it up VSAM return codes.
I think

www.theamericanprogrammer.com

has a list of return codes you can use to define NOTFND for VSAM.
You can even look up the other codes you might want to handle.

Regards.
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 23

PostPosted: Wed Jun 06, 2007 12:44 pm
Reply with quote

Hi Raphael / William,

Thnaks For your quick response.

Well, I can't use DFHRESP (NORMAL) or DFHRESP (NOTFND) because as per our installation coding standard we have do a check on the RESP only.

Raphael I had a look into the link you have given, I didn't get answer to my query.

Please give me more/exact details what wil the RESP value if the record not found in the VASM for CICS online program?

Thanks,
Gops
Back to top
View user's profile Send private message
rz061m

New User


Joined: 03 Mar 2006
Posts: 48
Location: Chennai

PostPosted: Wed Jun 06, 2007 1:07 pm
Reply with quote

Hi,

You can check DFHRESP with the code you have posted earlier.

EVALUATE WS-RESP
WHEN DFHRESP (NORMAL)
THROUGH A ERROR SAYING THE KEY ALREADY EXISTS.
WHEN DFHRESP (NOTFND)
WRITE THE FILE-REC IN THE FILE
END-EVALUATE.

Thanks,
Karthik. P
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 1:41 pm
Reply with quote

Gops wrote:
Well, I can't use DFHRESP (NORMAL) or DFHRESP (NOTFND) because as per our installation coding standard we have do a check on the RESP only.
What part of using DFHRESP (NORMAL) or DFHRESP (NOTFND) is not doing a "check on the RESP only"?
DFHRESP (NORMAL) is only synonym for a number......
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Wed Jun 06, 2007 3:09 pm
Reply with quote

Sorry for my previous post.

I think it will be easy for you to find the numeric value for the Response Codes. Like DFHRESP(NORMAL) is equivalent to '00' for example. I looked up 'DFHRESP CODES' in Google and found out that these codes are actually CICS Response Codes. Maybe you can look them up again to find a complete list. I found the list but it is quite long to post. Maybe you can find it yourself. It is hard to miss.


Regards.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 3:22 pm
Reply with quote

Raphael Bacay wrote:
I think it will be easy for you to find the numeric value for the Response Codes. Like DFHRESP(NORMAL) is equivalent to '00' for example.
But why would you want to use the numeric equivalents to the DFHRESP values, to do so opens your code to become obsolete if IBM ever changes anything.
Quote:
I looked up 'DFHRESP CODES' in Google and found out that these codes are actually CICS Response Codes. Maybe you can look them up again to find a complete list. I found the list but it is quite long to post. Maybe you can find it yourself. It is hard to miss.
They are also easily found in the Appendix describing the EIB in the CICS Application Programming Reference......
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 23

PostPosted: Wed Jun 06, 2007 3:49 pm
Reply with quote

Hi Guys,

Thankyou all for your quick responses and for your interest.

Raphael / William thanks to both of you, its 13, I just wanted to confirm it once again.

Thanks,
Gops.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 4:04 pm
Reply with quote

Gops wrote:
Well, I can't use DFHRESP (NORMAL) or DFHRESP (NOTFND) because as per our installation coding standard we have do a check on the RESP only.
I'm still asking, what part of using DFHRESP (NORMAL) or DFHRESP (NOTFND) is not doing a "check on the RESP only"?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Jun 06, 2007 7:48 pm
Reply with quote

and if IBM chages the values for NOTFND or others your program will not
function correctly any more. As stated you should being doing what I call
standard programming practice, which is to use the correct CICS usage
of check the RESP CODES.

DFHRESP(NORMAL), DFHRESP(NOTFND) ect.......
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 06, 2007 9:21 pm
Reply with quote

Hello,

Some sites have "rules"/standards that can cause problems. . . . icon_cry.gif

This
Quote:
Well, I can't use DFHRESP (NORMAL) or DFHRESP (NOTFND) because as per our installation coding standard we have do a check on the RESP only.
is yet another one. . . .

Or maybe the actual standard is being currently interpreted this way. . As Bill asks, how is using a number more correct than using the alpha value?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Jun 08, 2007 1:33 am
Reply with quote

Using the Alpha value, you at least know what condition you are
looking at, and not going and have to fine out the value assigned
to a number. The number has no meaning to me when looking at
them with out having the book opened a tracking down the alpha
function.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top