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 

how to use index to search

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS
View previous topic :: View next topic  
Author Message
digitalnirmal
Beginner


Joined: 06 Dec 2005
Posts: 21
Topics: 10

PostPosted: Wed May 17, 2006 5:04 am    Post subject: how to use index to search Reply with quote

I have a IMS DB DB1

the struct of this DB is as follows

DBROOT (key = KEY1)
|
|--DBSEG1 (key = KEY2)

now an index has been created on DBSEG1
The structure now looks like this if the index is used for view

DBSEG1 (key = KEY2)
|
|--DBROOT (key = KEY1)


I need to write a prog to search DB1 using the index on keyfields [KEY2, KEY1]

what steps need to be done??
Do i need a new PSB?
If yes, what shoutl the PSB look like?
Also can I search using two key segments in a single SSA????
Back to top
View user's profile Send private message
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Wed May 17, 2006 9:56 am    Post subject: Reply with quote

One more information required here. Even though it is said that secondary index is created on DBSEG1, can you once gain let us know what is source and target segments of secondary index. This will help to come out with best call.

What excatly should the call do , ie. what segment information ur looking here
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Wed May 17, 2006 10:03 am    Post subject: Reply with quote

INDICES parameter can do something like accessing segment with primary and secondary key.

"http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims9.doc.adb/dba317.htm"


Not sure wether it helps you out Confused
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
digitalnirmal
Beginner


Joined: 06 Dec 2005
Posts: 21
Topics: 10

PostPosted: Fri May 19, 2006 12:34 am    Post subject: Reply with quote

Hi Anil
i'm not sure what u mean by this
"what is source and target segments of secondary index"


"what segment information ur looking here"
I'm looking to insert / update into DBSEG1
Back to top
View user's profile Send private message
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Fri May 19, 2006 4:11 am    Post subject: Reply with quote

To insert into DBSEG1, there is no need to use secondary index.


Tp update , i think ur looking for occurences of DBSEG1 based on some criteria.


Are you novice in Secondary index
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
digitalnirmal
Beginner


Joined: 06 Dec 2005
Posts: 21
Topics: 10

PostPosted: Fri May 19, 2006 4:29 am    Post subject: Reply with quote

We are using the secondary index to improve performance of the existing code
The plan is to seek the segment using an index and then insert/update depending on conditions
Back to top
View user's profile Send private message
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Fri May 19, 2006 7:24 am    Post subject: Reply with quote

i assume that you have a file with keys of segments DBSEG1 and DBROOT.

File has secondary index of DBSEG1 and primary key DBROOT and data to updateor insert.

Read the database as

GU DBSEG1(SECONDARY KEY FIELD=*******)
DBROOT(Primary key field=******)



PSB should have procopt=secondary index database in PCB statement of PSB
segm dbseg1,parent=0procopt=ir or g
segm dbroot ,parent=dbseg1


Instead of GU call give GN and later check the fields of segment for selection criteria.
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS 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