View previous topic :: View next topic
|
Author |
Message |
gsnvsr
New User
Joined: 06 Jul 2005 Posts: 40
|
|
|
|
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 |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
Are you comparing your EIBRESP with either of DFHRESP(ENDFILE) or 20? |
|
Back to top |
|
|
gsnvsr
New User
Joined: 06 Jul 2005 Posts: 40
|
|
|
|
Yes! Am comparing EIBRESP with DFHRESP(ENDFLE). Thanks! |
|
Back to top |
|
|
Gops
New User
Joined: 21 Jul 2005 Posts: 23
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
Sandye
New User
Joined: 05 May 2010 Posts: 3 Location: Alabama
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Did you do as was suggested using CEDF? What was learned? |
|
Back to top |
|
|
Sandye
New User
Joined: 05 May 2010 Posts: 3 Location: Alabama
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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".
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 |
|
|
Sandye
New User
Joined: 05 May 2010 Posts: 3 Location: Alabama
|
|
|
|
I do have a STARTBR that gets a good return code. Then I perform the READNEXT. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Assuming this is a non-Production region and you have the proper security, have you tried this using CECI?
Bill |
|
Back to top |
|
|
|