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

  1. LSORT 3.41 (C) Copyright London Computing, 1983-1991.
  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 Assembler in DeSmet C88 or in
  255. any other language that can be linked to DeSmet C88.
  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.  Use LSMENU2 for
  442. OS2.
  443.  
  444. LSMENU will display an SAA like menu that makes it easier to use LSORT.
  445.  
  446. The menuing system uses drop down menus that allow you to:
  447.  
  448. o   Specify the operations (Sort / Merge) to be performed.
  449. o   Specify Work Drives
  450. o   Specify or Pick Input File(s) using a 'point and shoot' interface.
  451. o   Specify or Pick the Output file.
  452. o   Select the records type: (Fixed, Variable, Delimitted or dBase)
  453. o   Specify the Sort Fields using a context sensitive assistant that will
  454.     either display the names of dBase fields or display a file and let you
  455.     mark fields.
  456. o   Save a sort specification in a file for quick re-use.
  457. o   Load a sort specification.
  458.  
  459. Within LSMENU, the following conventions apply:
  460.  
  461. You select an option by typing the highlighted letter in the option name or
  462. by moving the cursor to that option using the arrow keys, then pression
  463. Enter.
  464.  
  465. You quit any menu option by pressing ESC.  You may use ESC to exit the
  466. program if desired.
  467.  
  468. Selectable options appear as blue on white with one blue letter highlighted.
  469.  
  470. Unavailable options appear as bright white on white.  An unavailable option
  471. becomes available as a by product of selecting other options.
  472.  
  473. When LSMENU is entered, the following menu is displayed:
  474. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  475. │   File    Record    Sortfield    Options                      Help   About   │
  476. └────────────────────────────────┌───────────────┐─────────────────────────────┘
  477.                                  │   HeapSort    │
  478.                                  │   QuickSort   │
  479.                                  │   Merge [ ]   │
  480.                                  │   Work Drive  │
  481.                                  └───────────────┘
  482.  
  483. The Sortfield and Record Options will display as white on white.  This color
  484. combination indicates that the option is not currently available.
  485.  
  486. The Options menu drops down automatically so that you select the type of Sort /
  487. Merge to perform: Heap, Quick or Merge (2-5 files).  When you make your sel-
  488. ection, the Options window closes automatically and the Record and Sortfield
  489. options appear as blue on white, indicating that they are available.  If you
  490. wish to close this or any menu without selecting anything, press ESC.
  491.  
  492. You may then select any other option as desired.  The recommended sequence is
  493. File -- Input,  File -- Output,  Record, Sortfield and File -- Go.
  494.  
  495. The following main menu options are available:
  496.  
  497. File, Record, Sortfield, Options, Help and About.
  498.  
  499. File Menu Option
  500. ----------------
  501. The File option displays the following:
  502.  
  503. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  504. │   File    Record    Sortfield    Options                      Help   About   │
  505. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  506.   │ New    │
  507.   │ Load   │
  508.   │ Save   │
  509.   │ Input  │
  510.   │ Output │
  511.   │ Go     │
  512.   │ Quit   │
  513.   └────────┘
  514.  
  515. New
  516. ---
  517. Select New to clear the sort specification.  This resets any previous
  518. specifications and allows you to start over.
  519.  
  520. Load
  521. ----
  522. Select Load to use an existing sort specification that was saved by the
  523. Save option.  When Load is selected, the following is displayed:
  524.  
  525. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  526. │   File    Record    Sortfield    Options                      Help   About   │
  527. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  528.   │ New    │┌───────────────────── Load Control File ──────────────────────────┐
  529.   │ Load   ││ Current Selection:                                               │
  530.   │ Save   ││                                                                  │
  531.   │ Input  ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                  ▄▄▄▄▄▄                   ▄▄▄▄▄▄▄▄ │
  532.   │ Output ││ █Select File█                  █ Ok █                   █Cancel█ │
  533.   │ Go     ││ ▀▀▀▀▀▀▀▀▀▀▀▀▀                  ▀▀▀▀▀▀                   ▀▀▀▀▀▀▀▀ │
  534.   │ Quit   │└──────────────────────────────────────────────────────────────────┘
  535.   └────────┘
  536.  
  537.             ┌────────────────────────File Selector ──────────────────────────┐
  538.             │Directory of:                                                   │
  539.             │D:\MSC\LSORTX3\*.LSC                                            │
  540.             │────────────────────────────────────────────────────────────────│
  541.             │ <KEY-IT-IN>     ..                                             │
  542.             │ <-A->           TEST.LSC                                       │
  543.             │ <-B->                                                          │
  544.             │ <-C->                                                          │
  545.             │ <-D->                                                          │
  546.             │ <-E->                                                          │
  547.             │ <-F->                                                          │
  548.             │ <-G->                                                          │
  549.             F1=HELP──────────────────────────────────────────────────────────┘
  550. Two new windows are displayed, the Load Control File window and the File
  551. Selector windows.  The File Selector window will be active, with any files
  552. of type .LSC displayed from the current directory.  You can use the file
  553. selector to move to any drive or directory and pick a file to be used as the
  554. control file or you may select <KEY-IT-IN> to enter a filename directly.  More
  555. information about the File Selector is available in file SELEFILE.DOC.
  556.  
  557. To Select a file, move the cursor to the desired file and press Enter.
  558. To Select a drive, move the cursor to a drive indicator, e.g. <-C->, and
  559. press Enter.
  560.  
  561. To Select a directory move the cursor to a directory entry, e.g. .., and
  562. press Enter.
  563.  
  564. To Quit without selecting a file, press ESC.
  565.  
  566. Pressing Enter or ESC closes the File Selector window and displays the
  567. selected file, if any, under Current Selection in the Load Control File
  568. window.  The Load Control File window has three options:  Select, Ok and
  569. Cancel.  Choose Select to redisplay the File Selector.  Choose Ok to
  570. approve the Current Selection and load the control file or choose Cancel
  571. to return to the Files Menu without selecting a control file.
  572.  
  573. Selecting a control file that does not contain control information will
  574. seriously confuse LSMENU.  Don't do it.
  575.  
  576. If you choose OK, the control file will be loaded and your input file,
  577. output file, Options, Record and Sortfield menus will be set to the values
  578. that they had when the control file was created.
  579.  
  580. Save
  581. ----
  582. Select Save to save your current specifications as a control file which can
  583. be loaded from a subsequent invokation of LSMENU.  The following is displayed:
  584.  
  585. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  586. │   File    Record    Sortfield    Options                      Help   About   │
  587. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  588.   │ New    │┌───────────────────── Save Control File ──────────────────────────┐
  589.   │ Load   ││ Current Selection:                                               │
  590.   │ Save   ││                                                                  │
  591.   │ Input  ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                 ▄▄▄▄▄▄                    ▄▄▄▄▄▄▄▄ │
  592.   │ Output ││ █Select File█                 █ Ok █                    █Cancel█ │
  593.   │ Go     ││ ▀▀▀▀▀▀▀▀▀▀▀▀▀                 ▀▀▀▀▀▀                    ▀▀▀▀▀▀▀▀ │
  594.   │ Quit   │└──────────────────────────────────────────────────────────────────┘
  595.   └────────┘
  596.  
  597.             ┌────────────────────────File Selector ──────────────────────────┐
  598.             │Directory of:                                                   │
  599.             │C:\TMP\*.*                                                      │
  600.             │────────────────────────────────────────────────────────────────│
  601.             │ <KEY-IT-IN>     ..              LSORT.EXE       LSORTPRM.OBJ   │
  602.             │ <-A->           DUFI.DOC        LSORT.HLP       LSORTQK.OBJ    │
  603.             │ <-B->           DUFI.EXE        LSORT.OBJ       LSORTSUB.OBJ   │
  604.             │ <-C->           DVINT.OBJ       LSORT311.TXT    LSORTX3.EXE    │
  605.             │ <-D->           FILELIST.TXT    LSORTCMP.OBJ    LSRTOS2.EXE    │
  606.             │ <-E->           LSMENU.EXE      LSORTDBF.OBJ    LSSORT.OBJ     │
  607.             │ <-F->           LSMERGE.OBJ     LSORTIO.OBJ     LSUSER.OBJ     │
  608.             │ <-G->           LSORT.CRF       LSORTLNK.BAT    SCRSUBS.OBJ    │
  609.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  610.  
  611. The Save Control File window shows the current control file, if any.  The File
  612. Selector window shows all the files in the current directory.  You may select
  613. and existing file to save the sort specification to or use <KEY-IT-IN> to enter
  614. a new file to contain the sort specification.  If you select an existing file,
  615. it will be overwritten with the sort specification and its old contents will
  616. be gone.  BE CAREFUL.
  617.  
  618. As above, once a file name has been entered, you may choose Select, Ok or
  619. Cancel from the Save Control File window.  Ok will save the sort specification.
  620. Cancel will return to the File menu without saving and Select will redisplay
  621. the File Selector.
  622.  
  623. Input
  624. -----
  625. This option is only activated if HeapSort, QuickSort or Merge has been selected
  626. from the Options Menu.  When you are sorting, the following will be displayed:
  627.  
  628. Input-Sort
  629. ----------
  630. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  631. │   File    Record    Sortfield    Options                      Help   About   │
  632. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  633.   │ New    │
  634.   │ Load   │┌───────────────────── Select Input File ──────────────────────────┐
  635.   │ Save   ││ Current Selection:                                               │
  636.   │ Input  ││                                                                  │
  637.   │ Output ││▄▄▄▄▄▄▄▄▄▄▄▄▄                 ▄▄▄▄▄▄                      ▄▄▄▄▄▄▄▄│
  638.   │ Go     ││█Select File█                 █ Ok █                      █Cancel█│
  639.   │ Quit   ││▀▀▀▀▀▀▀▀▀▀▀▀▀                 ▀▀▀▀▀▀                      ▀▀▀▀▀▀▀▀│
  640.   └────────┘└──────────────────────────────────────────────────────────────────┘
  641.  
  642.             ┌────────────────────────File Selector ──────────────────────────┐
  643.             │Directory of:                                                   │
  644.             │D:\MSC\LSORTX3\*.*                                              │
  645.             │────────────────────────────────────────────────────────────────│
  646.             │ <KEY-IT-IN>     ..              LSMENU.C        LSORTX3.H      │
  647.             │ <-A->           CDRIVER.C       LSORT.H         LSORTX3.MAK    │
  648.             │ <-B->           CDRIVER.OBJ     LSORT311.TXT    LSORTX3.OBJ    │
  649.             │ <-C->           CSEXTERN.H      LSORTBAK.ZIP    LSORTX3.OLD    │
  650.             │ <-D->           CSUBS.C         LSORTOS2.ZIP    LSORT_DF.C     │
  651.             │ <-E->           CSUBS.OBJ       LSORTX3.C       LSORT_DF.OBJ   │
  652.             │ <-F->           DUFI$$$$.$$$    LSORTX3.CRF     LSORT_FT.C     │
  653.             │ <-G->           DUFI.C          LSORTX3.EXE     LSORT_FT.OBJ   │
  654.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  655.  
  656. Use the File Selector as above to choose a file to sort and return to the
  657. Select Input File window where you may choose Ok, to set the input file to
  658. your selection, Cancel to quit without selecting an input file or Select File
  659. to redisplay the File Selector.
  660.  
  661. Input - Merge
  662. -------------
  663.  
  664. If you are merging, the following is displayed:
  665. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  666. │   File    Record    Sortfield    Options                      Help   About   │
  667. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  668.   │ New    │
  669.   │ Load   │┌──────────────────────Select Merge Files──────────────────────────┐
  670.   │ Save   ││# Current Selection:                                              │
  671.   │ Input  ││1                                                                 │
  672.   │ Output ││2                                                                 │
  673.   │ Go     ││3                                                                 │
  674.   │ Quit   ││4                                                                 │
  675.   └────────┘│5                                                                 │
  676.             │  Select File Number:                                             │
  677.             │  ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄  │
  678.             │  █ 1 █    █ 2 █    █ 3 █    █ 4 █    █ 5 █    █ Ok █   █Cancel█  │
  679.             │  ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀▀   ▀▀▀▀▀▀▀▀  │
  680.             └──────────────────────────────────────────────────────────────────┘
  681.  
  682. Choose the merge file to select by selecting menu options 1,2,3,4 or 5.  If you
  683. select any of these options, the File Selector will be displayed and you can
  684. use it to pick the merge file.  Repeat until all necessary merge files have
  685. been selected, then choose Ok to return to the File menu.
  686.  
  687. Output
  688. ------
  689. Use this option to specify the name of your output file which will contain
  690. the sorted or merged data.  When this option is selected, the following is
  691. displayed:
  692.  
  693. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  694. │   File    Record    Sortfield    Options                      Help   About   │
  695. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  696.   │ New    │
  697.   │ Load   │
  698.   │ Save   │┌───────────────────── Select Output File ─────────────────────────┐
  699.   │ Input  ││ Current Selection:                                               │
  700.   │ Output ││                                                                  │
  701.   │ Go     ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                  ▄▄▄▄                     ▄▄▄▄▄▄▄▄ │
  702.   │ Quit   ││ █Select File█                  █Ok█                     █Cancel█ │
  703.   └────────┘│ ▀▀▀▀▀▀▀▀▀▀▀▀▀                  ▀▀▀▀                     ▀▀▀▀▀▀▀▀ │
  704.             └──────────────────────────────────────────────────────────────────┘
  705.             ┌────────────────────────File Selector ──────────────────────────┐
  706.             │Directory of:                                                   │
  707.             │C:\TMP\*.*                                                      │
  708.             │────────────────────────────────────────────────────────────────│
  709.             │ <KEY-IT-IN>     ..              LSORT.EXE       LSORTPRM.OBJ   │
  710.             │ <-A->           DUFI.DOC        LSORT.HLP       LSORTQK.OBJ    │
  711.             │ <-B->           DUFI.EXE        LSORT.OBJ       LSORTSUB.OBJ   │
  712.             │ <-C->           DVINT.OBJ       LSORT311.TXT    LSORTX3.EXE    │
  713.             │ <-D->           FILELIST.TXT    LSORTCMP.OBJ    LSRTOS2.EXE    │
  714.             │ <-E->           LSMENU.EXE      LSORTDBF.OBJ    LSSORT.OBJ     │
  715.             │ <-F->           LSMERGE.OBJ     LSORTIO.OBJ     LSUSER.OBJ     │
  716.             │ <-G->           LSORT.CRF       LSORTLNK.BAT    SCRSUBS.OBJ    │
  717.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  718.  
  719. The File Selector window is active and you can pick an existing file to hold
  720. the output of the sort or merge or you can choose <KEY-IT-IN> to enter a new
  721. file name.  If you select an existing file, it will be overwritten when the
  722. sort / merge is run.  BE CAREFUL.  After specifying a file, the Select Ouput
  723. File window becomes active and you may choose Ok to accept the file name,
  724. Cancel to quit without accepting the file name or Select File to redisplay
  725. the File Selector.
  726.  
  727. GO
  728. --
  729. Select this option to perform the sort or merge.  This option should be
  730. selected ONLY after specifying HeapSort, QuickSort or Merge, Input File(s),
  731. Output File(s), Record Type and Sortfields.  If you select GO before all of
  732. the necessary information has been specified, an error message will be dis-
  733. played showing those pieces of information that are missing.  The message
  734. will be similar to that shown below:
  735.  
  736. ┌─────────────────────────────────────────────────────────┐
  737. │                                                         │
  738. │ Unable to RUN Sort because:                             │
  739. │                                                         │
  740. │ Sort or Merge not selected on Options Screen.           │
  741. │ No sort input file was specified.                       │
  742. │ No output file was specified.                           │
  743. │ No sort/merge fields were defined.                      │
  744. │                                                         │
  745. │                                                    ▄▄▄▄ │
  746. │                                                    █Ok█ │
  747. │                                                    ▀▀▀▀ │
  748. └─────────────────────────────────────────────────────────┘
  749.  
  750. If everything has bee specified, the menu will disapear and standard LSORT
  751. output will be displayed, the file(s) will be sorted or merged and control
  752. will return to the standard DOS prompt.
  753.  
  754. Quit
  755. ----
  756. Select this option to quit the menu system without running a Sort.  You will
  757. be given a chance to change your mind when the following is displayed:
  758.  
  759. ┌───────────────┐
  760. │ Quit LSMENU ? │
  761. │ ▄▄▄▄ ▄▄▄▄▄▄▄▄ │
  762. │ █Ok█ █Cancel█ │
  763. │ ▀▀▀▀ ▀▀▀▀▀▀▀▀ │
  764. └───────────────┘
  765.  
  766. If you select Ok, you will exit to the command line.  If you select Cancel,
  767. you will return to the File Menu.
  768.  
  769.  
  770. Record Menu Option
  771. ------------------
  772.  
  773. The record option allows you to pick the type of record to be sorted.  The
  774. following will be displayed:
  775.  
  776. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  777. │   File    Record    Sortfield    Options                      Help   About   │
  778. └─────────┌───────────────┐────────────────────────────────────────────────────┘
  779.           │   Fixed    0  │
  780.           │ √ Variable    │
  781.           │   Delimited   │
  782.           │   dBase       │
  783.           └───────────────┘
  784.  
  785. Use this menu to pick the record type.  The default type is Variable and is
  786. shown marked with a check.  Variable records are variable length, contain
  787. ASCII characters only and are terminated with a CR-LF.  To select variable,
  788. type V or move the cursor to the variable line and press Enter.  If the check
  789. mark is on a different type it will be moved to the Variable line.  Press
  790. ESC to return to the main menu.
  791.  
  792. You may also select Fixed, Delimited or dBase.  If you select Fixed, you will
  793. be prompted for the number of characters in the record.  Enter the number and
  794. press Enter.  (Fixed records are all the same length.  You must tell the LSMENU
  795. what that length is.)  The check mark will move to the Fixed Line and the
  796. record length will be displayed next to the word fixed.  Press ESC to return
  797. to the main menu.
  798.  
  799. If you select Delimited (fields are comma delimitted) or dBase, the check mark
  800. will move to the appropriate line.  Press ESC to return to the main menu.
  801.  
  802. SortField Menu Option
  803. ---------------------
  804. Select Sortfield to specify the fields to sort on.  You should specify
  805. Record Type before selecting Sortfields.  A different menu is displayed
  806. depending on the record type.
  807.  
  808. In all cases, you must first specify a sort field by moving the blue
  809. cursor to the desired field number.  You may then Add a new field, pushing
  810. all the current specification and subsequent specifications down one slot,
  811. Delete a field, moving following specifications up one slot or Edit the field.
  812.  
  813. To quit the SortFields Menu, press ESC.
  814.  
  815. Fixed or Variable Records
  816. -------------------------
  817. If the record type is Fixed or Variable the following screen is displayed with
  818. a high lighted cursor set to Sort Field 1.
  819. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  820. │   File    Record    Sortfield    Options                      Help   About   │
  821. ├──────╥────────┬──────┬─────┬────┬─────┬──────╥────────┬──────┬─────┬────┤────┘
  822. │Sort  ║Starting│Field │Field│Asc/│     │Sort  ║Starting│Field │Field│Asc/│
  823. │Field ║Position│Length│Type │Dec.│     │Field ║Position│Length│Type │Dec.│
  824. ╞══════╬════════╪══════╪═════╪════╡     ╞══════╬════════╪══════╪═════╪════╡
  825. │ __1_ ║      0 │    0 │     │    │     │  17  ║      0 │    0 │     │    │
  826. │   2  ║      0 │    0 │     │    │     │  18  ║      0 │    0 │     │    │
  827. │   3  ║      0 │    0 │     │    │     │  19  ║      0 │    0 │     │    │
  828. │   4  ║      0 │    0 │     │    │     │  20  ║      0 │    0 │     │    │
  829. │   5  ║      0 │    0 │     │    │     │  21  ║      0 │    0 │     │    │
  830. │   6  ║      0 │    0 │     │    │     │  22  ║      0 │    0 │     │    │
  831. │   7  ║      0 │    0 │     │    │     │  23  ║      0 │    0 │     │    │
  832. │   8  ║      0 │    0 │     │    │     │  24  ║      0 │    0 │     │    │
  833. │   9  ║      0 │    0 │     │    │     │  25  ║      0 │    0 │     │    │
  834. │  10  ║      0 │    0 │     │    │     │  26  ║      0 │    0 │     │    │
  835. │  11  ║      0 │    0 │     │    │     │  27  ║      0 │    0 │     │    │
  836. │  12  ║      0 │    0 │     │    │     │  28  ║      0 │    0 │     │    │
  837. │  13  ║      0 │    0 │     │    │     │  29  ║      0 │    0 │     │    │
  838. │  14  ║      0 │    0 │     │    │     │  30  ║      0 │    0 │     │    │
  839. │  15  ║      0 │    0 │     │    │     │  31  ║      0 │    0 │     │    │
  840. │  16  ║      0 │    0 │     │    │     │  32  ║      0 │    0 │     │    │
  841. └──────╨────────┴──────┴─────┴────┘     └──────╨────────┴──────┴─────┴────┘
  842.  
  843. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  844.  
  845. You may specify up to 32 different fields for sorting or merging.  A sort field
  846. specification consists of four entries, the field starting position (relative
  847. to 1), the field length, the field type and the sort order.  To select a sort
  848. field, move the cursor to that field number.  You may now press Enter to edit
  849. that sort field, Del to delete that sort field or Ins to insert a new field.
  850.  
  851. Deleting a sort field will move all following fields up one slot.  Inserting
  852. a sort field moves all fields down one slot and creates an empty specification
  853. at the selected field.
  854.  
  855. Editing a sort field allows you to enter or change starting position, field
  856. length, field type and sort order.
  857.  
  858. The four parts of a sort field specification consist of:
  859.  
  860. o    Starting Position, which indicates where the field starts relative to the
  861. first character in the record. Position 1 is the first charactter, position 2
  862. the second and so forth.
  863.  
  864. o   Field Length indicates how many characters or bytes are in the field.
  865.  
  866. o   Field Type indicates the type of field.  If you know the field type, just
  867. enter the correct code. If you don't know the field type, press F1 and the
  868. following will pop up:
  869.  
  870. ╒═══════Select Field Type══════╕     Choose the desired field type by moving
  871. │Character (case is signficant)│     the cursor and pressing enter or by
  872. │Double floating point         │     pressing the first letter on the line.
  873. │Floating point (single)       │
  874. │Integer (16 bit signed)       │     Once selected, the pop up window will
  875. │Long (32 bit signed integer)  │     close and the desired code will be
  876. │Numeric (ASCII text)          │     shown in the input field.
  877. │True/false (dBase logical)    │
  878. │Upper (character case ignored)│
  879. │Packed decimal                │
  880. │Binary                        │
  881. │X (user defined field type X) │
  882. │Y (user defined field type Y) │
  883. │Z (user defined field type Z) │
  884. └──────────────────────────────┘
  885.  
  886. o   Sort Order (Asc/Dec) indicates whether the field should be sorted in
  887. ascending or descending sequence.  If you leave it flank, press F1 or enter
  888. and invalid menu, a small pop up appears showing good values.
  889.  
  890. If you press F1 while in the Starting Position or Field Length columns, a
  891. special field selector window will be displayed.  You can use this window
  892. to display the first few lines of the file to be sorted.  You can display
  893. data in text or dump format.  The window is shown below:
  894.  
  895. ╔══════════════════════════════════════════════════════════════════════════════╗
  896. ║LSORTX3.MAK                                                   R1      , C1    ║
  897. ║------------------------------------------------------------------------------║
  898. ║PROJ   =LSORTX3                                                               ║
  899. ║DEBUG  =1                                                                     ║
  900. ║CC     =cl                                                                    ║
  901. ║CFLAGS_G   = /AS /W3                                                          ║
  902. ║------------------------------------------------------------------------------║
  903. ║   PgUp PgDn Home End, ^Home-Top, ^End-Bot, F1-Help, F3-Hex, F5-Mark, ESC-Quit║
  904. ╚══════════════════════════════════════════════════════════════════════════════╝
  905.  
  906. You can position to any record using the Up arrow, Down arrow, PgUp and PgDn.
  907. You can position to any character in the record using the Left arrow and Right
  908. arrow.  In order to mark a field, use the Left and Right arrows to position to
  909. the first character of the field, then press F5.  Continue using the Right
  910. arrow to mark each charcter in turn.  Marked characters are shown in reverse
  911. video.  When you have marked the last character of the field, press Enter.
  912.  
  913. You may perform this operation as many times as you desire.  Only the last
  914. mark is remembered.  Press ESC to return to the Sortfields screen.  The start-
  915. ing position and field length will be entered into the screen.
  916.  
  917. Delimitted Records
  918. ------------------
  919. If your record type is Delimited, the following will be displayed:
  920.  
  921. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  922. │   File    Record    Sortfield    Options                      Help   About   │
  923. ├──────╥───────┬─────┬────┬─────────────┬──────╥───────┬─────┬────┬────────────┘
  924. │Field ║Field  │Field│Asc/│ Delimitted  │Field ║Field  │Field│Asc/│
  925. │Number║Pos'n  │Type │Dec.│    File     │Number║Pos'n  │Type │Dec.│
  926. ╞══════╬═══════╪═════╪════╡             ╞══════╬═══════╪═════╪════╡
  927. │   1  ║      0│     │    │             │  17  ║      0│     │    │
  928. │   2  ║      0│     │    │             │  18  ║      0│     │    │
  929. │   3  ║      0│     │    │             │  19  ║      0│     │    │
  930. │   4  ║      0│     │    │             │  20  ║      0│     │    │
  931. │   5  ║      0│     │    │             │  21  ║      0│     │    │
  932. │   6  ║      0│     │    │             │  22  ║      0│     │    │
  933. │   7  ║      0│     │    │             │  23  ║      0│     │    │
  934. │   8  ║      0│     │    │             │  24  ║      0│     │    │
  935. │   9  ║      0│     │    │             │  25  ║      0│     │    │
  936. │  10  ║      0│     │    │             │  26  ║      0│     │    │
  937. │  11  ║      0│     │    │             │  27  ║      0│     │    │
  938. │  12  ║      0│     │    │             │  28  ║      0│     │    │
  939. │  13  ║      0│     │    │             │  29  ║      0│     │    │
  940. │  14  ║      0│     │    │             │  30  ║      0│     │    │
  941. │  15  ║      0│     │    │             │  31  ║      0│     │    │
  942. │  16  ║      0│     │    │             │  32  ║      0│     │    │
  943. └──────╨───────┴─────┴────┘             └──────╨───────┴─────┴────┘
  944.  
  945. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  946.  
  947. You select fields to edit, insert or delete as described above. You may specify
  948. up to 32 different fields for sorting or merging.  Field Pos'n indicates which
  949. comma seperated field is to be sorted.  Fields are numbered from 1.  Field Type
  950. indicates the type of field.  If you know the field type, just enter the
  951. correct code.  If you don't know the field type, press F1 and the following
  952. will pop up:
  953.  
  954. ╒═══════Select Field Type══════╕     Choose the desired field type by moving
  955. │Character (case is signficant)│     the cursor and pressing enter or by
  956. │Double floating point         │     pressing the first letter on the line.
  957. │Floating point (single)       │
  958. │Integer (16 bit signed)       │     Once selected, the pop up window will
  959. │Long (32 bit signed integer)  │     close and the desired code will be
  960. │Numeric (ASCII text)          │     shown in the input field.
  961. │True/false (dBase logical)    │
  962. │Upper (character case ignored)│     The Asc/Dec field should be set to A
  963. │X (user defined field type X) │     to sort from low to high or D to sort
  964. │Y (user defined field type Y) │     from high to low.  If you enter anything
  965. │Z (user defined field type Z) │     else a small pop up window will appear,
  966. └──────────────────────────────┘     showing the two valid choices.
  967.  
  968. If you press F1 while in the Field Pos'n column, a special field selector
  969. window will be displayed.  You can use this window to display the first few
  970. lines of the file to be sorted.  You can display data in text or dump format.
  971. The window is shown below:
  972.  
  973. ╔══════════════════════════════════════════════════════════════════════════════╗
  974. ║LSORTX3.MAK                                                   R1      , C1    ║
  975. ║------------------------------------------------------------------------------║
  976. ║PROJ   ,LSORTX3                                                               ║
  977. ║DEBUG  ,1                                                                     ║
  978. ║CC     ,cl                                                                    ║
  979. ║CFLAGS_G,/AS, /W3                                                             ║
  980. ║------------------------------------------------------------------------------║
  981. ║   PgUp PgDn Home End, ^Home-Top, ^End-Bot, F1-Help, F3-Hex, F5-Mark, ESC-Quit║
  982. ╚══════════════════════════════════════════════════════════════════════════════╝
  983.  
  984. You can position to any record using the Up arrow, Down arrow, PgUp and PgDn.
  985. You can position to any character in the record using the Left arrow and Right
  986. arrow.  In order to mark a field, use the Left and Right arrows to position to
  987. the first character of the field, then press F5.  Continue using the Right
  988. arrow to mark each charcter in turn.  Marked characters are shown in reverse
  989. video.  When you have marked the last character of the field, press Enter.
  990.  
  991. You may perform this operation as many times as you desire.  Only the last
  992. mark is remembered.  Press ESC to return to the Sortfields screen.  The start-
  993. ing position and field length will be entered into the screen.
  994.  
  995. dBase Records
  996. -------------
  997. The following screen is displayed for dBase records.
  998.  
  999. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  1000. │   File    Record    Sortfield    Options                      Help   About   │
  1001. ├──────╥───────────┬──────┬─────┬────┬────┬──────╥───────────┬──────┬─────┬────┤
  1002. │Sort  ║Field Name │Field │Field│Asc/│ d  │Sort  ║Field Name │Field │Field│Asc/│
  1003. │Field ║or Position│Length│Type │Dec.│ B  │Field ║or Position│Length│Type │Dec.│
  1004. ╞══════╬═══════════╪══════╪═════╪════╡ a  ╞══════╬═══════════╪══════╪═════╪════╡
  1005. │   1  ║           │    0 │     │    │ s  │  17  ║           │    0 │     │    │
  1006. │   2  ║           │    0 │     │    │ e  │  18  ║           │    0 │     │    │
  1007. │   3  ║           │    0 │     │    │    │  19  ║           │    0 │     │    │
  1008. │   4  ║           │    0 │     │    │ F  │  20  ║           │    0 │     │    │
  1009. │   5  ║           │    0 │     │    │ i  │  21  ║           │    0 │     │    │
  1010. │   6  ║           │    0 │     │    │ l  │  22  ║           │    0 │     │    │
  1011. │   7  ║           │    0 │     │    │ e  │  23  ║           │    0 │     │    │
  1012. │   8  ║           │    0 │     │    │    │  24  ║           │    0 │     │    │
  1013. │   9  ║           │    0 │     │    │    │  25  ║           │    0 │     │    │
  1014. │  10  ║           │    0 │     │    │    │  26  ║           │    0 │     │    │
  1015. │  11  ║           │    0 │     │    │    │  27  ║           │    0 │     │    │
  1016. │  12  ║           │    0 │     │    │    │  28  ║           │    0 │     │    │
  1017. │  13  ║           │    0 │     │    │    │  29  ║           │    0 │     │    │
  1018. │  14  ║           │    0 │     │    │    │  30  ║           │    0 │     │    │
  1019. │  15  ║           │    0 │     │    │    │  31  ║           │    0 │     │    │
  1020. │  16  ║           │    0 │     │    │    │  32  ║           │    0 │     │    │
  1021. └──────╨───────────┴──────┴─────┴────┘    └──────╨───────────┴──────┴─────┴────┘
  1022.  
  1023. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  1024.  
  1025. You specify a sort field by moving the cursor to the desired field.  You may
  1026. then insert, delete or edit fields as described above.
  1027.  
  1028. You may specify up to 32 sort fields.  Four pieces of information are required
  1029. for each sort field:  the dBase field name or starting position, the field
  1030. length, the field type and the sort order.
  1031.  
  1032. If you are in the Field Name column and press F1, a list of sort fields will
  1033. be displayed.  The list will be similar to the following:
  1034.  
  1035. ╔═════════════════════════╗     You can select a field from the list by moving
  1036. ║Database Name: NOTES.DB  ║     the cursor to the desired field and pressing
  1037. ╟───────────┬────┬────┬───╢     Enter.  When a field is selected, the name
  1038. ║Field Name │Type│Len │Dec║     length and type are entered automatically.
  1039. ╠═══════════╧════╧════╧═══╣
  1040. ║TEXT         C    65    0║     You may change the selected type or length in
  1041. ║TREATNO      C     9    0║     order to specify if you desire.  Increasing
  1042. ║SEQNO        N     3    0║     the field length will include part of the
  1043. ║                         ║     following field.  Decreasing the field length
  1044. ║                         ║     will sort on only the first part of a field.
  1045. ║                         ║
  1046. ║                         ║     Changing the field type from N to C will cause
  1047. ║                         ║     a numeric field to be sorted as though it
  1048. ║                         ║     contained characters.
  1049. ║                         ║
  1050. ║                         ║     If you wish to sort on middle or end positions
  1051. ║                         ║     of a field, you may do so by entering the
  1052. ║                         ║     starting position of the field to sort relative
  1053. ║                         ║     to the first character of the first field.
  1054. ║                         ║
  1055. ║                         ║     The first field always starts in position 2.
  1056. ╚═════════════════════════╝
  1057.  
  1058. You can find out where a field starts, e.g. SEQNO, by entering the field name
  1059. in an unused sort field line, then quitting the sort field menu, changing the
  1060. Record Type to Variable and redisplaying the SortField menu.  All field names
  1061. will be replaced by their starting position.  Note where the field starts, exit
  1062. SortFields, change the Record Type back to dBase and re-enter the SortField
  1063. menu.  You will again see field names.  Replace the name, e.g. SEQNO, with the
  1064. starting position plus the desired offset of the sub field.  In the above
  1065. example, SEQNO starts at position 76.  If you wish to sort on the second and
  1066. third positions of SEQNO only, Enter 77 for the Field Name and 2 for the
  1067. length.
  1068.  
  1069. Options Menu Option
  1070. -------------------
  1071.  
  1072. Select the Options menu option to specify the type of operation to be per-
  1073. formed (HeapSort, QuickSort or Merge) and to specify work drives if you have
  1074. selected a Sort option.  The Options display was described above.
  1075.  
  1076. If you select a Sort Option, you can use the Work Drive menu item to indicate
  1077. where your sort work drives are to be placed.  The default is drive C.
  1078.  
  1079. If you select Merge, you will be asked for the number of files to merge.  You
  1080. may pick a number between 2 and 5.  Selecting the Merge option disables the
  1081. Work Drives.
  1082.  
  1083.  
  1084. Help Menu Option
  1085. ----------------
  1086.  
  1087. This option displays a one page help summary describing the menuing system.
  1088.  
  1089.  
  1090. About Menu Option
  1091. -----------------
  1092. The About option displays the following:
  1093.  
  1094. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  1095. │   File    Record    Sortfield    Options                      Help   About   │
  1096. └──────────────────────────────────────────────────────────────────────────────┘
  1097.  
  1098.                   ┌──────────────────────────────────────────────┐
  1099.                   │ LSMENU Version 1.00                          │
  1100.                   │    Copyright LONDON COMPUTING 1989           │
  1101.                   │                                              │
  1102.                   │ LSORT Version 3.10                           │
  1103.                   │    Copyright LONDON COMPUTING 1983 to 1989   │
  1104.                   │                                              │
  1105.                   │ All rights reserved.                         │
  1106.                   │                                              │
  1107.                   │ LSMENU and LSORT are User Supported Software │
  1108.                   │ Registration ($25.00) required.  Please send │
  1109.                   │ registration fees to:                        │
  1110.                   │ LONDON COMPUTING                      ▄▄▄▄▄▄ │
  1111.                   │ P.O. Box 696                          █ OK █ │
  1112.                   │ Cherry Hill, NJ  08003                ▀▀▀▀▀▀ │
  1113.                   └──────────────────────────────────────────────┘
  1114.  
  1115.  
  1116. You can close the about window by pressing the letter O, pressing ENTER or
  1117. pressing ESC.
  1118.  
  1119.  
  1120.  
  1121. LSRT for WINDOWS
  1122.  
  1123. LSRT for Windows is a fast in memory sort program with a Windows front end.
  1124.  
  1125. It consists of two programs and a VBX file.
  1126. LSRTWIN3 -- a Visual Basic front end to LSRT and
  1127. LSRTWIN  -- a version of LSRT modified to run under Windows that was
  1128.             created using the QCWIN option of Quick C for Windows.
  1129. CMDIALOG.VBX is included.  Copy to your \WINDOWS\SYSTEM directory.
  1130. VBRUN200.DLL is required to run Visual Basic executables.  It is
  1131. not included but is available on Compuserv and other BBS's.
  1132.  
  1133. To install LSRT for Windows, copy the files LSRTWIN3.EXE, LSRTWIN.EXE
  1134. to your WINDOWS directory, usually (C:\WINDOWS).  If you do not own
  1135. Visual Basic and have not previously downloaded a copy of VBRUN200.DLL, 
  1136. copy VBRUN200.DLL to your WINDOWS directory.  Copy CMDIALOG.VBX to your
  1137. WINDOWS directory.
  1138.  
  1139. After all the files have been copied, add the program to an existing
  1140. group or create a new group for LSORT.  To add LSRT for Windows to a
  1141. group, open the group, then click on File then New.  A dialog box will
  1142. be displayed asking if you wish to create a new Item or new Group. 
  1143. Click on Program Item to add a new item to the existing group.  A
  1144. dialog box will be displayed asking for the program description and
  1145. command line.  Enter "LSRT for Windows" in the description field. 
  1146. Enter "LSRTWIN3" in the command line field.  Click OK.  LSRT for
  1147. Windows will now be available.
  1148.  
  1149. LSRT for Windows provides a menu driven front end for LSRT.  It allows you to
  1150. use familiar windows tools to select the input and output files and define
  1151. the SORT fields.  The help function will tell you how to use it.
  1152.  
  1153.  
  1154. LSORT for WINDOWS
  1155.  
  1156. LSORT for Windows is a full function sort program with a Windows front end.
  1157.  
  1158. It consists of three programs and a VBX file.
  1159. LSORTWIN3 -- a Visual Basic front end to LSRT and
  1160. LSORTWIN  -- a version of LSRT modified to run under Windows that was
  1161.              created using the QCWIN option of Quick C for Windows.
  1162. DB3COPYW  -- a Windows Utility to display all or part of an xBase file.
  1163. CMDIALOG.VBX
  1164.  
  1165. VBRUN200.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 VBRUN200.DLL, copy VBRUN200.DLL to your WINDOWS directory.  Copy 
  1172. CMDIALOG.VBX 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 does not support the Merge functions of LSORT.
  1195.  
  1196.  
  1197.