home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PRINT / MULCO403.ZIP / MULTICOL.DOC < prev    next >
Text File  |  1994-03-20  |  33KB  |  656 lines

  1. MULTICOL.DOC
  2. 03/20/94
  3.  
  4. The MULTICOL.EXE program creates multi-columned listings from a text file.
  5. Features:
  6.  
  7.   * You can specify the number of columns and desired page width for the
  8.     multi-column listing
  9.   * The program can provide titles, column headers, and footers for the
  10.     reformatted listing
  11.   * MULTICOL can also add these titles, etc to single-column listings,
  12.     providing some pagination capabilities for regular text
  13.   * Can reformat for display ASCII-delimited, fixed field, and dBase input files
  14.   * Can present totals and subtotals for dBase and ASCII-delimited fields
  15.   * Can reflow text to fit within the specified page widths
  16.   * Can imbed printer control characters in the resulting file
  17.   * Can remove (or add) columns within a text document
  18.  
  19.  
  20. Examples:
  21.  
  22. MULTICOL is an easy way of adding header and footer information to text
  23. documentation.  For my DEMO System documentation, I maintain a control file
  24. (MULTIHED.CTL)--control files are described below--that includes the following
  25. lines:
  26.  
  27.      ; Is used to create page headings for text documents.
  28.      /COLUMNS=1
  29.      /EJECT
  30.      /LINES=59
  31.      /TITLEC1="^N                   Last revised ^D                     Page ^B"
  32.      /TITLE2=""
  33.      /OVERWRITE
  34.  
  35. Then I create the documentation using the following command:
  36.  
  37.         MULTICOL DEMOSYS.DOC DEMOSYS.REF /CMULTIHED.CTL
  38.  
  39. The "^N" parameter in the title is replaced with the file name, "^D" is replaced
  40. with today's date, and "^B" is replaced with the page number.  Notice I'm not
  41. creating a multi-column output here and am not reformatting the original text at
  42. all except to add headers and footers.
  43.  
  44.  
  45. As another example, I frequently need a sorted multi-column directory listing.
  46. DIR /ON /W is fine in DOS but I prefer to see the filenames listed
  47. alphabetically down the page, not across it.  So I maintain a control file
  48. (in C:\DIRW.CTL) for my Epson printer that contains these lines:
  49.  
  50.      ; Is used for multicolumn DIR listings.
  51.      /COLUMNS=7
  52.      /OVERWRITE
  53.      /WIDTH=132
  54.      ; This is the setup string used to set a Epson to compressed mode.
  55.      /SETUP="\015"
  56.      ; Don't want to leave the printer in that mode when you leave.
  57.      /RESET="\018"
  58.  
  59. Then I create the listing using the following commands:
  60.  
  61.         DIR /ON > TEMP.TXT
  62.         MULTICOL TEMP.TXT TEMP.NEW /CC:\DIRW.CTL
  63.  
  64.  
  65. A similar example of the above (multicolumn DIR listings) creates a multicolumn
  66. listing with just the file name and creation date.  This requires creating a
  67. field definition file (called, say, C:\DIRW.DEF) roughly like the following:
  68.  
  69.      c 12 0 12 File Name
  70.      c 11 0 0  File Size
  71.      c 8 0 8   Updated
  72.      /+=-
  73.      /-=.
  74.      /-=Serial
  75.  
  76. Note that this definition file will provide the string "File Name" as the column
  77. header for the first column of data, skip the second (file size), provide
  78. "Updated" for the date, and then skip the rest of the DIR output.  It will also
  79. skip any lines in the directory that don't include a dash ("-") but drop the
  80. records containing "." or "Serial", both of which appear in the heading
  81. information.  Once the definition file is provided, you can create a
  82. three-column listing with the following commands.  (You could make it have more
  83. columns if you wanted to specify compressed options; see the prior example)
  84.  
  85.         DIR /ON > TEMP.TXT
  86.         MULTICOL TEMP.TXT TEMP.NEW /DEF=C:\DIRW.DEF /COLUMNS=3
  87.  
  88. A sample of what a portion of the output file (TEMP.NEW) might look like:
  89.  
  90.                                      Page 1
  91.                          |                          |
  92. File Name     Updated    | File Name     Updated    | File Name     Updated
  93.                          |                          |
  94. AV       BAS  01-08-94   | DEMOMAKE DOC  01-08-94   | FIXTEXT  DIZ  01-07-94
  95. AV       DIZ  03-22-93   | DEMOMAKE EXE  01-30-94   | FIXTEXT  DOC  01-26-94
  96. AV       DOC  01-08-94   | DEMOMAKE REF  01-08-94   | FIXTEXT  EXE  01-30-94
  97.  
  98.  
  99. Storing options in a control file:
  100.  
  101. The routine allows for a number of parameters, most of which can be very long.
  102. To avoid keying all of these in each time, a control file is provided for.  The
  103. control file is designated with the "/Cctlfile" parameter and consists of
  104. regular MULTICOL parameters.  Every parameter except the /Cctlfile parameter
  105. itself is allowed.
  106.  
  107. The control file provides several benefits for you.  (a) It makes it easier to
  108. enter the same parameters multiple times.  (b) It avoids too-long lines in DOS
  109. (DOS can't handle lines above about 120 characters in length).  (c) It allows
  110. you to store default printer characteristics (one or more sets of them actually)
  111. and bring them in easily.  (d) It allows you to maintain default formats for
  112. your output.
  113.  
  114. The format for the control statement file is essentially free-form.  Empty lines
  115. and lines which begin with a semi-colon or colon are ignored.  Typically,
  116. parameters begin in column 1 and only one parameter is provided on each line but
  117. this is optional.  For example:
  118.  
  119.         ; Sample control file for MULTICOL program
  120.         ; This one is for printing wide files (132-columns)
  121.         /DELIM=" │ "
  122.         /WIDTH=132
  123.         ; This is the setup string used to set a LaserJet to compressed
  124.         ; portrait mode.
  125.         /SETUP="\027(s16.66H"
  126.         ; Don't want to leave the printer in that mode when you leave.
  127.         /RESET="\027E"
  128.         ; The printer already has pre-defined page lengths so don't
  129.         ; put in page ejects.
  130.         /-EJECT
  131.  
  132. You can override any of the parameters in the control file from the command line
  133. when you invoke MULTICOL.  (Exception:  If your control card file includes input
  134. and/or output file name specifications, these cannot be overridden from the
  135. command line.)
  136.  
  137.  
  138. Field definition file:
  139.  
  140. NOTE:  THE FOLLOWING DISCUSSION DOES NOT APPLY TO BASIC TEXT FILES.  IF YOU JUST
  141. WANT TO ADD HEADERS AND SUCH TO STANDARD TEXT STUFF, SKIP THIS SECTION.  IT IS
  142. APPLICABLE ONLY FOR FIELDED DATA FILES.
  143.  
  144. For data files (ASCII-delimited, dBase, and fixed field input files), you can
  145. use MULTICOL to present a reasonably formatted listing of variables.  Unless you
  146. are reading a dBase file, this program requires a field definition file to
  147. figure out the characteristics for each field and also to set certain file
  148. characteristics.  If you're processing an ASCII-delimited input file, the
  149. routine can try to create a field definition file for you if desired.
  150.  
  151. The definition file can be created with any text editor.  The definition file
  152. consists of several records with the following fields separated by spaces.
  153. Except for the record type indicator (which must begin in column 1), all other
  154. fields can be placed in any columns:
  155.  
  156.         (1) record type (see below)
  157.         (2) length of field on input
  158.         (3) number of decimal places for numeric data (if you don't know,
  159.             put a "?" here; for non-numeric data, a "0" is fine) on output
  160.         (4) length of field on output
  161.  
  162. Any characters after the field length are treated as comment fields.  You would
  163. typically use this to enter the field name or column position or any other
  164. information of use to you.
  165.  
  166. The data record types accepted by this routine are as follows:
  167.  
  168.         type C = character data
  169.              N = numeric
  170.              L = logical (T or F)
  171.              D = date (in yyyymmdd format)
  172.  
  173. The data fields should be in the order the fields are found in the source file.
  174.  
  175. You may also specify up to 10 include filters and up to 10 exclude filters in
  176. the field definition file.  If an include filter is specified, the input record
  177. must contain at least one of the specified character strings in order to be
  178. processed.  If an exclude filter is specified, any input record which contains
  179. any of the specified character strings will be ignored.  Filters are case
  180. sensitive (capitalization matters) and processed as "or" items (if any filter is
  181. met, the condition is met; filters are not combined to determine fulfillment).
  182. The filters are specified in the field definition file in the following ways:
  183.  
  184.         /+=string     include filter, the string "string" can appear anywhere
  185.         /S+=string    include filter, the string "string" is at the beginning
  186.                       of the record
  187.         /+S=string    include filter, the string "string" is at the end of the
  188.                       record
  189.         /-=string     exclude filter, the string "string" can appear anywhere
  190.         /S-=string    exclude filter, the string "string" is at the beginning
  191.                       of the record
  192.         /-S=string    exclude filter, the string "string" is at the end of the
  193.                       record
  194.  
  195.  
  196. For example, if you want to specify in your control file that you only want
  197. records that contain either "Japan" or "France" *and* you want to exclude any
  198. records that begin with an underscore character, you would need to include the
  199. following three filter statements:
  200.  
  201.         /+=Japan
  202.         /+=France
  203.         /S-=_
  204.  
  205. The character string can include hexadecimal codes (in the &Hxx format) or
  206. decimal codes (in the \ddd format) if necessary.
  207.  
  208. Note that for fixed field files, you have to account for every byte in the file.
  209. If you have something like this:
  210.  
  211.         12345678_1_2345678_2_2345678_3      (column positions)
  212.         APPLE    X Y    12 BANANAS
  213.  
  214. Even though you may think you only have five fields, the following .DEF file
  215. will NOT work:
  216.  
  217.         ; Bad .DEF file:  Note does not account for blank spaces
  218.         C   8 0   8 Fruit1
  219.         C   1 0   1 Class1
  220.         C   1 0   1 Class2
  221.         N   5 0   5 Value
  222.         C  11 0  11 Fruit2
  223.  
  224. You may want the Fruit1 field to be in columns 1 through 8 and Class1 to be in
  225. column 10 but the routine will not know to skip column 9 so it will start
  226. reading Class1 beginning in column 9, Class2 beginning in column 10, etc.  To
  227. drop the blank positions, you have to add dummy fields on input and ask for them
  228. to be dropped on output:
  229.  
  230.         ; Good .DEF file:  Spaces between fields are accounted for
  231.         C   8 0   8 Fruit1
  232.         C   1 0   0 Filler
  233.         C   1 0   1 Class1
  234.         C   1 0   0 Filler
  235.         C   1 0   1 Class2
  236.         C   1 0   0 Filler
  237.         N   5 0   5 Value
  238.         C   1 0   0 Filler
  239.         C  11 0  11 Fruit2
  240.  
  241. You can also use the input field length and output field lengths to either drop
  242. fields using other formats (by specifying a zero length for the output field
  243. length) or for creating fields on output (by specifying a zero length for the
  244. input field length).  You can also use this to expand on contract a field.  For
  245. example, if Fruit1 is 8 characters long but you only want it to occupy 4
  246. characters on output (thus the field would be truncated), specify 8 for the
  247. input field length and 4 for the output field length.
  248.  
  249. For dBase files, a deffile will automatically be created for you unless you
  250. specify /DEF.  In that case, the routine will read the deffile and act
  251. appropriately.  This is necessary if you want fields expanded or ignored.
  252.  
  253.  
  254. You can also use the /PRINT specification to select which fields you want
  255. printed.
  256.  
  257. For adding headers and footers to regular text files, make sure you specify
  258. /COLUMNS=1.  The system starts a new page when it runs into lines with page
  259. eject characters or when it hits the number of lines specified in the /LINES=n
  260. parameter.  (The page eject part is only true if /-WRAP is in effect.)
  261.  
  262.  
  263. Syntax:
  264.  
  265.     MULTICOL infile outfile [ /OVERWRITE | /-OVERWRITE | /OVERASK ]
  266.       [ /DELIM="string" ] [ /LINES=n ] [ /WIDTH=n ] [ /EJECT | /-EJECT ]
  267.       [ /COLUMNS=n ] [ /-WRAP | /WRAP [ /INDENT=n ] | /REFLOW ]
  268.       [ /Cctlfile ] [ /SETUP="string" ] [ /RESET="string" ]
  269.       [ /{ TITLE | HEADER | FOOTER }[ R | C | L ][ 1 to 5]="text" ]
  270.       [ /{ TITLE | HEADER | FOOTER }{ T | B }="string" ]
  271.       [ /-TITLE ] [ /FROM FIXED | /FROM ASCII | /FROM DBF ] [ /DELETED ]
  272.       [ /DEF=deffile ] [ /DEF | /-DEF ]
  273.       [ /DELIMS=aroundstrings,aroundnums,betweenfields ] [ /BEEP | /-BEEP ]
  274.       [ /SKIP | /MISSING | /ABORT ] [ /GAP=n ] [ /TALLY ]
  275.       [ /INMISS=val ] [ /INMISSC=val ] [ /OUTMISS=val ] [ /OUTMISSC=val ]
  276.       [ /SUM={ col_spec | var_spec } ] [ /BREAK={ col_spec | var_spec } ]
  277.       [ /PRINT={ col_spec | var_spec } ] [ /? | /?&H ]
  278.  
  279. where:
  280.  
  281. "infile" is the name of the ASCII text file that you want reformatted into a
  282. multicolumn file.
  283.  
  284. "outfile" is the name of the ASCII text file that you want to create.  "infile"
  285. and "outfile" cannot be the same.  While "outfile" is typically a file name, you
  286. can specify devices like "PRN:" or "SCRN:" if you want to.
  287.  
  288. "/OVERWRITE" says to write over the outfile if it already exists.
  289.  
  290. "/-OVERWRITE" says to abort if the outfile exists already.
  291.  
  292. "/OVERASK" says to prompt if the outfile exists already.  This is normally the
  293. default but you can override this using the CONFIGWS.EXE program.
  294.  
  295. "/DELIM="string"" indicates the character string that should be used to separate
  296. columns.  Note that the string itself must appear within quotation marks.  By
  297. default, the string is " | ".
  298.  
  299. "/LINES=n" indicates how many physical lines can fit on your printed page.  This
  300. setting is used for determining where headers, footers, page eject characters
  301. (with /EJECT option), and number of lines per column for multi-column output.
  302. (It's not used in cases where you're using /COLUMNS=1, none of the other stuff,
  303. and you've specified /-TITLE to turn off the default title line.)  You
  304. can also set it to /LINES=0 to turn off page breaks; only the first
  305. title (if any) will print in that case.  Defaults to /LINES=60.
  306.  
  307. "/WIDTH=n" indicates how many physical characters can fit on your printed page.
  308. Defaults to /WIDTH=80.  Typically, if you are in compressed mode, the value is
  309. /WIDTH=132.
  310.  
  311.  
  312. "/EJECT" says to add a page eject after the maximum lines-per-page (/LINES=n)
  313. setting.  This is not recommended if you're using a printer with a defined page
  314. size that is the the same or smaller than the /LINES=n setting.  If you're using
  315. something like a LaserJet, setting /EJECT will typically result in blank pages
  316. being generated after each full page.  The default is "/-EJECT".
  317.  
  318. "/-EJECT" is the opposite of "/EJECT".  This is the default.
  319.  
  320. "/COLUMNS=n" indicates how many text columns you want to appear.  The value can
  321. be as low as one (useful if you're just doing reformatting of paragraphs).
  322. There's no maximum value but anything above 7 or so starts looking worthless.
  323. The default value is /COLUMNS=2.
  324.  
  325. The combination of the /COLUMNS=n, /DELIM="string", and /WIDTH=n tells the
  326. program how wide each physical column is.  For example, using the defaults of
  327. /COLUMNS=2, /DELIM=" | ", and /WIDTH=80, each text column is a maximum of 38
  328. characters.  (Width - (Size of Delimiter * (Number of columns - 1), all divided
  329. by 2.  INT((80-(3*1))/2) is 38.) The routine tells you what column size it
  330. picked; if you don't like the result, adjust some of your other parameters and
  331. try it again.
  332.  
  333. "/-WRAP", "/WRAP", and "/REFLOW" tells the program what you want it to do with
  334. text that exceeds the width of each physical column.  The default is /-WRAP.
  335. Each is explained separately below:
  336.  
  337. "/-WRAP" indicates that long lines are to be truncated and the excess characters
  338. are lost.  This is the default.
  339.  
  340. "/WRAP" says the line is to be parsed into words and any word(s) that doesn't
  341. fit on the original line spills over on successive line(s).  The spillover lines
  342. are indented by the value of "/INDENT=n".  By default, the secondary lines are
  343. indented by 2 spaces ("/INDENT=2").
  344.  
  345. "/INDENT=n"--see /WRAP above.
  346.  
  347. "/REFLOW" is the most sophisticated of the options.  /REFLOW will treat most of
  348. the text as paragraphs are readjust the length of the entire paragraph.  The
  349. reflowing stops whenever a new paragraph is detected.  The routine considers a
  350. new paragraph to start whenever the succeeding line is either blank or it starts
  351. with a space.  Unlike with the other options, you can actually end up with fewer
  352. lines in your output file than you had in your input file using /REFLOW.  This
  353. only happens of course if the source lines were generally shorter than the
  354. computer text column width.
  355.  
  356. "/Cctlfile" specifies an external text file that contains control statements.
  357. See the discussion above about control files.
  358.  
  359.  
  360. "/SETUP="string"" specifies the initialization string to put at the beginning of
  361. the file.  This is typically used to make sure your printer has the proper
  362. orientation (landscape vs portrait), characters per inch (cpi), and lines per
  363. inch (lpi) settings before printing.  The setup string itself must appear in
  364. quotation marks.  Use "\027" for the Escape character and any other ASCII code
  365. can be entered with "\" followed by its 3-digit value (e.g.  "\032" is a space).
  366. You can also use hexadecimal values as &Hxx.  See the character table at the end
  367. of this documentation.  You have to know your own setup strings.  Borland's
  368. documentation provides some very useful tables for this sort of thing (use "\"
  369. instead of "/" though).  For an HP LaserJet, the setups I use all of the time
  370. are:
  371.  
  372.         Orientation     PageLen RMargin String
  373.  
  374.         Portrait        60      80      \027E
  375.         Portrait        60      132     \027(s16.66H
  376.         Landscape       45      106     \027&l10
  377.         Landscape       45      176     \027&l10\027(s16.66H
  378.         Landscape       66      106     \027&l1o5.45C
  379.         Landscape       66      176     \027&l1o5.45C\027(s16.66H
  380.  
  381. "/RESET="string"" specifies the string to send after your file is done.  This
  382. typically resets the printer to its system default setting so you won't get
  383. stuck in landscape mode forever.  The setup string itself must appear in
  384. quotation marks.  Use "\027" for the Escape character.  For an HP LaserJet, the
  385. following resets the printer to its factory settings:
  386.  
  387.         \027E
  388.  
  389. "/{ TITLE | HEADER | FOOTER } [ R | C | L ] [ 1 to 5 ]="text"" allows you to
  390. specify up to 5 lines each for the report's TITLE (at the top of each page),
  391. HEADER (at the top of each column), and FOOTER (at the bottom of each page).
  392. You can specify positioning as well:
  393.  
  394.         R = right-justify the text
  395.         C = center the text (this is the default for /TITLE and /HEADER)
  396.         L = left-justify the text (this is the default for /FOOTER)
  397.  
  398. If no line number is specified, line 1 is presumed.  If a line number is
  399. specified, all lines before that number are presumed to contain something and
  400. will be blank filled if you don't provide anything.  If, for example, you
  401. specify "/TITLER3="Hi!"", without specifying any other titles, then you'll get
  402. blank lines for /TITLE1 and /TITLE2, but you won't get any /TITLE4 or /TITLE5.
  403.  
  404. The text itself can contain one of six imbedded string-replacement codes:
  405.  
  406.         ^B will be replaced by the page number
  407.         ^D will be replaced by today's date (in mm/dd/yy form)
  408.         ^T will be replaced by today's time (in hh:mm form)
  409.         ^N will be replaced by the input file's name
  410.         ^A will be replaced by the input file's creation date (mm/dd/yy form)
  411.         ^I will be replaced by the input file's creation time (hh:mm form)
  412.  
  413. The only title, header, or footer provided by default is /TITLE1="Page ^B".  If
  414. you don't want to replace the title with something else, the only way to turn it
  415. off entirely is to use the /-TITLE option (below).
  416.  
  417.  
  418. "/{TITLE | HEADER | FOOTER }{ T | B }="string"" allows you to specify a
  419. repeating string to be placed either on top of or on the bottom of your titles,
  420. headers, and footers.  The string, typically consisting of just a few
  421. characters, is repeated by the routine until it fills up the available space.
  422. For example, "/TITLET=" -"" would add the following line at the top of the
  423. report:
  424.  
  425.  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  426.  
  427. This option is typically used to (a) insure that there are blank lines before
  428. footer lines and (b) to have demarcations between sections.
  429.  
  430. "/-TITLE" says to turn off all titles including the default one (/TITLE="Page
  431. ^B").  Note that any /TITLE specifications used after /-TITLE will still appear.
  432.  
  433. "/FROM FIXED" says that the input file is a fixed field file.  Any file can be
  434. fixed field:  a page of text is typically a fixed field of 80 characters.  All
  435. standard text files are fixed-field.  The default for MULTICOL is /FROM FIXED.
  436. Note that if you want, you can specify a field definition file for fixed field
  437. files.  See the examples given in the beginning.
  438.  
  439. "/FROM ASCII" says that the input file is ASCII-delimited (typically with quotes
  440. around strings and commas between fields--MULTICOL treats the quotes as
  441. optional).  Typically, the routine expects a deffile (/DEF=defile) to be
  442. specified with the definition of fields.  The routine will determine a field
  443. definition file for you if the /-DEF parameter is specified.
  444.  
  445. "/FROM DBF" specifies that the input file is a dBase file.  If the file
  446. extension is .DBF, the routine will presume this.  The routine uses dBase's
  447. default field lengths unless /DEF is specified along with /DEF=deffile.
  448.  
  449. "/DELETED" applies for dBase input files only.  It says you want to retain
  450. deleted records.  Otherwise, they're dropped in the output file.
  451.  
  452. "/DEF=deffile" provides the name of the field definition file typically for
  453. ASCII-delimited and some dBase input files.  (You can also provide one for
  454. fixed-field files if you want.) A description of the definition file was given
  455. previously.  If no deffile is specifically provided and you're using either
  456. /FROM ASCII or /FROM DBF, the routine will presume it is called the same thing
  457. as the infile but it has the extension of ".DEF".  A deffile has to be
  458. specifically provided for /FROM FIXED files if one is desired.
  459.  
  460. "/DEF" applies to dBase input files only.  It tells MULTICOL that you want to
  461. read the field information from an existing field-definition file instead of
  462. reading the definition in dBase itself.  Normally, this is only done if you want
  463. the program to expand, condense, or eliminate some fields.
  464.  
  465. "/-DEF" applies to ASCII-delimited input files only.  It tells MULTICOL to scan
  466. the first few records in the input file and to figure out the field-definition
  467. file for you.  There are some risks in this primarily in that the routine may
  468. guess a field type incorrectly.  This also takes awhile.  The routine will
  469. automatically write out the field-definition file for you if you select this
  470. option.
  471.  
  472.  
  473. "/DELIMS=aroundstrings,aroundnums,betweenfields" allows you to specify the
  474. delimiters (in sequence) around string fields, around numeric fields, and
  475. between fields.  Defaults to:
  476.  
  477.         /DELIMS=",,,
  478.  
  479. (Use quotes around character strings, nothing around numeric data, and the third
  480. comma indicates that there is a comma between fields.) The replacement string
  481. can include hexadecimal codes (in the &Hxx format) or decimal codes (in the \ddd
  482. format) if necessary so either of the following would put a tab between fields:
  483.  
  484.         /DELIMS=",,&H09
  485.         /DELIMS=",,\009
  486.  
  487. See the table of hexadecimal and decimal codes at the end of this documentation.
  488.  
  489. "/BEEP" beeps when the program is finished.
  490.  
  491. "/-BEEP" reverses /BEEP.  This is normally the default but you can override this
  492. using the CONFIGWS.EXE program.
  493.  
  494. "/SKIP" says to skip ASCII-delimited records with bad data values; otherwise the
  495. routine aborts when it runs into any.  /SKIP, /MISSING, and /ABORT are mutually
  496. exclusive.
  497.  
  498. "/MISSING" says to presume any missing fields in an ASCII-delimited record
  499. should be filled in with blanks (for character fields) and 0 for numeric fields.
  500. Incomplete records are written out (unlike in /SKIP).  /SKIP, /MISSING, and
  501. /ABORT are mutually exclusive.
  502.  
  503. "/ABORT" says to abort when you run into bad records.  This is normally the
  504. default but you can override this using the CONFIGWS.EXE program.  /SKIP,
  505. /MISSING, and /ABORT are mutually exclusive.
  506.  
  507. "/GAP=n" is used when printing ASCII-delimited or dBase files.  It tells the
  508. program how many spaces to print between each variable.  The default is /GAP=2.
  509.  
  510. "/TALLY" says to present a count of items.  If a /BREAK specification is
  511. provided, there will be a tally for each break as well as for the grand total.
  512.  
  513. "/INMISS=val" specifies that any numeric value that has the character string
  514. representation of "val" will be considered missing.  Note that this is an exact
  515. character string comparison so /INMISS=1 will not compare to a value of "1.00".
  516. Defaults to /INMISS=NULL (which translates as spaces).
  517.  
  518. "/INMISSC=val" specifies that any character string value that has the value of
  519. "val" will be considered missing.  Defaults to /INMISSC= (which shouldn't
  520. happen very much).
  521.  
  522. "/OUTMISS=val" specifies that any missing numeric input value will be translated
  523. on output as "val".  For example, "/OUTMISS=N.A." would fill in "N.A." for each
  524. missing value.  Defaults to /OUTMISS=NULL (which translates as spaces).
  525.  
  526. "/OUTMISSC=val" specifies that any missing character input value will be
  527. translated on output as "val".  Defaults to /OUTMISSC=NULL (which translates as
  528. spaces).
  529.  
  530.  
  531. "/SUM={ col_spec | var_spec }" says to summarize (add) all values in particular
  532. columns.  If ASCII-delimited or dBase input is used, you can specify variables
  533. to be added.  If a /BREAK specification is provided, there will be subtotals at
  534. each break as well as grand total.
  535.  
  536. The "col_spec | var_spec" portion expands to "{ Cx[-x] | Vx[-x] } [, {Cx[-x] |
  537. Vx[-x] } ]..." where "x" is the column or variable number, "-" indicates a
  538. range, and "C" means column whereas "V" means variable.  If you have an
  539. ASCII-delimited file and you want the values of the first three variables
  540. summarized, you'd say "/SUM=C1-3".  If you want variables 2, and 4 through 6
  541. summarized, you'd say "/SUM=C2,C4-6".  If you want the values in columns 10
  542. through 20 summarized, you'd say "/SUM=C10-20".  Note that for column
  543. specifications, you have to request the output columns, not input columns.
  544.  
  545. "/BREAK={ col_spec | var_spec }" says to present tally, total, or blank lines
  546. based on the values in certain columns or variables.  For example, if you had an
  547. alphabetical listing and you wanted to, you could break up the listing by the
  548. first letter of the last name.  A break is generated whenever there is a change
  549. in any character in the column or variable range specified.  The
  550. "col_spec | var_spec" specification is identical to the /SUM specification.
  551.  
  552. "/PRINT={ col_spec | var_spec }" says to print only some of the fields.  For
  553. example, if you have a dBase file with 10 variables and you only want some of
  554. them to print out, you can say "/PRINT=V1-3,V6,V8" or something like that.  Note
  555. that the /PRINT specification works in conjunction with any 0-length output
  556. specifications in the deffile.
  557.  
  558. "/?" or "/HELP" or "HELP" gives you syntactical help.
  559.  
  560. "/?&H" gives you a hexadecimal and decimal conversion table.
  561.  
  562.  
  563.  
  564. Return codes:
  565.  
  566. MULTICOL returns the following ERRORLEVEL codes:
  567.         0 = no problems
  568.       254 = problems with format of file
  569.       255 = syntax problems, or /? requested
  570.  
  571.  
  572. Author:
  573.  
  574. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  575. and redistribution provided relevant documentation is kept with the program, no
  576. changes are made to the program or documentation, and it is not bundled with
  577. commercial programs or charged for separately.  People who need to bundle it in
  578. for-sale packages must pay a $50 registration fee to "Wayne Software" at the
  579. following address.
  580.  
  581. Additional information about this and other Wayne Software programs can be found
  582. in the file BRUCEymm.DOC which should be included in the original ZIP file.
  583. ("ymm" is replaced by the last digit of the year and the two digit month of the
  584. release.  BRUCE312.DOC came out in December 1993.  This same naming convention
  585. is used in naming the ZIP file that this program was included in.) Comments and
  586. suggestions can also be sent to:
  587.  
  588.                 Bruce Guthrie
  589.                 Wayne Software
  590.                 113 Sheffield St.
  591.                 Silver Spring, MD 20910
  592.  
  593.                 fax: (301) 588-8986
  594.  
  595. Foreign users:  Please provide an Internet address in all correspondence.
  596.  
  597.  
  598. Decimal and hexadecimal codes:
  599.   e.g. "\066\097\116" and "&H426174" both are "Bat"
  600. +---------------------------------------------------------------------------
  601. | dec  hex chr | dec  hex chr | dec  hex chr | dec  hex chr | dec  hex chr |
  602. +--------------+--------------+--------------+--------------+--------------+
  603. | \000 &H00 nul| \052 &H34 4  | \104 &H68 h  | \156 &H9C £  | \208 &HD0 ╨  |
  604. | \001 &H01   | \053 &H35 5  | \105 &H69 i  | \157 &H9D ¥  | \209 &HD1 ╤  |
  605. | \002 &H02   | \054 &H36 6  | \106 &H6A j  | \158 &H9E ₧  | \210 &HD2 ╥  |
  606. | \003 &H03   | \055 &H37 7  | \107 &H6B k  | \159 &H9F ƒ  | \211 &HD3 ╙  |
  607. | \004 &H04   | \056 &H38 8  | \108 &H6C l  | \160 &HA0 á  | \212 &HD4 ╘  |
  608. | \005 &H05   | \057 &H39 9  | \109 &H6D m  | \161 &HA1 í  | \213 &HD5 ╒  |
  609. | \006 &H06   | \058 &H3A :  | \110 &H6E n  | \162 &HA2 ó  | \214 &HD6 ╓  |
  610. | \007 &H07 bel| \059 &H3B ;  | \111 &H6F o  | \163 &HA3 ú  | \215 &HD7 ╫  |
  611. | \008 &H08 bs | \060 &H3C <  | \112 &H70 p  | \164 &HA4 ñ  | \216 &HD8 ╪  |
  612. | \009 &H09 tab| \061 &H3D =  | \113 &H71 q  | \165 &HA5 Ñ  | \217 &HD9 ┘  |
  613. | \010 &H0A lf | \062 &H3E >  | \114 &H72 r  | \166 &HA6 ª  | \218 &HDA ┌  |
  614. | \011 &H0B vt | \063 &H3F ?  | \115 &H73 s  | \167 &HA7 º  | \219 &HDB █  |
  615. | \012 &H0C pg | \064 &H40 @  | \116 &H74 t  | \168 &HA8 ¿  | \220 &HDC ▄  |
  616. | \013 &H0D cr | \065 &H41 A  | \117 &H75 u  | \169 &HA9 ⌐  | \221 &HDD ▌  |
  617. | \014 &H0E   | \066 &H42 B  | \118 &H76 v  | \170 &HAA ¬  | \222 &HDE ▐  |
  618. | \015 &H0F   | \067 &H43 C  | \119 &H77 w  | \171 &HAB ½  | \223 &HDF ▀  |
  619. | \016 &H10   | \068 &H44 D  | \120 &H78 x  | \172 &HAC ¼  | \224 &HE0 α  |
  620. | \017 &H11   | \069 &H45 E  | \121 &H79 y  | \173 &HAD ¡  | \225 &HE1 ß  |
  621. | \018 &H12   | \070 &H46 F  | \122 &H7A z  | \174 &HAE «  | \226 &HE2 Γ  |
  622. | \019 &H13   | \071 &H47 G  | \123 &H7B {  | \175 &HAF »  | \227 &HE3 π  |
  623. | \020 &H14   | \072 &H48 H  | \124 &H7C |  | \176 &HB0 ░  | \228 &HE4 Σ  |
  624. | \021 &H15   | \073 &H49 I  | \125 &H7D }  | \177 &HB1 ▒  | \229 &HE5 σ  |
  625. | \022 &H16   | \074 &H4A J  | \126 &H7E ~  | \178 &HB2 ▓  | \230 &HE6 µ  |
  626. | \023 &H17   | \075 &H4B K  | \127 &H7F   | \179 &HB3 │  | \231 &HE7 τ  |
  627. | \024 &H18   | \076 &H4C L  | \128 &H80 Ç  | \180 &HB4 ┤  | \232 &HE8 Φ  |
  628. | \025 &H19   | \077 &H4D M  | \129 &H81 ü  | \181 &HB5 ╡  | \233 &HE9 Θ  |
  629. | \026 &H1A eof| \078 &H4E N  | \130 &H82 é  | \182 &HB6 ╢  | \234 &HEA Ω  |
  630. | \027 &H1B esc| \079 &H4F O  | \131 &H83 â  | \183 &HB7 ╖  | \235 &HEB δ  |
  631. | \028 &H1C   | \080 &H50 P  | \132 &H84 ä  | \184 &HB8 ╕  | \236 &HEC ∞  |
  632. | \029 &H1D ???| \081 &H51 Q  | \133 &H85 à  | \185 &HB9 ╣  | \237 &HED φ  |
  633. | \030 &H1E ???| \082 &H52 R  | \134 &H86 å  | \186 &HBA ║  | \238 &HEE ε  |
  634. | \031 &H1F ???| \083 &H53 S  | \135 &H87 ç  | \187 &HBB ╗  | \239 &HEF ∩  |
  635. | \032 &H20    | \084 &H54 T  | \136 &H88 ê  | \188 &HBC ╝  | \240 &HF0 ≡  |
  636. | \033 &H21 !  | \085 &H55 U  | \137 &H89 ë  | \189 &HBD ╜  | \241 &HF1 ±  |
  637. | \034 &H22 "  | \086 &H56 V  | \138 &H8A è  | \190 &HBE ╛  | \242 &HF2 ≥  |
  638. | \035 &H23 #  | \087 &H57 W  | \139 &H8B ï  | \191 &HBF ┐  | \243 &HF3 ≤  |
  639. | \036 &H24 $  | \088 &H58 X  | \140 &H8C î  | \192 &HC0 └  | \244 &HF4 ⌠  |
  640. | \037 &H25 %  | \089 &H59 Y  | \141 &H8D ì  | \193 &HC1 ┴  | \245 &HF5 ⌡  |
  641. | \038 &H26 &  | \090 &H5A Z  | \142 &H8E Ä  | \194 &HC2 ┬  | \246 &HF6 ÷  |
  642. | \039 &H27 '  | \091 &H5B [  | \143 &H8F Å  | \195 &HC3 ├  | \247 &HF7 ≈  |
  643. | \040 &H28 (  | \092 &H5C \  | \144 &H90 É  | \196 &HC4 ─  | \248 &HF8 °  |
  644. | \041 &H29 )  | \093 &H5D ]  | \145 &H91 æ  | \197 &HC5 ┼  | \249 &HF9 ∙  |
  645. | \042 &H2A *  | \094 &H5E ^  | \146 &H92 Æ  | \198 &HC6 ╞  | \250 &HFA ·  |
  646. | \043 &H2B +  | \095 &H5F _  | \147 &H93 ô  | \199 &HC7 ╟  | \251 &HFB √  |
  647. | \044 &H2C ,  | \096 &H60 `  | \148 &H94 ö  | \200 &HC8 ╚  | \252 &HFC ⁿ  |
  648. | \045 &H2D -  | \097 &H61 a  | \149 &H95 ò  | \201 &HC9 ╔  | \253 &HFD ²  |
  649. | \046 &H2E .  | \098 &H62 b  | \150 &H96 û  | \202 &HCA ╩  | \254 &HFE ■  |
  650. | \047 &H2F /  | \099 &H63 c  | \151 &H97 ù  | \203 &HCB ╦  | \255 &HFF    |
  651. | \048 &H30 0  | \100 &H64 d  | \152 &H98 ÿ  | \204 &HCC ╠  |              |
  652. | \049 &H31 1  | \101 &H65 e  | \153 &H99 Ö  | \205 &HCD ═  |              |
  653. | \050 &H32 2  | \102 &H66 f  | \154 &H9A Ü  | \206 &HCE ╬  |              |
  654. | \051 &H33 3  | \103 &H67 g  | \155 &H9B ¢  | \207 &HCF ╧  |              |
  655. +--------------+--------------+--------------+--------------+--------------+
  656.