Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need for a new secondary index

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

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Fri Jan 18, 2013 1:52 pm    Post subject: Need for a new secondary index
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
Location: italy

PostPosted: Sun Jan 20, 2013 6:49 pm    Post subject: Reply to: Need for a new secondary index
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.    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us