Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Call a secondary index database

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
ektaag

New User


Joined: 21 Mar 2007
Posts: 14
Location: bangalore

PostPosted: Mon Sep 01, 2008 11:51 am    Post subject: Call a secondary index database
Reply with quote

Hi,
Need ur help!!

We need to call a secondary index database that has two fields as a key. for ex.
identification no as first key,and order no as second.
the purpose is to fetch all the order no for that customer(identif key)

for the first time we don't have the order no so we give iden no and spaces for order no and GT as a operator . But the problem is when there is no order no on that customer it is fetching the next customer. But we don't want that . we want to do that for specific customer.it should give seg not found and not fetch the new customer. we are bound to give the GT operator as we don't know the full key .

please help!!

Thanks
ekta
Back to top
View user's profile Send private message

rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 193
Location: india

PostPosted: Sun Sep 07, 2008 2:15 am    Post subject:
Reply with quote

hello,

Try issuing GE (greater then and equal to) operator, I hope this might solve your problem.If not then let us know for what purpose you are trying to retrive the cutomer information for the first time when order number is blank.


Regards,
Rajat
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Sun Sep 07, 2008 4:23 am    Post subject:
Reply with quote

not knowing if there is no order for an existing customer is common.
that ekta would want to do that is 'a normal business need'
if he was forced to report for all customers
as either list the orders or indicating that they have none.

That ekta can not raise a 'not found' is due to the 'Greater than'.
That is a problem with VSAM, DB2 - any indexed access when you use a
partial key. you are logically forced to use GT syntax to find an 'equal'.
one normally filters the result with code to get ignore a 'higher found'.
Unless the partial key is greater than the last key on the file,
you will always return something - hence the need to filter with code.

Ekta, if your goal is only to report existing orders,
why not just read the order index as your trigger
instead of the complete customer base
thus avoiding 'false positives' (force to filter with code in program)?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    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 SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 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


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us