Date: Fri, 17 Feb 1995 18:59:44 EST Reply-To: The NOMAD2 Discussion List Sender: The NOMAD2 Discussion List From: "Walter H.Horowitz" Subject: Call trace and two key lookup The following notes were passed to me by Scot Stoney >Subject: RE: CALL BACK PROCEDURE LIST >Several of the tools implement a full call back list during their >default error handling conditions. >The basic approach is to: > 1. Turn DEBUG on. > 2. Set Error msg save on. > 3. Stack two commands for debug: > debug where trace (or something like that) > continue (to exit from debug) > 4. Reset the error message command. > 5. Look at the messages in the &variable set by the debug where > command. >I believe that Tom Ramsberger has included the technique in one or >more of his advanced coding technique sessions delivered at the NOMAD >Training Conferences. >Clearly, to be used in a generic environment, these commands would be >packaged into a single, callable, procedure. >Subject: Two Key Lookup >In the scenario given, presuming that there are a reasonable number >of KEY1 values and not too many KEY2 values for each KEY1.... > DECLARE &CATKEY(0) as ... > &CATKEY = display(&x_key1) cat display(&x_key2); > SELECT key1 among(constant(&x_key1)) > (display(key1) cat display(key2) among constant(&catkeys); > By performing the display/cat operation on the &variables and > assigning the result to &CATKEY, this calculation is done only > one time. By selecting key1 among &x_key1, we get a smart select > on the first part of the primary key. The final selection on the > display'd values is done only where needed. Participation in this discussion by Thomson Software Products employees does not reflect an endorsement by the company. Comments posted here are the responsibility of the poster. There is no official support available here. Void where prohibited by law ;-) I hope you won't flame me or worse flood me with mail (I'm too much of a newbee to know the official word for that punishment) for mentioning that the answers to these kinds of questions are found at the NOMAD Training Conference, to be held at the Hotel Del Coronado in San Diego, April 23-26. If you need the details or a registration form, send a note to srf@dart.thomsoft.com. I hope to see you there. Perhaps we can have an Internet BOF. Time to go home and eat my spam. :-) Walter H. Horowitz - email whh@dart.thomsoft.com Thomson Software Products - (203) 845-5025 back to index