View previous topic :: View next topic
|
Author |
Message |
Anil Thomas
New User
Joined: 04 Mar 2012 Posts: 4 Location: India
|
|
|
|
Hi,
One of my CICS MAP program abended with abend code 'AEIP'. The program abended when it tried to perform ENDBR on a VSAM file. Below are the details :-
Code: |
Last CICS Command . . . . : ENDBR (EIBFN)
CICS Response Code. . . . : INVREQ (EIBRCODE)
RESP Condition. . . . . . : INVREQ (EIBRESP)
RESP Condition Reason . . : 00000023 (EIBRESP2) |
The program flow is like :-
SET STARTBR-FLAG = 'N'
PERFORM STARTBR
SET STARTBR-FLAG = 'Y'
PERFORM READNEXT
PERFORM ENDBR
SET STARTBR-FLAG = 'N'
The program abended at the ENDBR step and the value of the STARTBR-FLAG at the time of abend is 'N'. The input key value used for these operations is an item code '12345' . But when I searched this item code in the VSAM file ,it is not present in the file. NOTFND condition is handled for these operations. I am assuming that the STARTBR gave a NOTFND and because of this the control went to the EXIT para mentioned in the NOTFND handler and the SET STARTBR-FLAG = 'Y' step was skipped.
Is the abend because of the ENDBR operation when a STARTBR was not executed ?
Also If a STARTBR gives NOTFND condition , will it be considered as 'STARTBR not performed' ?
Please suggest me with a solution... |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Posting 'program flow' tells us nothing. You need to show actual code with the EXEC CICS commands. You've not shown the EXIT para mentioned either.
Unfortunately, today is not "PSYCHIC DAY".
You do need a successful STARTBR to have occurred before issuing an ENDBR .
Garry. |
|
Back to top |
|
|
Anil Thomas
New User
Joined: 04 Mar 2012 Posts: 4 Location: India
|
|
|
|
So If the program try to perform STARTBR on a VSAM file with a key value wich is not present in that VSAM file, will that be considered as a successful STARTBR ? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Depends on the type of STARTBR you want. If using GTEQ your STARTBR can be successful but positioned at a key higher than the one specified.
Garry. |
|
Back to top |
|
|
Anil Thomas
New User
Joined: 04 Mar 2012 Posts: 4 Location: India
|
|
|
|
I am not using GTEQ. The STARTBR code is
Code: |
EXEC CICS STARTBR
DATASET ('XXXXXXXX')
RIDFLD (XXXXXXXX-KEY)
END-EXEC.
|
|
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
That will return NOTFND , so the STARTBR is unsuccessful. This is documented in the CICS Application Programming Reference - there's a link to manuals above....
Garry. |
|
Back to top |
|
|
Anil Thomas
New User
Joined: 04 Mar 2012 Posts: 4 Location: India
|
|
|
|
Thanks Garry for the suggestions . Found out that the root cause of the abend is, key field value is not present in the VSAM file.
For testing I created two scenarios in our TEST environment. The range of the key field value in the VSAM file is 500000 <---> 998000
1) Key field = 540000
The key value 540000 is not present in the VSAM file. But when I ran the program it didnt abend , instead it took the next greater value in the VSAM file 540001 as the key value.
1) Key field = 999999
The key value 999999 is not present in the VSAM file. When I ran the program it abended at the ENDBR statement, since there is no value in the VSAM file which is greater than or equal to 999999. |
|
Back to top |
|
|
|