home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / LS321.ZIP / LSORT.DOC < prev    next >
Text File  |  1990-09-22  |  53KB  |  1,096 lines

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