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
 

 

How to use EIBRESP in CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
shyamvadeyar

New User


Joined: 20 Dec 2007
Posts: 5
Location: India

PostPosted: Thu Dec 20, 2007 3:37 pm    Post subject: How to use EIBRESP in CICS
Reply with quote

Hi,
I am trying to read a file in CICS by' EXEC CICS READ' command. I am not able to read it properly. I want to know the EIBRESP code value. I have coded immediately after the READ command so as to get the value of EIBRESP. But CICS abends in the READ statement and does not go to the next statement at all.
How do I use EIBRESP to handle abends/errors in CICS?
What are native CICS errors?

Thank you.
Shyam
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Dec 20, 2007 5:22 pm    Post subject:
Reply with quote

How about the HANDLE statement?

O.
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Thu Dec 20, 2007 11:30 pm    Post subject:
Reply with quote

or the RESP (WS-RESP) option?

Rick
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Thu Dec 20, 2007 11:33 pm    Post subject:
Reply with quote

code your read statment with a NOHANDLE


EXEC CICS READ DATASET ('XXXXXX')
INTO (WS-AREA)
RIDFLD(WS-RECKEY)
NOHANDLE
END-EXEC.


* then check EIBRESP
Back to top
View user's profile Send private message
shyamvadeyar

New User


Joined: 20 Dec 2007
Posts: 5
Location: India

PostPosted: Fri Dec 21, 2007 3:15 pm    Post subject:
Reply with quote

Hi Earl,

I did code the way you have mentioned. I am checking for the EIBRESP after the READ command. But the control does not go the statement. It abends in the READ statement and the execution stops.
Do you a have a solution for this?

And what does NATIVE CICS errors mean?
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Fri Dec 21, 2007 9:50 pm    Post subject:
Reply with quote

please show the read statement you are having this problem with and
the eibresp statements..

where did you get the term Native CICS errors ?
Back to top
View user's profile Send private message
Harvey Sullivan

New User


Joined: 05 Nov 2007
Posts: 19
Location: Monterey CA

PostPosted: Sat Dec 22, 2007 2:24 am    Post subject: Handle condition
Reply with quote

ofer71 wrote:
How about the HANDLE statement?

O.


Does it matter where you put the handle condition, before or after the read? Thanks, Harvey
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Sat Dec 22, 2007 5:02 am    Post subject:
Reply with quote

handle condition goes before the read

if blowing up in the read, I supect he has a coding problem, thats why
we need to see the source code he is using..

also what is the CICS ABEND code you are getting ?
Back to top
View user's profile Send private message
shyamvadeyar

New User


Joined: 20 Dec 2007
Posts: 5
Location: India

PostPosted: Mon Dec 24, 2007 9:58 am    Post subject: Reply to: How to use EIBRESP in CICS
Reply with quote

Hi Earl,
This is how I coded..

EXEC CICS READ
DATASET ('XXXXXX')
RIDFLD (WS-KEY)
INTO (WS-RECORD)
UPDATE
LENGTH (WS-MAX-LENGTH)
NOHANDLE
END-EXEC.

I sometimes get AEIV error and sometimes AEIL.

1. Is it that the file needs to know that a program is trying to modify it. Because I am developing a new program to edit a existing file. There are CICS programs in production that edit the same file.

2. May be I will make my doubt simpler. I want to update a FILE. What are the possible CICS ERRORS/ABENDS that I need to take care of while doing so?

3.What is the best method:? (HANDLE or EIBRESP and how to code)

I hope now you might be able to help me in a better way.

Thanks
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Dec 24, 2007 10:48 pm    Post subject:
Reply with quote

depending upon how the file is defined. I see 2 problems with your coding.

1. 'XXXXXX' surely this is not the file name ?

2. since you have length coded , and you are gettting an AEIV/AEIL
abend, then , the value in your ws-max-length field is incorrect

you may also need to code keylength.

talk to your systems programmer for specifics


take the time to use the internet and google for CICS ABEND AEIV
or
look at this link
http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziae0094.htm


I normally use EIBRESP for coding, but then I'm from old'school cics
programming.
Back to top
View user's profile Send private message
shyamvadeyar

New User


Joined: 20 Dec 2007
Posts: 5
Location: India

PostPosted: Thu Dec 27, 2007 1:44 pm    Post subject: All CICS file related errors
Reply with quote

Hi,
Can you please send me a list of all CICS errors when trying to access(read/write/modify) a file so that I can handle errors properly?
Or atleast send me the link where I can find all the CICS file related error?

Thank you
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Fri Dec 28, 2007 5:38 am    Post subject:
Reply with quote

I would need to search the internet for a list of CICS errors. If you want to contract for my time. I would be glad to perform this task for you.

thanks,
icon_idea.gif
Back to top
View user's profile Send private message
Harvey Sullivan

New User


Joined: 05 Nov 2007
Posts: 19
Location: Monterey CA

PostPosted: Fri Dec 28, 2007 7:54 am    Post subject: EIBRESP question
Reply with quote

Earl wrote:
code your read statment with a NOHANDLE


EXEC CICS READ DATASET ('XXXXXX')
INTO (WS-AREA)
RIDFLD(WS-RECKEY)
NOHANDLE
END-EXEC.


* then check EIBRESP


Does this mean that any or all conditions are put into EIBRESP? is this just like the old macro level condition code handling?
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Fri Dec 28, 2007 8:03 pm    Post subject:
Reply with quote

similar to macro level.

even if you code, without the NOHANDLE condition, response codes are still returned.

In addition to EIBRESP , there is also an EIBRESP2 for additional checking.

review the CICS command level programming guide for additional
information

icon_smile.gif
Back to top
View user's profile Send private message
rz061m

New User


Joined: 03 Mar 2006
Posts: 48
Location: Chennai

PostPosted: Mon Dec 31, 2007 9:39 am    Post subject:
Reply with quote

Use the RESP option along with your read statement.

EXEC CICS READ
DATASET ('XXXXXX')
RIDFLD (WS-KEY)
INTO (WS-RECORD)
UPDATE
LENGTH (WS-MAX-LENGTH)
NOHANDLE
RESP (WS-RESP)
END-EXEC.

Then check for EIBRESP; this will avoid abend you encounter.
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Dec 31, 2007 7:22 pm    Post subject:
Reply with quote

in my experience, coding RESP is not necessary, the NOHANDLE optoin
is what prevents the abend. icon_rolleyes.gif
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Dec 31, 2007 7:29 pm    Post subject:
Reply with quote

in my experience, coding RESP is not necessary, the NOHANDLE
is what avoids the abend conditions.
icon_cool.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Jan 15, 2008 7:34 am    Post subject: How to use EIBRESP in CICS
Reply with quote

Could you verify that WS-MAX-LENGTH is a 2-byte signed binary-halfword, set to the maximum-length of WS-RECORD?

I suspect that it's not a correct definition.

A signed-halfword is S9(04) COMP/BINARY/COMP-4/COMP-5, depending on your version of COBOL.

It can have a maximum value of +32767 (X'7FFF').

If your compiler is COBOL2 or greater, then you can populate the halfword with LENGTH OF WS-RECORD.

Regards,

Bill
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Tue Jan 15, 2008 10:21 pm    Post subject:
Reply with quote

What's strange is that AEIV is LENGERR and AEIL is FILENOTFOUND.
Do you have the dataset name in a variable or as a constant ?

Look at the manual: for each command there is a list of possible conditions (in the box at the top of the command description).
For example, READ can raise any of these:
Quote:
Conditions: DISABLED, DUPKEY, FILENOTFOUND, ILLOGIC, INVREQ, IOERR, ISCINVREQ, LENGERR, LOADING, LOCKED, NOTAUTH, NOTFND, NOTOPEN, RECORDBUSY, SYSIDERR
Back to top
View user's profile Send private message
sdsinfo

New User


Joined: 14 Jan 2008
Posts: 10
Location: bangalore

PostPosted: Wed Jan 16, 2008 12:52 pm    Post subject: hi
Reply with quote

if u included the copy book then after this code directly
u can display the EIBRESP copy book variabe , or
if u r writing RESP(WS-RESP) then give display ws-resp,
or u can also check as ..... IF WS-RESP = DFHRESP(NORMAL) ..

then perform further statements...........
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 How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm


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