IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need for a new secondary index


IBM Mainframe Forums -> IMS DB/DC
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Fri Jan 18, 2013 1:52 pm
Reply with quote

Hi Friends,

I have a question on requirement w.r.t need for a new secondary index. The requirement is as below:

We have a root segment- Order segment - having key as "Order No". The other fields on the root segment are "customer-code", "order-date", and "ship-indicator" alongwith some other fields.

We need to display all the orders for a given "customer-code" (customer code is input by the user on the inquiry screen) on to the screen in sequence by "order-date" - order with the oldest date first. Only those orders should be displayed for which "order-date" < current-date AND for which "ship-indicator" field is blank.

The database already has secondary index on the root segment based on customer code.

However, since the requirement is to display the orders in sequence by "order-date", I am thinking of defining an index on "order-date" that should point to the root segment.

Should I define:

(1) a single index on "Order-date". OR
(2) a single index on "Order-date" AND "ship-indicator".OR
(3) a single index on "Order-date" AND "ship-indicator AND cusotmer-code".

The order for fields in the index is as given above.

Please let me know your views/thoughts.

Thanks,
Ajay
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Jan 20, 2013 6:49 pm
Reply with quote

do not double post ...

You will not get a double number of answers in the same time
or the same number of answers in half the time

people replying there are the same replying here

one more and You will get a Yellow card

topic locked for now.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Cobol file using index COBOL Programming 2
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts choice of clustering index DB2 3
Search our Forums:

Back to Top