View previous topic :: View next topic
|
Author |
Message |
shyamvadeyar
New User
Joined: 20 Dec 2007 Posts: 5 Location: India
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
How about the HANDLE statement?
O. |
|
Back to top |
|
|
rpuhlman
New User
Joined: 11 Jun 2007 Posts: 80 Location: Columbus, Ohio
|
|
|
|
or the RESP (WS-RESP) option?
Rick |
|
Back to top |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
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 |
|
|
shyamvadeyar
New User
Joined: 20 Dec 2007 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
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 |
|
|
Harvey Sullivan
New User
Joined: 05 Nov 2007 Posts: 19 Location: Monterey CA
|
|
|
|
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 |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
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 |
|
|
shyamvadeyar
New User
Joined: 20 Dec 2007 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
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
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 |
|
|
shyamvadeyar
New User
Joined: 20 Dec 2007 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
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,
|
|
Back to top |
|
|
Harvey Sullivan
New User
Joined: 05 Nov 2007 Posts: 19 Location: Monterey CA
|
|
|
|
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 |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
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
|
|
Back to top |
|
|
rz061m
New User
Joined: 03 Mar 2006 Posts: 48 Location: Chennai
|
|
|
|
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 |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
in my experience, coding RESP is not necessary, the NOHANDLE optoin
is what prevents the abend. |
|
Back to top |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
in my experience, coding RESP is not necessary, the NOHANDLE
is what avoids the abend conditions.
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
sdsinfo
New User
Joined: 14 Jan 2008 Posts: 10 Location: bangalore
|
|
|
|
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 |
|
|
|