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 

Creating index with more than one fields as Key

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


Joined: 04 Apr 2006
Posts: 4
Topics: 2

PostPosted: Mon May 22, 2006 9:24 am    Post subject: Creating index with more than one fields as Key Reply with quote

Hi,

I am trying to creating an index for a database. The database contains one parent segment and one child segment. The index is for child segment. Now, it has one field as the key but I need to amend it as four fields to be a key and all the four fields are not adjacent to eachother. So, if I try with giving one field as SEQ and others as SRCH , I am getting " SEQ field not Unique" abend, since the combination of all the four fields only will be unique.
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: Mon May 22, 2006 9:57 am    Post subject: Reply with quote

It is not mandatory to have all search fields to be adjacent.

Give all four fields in SRCH=(,,,) and it is you or your teams call to have
symbolic or direct pointer addressing for secondary index.


SEQ= can have two value to make key unique in case if all 4 fields are not unique. ( /SX or /CK for symbolic or concatenated key)

Very Happy
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Jayanthi Periasamy
Beginner


Joined: 04 Apr 2006
Posts: 4
Topics: 2

PostPosted: Mon May 22, 2006 10:12 pm    Post subject: Reply with quote

Anil,

Thanks for your reply.
My Present DBD is

SEGM NAME=SWPIDCH,PARENT=SWPIDRT,BYTES=98
FIELD NAME=(FWCHDKEY,SEQ),BYTES=2,START=1

I tried to change as

SEGM NAME=SWPIDCH,PARENT=SWPIDRT,BYTES=98
FIELD NAME=(FWPEFFDT,SEQ),BYTES=5,START=10
FIELD NAME=FWPBSN,BYTES=1,START=79
FIELD NAME=FWPSEQ ,BYTES=1,START=80
FIELD NAME=FWPCOVC,BYTES=1,START=82

In this, it is telling FWPEFFDT is not unique. Could you help me in this... Sad
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: Tue May 23, 2006 9:31 am    Post subject: Reply with quote

I thought u had problen with secondary index ,considering SEQ and SRCH words. But it is not the case here. Problem is with primary key itself.

What actually mean by "creating index". I think this DBD already exists with
child segment having key. Then why new index
_________________
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