Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

End of file condition during EXEC CICS READNEXT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
gsnvsr

New User


Joined: 06 Jul 2005
Posts: 40

PostPosted: Thu Oct 06, 2005 4:20 pm    Post subject: End of file condition during EXEC CICS READNEXT
Reply with quote

Hi

Am trying to read a vsam-ksds file sequentially in CICS. The program is going into an infinite loop without terminating at the End of file. Basically, the end of file condition is not reached and the program is reading the last record infinite times. Program logic seems to be correct and the terminate logic is coded by checking EIBRESP for End of file condition. Please help!

Thanks in advance,
Prasad
Back to top
View user's profile Send private message

mallikiran

New User


Joined: 07 Sep 2005
Posts: 49

PostPosted: Fri Oct 07, 2005 9:07 pm    Post subject:
Reply with quote

Are you comparing your EIBRESP with either of DFHRESP(ENDFILE) or 20?
Back to top
View user's profile Send private message
gsnvsr

New User


Joined: 06 Jul 2005
Posts: 40

PostPosted: Thu Oct 13, 2005 2:40 pm    Post subject: Re: End of file condition during EXEC CICS READNEXT
Reply with quote

Yes! Am comparing EIBRESP with DFHRESP(ENDFLE). Thanks!
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 23

PostPosted: Wed Jun 06, 2007 1:03 pm    Post subject: Re: End of file condition during EXEC CICS READNEXT
Reply with quote

Hi Malli kiran,

Waht will the DFHRESP code in NUMBER when a record or KEY is not found in VSAM file?

DFHRESP(NOTFOUND) or ?

Thanks,
Gops
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jun 06, 2007 1:35 pm    Post subject: Re: End of file condition during EXEC CICS READNEXT
Reply with quote

gsnvsr wrote:
The program is going into an infinite loop without terminating at the End of file. Basically, the end of file condition is not reached and the program is reading the last record infinite times. Program logic seems to be correct and the terminate logic is coded by checking EIBRESP for End of file condition.
Either you are altering the RID field causing a reposition or the program logic is not correct.
You might try to CEDF it and see what the RID field is - if it is looping, and you cancel it, look at the expanded trace entries.
Back to top
View user's profile Send private message
Sandye

New User


Joined: 05 May 2010
Posts: 3
Location: Alabama

PostPosted: Mon Oct 18, 2010 10:27 pm    Post subject: Reply to: End of file condition during EXEC CICS READNEXT
Reply with quote

did anyone figure out this problem? I am having the same issue when reading a ESDS file. I can see where the system EIBRESP = +20 but it is looking at the user EIBRESP and returning a normal response. Please help!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Oct 18, 2010 10:54 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

Did you do as was suggested using CEDF? What was learned?
Back to top
View user's profile Send private message
Sandye

New User


Joined: 05 May 2010
Posts: 3
Location: Alabama

PostPosted: Mon Oct 18, 2010 11:07 pm    Post subject:
Reply with quote

Yes. The file being read in has 3 records with record length of 80 bytes. The first RIDFLD 0, next is 80, next 160. The looping continues on the last record and the RIDFLD continues to be 160.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Oct 19, 2010 12:02 am    Post subject: Reply to: End of file condition during EXEC CICS READNEXT
Reply with quote

Are you beginning your READNEXT API sequences with a STARTBR API? This is mandatory, otherwise (as the fine manual will tell you) "Unpredictable Results may Occur". icon_eek.gif

I guess nobody asked this because we assumed otherwise.

FWIW, the NOTFND condition can only be raised on a sequential browse via a STARTBR API, never a READNEXT.

NOTFND (as in Key Not Found) can be raised on random (direct) READ API's.

Bill
Back to top
View user's profile Send private message
Sandye

New User


Joined: 05 May 2010
Posts: 3
Location: Alabama

PostPosted: Tue Oct 19, 2010 12:58 am    Post subject:
Reply with quote

I do have a STARTBR that gets a good return code. Then I perform the READNEXT.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Oct 19, 2010 1:08 am    Post subject: Reply to: End of file condition during EXEC CICS READNEXT
Reply with quote

Assuming this is a non-Production region and you have the proper security, have you tried this using CECI?

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us