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

VSAM Response code 16 for ENDBR


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

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Mon Jul 11, 2011 5:07 pm
Reply with quote

I am getting Vsam response code 16 for Endbr, which is invreq

INVREQ

Occurs if the ENDBR command is issued for a file that has not successfully had a previous STARTBR command issued for it. Default action: Terminates the task abnormally.

I have used in my module as


EXEC CICS STARTBR
DATASET (WS-BKP-FILE)
RIDFLD (WS-BKP)
RESP (WS-RESP-CODE)
GTEQ
END-EXEC

the above startbr command execution is successful with 0000 response code


then readnext,once sequential read is done, im issuing below endbr command

EXEC CICS ENDBR
DATASET(WS-BKP-FILE)
RESP(WS-RESP-CODE)
END-EXEC.

note:the above mentioned starbr is not in loop
pls help me with this.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 11, 2011 5:31 pm
Reply with quote

well, error codes/responses from CICS like DB2,
i tend to trust.

you are issuing an endbr on a ds that did not have a startbr.
simple as that.

make sure you are not slopping crap into your ws-bkp-file variable.

noticed that you did not supply the readnext code.
Back to top
View user's profile Send private message
Arun bv

New User


Joined: 29 Dec 2010
Posts: 41
Location: Mumbai

PostPosted: Mon Jul 11, 2011 5:40 pm
Reply with quote

ok.... after ur post i checked the code,, i have given startbr for the same dataset before and it is successful in execution when i debug(xped)...

for ur reference readnext command i have used was

EXEC CICS READNEXT
DATASET(WS-BKP-FILE)
INTO(WS-F1149BKP-F1149BK1)
RIDFLD(WS-BKP)
RESP(WS-RESP-CODE)
LENGTH(LENGTH OF WS-F1149BKP-F1149BK1)
END-EXEC.



this readnext command also executed successfully...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jul 11, 2011 6:05 pm
Reply with quote

If the answer to your 16 is only that, then start by trusting it. Otherwise you'll waste a lot of time (yours and others).

What is the value of WS-BKP-FILE when you do the ENDBR?

If you like, put the ENDBR immediately after the STARTBR and run it again. If it works, then something is happening between the STARTBR and ENDBR which makes it not work.

Are you doing the ENDBR more than once? Can the code be entered without doing the STARTBR?

Don't just say "hey, I've got a problem here", but make use of the information from the problem to find out what is wrong.

You said you checked the code after dbz's post. I hope you checked the code before your initial post.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Jul 11, 2011 8:21 pm
Reply with quote

This is one of the few occasions where CEDF might be more useful than xpediter...
Start CEDF, run your transaction and have a good look at the 3 commands (STARTBR, READNEXT and ENDBR) before and after execution.
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top