Date: Thu, 20 Apr 1995 17:46:45 EDT Reply-To: The NOMAD2 Discussion List Sender: The NOMAD2 Discussion List From: "Nicholas A.Rawlings" Subject: ddquery('used",tablename) Sorry, Stace, the DDQUERY('USED',...) function gets its info from the "SEG0" statistics, the same as DBCHK ... STAT. That's why it's fast. The only way > ...to obtain the record number of the currently positioned record is to access the data directly. If you guess you're near the "front" of a BTREE file, a LIST NUM(KEYX) NOPR SET &XX WHERE KEYX LT &KEYX OTW &XX=1;IFOK &XX=&XX+1; will get you the relative record number of that &KEYX record. If you think you're near the end, LIST NUM(KEYX) NOPR SET &XX WHERE KEYX GT &KEYX OTW &XX=0; &XX=DDQUERY('USED','RALPH')-&XX; For "standard" NOMAD files, the change in &&INSTANCE_COUNT for a positioning operation will tell you what you need. In short, you gotta access either all the records up to, or all the records after, a given record in order to determine its relative record number. Off to the Training Conference. Hope to see a bunch of you there. back to index