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 .
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.
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
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)?