MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Package set

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
beenaj
Beginner


Joined: 22 Dec 2004
Posts: 3
Topics: 1

PostPosted: Thu Dec 23, 2004 7:47 am    Post subject: Package set Reply with quote

Hi,

I have a doubt regarding package set and cursor.
From my understanding of working of cursors, when open cursor (for a select query) is performed all the rows selected are available in a view and when we do a fetch, the records are fetched one at a time.

My problem is as follows, I have split tables which needs to be accessed with different qualifiers. I use the Set package set to access the different split tables.
My first table is not a split table, meaning I can fetch records from the first table using any qualifier. I set the package set to a particular value and select the records. In my fetch loop I have to access another table which is a split table. For accessing this table, I reset the package set, now when i go back to the fetch, it is abending with -501.

To overcome this, I coded one more set package set after the read of the second table with the initial package set value and it is working fine.

Can anyone tell me why -501 is occuring ? Already the rows have been selected and we are just trying to fetch the same.

Is it that the cursor is getting closed when I change the package set ? then how is it getting solved when I again reset it back to original package set ?

Regards,
BeeJith
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 23, 2004 9:30 am    Post subject: Reply with quote

Beenaj,

Did the program issue a Syncpoint in between?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
beenaj
Beginner


Joined: 22 Dec 2004
Posts: 3
Topics: 1

PostPosted: Wed Dec 29, 2004 1:52 am    Post subject: Reply with quote

No there is no syncpoint being issued.
Back to top
View user's profile Send private message
beenaj
Beginner


Joined: 22 Dec 2004
Posts: 3
Topics: 1

PostPosted: Wed Dec 29, 2004 1:55 am    Post subject: Reply with quote

Kolusu,

As an additional info, please note that the code is done using cool:gen, and it is within the Read Each loop that the package set is being set.

Regards,
beejith
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group