
Ŀ
 SORTNENG - NASA 2-Lines filtering/checking      IT9XXS Giovanni Mazzola




 You are free to use, copy and give this program to another friend, or put
 it in your favorite BBS. This is freeware.

 SORTNENG is a very simple C program, and runs fine on my 486/33.
 Scanning a very large file and extracting the elements, takes only few
 seconds on this machine.

 I've written this program to automatically extract all or part of the
 NASA keps which weeekly comes from Internet or other sources.
 I usually receive a large amount of messages together with the keps,
 in one long file, and find it boring to manually extract them.
 I use it to prepare the update file for TrakBox.

 This program checks for the integrity of the keps calculating their
 line checksum and comparing it against the last number reported in each
 line of data, after assuring that the first and the second data-line
 are part of the same satellite. Any unuseful data or corrupted element
 will be ignored.

 Fatal file-i/o errors will stop the program and return ErrorLevel 1,
 otherwise 0, so you can call SORTNENG from your batch files.

 You can invoke the program in two different ways:

 extracting, checking and sorting (by name) *all* elements Ŀ
  syntax: SORTNENG input_file output_file                     Sorted

 or
 extracting and checking only selected satellite elements Ŀ
  syntax: SORTNENG input_file output_file wanted_sat_names    Same sort-order
   
                                   ^           ^                  
 where:                            

 input_file  is a text file where the keps are mixed to lots of messages,
             and even AMSAT element sets (IGNORED);

 output_file is a text file, generated by this program, which will contain
             the elements extracted from the "input_file" and sorted.
             Be careful: if existing, this file will be re-written !

 wanted_sat_ is the name of an optional text file which holds the satellite
             names to be extracted from the "input_file".
             In this case the program does NOT sort the element by name to
             the "output_file", but just writes them in the same order as in
             the "wanted_sat_names" file.
             This is useful if you need only certain satellites and want them
             sorted in a precise order (e.g. by number, like UO-22, KO-23,
             KO-25, and so on).
             The names for each satellite can be written in upper or lower
             case, but must EXACTLY match those of the input_file.
             Hint: to know the possible satellite names, run the program
             redirecting the screen output to a file, e.g.
                      SORTNENG input_file output_file > log
             edit "log" and you'll read all satellite names found in the
             "input_file", together with the other messages generated by the
             program.
             This way, you can keep the satellite names you need and discard
             the rest, using the file as a list.

 Input, output and reference filenames must be different, or the program will
 halt and tell you so.

 I hope you'll find this program useful.

 !Please! send me a message with your suggestions, notes, corrections, ...
 to my Internet address: mc3626@mclink.it (or it9xxs@amsat.org if your
 message is of public interest).

 I'm not responsible for any loss of data due to my program.
 ***********************************************************

 Release date: 12/2/94.

------------------------------------------------------------------------------
                 /       it9xxs - giovanni mazzola             amsat-uk 5502
   /. ///.//////./       internet mc3626@mclink.it
   /      //             tcp-ip 44.134.112.62
------------------------------------------------------------------------------
