Date: 19-Oct-90 12:19 EDT From: Chris Barr [PC MagNet] [72241,13] Subj: PCSORT.DOC PCSORT, by Michael J. Mefford, is a multi-line, multi-field text file sorter, that does everything SORT.EXE can do--and plenty more. USING PCSORT The syntax for PCSORT is: PCSORT [filename] [options] PCSORT COMMAND-LINE SUMMARY /Sn n=size of record in lines (1-9) Default=1 /Pn n=sort priority (1-9) Default=1 /R Sort current priority in reverse order Default = ascending /N Numeric sort current priority Default = Alphanumeric /L[n] Line sort: n=record sort line (1-9) default=1 default sort is a line sort /[B][+] nn [xx [y]] Block or column sort: nn=start column xx=width y=sort line (1-9) defaults: nn=1; xx=start column to end of line; y=1 /W [+|-] n Word sort: n=word count default = plus 1 minus = count from end of record /C Case sensitive sort Default = Case insensitive Shown above are the many switches you can use, either at the command line or within batch files, to configure PCSORT for your own needs. The options listed need be used only if you're using PCSORT as a filter--in combination with the DOS redirection characters |, <, and >. A common example is piping DOS directory's output to a filter and redirecting the filter's output to a file. PCSORT MENU COMMAND SUMMARY PgUp/PgDn Next page Arrow keys Cursor Home(1) Beginning of column Home(2) Top of page Home(3) Top of text (the third time you press Home) End(1) End of column End(2) End of page End(3) End of text (the third time you press End) Ctrl Home Beginning of text Ctrl End End of text Enter Beginning of next line F1 Displays all sort fields at a glance Alt-F1 Resets all the sort variables to their defaults F2 Save file F3 New file F4 Sort text F5 Increase lines per record (1-9) Shift F5 Decrease lines per record /F6 Select next key priority (1-9) Shift F6 Select previous key priority} F7 Sort order (de/ascending) F8 Alphanumeric or Numeric sort F9 Select next Field type: Line, block, word or none Shift F9 Select previous Field type F10 Mark the record line for line sort or mark block sort field or select sort word count Shift F10 Reverse selection of word count Esc Exit PCSORT This listing of PCSORT's navigation keys demonstrates the program's versatility in sorting in up to 9 priority orders. Each priority can be set independently of the others. Key commands, in general, operate as you might expect. Note, however, the varied uses of the Home and End keys for traveling throughout the file; each key's role, here, depends on the number of times you press it. CUSTOMIZING PCSORT by Michael J. Mefford Some systems, especially laptops, do not display color contrasts very well. If you find PCSORT hard to read, you can force PCSORT to use black-and-white attributes by entering the command MODE BW80 before running PCSORT. The best way to do that is from a batch file, as shown: MODE BW80 PCSORT %1 %2 If you have a color system and PCSORT is using black and white attributes, chances are some other application has changed the video mode. To encourage PCSORT to use color, issue the DOS command MODE CO80 before running PCSORT. The following instructions will enable you to customize the colors used by PCSORT. Start by making a backup copy of PCSORT.COM and then enter DEBUG PCSORT.COM You are now ready to modify PCSORT.COM. If at any time you make a mistake, you can abort the editing process by entering Q. The last two commands that you enter after entering any modifications are W Q for Write to disk and Quit DEBUG. COLOR SCHEME Enter the following Debug instructions, replacing the xx with a hexadecimal color value. The default color values for the menu color, the text, and the block marker, and their respective descriptions, are shown as comments to the right of the semicolons. Do not type in the comments. E 106 xx ; 71 Blue on light gray E 107 xx ; 17 Light gray on blue E 108 xx ; 31 Blue on cyan Alternate colors may be selected from the following list. The background color number is entered for the first x and the foreground color for the second x. Do not use a light color for the background, or the display will blink. Dark Light 0 Black 8 Dk. gray 1 Blue 9 Lt. blue 2 Green A Lt. green 3 Cyan B Lt. cyan 4 Red C Orange 5 Magenta D Violet 6 Brown E Yellow 7 Lt. gray F White For example, to change the Block marker color from blue on cyan (31) to blue on light gray (17), you would enter E 108 17 PCSORT turns on the border, and some monitors can not handle that. To disable the border, enter E 10C 1 Replace the 1 with a 0 to re-enable the border. Finish the DEBUG session with W Q