Just to relate this back to a prior thread, has anyone used 
     pushbuttons on a window subfile control record to simulate the way 
     windows allows you to sort by column on a display panel? The 
     pushbutton would actually be used in place of column heading, allowing 
     the user to click (or select by hot key) the column view needed. I 
     haven't tried it myself, but it seems plausible. 
     The same problem still applies, though. Switch to a different subfile 
     or reload the current subfile...... I wish we could apply a sort 
     operation to a subfile to reorder the loaded records. Is there any way 
     to retrieve the address of the subfile data, assign this to an array 
     and do a sorta on it? I don't know much about the internal 
     implementation of subfiles, so I couldn't say if something like this 
     is possible or not. 
     Anyone know for sure?

______________________________ Reply Separator _________________________________
Subject: Re: 4 - subfiles 
Author:  <MIDRANGE-L@midrange.com> at INET_WACO
Date:    11/4/99 4:05 PM

If you're really concerned about the read performance, you could simply define t
ee additional subfiles. Load the first (default) when the pgm starts, then switc
the subfile you're displaying based on the user's selection. If the user selects
aview that hasn't been initialized yet, go out and do the read at that time, 
 otherwise just keep alternating the sfile that is displayed.
Another alternative, and one that I have used a few times in the past, is to onl
use a single input file regardless of the number of logical views that the user 
n choose from. The initial subfile load is performed using the default sort 
order.When the user requests a sort on a specific column, I just perform a 
 standard shell sort right in the program.
For what it's worth, I don't think that you are dealing with enough records for 
itto really be much of an issue which method you choose.
John Taylor
----- Original Message ----- 
  From: boothm@earth.goddard.edu 
  To: midrange-l@midrange.com 
  Sent: Wednesday, November 03, 1999 19:08 
  Subject: 4 - subfiles
  Here's a subfile question.  I'm not very good with them.  I have a display 
  screen showing a subfile with 4 fields.  Each field is the key to a logical 
file so thereare 4 logical files in the F-specs.  For clarity, lets call the 
 fields LastName, FirstName, ExtNbr, DeptName.  I want the user to be able to 
display any one of th 4 logical files.  I know the file will never grow beyond 
999 because the ExtNbr eld is 3/0, and because there's only about 150 extensions
now, anyway.   Every t e the user selects another logical to display I clear the
subfile and  reload th entire file to the subfile.  With a dozen test records 
I'm getting sub-second re ads.  Now, as the number of records increases it seems
to me that reload times w l increase.  Still, I know that 5000 records load in 
11 or 12 seconds so the tim for about 200 records will probably be a second or 
  However, it occurs to me that having loaded the subfile, I shouldn't need to 
  read the data file again.  I am thinking there must be an easy way to save 
subfil in case it is needed again, instead of just clearing it, or am I tilting 
at wind lls?

| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@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 on our policy page. If you have questions about this, please contact [javascript protected email address].