Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

RESP value if the record present in the VSAM file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: RESP value if the record present in the VSAM file.
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: 3158
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 8:42 pm    Post subject: Re: RESP value if the record present in the VSAM file.
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    Post subject:
Reply with quote

You can look it up VSAM return codes.
I think

http://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    Post subject: Re: RESP value if the record present in the VSAM file.
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 1:41 pm    Post subject: Re: RESP value if the record present in the VSAM file.
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 3:22 pm    Post subject:
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    Post subject: Re: RESP value if the record present in the VSAM file.
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: 3158
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 4:04 pm    Post subject: Re: RESP value if the record present in the VSAM file.
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    Post subject:
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

Site Director


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

PostPosted: Wed Jun 06, 2007 9:21 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us