• Subject: RE: Subfile processing with duplicate keys
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Thu, 14 May 1998 08:02:56 -0400
  • Organization: commsoft

On Wednesday, May 13, 1998 8:22 PM, Tim-Bar [SMTP:timbar@blazenet.net] 
wrote:
> We have a multiformat logical file that has duplicate keys that needs to
> be updated in a subfile program. You select the record you want to
> update and it is displayed on the screen. Because of the duplicate keys,
> you don't get the record you want. You can't use relative record number
> with a multiformat logial file. Anybody got any ideas?

Darlene,
  Yuck.
The implicit assumption here is that having duplicate keys is acceptable 
for the rest of the application, and that adding a sequence number or 
timestamp to make unique keys is out.  Given that, here's one sadly 
torturous way to go where you're headed:
Use the file information data structure to get the record format name from 
the multi-format logical.  Store it in your selection subfile as a hidden 
field.  Also store any "identifying" fields from the input record as 
hidden fields.  When the user selects the record, use the hidden record 
format name to SETLL/READE against the underlying physical (using your 
favourite looping construct<g>) and compare the hidden subfile records to 
the database records until you get a match.  Ugly.
Good luck!

Buck Calabro
Commsoft, Albany, NY
mailto:mcalabro@commsoft.net

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact [javascript protected email address].