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

StartBR fails with EIBRESP = 10


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

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Dec 09, 2005 5:04 pm
Reply with quote

Hi,

I have a program which has the following structure :-

1. StartBR a file
2. Readnext until I get the record I want or EOF.
3. EndBR the file

I call this routine 2wice. The second time I do the StartBR, it fails with EIBRESP = 10.

Dont know why the StartBR fails when I have done a EndBR the last time I used the file.

Please reply ASAP.

Cheers.
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Fri Dec 09, 2005 6:08 pm
Reply with quote

Hi murali922,

To my understanding I think the reason why STARTBR fails is due to the illogic condition.

Consider this problem scenario.

Question

Quote:
I have a couple of development questions concerning CICS and a ESDS file.
I am writing a background CICS program that will start and the beginning of
an ESDS file and read, process until it reaches the end of the file. When
I reach the EOF, I put the program to sleep (the CICS delay command) for 30
seconds, giving the users some time to add more data to the end of the ESDS
file. I'm having 2 issues.
I will browse the ESDS file in fileaid and see that there are xx records on
the file. When I run my program in expediter, I can read until the end of
the file, but it may be at the yy record. Is the program reading data out
of the ESDS buffer before it was physically written to the buffer? Also,
when the program wakes up after it's nap, I want to start a browse again at
the RBA that is equal to the last record on the file. I can calculate the
RBA of the last record since the records are fixed length. When the
startbr is executed, I am getting a resp of 21 and a resp2 of 110. In
other words the startbr fails with an illogic condition. I can reset the
RBA to zero and the startbr works just fine. What am I missing?


Answer

Quote:
First issue: Yes, non CICS reads see only the physical disk data while CICS
reads see the buffer.

Second issue: With each READNEXT yoou will get the RBA in the RIDFLD, save it for the STARTBR when you next wake up and READNEXT one extra time to get past the already read record.


Try to figure out the logic, the way you have coded your program.
Hope this helps.
Back to top
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Dec 09, 2005 7:54 pm
Reply with quote

Mine is a KSDS file.

Why is a STARTBR failing in this case, when I have ENDBR the same ??
Back to top
View user's profile Send private message
satsubram

New User


Joined: 18 May 2006
Posts: 1

PostPosted: Thu May 18, 2006 10:18 pm
Reply with quote

I have the same issue with STARTBR issued two times. Did you have a resolution for your problem. Please help.

Thanks in advance.
Back to top
View user's profile Send private message
gskulkarni

New User


Joined: 01 Mar 2006
Posts: 70

PostPosted: Fri May 19, 2006 10:04 am
Reply with quote

Guys, i might be able to help. Could you post your code and RESP and RESP2 values please?
Back to top
View user's profile Send private message
gskulkarni

New User


Joined: 01 Mar 2006
Posts: 70

PostPosted: Fri May 19, 2006 10:25 am
Reply with quote

START=>READNEXT in loop => ENDBR => Reset the STARTBR keyf => STARTBR

This flow should work perfectly fine if the response code of each of them was 0.

You have said response code is 10. But in case of STARTBR you generally do not get resp code = 10. It must be 104, 110 or something like it. Please post the exact RESP and RESP2. Also check the RESP and RESP2 of the last ENDBR.

Although conceptually since you are dealing with the same file again, i.e. browsing the same file in loop, you should be using RESETBR command instead of ENDBR. RESETBR is equal to STARTBR with new key without ending the browse.
Back to top
View user's profile Send private message
karthick sivakumar

New User


Joined: 16 Mar 2006
Posts: 16
Location: india

PostPosted: Wed Jun 07, 2006 2:33 pm
Reply with quote

Hi,


if u are reading a ksds it is enough to give start browse only once .

then in the readnext handle the condition eof. loop until eof is set( loop the read next alone).

finally use end browse(optional). this should work fine i guess

see the example code

EXEC CICS STARTBR DATASET('DATASET')
RIDFLD(KEY)
EQUAL / GTEQ
END-EXEC

PERFORM X100-READNEXT THRU X100-EXIT UNTIL EOF


X100-READNEXT.
EXEC CICS HANDLE CONDITION ENDFILE(X110-END-FILE)

END-EXEC.

EXEC CICS READNEXT DATASET('DATASET')
INTO(WS-RECORD)
RIDFLD(KEY)
END-EXEC.


X110-END-FILE.

SET EOF TO TRUE.


X100-EXIT.
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 dsnrexx fails without error message CLIST & REXX 9
No new posts Z Monitoring server fails to start IBM Tools 1
No new posts EIBRESP=16 and EIBRESP2=25 while doi... CICS 2
No new posts EIBRESP =16 & EIBRESP2 = 01 while... CICS 3
No new posts Fileaid 2 commands instream work. In ... Compuware & Other Tools 2
Search our Forums:

Back to Top