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

Call a secondary index database


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
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
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: 199
Location: india

PostPosted: Sun Sep 07, 2008 2:15 am
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: 6966
Location: porcelain throne

PostPosted: Sun Sep 07, 2008 4:23 am
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 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 What database does Jobtrac use CA Products 4
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Cobol file using index COBOL Programming 2
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top