home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / LS351.ZIP / LSORT.DOC < prev    next >
Text File  |  1994-01-05  |  58KB  |  1,197 lines

  1. LSORT 3.51 (C) Copyright London Computing, 1983-1993.
  2. All rights reserved.
  3.  
  4. LSORT is a general purpose sort/merge utility written in Microsoft C
  5. 6.0 for DOS 3.30 and above and OS2 1.2 and above written as a family
  6. mode application.  It runs on IBM PCs and compatibles with at least
  7. 512KB and either two floppy disks or a fixed disk.
  8.  
  9. LSORT is User Supported Software,  if this program proves useful, please
  10. make a contribution ($35 suggested) to:
  11.  
  12. London Computing, P.O. Box 696  Cherry Hill, NJ 08003
  13.  
  14. Anyone sending a contribution will receive a disk containing the source code
  15. to LSORT as well as a copy of the LSRT sort filter.  LSRT is similar to the
  16. DOS SORT filter but works much faster and will sort on multiple fields.
  17.  
  18. You may make copies of this software and distribute to other users as long as
  19. there is no charge or other consideration and this notice is not removed or
  20. bypassed.
  21.  
  22. LSORT will sort MSDOS and OS2 files and dBase II and dBase III
  23. databases.  (dBase III memo files and FOXPRO memo files are not sorted
  24. but .DBF files will be sorted.) Each file may be sorted using 1 to 32
  25. sort fields.  The file to be sorted may contain either fixed length
  26. records, variable length records or comma delimited records.  Variable
  27. length records are records ending with cr/lf.  Comma delimited records
  28. are variable length records where the fields are also variable length
  29. and separated by a comma.  Character fields may be enclosed in either
  30. single or double quotes.  It will merge up to 5 files using 1 to 32
  31. sort fields.  dBase databases may not be merged.  Any field may be
  32. sorted in either ascending or descending sequence.  LSORT allows for
  33. three user defined field types to be used: X,Y and Z.  You must write
  34. your own comparison subroutine to compare user defined fields.
  35.  
  36. The sort knows about:                       field type
  37.  
  38. binary fields (to 127 bytes)                      B
  39.    A binary field is compared left to right
  40.    based on value of the code in each field
  41.    (0-255).  It is useful for comparing strings
  42.    where binary zeros are embedded and for
  43.    comparing IBM Mainframe stype binary numbers
  44. packed decimal fields (1-8 bytes) Stored as on    P
  45.    IBM Mainframe computers.  Each digit position
  46.    is stored in 4 bits as a binary value between
  47.    0 and 10.  The digits are stored left to
  48.    right with the rightmost position containing
  49.    a sign, 0x0D for negative, 0x0C or 0x0F for
  50.    positive.  A packed decimal field can store
  51.    between 1 and 15 digits depending on the
  52.    length of the field.  If an invalid sign
  53.    field is specified, the sort won't produce
  54.    what you would expect.  Packed decimal values
  55.    are only meaningful in fixed length record.   
  56. character fields (to 127 bytes)                   C
  57.    character fields compare up to the first
  58.    binary zero in the field following C
  59.    language conventions.
  60. upper case character fields (sort fields are      U
  61.    translated to upper case before compare)
  62. 2 byte integers in internal  format               I
  63. 4 byte integers in internal format                L
  64. floating point numbers (ieee)                     F
  65. double precision floating point (ieee)            D
  66. zoned decimal  numbers                            N
  67.    (Text format numbers,  Decimals are allowed)
  68.    (LSORT now supports scientific notation as)
  69.    (well, using E notation, eg. .98 == 9.8E-1)
  70.    (xBase N and F fields are sorted as type N)
  71. 1 byte logical fields (dBase II or III)           T
  72. User defined field type X                         X
  73. User defined field type Y                         Y
  74. User defined field type Z                         Z
  75.  
  76. A zoned decimal number is stored as a character string and may contain
  77. leading and trailing spaces, minus sign, decimal point and digits.
  78.  
  79. NOTE: zoned decimal numbers and comma delimitted files sort very slowly!
  80. The only reasonable field types for comma delimited files are C or N. LSORT
  81. will accept other field types, but the results are undefined.
  82.  
  83.  
  84. LSORT will prompt you for all parameters and file names or you may specify
  85. some or all of the parameters on the command line when you invoke the sort.
  86.  
  87. The maximum record length is 4096 bytes.  Files will be sorted in memory if
  88. possible.
  89.  
  90. Files larger than available memory are sorted in pieces and then merged
  91. together.  If you have a floppy only system, you should have LSORT on the A
  92. drive and the file to be sorted on the B drive.  Place a copy of LSORT on an
  93. otherwise empty disk and use as your A drive.  You may need a formatted empty
  94. disk for work files on the B drive.
  95.  
  96.  
  97. SYNTAX:
  98.  
  99.  
  100. LSORT [-h | -m] -- will prompt you for all necessary information.
  101.  or
  102. LSORT [-h | -m] sort specifications--will take the specification specified and
  103.                                   prompt you for any others.
  104.  
  105. Specify -h if you are using a fixed (hard disk) for your output and
  106. merge files.  This will eliminate mount messages.  This is the default
  107. for LSORT 3.01 and above.  Specify -m if you are using mountable disks
  108. (floppy, Bournouli, etc.).  This allows you to mount disks to contain
  109. work files and output files.
  110.  
  111.  or
  112.  
  113. LSORT -R  -- will restart a sort.
  114.  
  115.  
  116. Sort Specifications:
  117.  
  118. You will be asked to specify either a SORT or MERGE operation.
  119.  
  120. If you ask for a SORT, you may tell LSORT to use either a QUICKSORT or
  121. HEAPSORT for internal sorting.  You will also be asked to specify two
  122. devices to hold merge files if any are needed.  Merge files may be placed on
  123. floppy disk, hard disk or RAM disk.  The specified drive must be large
  124. enough to hold the entire input file.  You will be given the opportunity to
  125. change floppy disks if desired before each merge drive is used and before
  126. the output file is written.  The program will wait for you to press 'Y'
  127. before proceeding.  This is not really a problem for unattended sorting
  128. if you use redirected input or specify all prompts on the command line.
  129.  
  130. If you specify SORT or MERGE you will be prompted for your input file(s) and
  131. output file as well as the definition of the key fields to be used in the
  132. comparisons.  Fields are specified by their starting position and length.
  133. The types of fields have been listed above.
  134.  
  135. The sort specifications may be entered on the command line in the order
  136. requested by LSORT. Each parameter should be separated from the others with
  137. one or more spaces.  You will not be prompted for any specification on the
  138. command line (including requests to change disks).
  139.  
  140. The sort will ask for the following information in the order shown:
  141.  
  142. Type of Sort:  You may reply:
  143. S -- for QUICKSORT
  144. H -- for HEAPSORT
  145.  
  146. Merge Drive 1:  You may reply with any drive letter, although it is best to
  147. specify a fixed disk (if any).
  148.  
  149.  
  150. Merge Drive 2:  This should be different from drive 1 if you are using
  151. floppy disks, but should be a fixed disk if you have one.
  152.  
  153. Name of input file: You may specify any name including drive letter and
  154. path.  Specify :X to use a user specified input routine.
  155.  
  156. Name of output file:  See above.  Specify :X to use a user specified output
  157. routine.
  158.  
  159. File Type (Unless you are sorting a dBase file):  You may reply F for a
  160. fixed length file (all records are the same length), V for a varying
  161. length file (records must end with CR LF.) or D for comma delimited files.
  162.  
  163.  
  164. If you entered 'F' for a fixed file, you will be prompted for the record
  165. length.
  166.  
  167. You will then be prompted for field definitions.  Each field definition has
  168. four parts:    starting position (from 1)  or  starting field (delimited files)
  169.                field length (in bytes)         (no prompt for delimited files)
  170.                field type (See above list of valid types)
  171.                sort order (A--Ascending, D--Descending)
  172.  
  173. In order to work as efficiently as possible, LSORT does not check the
  174. starting position of a field against the actual length of a record.  If some
  175. field starts past the end of a record (e.g. sort field 1 starts in column 10
  176. but the record is only 8 bytes long), the results will be undefined and most
  177. certainly not what you want.  Please be careful.
  178.  
  179. Enter a '0' for the starting position to end the prompt for field
  180. definitions.
  181.  
  182. If you are sorting a dBase file, you will see a list of fields.  You may
  183. specify a field by name, in which case you will only be prompted for the
  184. sort order or you may enter starting position, length, type and order as
  185. above.
  186.  
  187. Following the '0' that ends field definitions, you may specify a series of
  188. 'Y's if you know that the disks currently mounted will hold merge work files
  189. and the output file.  These may be omitted if you specified the -H flag.
  190.  
  191. example 1:
  192.  
  193. Sort file test.dat on positions 1-5,char,ascending and 6-7, binary integer,
  194. descending.  Use drive C for the work files and put the sorted file in
  195. test.srt.
  196.  
  197. Issue the following command:
  198.  
  199. LSORT S C C test.dat test.srt V 1 5 C A 6 2 H D 0 Y Y Y
  200.       | | | |        |        | |_____| |_____| | | | |
  201.       | | | input    output   F |       |       | | | response to mount
  202.       | | | file     file     i sort    sort    | | | output file message.
  203.       | | | name     name     l field 1 field 2 | | |
  204.       | | |                   e starts  starts  | | response to mount 2nd
  205.       | | merge drive 2         at byte at byte | | merge volume message.
  206.       | |                     T 1, is 5 6, is 2 | |
  207.       | merge drive 1         y byte    byte    | response to mount first
  208.       |                       p char-   long    | merge volume message.
  209.       sort using              e acter   integer |
  210.       quicksort                 string  sorted  ends list of sort fields.
  211.                                 ascend- descend-
  212.                                 ing     ing
  213.  
  214.  
  215.  
  216. Merge Specification:
  217.  
  218. Enter 'M' to indicate the merge operation.
  219.  
  220. You will be asked to enter the number of files to be merged followed by 1-5
  221. files to be merged. They are entered one at a time.
  222.  
  223. You will be asked to enter a file type, output file and a field list as
  224. above.
  225.  
  226. example:
  227.  
  228. Merge files t1.dat t2.dat and t3.dat on positions 4-7 defined as a character
  229. field, ascending.
  230.  
  231. LSORT M 3 t1.dat t2.dat t3.dat   test.mrg V 4 4 c a 0 y y
  232.       | | |      |      |        |        | |_____| | |_|
  233.       | | input  input  input    output   | |       | |
  234.       | | file 1 file 2 file 3   file     | merge   | response to mount
  235.       | |                                 | field   | messages
  236.       | merge 3 files                     | 1       |
  237.       |                                   |         end of list of merge
  238.       do a merge                          file      fields
  239.                                           type
  240. Restarting:
  241.  
  242. If a sort stops in the middle due to lack of space or is stopped by you by
  243. pressing ^BREAK, it may be restarted by issuing the LSORT -R command
  244. providing the dataset(s), SORTPARM.DAT and (DB3PARM.DAT for dBase III files
  245. only) are still available and further providing all files LSMERGE?.DAT are
  246. still available. The sort will be restarted at the beginning of the LSSORT
  247. phase (where the input file is read and sorted) or at the beginning of an
  248. LSMERGE pass, where several partially sorted files are combined.
  249.  
  250. User Exits:
  251.  
  252. You may define your own user exits to read and write data and you may define
  253. your own compare routines for the standard field types or for user defined
  254. field types.  These routines must be written in Microsoft C 6.0 or in
  255. any other language that can be linked to Microsoft C 6.0.
  256.  
  257. User input:  (Available for Sorting Only)
  258.  
  259. Specify :X as the name of the input file. LSORT uses a routine named USERIP
  260. to read the records to be sorted. You may write your own version of USERIP
  261. and link it with LSORT to create a custom version containing your own input
  262. routine.
  263.  
  264. USERIP is used as follows:
  265.  
  266. int l,userip();
  267. char buffer[...];
  268.  
  269. l = userip(buffer);
  270.  
  271. USERIP must return the length of the record read which must be <= 4096 or -1
  272. for end of file. If you have specified V type files, USERIP must return a
  273. string ending with a '\0'. The string length must include the trailing '\0'.
  274.  
  275. User Output:
  276.  
  277. Specify :X as the name of the output file. LSORT uses a routine called
  278. USEROP to write to the :X file. You may write your own user output routine
  279. to be used to write the final sorted or merged output by creating a custom
  280. version of USEROP and relinking LSORT to create a custom LSORT. USEROP works
  281. as follows:
  282.  
  283. int buflen;
  284. char buffer[...];
  285.  
  286. userop(buffer,buflen);     /* userop must write buflen bytes from buffer */
  287.                            /* buflen == 0 means that you want to write a
  288.                               0 terminated string */
  289. userop(NULL,-1);           /* userop must perform end of file processing */
  290.  
  291.  
  292. Sample versions of userip and userop appear below:
  293. /* Userip to return a varying length string */
  294. #define CPMEOF 26
  295. #include "stdio.h"
  296. userip(s)
  297. char *s;
  298. {
  299.  static char firsttime = 1;
  300.  static int inchan;
  301.  char *fgets();
  302.  int l;
  303.  /* input is string buffer, max length 4k, 4k always available      */
  304.  /* this routine must return length of string or EOF if end of file */
  305.  /* example follows: (Note length of string includes 0 byte at end  */
  306.       if (firsttime) {
  307.             firsttime=0;
  308.             inchan=fopen("usertest.dat","r");
  309.       }
  310.       if (fgets(s,4096,inchan))
  311.             return strlen(s)+1;
  312.       else
  313.             return EOF;
  314. }
  315.  
  316. /* Userip to return a fixed length string */
  317. #define CPMEOF 26
  318. #define STRLEN 128
  319. #include "stdio.h"
  320. userip(s)
  321. char *s;
  322. {
  323.  static char firsttime = 1;
  324.  static int inchan;
  325.  char *fgets();
  326.  int c,l;
  327.  /* input is string buffer, max length 4k, 4k always available      */
  328.  /* this routine must return length of string or EOF if end of file */
  329.  /* example follows: (Note length of string includes 0 byte at end  */
  330.       if (firsttime) {
  331.             firsttime=0;
  332.             inchan=fopen("usertest.dat","r");
  333.       }
  334.       if ((l=read(inchan,buffer,STRLEN)) == STRLEN)
  335.             return STRLEN;
  336.       else
  337.             return EOF;
  338. }
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348. userop(s,l)
  349. char *s;
  350. int l;
  351. {
  352. /* s is string to write, l is length or 0 if 0 terminated or -1 for close */
  353.       static char firsttime = 1;
  354.       static int otchan;
  355.       if (firsttime) {
  356.             firsttime = 0;
  357.             otchan = fopen("usertest.srt","w");
  358.       }
  359.       
  360.       if (l == -1 || s == NULL)
  361.             fclose(otchan);
  362.       else if (l) /* write an F type record */
  363.             while(l--) fputc(*s++,otchan);
  364.       else fputs(s,otchan); /* write a V type record */
  365. }
  366.             
  367.  
  368. User Compare Routines:
  369.  
  370. You may define up three user defined fields: X,Y,Z.  You must write a compare
  371. routine for each field type used.  The routine names are:
  372.  
  373.       sxcmp --  for field type X.
  374.       sycmp --  for field type Y.
  375.       szcmp --  for field type Z.
  376.  
  377. The compare routines are called with three arguments, the address of the
  378. first field, the address of the second field and the field length. The
  379. routine must return 1 if field 1 < field 2, 0 if field1 == field2 and -1 if
  380. field1 > field2.
  381.  
  382. Sample routines are shown below:
  383.  
  384. sxcmp(a,b,l)
  385. long int *a,*b;
  386. int l;
  387. { /* this routine compares two long integers */
  388. long int c;
  389. c = *a - *b;
  390. return c <0 ? -1 : c == 0 ? 0 : 1;
  391. }
  392.  
  393. sycmp(a,b,l)
  394. int *a,*b;
  395. int l;
  396. { /* this routine compares two integers (2 bytes) */
  397. int c;
  398. c = *a - *b;
  399. return c <0 ? -1 : c == 0 ? 0 : 1;
  400. }
  401.  
  402.  
  403. szcmp(a,b,l)
  404. float *a,*b;
  405. int l;
  406. { /* this routine compares two floating numbers */
  407. float c;
  408. c = *a - *b;
  409. return c<0 ? -1 : c == 0 ? 0 : 1;
  410. }
  411.  
  412.  
  413.  
  414. Linking user written routines:
  415.  
  416. For MicroSoft C.
  417.  
  418. Compile your user written routines using Microsoft C 6.0 to create .OBJ
  419. files.  Use the -Lp -Fb options.  Modify the file lsort.crf to include
  420. your routines before LSORTCMP:
  421.  
  422. lsort.obj +
  423.                   <=== place your routines here       
  424. lsortcmp.obj +
  425. lsortdbf.obj +
  426. lsortio.obj +
  427. lsortprm.obj +
  428. lsortqk.obj +
  429. lsortsub.obj +
  430. lssort.obj +
  431. lsuser.obj +
  432. lsmerge.obj +
  433.  
  434.  
  435. Re-link LSORT with the following statement:
  436. LINK /stack:4096 @lsort.crf;
  437. BIND LSORT
  438.  
  439. LSMENU
  440.  
  441. Enter LSMENU instead of LSORT for the menu driven interface.
  442.  
  443. LSMENU will display an SAA like menu that makes it easier to use LSORT.
  444.  
  445. The menuing system uses drop down menus that allow you to:
  446.  
  447. o   Specify the operations (Sort / Merge) to be performed.
  448. o   Specify Work Drives
  449. o   Specify or Pick Input File(s) using a 'point and shoot' interface.
  450. o   Specify or Pick the Output file.
  451. o   Select the records type: (Fixed, Variable, Delimitted or dBase)
  452. o   Specify the Sort Fields using a context sensitive assistant that will
  453.     either display the names of dBase fields or display a file and let you
  454.     mark fields.
  455. o   Save a sort specification in a file for quick re-use.
  456. o   Load a sort specification.
  457.  
  458. Within LSMENU, the following conventions apply:
  459.  
  460. You select an option by typing the highlighted letter in the option name or
  461. by moving the cursor to that option using the arrow keys, then pression
  462. Enter.
  463.  
  464. You quit any menu option by pressing ESC.  You may use ESC to exit the
  465. program if desired.
  466.  
  467. Selectable options appear as blue on white with one blue letter highlighted.
  468.  
  469. Unavailable options appear as bright white on white.  An unavailable option
  470. becomes available as a by product of selecting other options.
  471.  
  472. When LSMENU is entered, the following menu is displayed:
  473. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  474. │   File    Record    Sortfield    Options                      Help   About   │
  475. └────────────────────────────────┌───────────────┐─────────────────────────────┘
  476.                                  │   HeapSort    │
  477.                                  │   QuickSort   │
  478.                                  │   Merge [ ]   │
  479.                                  │   Work Drive  │
  480.                                  └───────────────┘
  481.  
  482. The Sortfield and Record Options will display as white on white.  This color
  483. combination indicates that the option is not currently available.
  484.  
  485. The Options menu drops down automatically so that you select the type of Sort /
  486. Merge to perform: Heap, Quick or Merge (2-5 files).  When you make your sel-
  487. ection, the Options window closes automatically and the Record and Sortfield
  488. options appear as blue on white, indicating that they are available.  If you
  489. wish to close this or any menu without selecting anything, press ESC.
  490.  
  491. You may then select any other option as desired.  The recommended sequence is
  492. File -- Input,  File -- Output,  Record, Sortfield and File -- Go.
  493.  
  494. The following main menu options are available:
  495.  
  496. File, Record, Sortfield, Options, Help and About.
  497.  
  498. File Menu Option
  499. ----------------
  500. The File option displays the following:
  501.  
  502. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  503. │   File    Record    Sortfield    Options                      Help   About   │
  504. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  505.   │ New    │
  506.   │ Load   │
  507.   │ Save   │
  508.   │ Input  │
  509.   │ Output │
  510.   │ Go     │
  511.   │ Quit   │
  512.   └────────┘
  513.  
  514. New
  515. ---
  516. Select New to clear the sort specification.  This resets any previous
  517. specifications and allows you to start over.
  518.  
  519. Load
  520. ----
  521. Select Load to use an existing sort specification that was saved by the
  522. Save option.  When Load is selected, the following is displayed:
  523.  
  524. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  525. │   File    Record    Sortfield    Options                      Help   About   │
  526. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  527.   │ New    │┌───────────────────── Load Control File ──────────────────────────┐
  528.   │ Load   ││ Current Selection:                                               │
  529.   │ Save   ││                                                                  │
  530.   │ Input  ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                  ▄▄▄▄▄▄                   ▄▄▄▄▄▄▄▄ │
  531.   │ Output ││ █Select File█                  █ Ok █                   █Cancel█ │
  532.   │ Go     ││ ▀▀▀▀▀▀▀▀▀▀▀▀▀                  ▀▀▀▀▀▀                   ▀▀▀▀▀▀▀▀ │
  533.   │ Quit   │└──────────────────────────────────────────────────────────────────┘
  534.   └────────┘
  535.  
  536.             ┌────────────────────────File Selector ──────────────────────────┐
  537.             │Directory of:                                                   │
  538.             │D:\MSC\LSORTX3\*.LSC                                            │
  539.             │────────────────────────────────────────────────────────────────│
  540.             │ <KEY-IT-IN>     ..                                             │
  541.             │ <-A->           TEST.LSC                                       │
  542.             │ <-B->                                                          │
  543.             │ <-C->                                                          │
  544.             │ <-D->                                                          │
  545.             │ <-E->                                                          │
  546.             │ <-F->                                                          │
  547.             │ <-G->                                                          │
  548.             F1=HELP──────────────────────────────────────────────────────────┘
  549. Two new windows are displayed, the Load Control File window and the File
  550. Selector windows.  The File Selector window will be active, with any files
  551. of type .LSC displayed from the current directory.  You can use the file
  552. selector to move to any drive or directory and pick a file to be used as the
  553. control file or you may select <KEY-IT-IN> to enter a filename directly.  More
  554. information about the File Selector is available in file SELEFILE.DOC.
  555.  
  556. To Select a file, move the cursor to the desired file and press Enter.
  557. To Select a drive, move the cursor to a drive indicator, e.g. <-C->, and
  558. press Enter.
  559.  
  560. To Select a directory move the cursor to a directory entry, e.g. .., and
  561. press Enter.
  562.  
  563. To Quit without selecting a file, press ESC.
  564.  
  565. Pressing Enter or ESC closes the File Selector window and displays the
  566. selected file, if any, under Current Selection in the Load Control File
  567. window.  The Load Control File window has three options:  Select, Ok and
  568. Cancel.  Choose Select to redisplay the File Selector.  Choose Ok to
  569. approve the Current Selection and load the control file or choose Cancel
  570. to return to the Files Menu without selecting a control file.
  571.  
  572. Selecting a control file that does not contain control information will
  573. seriously confuse LSMENU.  Don't do it.
  574.  
  575. If you choose OK, the control file will be loaded and your input file,
  576. output file, Options, Record and Sortfield menus will be set to the values
  577. that they had when the control file was created.
  578.  
  579. Save
  580. ----
  581. Select Save to save your current specifications as a control file which can
  582. be loaded from a subsequent invokation of LSMENU.  The following is displayed:
  583.  
  584. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  585. │   File    Record    Sortfield    Options                      Help   About   │
  586. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  587.   │ New    │┌───────────────────── Save Control File ──────────────────────────┐
  588.   │ Load   ││ Current Selection:                                               │
  589.   │ Save   ││                                                                  │
  590.   │ Input  ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                 ▄▄▄▄▄▄                    ▄▄▄▄▄▄▄▄ │
  591.   │ Output ││ █Select File█                 █ Ok █                    █Cancel█ │
  592.   │ Go     ││ ▀▀▀▀▀▀▀▀▀▀▀▀▀                 ▀▀▀▀▀▀                    ▀▀▀▀▀▀▀▀ │
  593.   │ Quit   │└──────────────────────────────────────────────────────────────────┘
  594.   └────────┘
  595.  
  596.             ┌────────────────────────File Selector ──────────────────────────┐
  597.             │Directory of:                                                   │
  598.             │C:\TMP\*.*                                                      │
  599.             │────────────────────────────────────────────────────────────────│
  600.             │ <KEY-IT-IN>     ..              LSORT.EXE       LSORTPRM.OBJ   │
  601.             │ <-A->           DUFI.DOC        LSORT.HLP       LSORTQK.OBJ    │
  602.             │ <-B->           DUFI.EXE        LSORT.OBJ       LSORTSUB.OBJ   │
  603.             │ <-C->           DVINT.OBJ       LSORT311.TXT    LSORTX3.EXE    │
  604.             │ <-D->           FILELIST.TXT    LSORTCMP.OBJ    LSRTOS2.EXE    │
  605.             │ <-E->           LSMENU.EXE      LSORTDBF.OBJ    LSSORT.OBJ     │
  606.             │ <-F->           LSMERGE.OBJ     LSORTIO.OBJ     LSUSER.OBJ     │
  607.             │ <-G->           LSORT.CRF       LSORTLNK.BAT    SCRSUBS.OBJ    │
  608.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  609.  
  610. The Save Control File window shows the current control file, if any.  The File
  611. Selector window shows all the files in the current directory.  You may select
  612. and existing file to save the sort specification to or use <KEY-IT-IN> to enter
  613. a new file to contain the sort specification.  If you select an existing file,
  614. it will be overwritten with the sort specification and its old contents will
  615. be gone.  BE CAREFUL.
  616.  
  617. As above, once a file name has been entered, you may choose Select, Ok or
  618. Cancel from the Save Control File window.  Ok will save the sort specification.
  619. Cancel will return to the File menu without saving and Select will redisplay
  620. the File Selector.
  621.  
  622. Input
  623. -----
  624. This option is only activated if HeapSort, QuickSort or Merge has been selected
  625. from the Options Menu.  When you are sorting, the following will be displayed:
  626.  
  627. Input-Sort
  628. ----------
  629. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  630. │   File    Record    Sortfield    Options                      Help   About   │
  631. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  632.   │ New    │
  633.   │ Load   │┌───────────────────── Select Input File ──────────────────────────┐
  634.   │ Save   ││ Current Selection:                                               │
  635.   │ Input  ││                                                                  │
  636.   │ Output ││▄▄▄▄▄▄▄▄▄▄▄▄▄                 ▄▄▄▄▄▄                      ▄▄▄▄▄▄▄▄│
  637.   │ Go     ││█Select File█                 █ Ok █                      █Cancel█│
  638.   │ Quit   ││▀▀▀▀▀▀▀▀▀▀▀▀▀                 ▀▀▀▀▀▀                      ▀▀▀▀▀▀▀▀│
  639.   └────────┘└──────────────────────────────────────────────────────────────────┘
  640.  
  641.             ┌────────────────────────File Selector ──────────────────────────┐
  642.             │Directory of:                                                   │
  643.             │D:\MSC\LSORTX3\*.*                                              │
  644.             │────────────────────────────────────────────────────────────────│
  645.             │ <KEY-IT-IN>     ..              LSMENU.C        LSORTX3.H      │
  646.             │ <-A->           CDRIVER.C       LSORT.H         LSORTX3.MAK    │
  647.             │ <-B->           CDRIVER.OBJ     LSORT311.TXT    LSORTX3.OBJ    │
  648.             │ <-C->           CSEXTERN.H      LSORTBAK.ZIP    LSORTX3.OLD    │
  649.             │ <-D->           CSUBS.C         LSORTOS2.ZIP    LSORT_DF.C     │
  650.             │ <-E->           CSUBS.OBJ       LSORTX3.C       LSORT_DF.OBJ   │
  651.             │ <-F->           DUFI$$$$.$$$    LSORTX3.CRF     LSORT_FT.C     │
  652.             │ <-G->           DUFI.C          LSORTX3.EXE     LSORT_FT.OBJ   │
  653.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  654.  
  655. Use the File Selector as above to choose a file to sort and return to the
  656. Select Input File window where you may choose Ok, to set the input file to
  657. your selection, Cancel to quit without selecting an input file or Select File
  658. to redisplay the File Selector.
  659.  
  660. Input - Merge
  661. -------------
  662.  
  663. If you are merging, the following is displayed:
  664. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  665. │   File    Record    Sortfield    Options                      Help   About   │
  666. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  667.   │ New    │
  668.   │ Load   │┌──────────────────────Select Merge Files──────────────────────────┐
  669.   │ Save   ││# Current Selection:                                              │
  670.   │ Input  ││1                                                                 │
  671.   │ Output ││2                                                                 │
  672.   │ Go     ││3                                                                 │
  673.   │ Quit   ││4                                                                 │
  674.   └────────┘│5                                                                 │
  675.             │  Select File Number:                                             │
  676.             │  ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄  │
  677.             │  █ 1 █    █ 2 █    █ 3 █    █ 4 █    █ 5 █    █ Ok █   █Cancel█  │
  678.             │  ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀▀   ▀▀▀▀▀▀▀▀  │
  679.             └──────────────────────────────────────────────────────────────────┘
  680.  
  681. Choose the merge file to select by selecting menu options 1,2,3,4 or 5.  If you
  682. select any of these options, the File Selector will be displayed and you can
  683. use it to pick the merge file.  Repeat until all necessary merge files have
  684. been selected, then choose Ok to return to the File menu.
  685.  
  686. Output
  687. ------
  688. Use this option to specify the name of your output file which will contain
  689. the sorted or merged data.  When this option is selected, the following is
  690. displayed:
  691.  
  692. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  693. │   File    Record    Sortfield    Options                      Help   About   │
  694. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  695.   │ New    │
  696.   │ Load   │
  697.   │ Save   │┌───────────────────── Select Output File ─────────────────────────┐
  698.   │ Input  ││ Current Selection:                                               │
  699.   │ Output ││                                                                  │
  700.   │ Go     ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                  ▄▄▄▄                     ▄▄▄▄▄▄▄▄ │
  701.   │ Quit   ││ █Select File█                  █Ok█                     █Cancel█ │
  702.   └────────┘│ ▀▀▀▀▀▀▀▀▀▀▀▀▀                  ▀▀▀▀                     ▀▀▀▀▀▀▀▀ │
  703.             └──────────────────────────────────────────────────────────────────┘
  704.             ┌────────────────────────File Selector ──────────────────────────┐
  705.             │Directory of:                                                   │
  706.             │C:\TMP\*.*                                                      │
  707.             │────────────────────────────────────────────────────────────────│
  708.             │ <KEY-IT-IN>     ..              LSORT.EXE       LSORTPRM.OBJ   │
  709.             │ <-A->           DUFI.DOC        LSORT.HLP       LSORTQK.OBJ    │
  710.             │ <-B->           DUFI.EXE        LSORT.OBJ       LSORTSUB.OBJ   │
  711.             │ <-C->           DVINT.OBJ       LSORT311.TXT    LSORTX3.EXE    │
  712.             │ <-D->           FILELIST.TXT    LSORTCMP.OBJ    LSRTOS2.EXE    │
  713.             │ <-E->           LSMENU.EXE      LSORTDBF.OBJ    LSSORT.OBJ     │
  714.             │ <-F->           LSMERGE.OBJ     LSORTIO.OBJ     LSUSER.OBJ     │
  715.             │ <-G->           LSORT.CRF       LSORTLNK.BAT    SCRSUBS.OBJ    │
  716.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  717.  
  718. The File Selector window is active and you can pick an existing file to hold
  719. the output of the sort or merge or you can choose <KEY-IT-IN> to enter a new
  720. file name.  If you select an existing file, it will be overwritten when the
  721. sort / merge is run.  BE CAREFUL.  After specifying a file, the Select Ouput
  722. File window becomes active and you may choose Ok to accept the file name,
  723. Cancel to quit without accepting the file name or Select File to redisplay
  724. the File Selector.
  725.  
  726. GO
  727. --
  728. Select this option to perform the sort or merge.  This option should be
  729. selected ONLY after specifying HeapSort, QuickSort or Merge, Input File(s),
  730. Output File(s), Record Type and Sortfields.  If you select GO before all of
  731. the necessary information has been specified, an error message will be dis-
  732. played showing those pieces of information that are missing.  The message
  733. will be similar to that shown below:
  734.  
  735. ┌─────────────────────────────────────────────────────────┐
  736. │                                                         │
  737. │ Unable to RUN Sort because:                             │
  738. │                                                         │
  739. │ Sort or Merge not selected on Options Screen.           │
  740. │ No sort input file was specified.                       │
  741. │ No output file was specified.                           │
  742. │ No sort/merge fields were defined.                      │
  743. │                                                         │
  744. │                                                    ▄▄▄▄ │
  745. │                                                    █Ok█ │
  746. │                                                    ▀▀▀▀ │
  747. └─────────────────────────────────────────────────────────┘
  748.  
  749. If everything has bee specified, the menu will disapear and standard LSORT
  750. output will be displayed, the file(s) will be sorted or merged and control
  751. will return to the standard DOS prompt.
  752.  
  753. Quit
  754. ----
  755. Select this option to quit the menu system without running a Sort.  You will
  756. be given a chance to change your mind when the following is displayed:
  757.  
  758. ┌───────────────┐
  759. │ Quit LSMENU ? │
  760. │ ▄▄▄▄ ▄▄▄▄▄▄▄▄ │
  761. │ █Ok█ █Cancel█ │
  762. │ ▀▀▀▀ ▀▀▀▀▀▀▀▀ │
  763. └───────────────┘
  764.  
  765. If you select Ok, you will exit to the command line.  If you select Cancel,
  766. you will return to the File Menu.
  767.  
  768.  
  769. Record Menu Option
  770. ------------------
  771.  
  772. The record option allows you to pick the type of record to be sorted.  The
  773. following will be displayed:
  774.  
  775. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  776. │   File    Record    Sortfield    Options                      Help   About   │
  777. └─────────┌───────────────┐────────────────────────────────────────────────────┘
  778.           │   Fixed    0  │
  779.           │ √ Variable    │
  780.           │   Delimited   │
  781.           │   dBase       │
  782.           └───────────────┘
  783.  
  784. Use this menu to pick the record type.  The default type is Variable and is
  785. shown marked with a check.  Variable records are variable length, contain
  786. ASCII characters only and are terminated with a CR-LF.  To select variable,
  787. type V or move the cursor to the variable line and press Enter.  If the check
  788. mark is on a different type it will be moved to the Variable line.  Press
  789. ESC to return to the main menu.
  790.  
  791. You may also select Fixed, Delimited or dBase.  If you select Fixed, you will
  792. be prompted for the number of characters in the record.  Enter the number and
  793. press Enter.  (Fixed records are all the same length.  You must tell the LSMENU
  794. what that length is.)  The check mark will move to the Fixed Line and the
  795. record length will be displayed next to the word fixed.  Press ESC to return
  796. to the main menu.
  797.  
  798. If you select Delimited (fields are comma delimitted) or dBase, the check mark
  799. will move to the appropriate line.  Press ESC to return to the main menu.
  800.  
  801. SortField Menu Option
  802. ---------------------
  803. Select Sortfield to specify the fields to sort on.  You should specify
  804. Record Type before selecting Sortfields.  A different menu is displayed
  805. depending on the record type.
  806.  
  807. In all cases, you must first specify a sort field by moving the blue
  808. cursor to the desired field number.  You may then Add a new field, pushing
  809. all the current specification and subsequent specifications down one slot,
  810. Delete a field, moving following specifications up one slot or Edit the field.
  811.  
  812. To quit the SortFields Menu, press ESC.
  813.  
  814. Fixed or Variable Records
  815. -------------------------
  816. If the record type is Fixed or Variable the following screen is displayed with
  817. a high lighted cursor set to Sort Field 1.
  818. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  819. │   File    Record    Sortfield    Options                      Help   About   │
  820. ├──────╥────────┬──────┬─────┬────┬─────┬──────╥────────┬──────┬─────┬────┤────┘
  821. │Sort  ║Starting│Field │Field│Asc/│     │Sort  ║Starting│Field │Field│Asc/│
  822. │Field ║Position│Length│Type │Dec.│     │Field ║Position│Length│Type │Dec.│
  823. ╞══════╬════════╪══════╪═════╪════╡     ╞══════╬════════╪══════╪═════╪════╡
  824. │ __1_ ║      0 │    0 │     │    │     │  17  ║      0 │    0 │     │    │
  825. │   2  ║      0 │    0 │     │    │     │  18  ║      0 │    0 │     │    │
  826. │   3  ║      0 │    0 │     │    │     │  19  ║      0 │    0 │     │    │
  827. │   4  ║      0 │    0 │     │    │     │  20  ║      0 │    0 │     │    │
  828. │   5  ║      0 │    0 │     │    │     │  21  ║      0 │    0 │     │    │
  829. │   6  ║      0 │    0 │     │    │     │  22  ║      0 │    0 │     │    │
  830. │   7  ║      0 │    0 │     │    │     │  23  ║      0 │    0 │     │    │
  831. │   8  ║      0 │    0 │     │    │     │  24  ║      0 │    0 │     │    │
  832. │   9  ║      0 │    0 │     │    │     │  25  ║      0 │    0 │     │    │
  833. │  10  ║      0 │    0 │     │    │     │  26  ║      0 │    0 │     │    │
  834. │  11  ║      0 │    0 │     │    │     │  27  ║      0 │    0 │     │    │
  835. │  12  ║      0 │    0 │     │    │     │  28  ║      0 │    0 │     │    │
  836. │  13  ║      0 │    0 │     │    │     │  29  ║      0 │    0 │     │    │
  837. │  14  ║      0 │    0 │     │    │     │  30  ║      0 │    0 │     │    │
  838. │  15  ║      0 │    0 │     │    │     │  31  ║      0 │    0 │     │    │
  839. │  16  ║      0 │    0 │     │    │     │  32  ║      0 │    0 │     │    │
  840. └──────╨────────┴──────┴─────┴────┘     └──────╨────────┴──────┴─────┴────┘
  841.  
  842. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  843.  
  844. You may specify up to 32 different fields for sorting or merging.  A sort field
  845. specification consists of four entries, the field starting position (relative
  846. to 1), the field length, the field type and the sort order.  To select a sort
  847. field, move the cursor to that field number.  You may now press Enter to edit
  848. that sort field, Del to delete that sort field or Ins to insert a new field.
  849.  
  850. Deleting a sort field will move all following fields up one slot.  Inserting
  851. a sort field moves all fields down one slot and creates an empty specification
  852. at the selected field.
  853.  
  854. Editing a sort field allows you to enter or change starting position, field
  855. length, field type and sort order.
  856.  
  857. The four parts of a sort field specification consist of:
  858.  
  859. o    Starting Position, which indicates where the field starts relative to the
  860. first character in the record. Position 1 is the first charactter, position 2
  861. the second and so forth.
  862.  
  863. o   Field Length indicates how many characters or bytes are in the field.
  864.  
  865. o   Field Type indicates the type of field.  If you know the field type, just
  866. enter the correct code. If you don't know the field type, press F1 and the
  867. following will pop up:
  868.  
  869. ╒═══════Select Field Type══════╕     Choose the desired field type by moving
  870. │Character (case is signficant)│     the cursor and pressing enter or by
  871. │Double floating point         │     pressing the first letter on the line.
  872. │Floating point (single)       │
  873. │Integer (16 bit signed)       │     Once selected, the pop up window will
  874. │Long (32 bit signed integer)  │     close and the desired code will be
  875. │Numeric (ASCII text)          │     shown in the input field.
  876. │True/false (dBase logical)    │
  877. │Upper (character case ignored)│
  878. │Packed decimal                │
  879. │Binary                        │
  880. │X (user defined field type X) │
  881. │Y (user defined field type Y) │
  882. │Z (user defined field type Z) │
  883. └──────────────────────────────┘
  884.  
  885. o   Sort Order (Asc/Dec) indicates whether the field should be sorted in
  886. ascending or descending sequence.  If you leave it flank, press F1 or enter
  887. and invalid menu, a small pop up appears showing good values.
  888.  
  889. If you press F1 while in the Starting Position or Field Length columns, a
  890. special field selector window will be displayed.  You can use this window
  891. to display the first few lines of the file to be sorted.  You can display
  892. data in text or dump format.  The window is shown below:
  893.  
  894. ╔══════════════════════════════════════════════════════════════════════════════╗
  895. ║LSORTX3.MAK                                                   R1      , C1    ║
  896. ║------------------------------------------------------------------------------║
  897. ║PROJ   =LSORTX3                                                               ║
  898. ║DEBUG  =1                                                                     ║
  899. ║CC     =cl                                                                    ║
  900. ║CFLAGS_G   = /AS /W3                                                          ║
  901. ║------------------------------------------------------------------------------║
  902. ║   PgUp PgDn Home End, ^Home-Top, ^End-Bot, F1-Help, F3-Hex, F5-Mark, ESC-Quit║
  903. ╚══════════════════════════════════════════════════════════════════════════════╝
  904.  
  905. You can position to any record using the Up arrow, Down arrow, PgUp and PgDn.
  906. You can position to any character in the record using the Left arrow and Right
  907. arrow.  In order to mark a field, use the Left and Right arrows to position to
  908. the first character of the field, then press F5.  Continue using the Right
  909. arrow to mark each charcter in turn.  Marked characters are shown in reverse
  910. video.  When you have marked the last character of the field, press Enter.
  911.  
  912. You may perform this operation as many times as you desire.  Only the last
  913. mark is remembered.  Press ESC to return to the Sortfields screen.  The start-
  914. ing position and field length will be entered into the screen.
  915.  
  916. Delimitted Records
  917. ------------------
  918. If your record type is Delimited, the following will be displayed:
  919.  
  920. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  921. │   File    Record    Sortfield    Options                      Help   About   │
  922. ├──────╥───────┬─────┬────┬─────────────┬──────╥───────┬─────┬────┬────────────┘
  923. │Field ║Field  │Field│Asc/│ Delimitted  │Field ║Field  │Field│Asc/│
  924. │Number║Pos'n  │Type │Dec.│    File     │Number║Pos'n  │Type │Dec.│
  925. ╞══════╬═══════╪═════╪════╡             ╞══════╬═══════╪═════╪════╡
  926. │   1  ║      0│     │    │             │  17  ║      0│     │    │
  927. │   2  ║      0│     │    │             │  18  ║      0│     │    │
  928. │   3  ║      0│     │    │             │  19  ║      0│     │    │
  929. │   4  ║      0│     │    │             │  20  ║      0│     │    │
  930. │   5  ║      0│     │    │             │  21  ║      0│     │    │
  931. │   6  ║      0│     │    │             │  22  ║      0│     │    │
  932. │   7  ║      0│     │    │             │  23  ║      0│     │    │
  933. │   8  ║      0│     │    │             │  24  ║      0│     │    │
  934. │   9  ║      0│     │    │             │  25  ║      0│     │    │
  935. │  10  ║      0│     │    │             │  26  ║      0│     │    │
  936. │  11  ║      0│     │    │             │  27  ║      0│     │    │
  937. │  12  ║      0│     │    │             │  28  ║      0│     │    │
  938. │  13  ║      0│     │    │             │  29  ║      0│     │    │
  939. │  14  ║      0│     │    │             │  30  ║      0│     │    │
  940. │  15  ║      0│     │    │             │  31  ║      0│     │    │
  941. │  16  ║      0│     │    │             │  32  ║      0│     │    │
  942. └──────╨───────┴─────┴────┘             └──────╨───────┴─────┴────┘
  943.  
  944. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  945.  
  946. You select fields to edit, insert or delete as described above. You may specify
  947. up to 32 different fields for sorting or merging.  Field Pos'n indicates which
  948. comma seperated field is to be sorted.  Fields are numbered from 1.  Field Type
  949. indicates the type of field.  If you know the field type, just enter the
  950. correct code.  If you don't know the field type, press F1 and the following
  951. will pop up:
  952.  
  953. ╒═══════Select Field Type══════╕     Choose the desired field type by moving
  954. │Character (case is signficant)│     the cursor and pressing enter or by
  955. │Double floating point         │     pressing the first letter on the line.
  956. │Floating point (single)       │
  957. │Integer (16 bit signed)       │     Once selected, the pop up window will
  958. │Long (32 bit signed integer)  │     close and the desired code will be
  959. │Numeric (ASCII text)          │     shown in the input field.
  960. │True/false (dBase logical)    │
  961. │Upper (character case ignored)│     The Asc/Dec field should be set to A
  962. │X (user defined field type X) │     to sort from low to high or D to sort
  963. │Y (user defined field type Y) │     from high to low.  If you enter anything
  964. │Z (user defined field type Z) │     else a small pop up window will appear,
  965. └──────────────────────────────┘     showing the two valid choices.
  966.  
  967. If you press F1 while in the Field Pos'n column, a special field selector
  968. window will be displayed.  You can use this window to display the first few
  969. lines of the file to be sorted.  You can display data in text or dump format.
  970. The window is shown below:
  971.  
  972. ╔══════════════════════════════════════════════════════════════════════════════╗
  973. ║LSORTX3.MAK                                                   R1      , C1    ║
  974. ║------------------------------------------------------------------------------║
  975. ║PROJ   ,LSORTX3                                                               ║
  976. ║DEBUG  ,1                                                                     ║
  977. ║CC     ,cl                                                                    ║
  978. ║CFLAGS_G,/AS, /W3                                                             ║
  979. ║------------------------------------------------------------------------------║
  980. ║   PgUp PgDn Home End, ^Home-Top, ^End-Bot, F1-Help, F3-Hex, F5-Mark, ESC-Quit║
  981. ╚══════════════════════════════════════════════════════════════════════════════╝
  982.  
  983. You can position to any record using the Up arrow, Down arrow, PgUp and PgDn.
  984. You can position to any character in the record using the Left arrow and Right
  985. arrow.  In order to mark a field, use the Left and Right arrows to position to
  986. the first character of the field, then press F5.  Continue using the Right
  987. arrow to mark each charcter in turn.  Marked characters are shown in reverse
  988. video.  When you have marked the last character of the field, press Enter.
  989.  
  990. You may perform this operation as many times as you desire.  Only the last
  991. mark is remembered.  Press ESC to return to the Sortfields screen.  The start-
  992. ing position and field length will be entered into the screen.
  993.  
  994. dBase Records
  995. -------------
  996. The following screen is displayed for dBase records.
  997.  
  998. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  999. │   File    Record    Sortfield    Options                      Help   About   │
  1000. ├──────╥───────────┬──────┬─────┬────┬────┬──────╥───────────┬──────┬─────┬────┤
  1001. │Sort  ║Field Name │Field │Field│Asc/│ d  │Sort  ║Field Name │Field │Field│Asc/│
  1002. │Field ║or Position│Length│Type │Dec.│ B  │Field ║or Position│Length│Type │Dec.│
  1003. ╞══════╬═══════════╪══════╪═════╪════╡ a  ╞══════╬═══════════╪══════╪═════╪════╡
  1004. │   1  ║           │    0 │     │    │ s  │  17  ║           │    0 │     │    │
  1005. │   2  ║           │    0 │     │    │ e  │  18  ║           │    0 │     │    │
  1006. │   3  ║           │    0 │     │    │    │  19  ║           │    0 │     │    │
  1007. │   4  ║           │    0 │     │    │ F  │  20  ║           │    0 │     │    │
  1008. │   5  ║           │    0 │     │    │ i  │  21  ║           │    0 │     │    │
  1009. │   6  ║           │    0 │     │    │ l  │  22  ║           │    0 │     │    │
  1010. │   7  ║           │    0 │     │    │ e  │  23  ║           │    0 │     │    │
  1011. │   8  ║           │    0 │     │    │    │  24  ║           │    0 │     │    │
  1012. │   9  ║           │    0 │     │    │    │  25  ║           │    0 │     │    │
  1013. │  10  ║           │    0 │     │    │    │  26  ║           │    0 │     │    │
  1014. │  11  ║           │    0 │     │    │    │  27  ║           │    0 │     │    │
  1015. │  12  ║           │    0 │     │    │    │  28  ║           │    0 │     │    │
  1016. │  13  ║           │    0 │     │    │    │  29  ║           │    0 │     │    │
  1017. │  14  ║           │    0 │     │    │    │  30  ║           │    0 │     │    │
  1018. │  15  ║           │    0 │     │    │    │  31  ║           │    0 │     │    │
  1019. │  16  ║           │    0 │     │    │    │  32  ║           │    0 │     │    │
  1020. └──────╨───────────┴──────┴─────┴────┘    └──────╨───────────┴──────┴─────┴────┘
  1021.  
  1022. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  1023.  
  1024. You specify a sort field by moving the cursor to the desired field.  You may
  1025. then insert, delete or edit fields as described above.
  1026.  
  1027. You may specify up to 32 sort fields.  Four pieces of information are required
  1028. for each sort field:  the dBase field name or starting position, the field
  1029. length, the field type and the sort order.
  1030.  
  1031. If you are in the Field Name column and press F1, a list of sort fields will
  1032. be displayed.  The list will be similar to the following:
  1033.  
  1034. ╔═════════════════════════╗     You can select a field from the list by moving
  1035. ║Database Name: NOTES.DB  ║     the cursor to the desired field and pressing
  1036. ╟───────────┬────┬────┬───╢     Enter.  When a field is selected, the name
  1037. ║Field Name │Type│Len │Dec║     length and type are entered automatically.
  1038. ╠═══════════╧════╧════╧═══╣
  1039. ║TEXT         C    65    0║     You may change the selected type or length in
  1040. ║TREATNO      C     9    0║     order to specify if you desire.  Increasing
  1041. ║SEQNO        N     3    0║     the field length will include part of the
  1042. ║                         ║     following field.  Decreasing the field length
  1043. ║                         ║     will sort on only the first part of a field.
  1044. ║                         ║
  1045. ║                         ║     Changing the field type from N to C will cause
  1046. ║                         ║     a numeric field to be sorted as though it
  1047. ║                         ║     contained characters.
  1048. ║                         ║
  1049. ║                         ║     If you wish to sort on middle or end positions
  1050. ║                         ║     of a field, you may do so by entering the
  1051. ║                         ║     starting position of the field to sort relative
  1052. ║                         ║     to the first character of the first field.
  1053. ║                         ║
  1054. ║                         ║     The first field always starts in position 2.
  1055. ╚═════════════════════════╝
  1056.  
  1057. You can find out where a field starts, e.g. SEQNO, by entering the field name
  1058. in an unused sort field line, then quitting the sort field menu, changing the
  1059. Record Type to Variable and redisplaying the SortField menu.  All field names
  1060. will be replaced by their starting position.  Note where the field starts, exit
  1061. SortFields, change the Record Type back to dBase and re-enter the SortField
  1062. menu.  You will again see field names.  Replace the name, e.g. SEQNO, with the
  1063. starting position plus the desired offset of the sub field.  In the above
  1064. example, SEQNO starts at position 76.  If you wish to sort on the second and
  1065. third positions of SEQNO only, Enter 77 for the Field Name and 2 for the
  1066. length.
  1067.  
  1068. Options Menu Option
  1069. -------------------
  1070.  
  1071. Select the Options menu option to specify the type of operation to be per-
  1072. formed (HeapSort, QuickSort or Merge) and to specify work drives if you have
  1073. selected a Sort option.  The Options display was described above.
  1074.  
  1075. If you select a Sort Option, you can use the Work Drive menu item to indicate
  1076. where your sort work drives are to be placed.  The default is drive C.
  1077.  
  1078. If you select Merge, you will be asked for the number of files to merge.  You
  1079. may pick a number between 2 and 5.  Selecting the Merge option disables the
  1080. Work Drives.
  1081.  
  1082.  
  1083. Help Menu Option
  1084. ----------------
  1085.  
  1086. This option displays a one page help summary describing the menuing system.
  1087.  
  1088.  
  1089. About Menu Option
  1090. -----------------
  1091. The About option displays the following:
  1092.  
  1093. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  1094. │   File    Record    Sortfield    Options                      Help   About   │
  1095. └──────────────────────────────────────────────────────────────────────────────┘
  1096.  
  1097.                   ┌──────────────────────────────────────────────┐
  1098.                   │ LSMENU Version 1.00                          │
  1099.                   │    Copyright LONDON COMPUTING 1989           │
  1100.                   │                                              │
  1101.                   │ LSORT Version 3.10                           │
  1102.                   │    Copyright LONDON COMPUTING 1983 to 1989   │
  1103.                   │                                              │
  1104.                   │ All rights reserved.                         │
  1105.                   │                                              │
  1106.                   │ LSMENU and LSORT are User Supported Software │
  1107.                   │ Registration ($25.00) required.  Please send │
  1108.                   │ registration fees to:                        │
  1109.                   │ LONDON COMPUTING                      ▄▄▄▄▄▄ │
  1110.                   │ P.O. Box 696                          █ OK █ │
  1111.                   │ Cherry Hill, NJ  08003                ▀▀▀▀▀▀ │
  1112.                   └──────────────────────────────────────────────┘
  1113.  
  1114.  
  1115. You can close the about window by pressing the letter O, pressing ENTER or
  1116. pressing ESC.
  1117.  
  1118.  
  1119.  
  1120. LSRT for WINDOWS
  1121.  
  1122. LSRT for Windows is a fast in memory sort program with a Windows front end.
  1123.  
  1124. It consists of two programs and a VBX file.
  1125. LSRTWIN3 -- a Visual Basic front end to LSRT and
  1126. LSRTWIN  -- a version of LSRT modified to run under Windows that was
  1127.             created using the QCWIN option of Quick C for Windows.
  1128. CMDIALOG.VBX is included.  Copy to your \WINDOWS\SYSTEM directory.
  1129. VBRUN300.DLL is required to run Visual Basic executables.  It is
  1130. not included but is available on Compuserv and other BBS's.
  1131.  
  1132. To install LSRT for Windows, copy the files LSRTWIN3.EXE, LSRTWIN.EXE
  1133. to your WINDOWS directory, usually (C:\WINDOWS).  If you do not own
  1134. Visual Basic and have not previously downloaded a copy of VBRUN200.DLL, 
  1135. copy VBRUN200.DLL to your WINDOWS directory.  Copy CMDIALOG.VBX to your
  1136. WINDOWS directory.
  1137.  
  1138. After all the files have been copied, add the program to an existing
  1139. group or create a new group for LSORT.  To add LSRT for Windows to a
  1140. group, open the group, then click on File then New.  A dialog box will
  1141. be displayed asking if you wish to create a new Item or new Group. 
  1142. Click on Program Item to add a new item to the existing group.  A
  1143. dialog box will be displayed asking for the program description and
  1144. command line.  Enter "LSRT for Windows" in the description field. 
  1145. Enter "LSRTWIN3" in the command line field.  Click OK.  LSRT for
  1146. Windows will now be available.
  1147.  
  1148. LSRT for Windows provides a menu driven front end for LSRT.  It allows you to
  1149. use familiar windows tools to select the input and output files and define
  1150. the SORT fields.  The help function will tell you how to use it.
  1151.  
  1152.  
  1153. LSORT for WINDOWS
  1154.  
  1155. LSORT for Windows is a full function sort program with a Windows front end.
  1156.  
  1157. It consists of three programs and a VBX file.
  1158. LSORTWIN3 -- a Visual Basic front end to LSRT and
  1159. LSORTWIN  -- a version of LSRT modified to run under Windows that was
  1160.              created using the QCWIN option of Quick C for Windows.
  1161. DB3COPYW  -- a Windows Utility to display all or part of an xBase file.
  1162. CMDIALOG.VBX
  1163. STRTOHEX.DLL
  1164.  
  1165. VBRUN300.DLL is required to run Visual Basic executables.  It is not 
  1166. included but is avaiable on Compuserv and other BBS's.
  1167.  
  1168. To install LSORT for Windows, copy the files LSORTWN3.EXE, LSORTWIN.EXE
  1169. and DB3COPYW.exe to your WINDOWS directory, usually (C:\WINDOWS).  If
  1170. you do not own Visual Basic and have not previously downloaded a copy
  1171. of VBRUN300.DLL, copy VBRUN300.DLL to your WINDOWS directory.  Copy 
  1172. CMDIALOG.VBX and STRTOHEX.DLL to your Windows directory.
  1173.  
  1174. After all the files have been copied, add the program to an existing
  1175. group or create a new group for LSORT.  To add LSORT for Windows to a
  1176. group, open the group, then click on File then New.  A dialog box will
  1177. be displayed asking if you wish to create a new Item or new Group. 
  1178. Click on Program Item to add a new item to the existing group.  A
  1179. dialog box will be displayed asking for the program description and
  1180. command line.  Enter "LSORT for Windows" in the description field. 
  1181. Enter "LSORTWN3" in the command line field.  Click OK.  LSORT for
  1182. Windows will now be available.
  1183.  
  1184. LSORT for Windows provides a menu driven front end for LSORT.  It allows you to
  1185. use familiar windows tools to select the input and output files and define
  1186. the SORT fields.  The help function will tell you how to use it.
  1187.  
  1188. When using LSORT for Windows, you must always define an input and
  1189. output file and define your SORT fields.  You may optionally pick a
  1190. sorting algorithm (Help Sort or Quick Sort), define the locations of
  1191. Work Files,  determine the file type (Text, Comma Delim, Fixed Record
  1192. or xBase) and view the file prior to sorting.  When selecting the sort
  1193. fields, LSORT for Windows will display the database structure in a Listbox.
  1194. LSORT for Windows now supports the Merge functions of LSORT.
  1195.  
  1196.  
  1197.