× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A few years ago I had to write a program similar to what you are looking
for with a few more features.  It didn't chew up system resources too
badly and performed pretty well and only a few people had access to it.
Here are some of the features related to your inquiry.

The program had four columns of information for each record.  When the
subfile was loaded the first column was automatically in ascending
order.  The user could also re-sort the subfile by any column selected.
The sorting required that the subfile was unloaded into a sort file and
run through a simple sort routine.  After the sort the subile was
reloaded from the sort file.  The performance seemed much better doing
it this way versus using a logical file for each column to be sorted or
using sort routines and rereading the database file.  The subfile
resides in memory so reading and writing is much faster.

Also, since the database file had more than 9,999 records I force the
user to enter criteria to reduce the number of records to display.  

Another thing I included in the program was a search function that read
through the subfile sequentially.  When it found the record with the
matching string it would reposition the subfile to that record and mark
it.  The user could do this search on any of the columns.  This was
surprisingly fast considering that it was a sequential read.  When the
user pressed the search key it would go to the next matching record.
When there were no more matches a message was issued that it was at the
end and then would go back to the first match when the search key was
pressed again.  I also had it set up to allow the user to search with
partial strings.  

It's probably not the way you should structure a program but it worked
well and made the user's job easier.




Basil Zangare
Applications Specialist
Nikon Inc
1300 Walt Whitman Road
Melville, New York 11747
phone: (631) 547-4389
fax: (631) 547-4026
bzangare@xxxxxxxxx


-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bhat, Chandra
Sent: Friday, April 07, 2006 12:28 AM
To: cobol400-l@xxxxxxxxxxxx
Subject: [COBOL400-L] How to view data in alphabetical order in a
subfile

Folks,
 
In the below subfile, The records are displayed in the alphabetical
order.
Now, what I want to know is how can I view records from a particular
customer name starting with alphabet say 'P' if when I enter P or PXXXXX
in
the 'Position' to field?  
 
                                                   
                                                              Position
to  .
. . . .              
 

 Type options, press Enter.

  2=Edit       3=Add     4=Delete                            
  
     Cust.Name     City                     A/c No

      A1                MUMBAI              10001

      A2                DELHI                  10002

      B1                HYDERABAD       20001

      B2                KOLKATA            20002

      C1                PUNE                  30001

      C2                CHENNAI             30002

      D1                BANGALORE       40001

      D2                NAGPUR              40002

      -                    -     
      -                    -    
 
Rgds
 
 
     
 
IMPORTANT NOTICE: 

The information in this email (and any attachments) is confidential. 
If you are not the intended recipient, you must not use or disseminate
the
information.
If you have received this email in error, please immediately notify me
by
"Reply" command 
and permanently delete the original and any copies or printouts thereof.

Although this email and any attachments are believed to be free of any
virus
or 
other defect that might affect any computer system into which it is
received
and opened, 
it is the responsibility of the recipient to ensure that it is virus
free
and no responsibility 
is accepted by American International Group, Inc. or its subsidiaries or
affiliates either 
jointly or severally, for any loss or damage arising in any way from its
use.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.