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

ENDBR Abend with INVERQ 23


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

New User


Joined: 04 Mar 2012
Posts: 4
Location: India

PostPosted: Thu Mar 14, 2013 12:37 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Mar 14, 2013 2:15 pm
Reply with quote

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
View user's profile Send private message
Anil Thomas

New User


Joined: 04 Mar 2012
Posts: 4
Location: India

PostPosted: Thu Mar 14, 2013 2:25 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Mar 14, 2013 3:15 pm
Reply with quote

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
View user's profile Send private message
Anil Thomas

New User


Joined: 04 Mar 2012
Posts: 4
Location: India

PostPosted: Thu Mar 14, 2013 3:31 pm
Reply with quote

I am not using GTEQ. The STARTBR code is
Code:
EXEC CICS STARTBR           
     DATASET ('XXXXXXXX')   
     RIDFLD  (XXXXXXXX-KEY)
END-EXEC.                   
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Mar 14, 2013 3:36 pm
Reply with quote

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
View user's profile Send private message
Anil Thomas

New User


Joined: 04 Mar 2012
Posts: 4
Location: India

PostPosted: Thu Mar 14, 2013 5:35 pm
Reply with quote

Thanks Garry for the suggestions icon_biggrin.gif . 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
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 ISAM and abend S03B JCL & VSAM 9
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Need to get an DLI abend like U0200 IMS DB/DC 2
Search our Forums:

Back to Top