home *** CD-ROM | disk | FTP | other *** search
/ PC Open 18 / pcopen18.iso / Msdos / Paginate / PAGINATE.TXT < prev    next >
Encoding:
Text File  |  1997-02-22  |  72.1 KB  |  1,909 lines

  1. # % PAGINATE.TXT -- documentation for the PAGINATE command
  2. # % Please reformat using "PAGINATE PAGINATE.TXT PAGINATE.DOC /OVERWRITE /-I"
  3. # % (There's a batch file--PAGDOCS.BAT--that does this for you)
  4. # page=60
  5. # adjust
  6. # TITLE CENTER WIDTH=79
  7. ^O%12%                        ^B%3%                       Revised: ^A
  8.  
  9. # end
  10. # % The default width (WIDTH=80) is overridden here because some users
  11. # % preferred it smaller but, in general, WIDTH=80 should be wonderful!
  12. # justify width 79
  13. # index "Column headers" "(See also HEADER)" DUMMY
  14. # index "END" "(See FOOTER)" DUMMY
  15. # index "END" "(See HEADER)" DUMMY
  16. # index "END" "(See MULTICOLUMN)" DUMMY
  17. # index "END" "(See TITLE)" DUMMY
  18. # index "END" "(See UNIT)" DUMMY
  19. # index "Error messages" "(See also /DEBUG parameter)" DUMMY
  20. # index "Environmental variable" "(See SET PAGINATE)" DUMMY
  21. # index "Formatting commands" "LENGTH" "(See WIDTH command)" DUMMY
  22. # index "PAGINATE.INI" "(See INI File)" DUMMY
  23. # index "PAGNOASC.INI" "(See Character-translation Table)" DUMMY
  24. # index "Printer" "(See RESET=string)" DUMMY
  25. # index "Printer" "(See SETUP=string)" DUMMY
  26. # index "Indenting" "(See also WRAPBOL=string)" DUMMY
  27. # index "Indenting" "(See also WRAPOOL=string)" DUMMY
  28. # index "INDEX" "(See INCLUDE INDEX)" DUMMY
  29. # index "Left margin" "Changing temporarily" "(See INDENT command)" DUMMY
  30. # index "Left margin" "Changing permanently" "(See MARGIN command)" DUMMY
  31. # index "Length" "Of line" "(See WIDTH command)" DUMMY
  32. # index "Length" "Of page" "(See PAGE command)" DUMMY
  33. # index "LENGTH" "(See WIDTH command)" DUMMY
  34. # index "Lines" "Across page" "(See RULE command)" DUMMY
  35. # index "Missing data values" "(See INMISS=val)" DUMMY
  36. # index "Missing data values" "(See INMISSC=val)" DUMMY
  37. # index "Missing data values" "(See OUTMISS=val)" DUMMY
  38. # index "Missing data values" "(See OUTMISSC=val)" DUMMY
  39. # index "Multicolumn text" "(See MULTICOLUMN command)" DUMMY
  40. # index "Sorting" "Case-insensitive" "(See SORTI=varspec)" DUMMY
  41. # index "Sorting" "Descending" "(See SORTD=varspec)" DUMMY
  42. # index "Source code" "Printing" "(See WRAP command)" DUMMY
  43. # index "Source code" "Printing" "(See WRAPBOL=string)" DUMMY
  44. # index "Source code" "Printing" "(See WRAPEOL=string)" DUMMY
  45. # index "Streamed output" "Printing" "(See WRAP command)" DUMMY
  46. # index "Streamed output" "Printing" "(See WRAPBOL=string)" DUMMY
  47. # index "Streamed output" "Printing" "(See WRAPEOL=string)" DUMMY
  48. # index "SPACING=1" "(See also SINGLE command)" DUMMY
  49. # index "SPACING=2" "(See also DOUBLE command)" DUMMY
  50. # index "SPACING=3" "(See also TRIPLE command)" DUMMY
  51. # index "Widow lines" "(See ADJUST command)" DUMMY
  52. # index "Overview"
  53. The PAGINATE.EXE program formats text files containing embedded "marker"
  54. commands.  Specifically, the program can be used to:
  55.  
  56. # unit
  57. # indent 4-2
  58. # index "Streamed text" "Example"
  59. * Align, justify, center text
  60. # indent 4
  61. Simple sample:  You have long, streamed text.  You want it wrapped nicely:
  62.   PAGINATE infile /WRAP /LENGTH=70 /-PAGE
  63. # indent 4-2
  64. * Add headers and footers to pages
  65. # paragraph
  66. * Add page breaks
  67. # paragraph
  68. * Control indentation
  69. # paragraph
  70. * Control spacing
  71. # paragraph
  72. # index "Sorting" "Example"
  73. * Sort the file (alphabetically, not numerically all that well) in either
  74. ascending or descending order.
  75. # indent 4
  76. Simple sample:  You have an ASCII text file called BRUCE.DOC that you
  77. want to sort:
  78.   PAGINATE bruce.doc /SORT 1-50 /-PAGE
  79. # indent 4-2
  80. * Generate indexes
  81. # paragraph
  82. * Select fields to print
  83. # paragraph
  84. # index "dBase files" "Example"
  85. * Print out dBase and ASCII-delimited files in tabular forms
  86. # indent 4
  87. Simple sample:  You have a dBase file that you want printed out.
  88. Create an ASCII text file (call it, say, DBASEPAG.CTL) with the following:
  89.  
  90.   # from dbf
  91.   # include sample.dbf
  92.  
  93. Now, run the PAGINATE command:
  94.   PAGINATE dbasepag.ctl /-PAGE
  95.  
  96. # indent 4-2
  97. * Bring ASCII-delimited and dBase files into existing text
  98. # paragraph
  99. * Translate characters
  100. # paragraph
  101. # index "Multicolumn text" "Example"
  102. * Do multi-column listings
  103. # indent 4
  104. Simple sample:  You have source code.  You want it shown double-column.
  105. Create an ASCII text file (call it, say, TWOCOL.CTL) with the following:
  106.  
  107.   # width=133
  108.   # page=50
  109.   # title center
  110.   ^N%12%                                                       ^B%2%                                              Revised: ^A
  111.  
  112.   # end
  113.   # wrap
  114.   # wrapbol = "..>."
  115.   # wrapeol = " <"
  116.   # multicolumn=2
  117.   # separator = " ! "
  118.  
  119. # indent 4
  120. Now, run the PAGINATE command:
  121.   PAGINATE infile /Ctwocol.ctl
  122. # indent 4-2
  123. * Pressing escape stops the program early.
  124. # end
  125.  
  126. Despite some of the samples shown above, the power of PAGINATE is really in
  127. combining these features for a single document.  You can bring dBase files into
  128. reports, you can reflow external documents and bring them into your report, you
  129. can generate indexes for documentation, etc.  The documentation you're reading,
  130. for example, was created using a text editor and the PAGINATE command.
  131.  
  132. #
  133. # index "National Institutes of Health"
  134. The PAGINATE.EXE program is based on a document-formatting language that exists
  135. on the mainframe computers at the National Institutes of Health in Bethesda, MD.
  136. The text editor used there is called WYLBUR and it does all sorts of wonderful
  137. things like creating programs.
  138.  
  139. For documentation, you use the WYLBUR text editor and insert document formatting
  140. codes.  These codes determine things like margins, indentation, justification,
  141. spacing, etc.  After you embed all of these formatting commands, you issue a
  142. PAGINATE command and everything's reformatted for you.
  143.  
  144. PAGINATE includes many of the WYLBUR pagination commands and then adds a number
  145. or database operations.
  146.  
  147. Typically, I do most of my text formatting using the PE2 text editor which
  148. I dearly love.  I add PAGINATE marker commands to the regular documentation
  149. so I can do titles, footers, indexes, etc.
  150.  
  151. # % Nope.  Can't generate a table of contents yet using PAGINATE.
  152. # % Maybe someday!
  153. # unit verbatim
  154. # indent 8
  155. Quick remaining contents:
  156.   Introduction to marker commands...................... pg  3
  157.   Sample files......................................... pg  5
  158.   Command reference:
  159.     Formatting commands................................ pg  5
  160.     Database-related functions......................... pg 13
  161.   Control codes........................................ pg 20
  162.   Varspecs............................................. pg 21
  163.   Field-definition file................................ pg 22
  164.   Specifying parameters................................ pg 24
  165.   Character-translation file........................... pg 24
  166.   Examples............................................. pg 26
  167.   Syntax............................................... pg 27
  168.   Return codes......................................... pg 29
  169.   Author............................................... pg 29
  170.   Index................................................ pg 30
  171. # end
  172. #
  173. # index "Marker commands"
  174. Introduction to marker commands:
  175.  
  176. PAGINATE typically expects document formatting codes to be embedded in the text
  177. document itself.  If you want the same formating to be used through the entire
  178. document, however, you can pass in most of the arguments (see the "Syntax"
  179. discussion below) or use a separate control file instead.
  180.  
  181. The formatting codes are preceded by a "marker" character.  This is a character
  182. which begins in column 1 of the text (or control) file and is typically the
  183. character "#".  (When passing in the formatting codes, all codes are preceded by
  184. a "/".)
  185.  
  186. For example, you might have text like this:
  187.  
  188. # unit
  189. # verbatim
  190.         #align width 20
  191.         This is some sample text which you have asked to align.  The margins
  192.         will be placed at 1 and 20.  You can use an indent command to shift
  193.         the left margin if desired.
  194. # end
  195.  
  196.  
  197. This example shows one marker statement ("#align width 20") which contains two
  198. formatting commands:  "align" and "width 20".  Formatting commands are keyword
  199. specific.
  200.  
  201. You can put in commands on the same line which have no logical bearing to one
  202. another like "#align spacing=2".  Exceptions:
  203.  
  204.    * Do not do this for INCLUDE statements
  205.    * Do not do this for INDEX statement
  206.  
  207. # index "Semi-colons"
  208. Formatting commands can be separated by semi-colons for clarity but only a space
  209. is required.  The case of the marker statement is irrelevant.
  210.  
  211. After the PAGINATE command is run, the above text will come out like this:
  212.  
  213. # unit
  214. # verbatim
  215.         This is some sample
  216.         text which you have
  217.         asked to align.  The
  218.         margins will be
  219.         placed at 1 and 20.
  220.         You can use an
  221.         indent command to
  222.         shift the left
  223.         margin if desired.
  224. # end
  225.  
  226. #
  227. # index "Paragraphs"
  228. In terms of alignment, justification, variable indentation, etc, the system
  229. treats each paragraph as a separate entity.  A paragraph is defined as beginning
  230. with a blank line or a space.  For example:
  231.  
  232. # unit
  233. # verbatim
  234.         #justify width 25
  235.         This is one paragraph
  236.  
  237.         And this is another paragraph.
  238.         But this is the same paragraph.
  239.           New paragraph here.
  240. # end
  241.  
  242. Comes out as this:
  243.  
  244. # unit
  245. # verbatim
  246.         This is one paragraph
  247.  
  248.         And   this   is   another
  249.         paragraph.  But  this  is
  250.         the same paragraph.
  251.           New paragraph here.
  252. # end
  253.  
  254. # index "Range of formatting"
  255. Formatting commands cover a variety of functions.  Note that formatting within
  256. titles, footers, headers, and UNIT...END blocks does not affect formatting
  257. beyond the END statement.  For example, the width of the title below does not
  258. affect the width outside the title:
  259.  
  260. # unit
  261. # verbatim
  262.         # align width 50
  263.         This text is aligned width 50.  Here comes a title.
  264.         # title center width 70
  265.         This title is centered within width 70.
  266.  
  267.         # end
  268.         This text (outside the TITLE ... END block) is still being
  269.         aligned (not centered) to width 50 (not 70).
  270. # end
  271.  
  272. # index "Short lines"
  273. # index "Paragraphs" "One liners"
  274. Note that JUSTIFY and ALIGN do not affect lines which are on their own and do
  275. not continue to a second line and do not exceed the given page length.
  276.  
  277. As an example, note that the file names shown in the next section ("Sample
  278. files:") are not affected even though they are actually controlled by a JUSTIFY
  279. marker command.  This may seem like an error at times especially if you've
  280. already indented text; remember that indentation is the system's clue that there
  281. is a new paragraph so pre-indented text won't be affected much by the program.
  282.  
  283. This feature is, by the way, frequently useful in defining oddly formatted
  284. sections of text without needing to use a "# UNIT VERBATIM" statement around it;
  285. just make sure each line begins with at least one space and the program won't
  286. touch it.
  287.  
  288. #
  289. # index "Sample files"
  290. Sample files:
  291.  
  292. An example input file and its related components are included in this ZIP
  293. under PAGDEMO.*.  You can modify this and see how features are affected.  The
  294. demonstration files are as follows:
  295.  
  296. # % As is documented above, the following lines don't need a VERBATIM
  297. # % marker because they are short enough to not be affected by the JUSTIFY
  298. # % marker command.
  299.         PAGDEMO.BAT      Batch file that actually runs the demo file
  300.         PAGDEMO.#1       The primary file for the demo
  301.         PAGDEMO.#1D      The ASCII-delimited file brought in for the demo
  302.         PAGDEMO.#1C      The field-definition file used for the demo
  303.  
  304.  
  305. # rule=-
  306.                                COMMAND REFERENCE
  307. # rule=-
  308. # index "Formatting commands"
  309.                               Formatting commands
  310.  
  311.  
  312. # index "Equal signs"
  313. The following section describes the formatting commands alphabetically with some
  314. cross-referencing.  The commands are case insensitive ("align" and "ALIGN" are
  315. the same).  Typically, the equal signs are optional ("WIDTH=80" is the same as
  316. "WIDTH 80") except when used from the DOS command line.  Remember, the text
  317. line that these commands appear in must begin with the designated marker
  318. character (typically a "#").
  319.  
  320. # index "Formatting commands" "Default values"
  321. Default initial values (format commands):
  322.         FLAG=NULL
  323.         INDENT=0
  324.         INDENTER=NULL
  325.         WIDTH=80
  326.         MARGIN=1
  327.         MARKER=#
  328.         PAGE=60
  329.         PAGEEJECT=\012\013\010
  330.         SINGLE
  331.         VERBATIM
  332.         WRAPBOL=NULL
  333.         WRAPEOL=NULL
  334.  
  335. # indent 3-3
  336. # index "Formatting commands" "% (comments)"
  337. # index "% (comments)"
  338. %: Comments.  You can add comments after any marker command or you can embed
  339. them as marker commands all on their own.
  340.  
  341. # index "Formatting commands" "ADJUST"
  342. # index "ADJUST"
  343. ADJUST:  Tells the system to not write single lines on the bottom of a page.
  344. This is typically done to control "widow lines", cases where the first line of
  345. a paragraph prints on the bottom of one page and the remainder of the paragraph
  346. prints on the top of the next.
  347.  
  348. # index "Formatting commands" "-ADJUST"
  349. # index "-ADJUST"
  350. -ADJUST:  Says that "widow lines" are okay.
  351.  
  352. # index "Formatting commands" "ALIGN"
  353. # index "ALIGN"
  354. ALIGN:  Aligns text (uneven right margins) according to the default page width.
  355. See also: CENTER, JUSTIFY, RIGHT, VERBATIM, and WRAP.  See also WIDTH.
  356.  
  357. # index "Formatting commands" "-ALIGN"
  358. # index "-ALIGN"
  359. -ALIGN:  Same thing as VERBATIM.
  360.  
  361. #
  362. # index "Formatting commands" "CENTER"
  363. # index "CENTER"
  364. CENTER:  Centers text according to the default page width.  Unlike ALIGN,
  365. JUSTIFY, and RIGHT, the CENTER command does not actually reflow any text.  If
  366. your line is wider than the specified width, it will not be split into multiple
  367. lines for you.  Note when CENTER is in effect, leading spaces are automatically
  368. removed from text lines so centering can be recalculated correctly.  See also:
  369. ALIGN, JUSTIFY, RIGHT, VERBATIM, and WRAP.  See also WIDTH.
  370.  
  371. # index "Formatting commands" "-CENTER"
  372. # index "-CENTER"
  373. -CENTER:  Same thing as VERBATIM.
  374.  
  375. # index "Formatting commands" "DOUBLE"
  376. # index "DOUBLE"
  377. DOUBLE:  Double-spaces all text.  See also: SINGLE, SPACING=n, and TRIPLE.
  378.  
  379. # index "Formatting commands" "EJECT"
  380. # index "EJECT"
  381. # index "Page-eject characters"
  382. EJECT:  Causes a new page to be created.  A regular decimal 12 character (the
  383. female symbol) is also treated as a page eject in the input file as long as it
  384. appears by itself on a line.  See also:  PAGEEJECT, PAGEEJECT=string, and
  385. PAGEFILL.
  386.  
  387. # index "Formatting commands" "EJECT FRONT"
  388. # index "EJECT FRONT"
  389. EJECT FRONT:  Same as EJECT but makes sure you are ejected to the next odd
  390. numbered page.
  391.  
  392. # index "Formatting commands" "EJECT BACK"
  393. # index "EJECT BACK"
  394. EJECT BACK:  Same as EJECT but makes sure you are ejected to the next even
  395. numbered page.
  396.  
  397. # index "Formatting commands" "FLAG"
  398. # index "FLAG"
  399. FLAG=string:  Allows you to set a character or set of characters that appears
  400. at the end of the lines that follow.  The location of the flag characters is
  401. the width of the line plus a space plus whatever string you specify.  For
  402. example, #flag="!" when #width=20 is in effect will result in "!" appearing
  403. at column 22 on each of the effected lines.  Initially defaults to FLAG=NULL.
  404. See also: INDENTER=string.
  405.  
  406. # index "Formatting commands" "FOOTER"
  407. # index "FOOTER"
  408. FOOTER ... END:  Defines a footer to appear at the bottom of each page.  Has
  409. same features that TITLE ... END has; see that discussion.
  410.  
  411. # index "Formatting commands" "-FOOTER"
  412. # index "-FOOTER"
  413. # index "FOOTER" "Deactivating"
  414. -FOOTER:  Turns off the current footer specification.  See FOOTER ... END.
  415.  
  416. # indent 3-3
  417. # index "Formatting commands" "INCLUDE filename"
  418. # index "INCLUDE filename"
  419. # index "Adding files"
  420. INCLUDE filename:  Adds another file to the processing.  This file is processed
  421. according to whatever formatting defaults are in use at that point.
  422.  
  423. # index "Formatting commands" "INDENT=n"
  424. # index "INDENT=n"
  425. INDENT=n:  Indents the text which follows by "n" spaces.  Essentially sets the
  426. left margin.  Default value: INDENT=0.  See also: INDENTER=string.
  427.  
  428. #
  429. # index "Formatting commands" "INDENT=n-n"
  430. # index "INDENT n-n"
  431. # index "Bulleted text"
  432. INDENT=n-n:  Specifies that most of the lines of a paragraph are to be
  433. indented by "n" spaces whereas the first word of the first line is to be
  434. indented by "n-n" spaces.  For example, "INDENT 5-3" will indent the first word
  435. by two spaces and the subsequent lines by 5 spaces.  This is frequently used for
  436. bulleted text.  See also: INDENTER=string.
  437.  
  438. # indent 3
  439. # index "Bulleted text" "Tricks"
  440. Note with bulleted items that if you want single-spaced items bulleted, include
  441. a #paragraph statement before the next bullet.  This is only a problem because
  442. the routine doesn't start re-indenting text until it thinks it's at another
  443. paragraph.  (A blank line would have worked fine but you want it single spaced
  444. some times.) For example:
  445.  
  446. # unit verbatim
  447.         # indent 5-2
  448.         * This is one paragraph to be indented
  449.         # paragraph
  450.         * And this is another.
  451. # end
  452.  
  453. Remember that the indentation rule applies to the first word of the first line
  454. of a given paragraph.  That word can be a bullet (like an asterisk) but it can
  455. also be an actual word.  This is useful when the first words of different
  456. paragraphs are of different widths.  For example:
  457.  
  458. # unit verbatim
  459.         # indent 8-8
  460.         Home Takes you to the top line
  461.         # indent 8-8
  462.         End Takes you to the bottom line
  463.         # indent 8-8
  464.         F1 Presents help
  465. # end
  466.  
  467. This ends up like this:
  468.  
  469. # unit verbatim
  470.         Home    Takes you to the top line
  471.         End     Takes you to the bottom line
  472.         F1      Presents help
  473. # end
  474.  
  475. # index "Wrapping" "Faking out"
  476. # index "Alt-255 key"
  477. If you want, you can fake the system into thinking that multiple words are, in
  478. fact single words for indentation or word-wrapping purchases.  This is done by
  479. putting a non-printable character instead of a space character between the
  480. words.  A good character to use is Alt-255 (press the Alt key, while it's down,
  481. press the digits 2, 5, 5 on the numeric keypad, then release the Alt key).  This
  482. character shows up as a space but the system treats it as a regular character so
  483. it doesn't split up the words it's between.
  484.  
  485. Warning:  It's easy to forget you used Alt-255.  If you use Alt-255 frequently,
  486. remember to check for it with a hex text viewer (like LIST) when you're
  487. wondering why text didn't wrap or otherwise behave the way you expected.
  488.  
  489. #
  490. Note that using INDENT=n-n causes pre-indented paragraphs to be treated
  491. differently than any other INDENT specification would.  Consider the following:
  492.  
  493. # unit verbatim
  494.         # -indent
  495.                 This is some
  496.                 sample text
  497.         # indent 3
  498.                 This is some
  499.                 sample text
  500.         # indent 3-3
  501.                 This is some
  502.                 sample text
  503. # end
  504.  
  505. In all cases, the system considers that any line that is either empty or begins
  506. with a space in fact starts a paragraph.  In the first case, the system says
  507. don't change any indentation for either line.  In the second case, the system
  508. figures new paragraphs for each line and additionally indents each line.  In the
  509. last case, the system knows that the first word is be de-indented so it removes
  510. leading spaces.  As a result, you get the following:
  511.  
  512. # unit verbatim
  513.                 This is some
  514.                 sample text
  515.                    This is some
  516.                    sample text
  517.         This is some
  518.         sample text
  519. # end
  520.  
  521. The use of #UNIT and #VERBATIM blocks is one way to insure consistency
  522. within indented sections even for single-line blocks of text.
  523.  
  524. # indent 3-3
  525. # index "Formatting commands" "INDENT=n+n"
  526. # index "INDENT=n+n"
  527. INDENT=n+n:  Specifies that most of the lines of a paragraph are to be
  528. indented by "n" spaces whereas the first line is to be indented by "n+n" spaces.
  529. For example, "INDENT 5+3" will indent the first line by eight spaces and the
  530. subsequent lines by 5 spaces.  See also: INDENTER=string.
  531.  
  532. # index "Formatting commands" "-INDENT"
  533. # index "-INDENT"
  534. -INDENT:  Same thing as INDENT=0.
  535.  
  536. # index "Formatting commands" "INDENTER"
  537. # index "INDENTER=string"
  538. # index "Elsie"
  539. INDENTER=string:  Specifies characters that are to be added to start of each
  540. indented line.  Is sometimes used for highlighting text.  Defaults to
  541. INDENTER=NULL.  See also: FLAG=string and INDENT=n.  For example,
  542.  
  543. # unit verbatim
  544.         # indent 4
  545.         # align width 30
  546.         # indenter="> "
  547.         My cat's name is Elsie.  It actually is "LC" and stands for
  548.         "Lost Cat" but it's "Elsie" for short.  Elsie's actually
  549.         male.  I thought it rude to check.
  550. # end
  551.  
  552. # indent 3
  553. Ends up as:
  554.  
  555. # unit verbatim
  556.         >   My cat's name is Elsie.
  557.         >   It actually is "LC" and
  558.         >   stands for "Lost Cat" but
  559.         >   it's "Elsie" for short.
  560.         >   Elsie's actually male.  I
  561.         >   thought it rude to check.
  562. # end
  563.  
  564. # indent 3-3
  565. # index "Formatting commands" "JUSTIFY"
  566. # index "JUSTIFY"
  567. JUSTIFY:  Justifies text (makes right margins flush) within the default page
  568. width.  See also:  ALIGN, CENTER, RIGHT, VERBATIM, and WRAP.  See also WIDTH.
  569.  
  570. # index "Formatting commands" "-JUSTIFY"
  571. # index "-JUSTIFY"
  572. -JUSTIFY:  Same thing as VERBATIM.
  573.  
  574. # index "Formatting commands" "MARKER=c"
  575. # index "MARKER=c"
  576. # index "Changing marker character"
  577. MARKER=c:  Defines the single-character marker indicator that will appear in
  578. column 1 of all subsequent lines.  Default value: MARKER=#.
  579.  
  580. # index "Formatting commands" "MARGIN=n"
  581. # index "Formatting commands" "LMARGIN=n"
  582. # index "MARGIN=n"
  583. # index "LMARGIN=n"
  584. MARGIN=n:  (Or LMARGIN=n)  Specifies that the left margin is to be set at
  585. a particular column.  This allows you to keep standard indentation and such
  586. while shifting the entire page for punch holes or whatever.  The margin is
  587. set independently of the other settings; if you have INDENT=5 and MARGIN=10,
  588. the actual text will start appearing at column 15 on the page.  Default value:
  589. MARGIN=1.
  590.  
  591. # index "Formatting commands" "NEXT=n"
  592. # index "NEXT=n"
  593. NEXT=n:  Specifies which page number will appear the next time ^B appears in
  594. a title, footer, or header.  You can specify "-NEXT" or "NEXT=0" to start
  595. at 0.  Starts at NEXT=1 typically.
  596.  
  597. # index "Formatting commands" "-PAGE"
  598. # index "-PAGE"
  599. -PAGE:  Same as "PAGE=0".
  600.  
  601. # index "Formatting commands" "PAGE=n"
  602. # index "PAGE=n"
  603. PAGE=n:  Defines default page length.  You can say "PAGE=0" to set continuous
  604. pages.  (You have to have a page length specified if you're using the
  605. MULTICOLUMN option though.) Default value:  PAGE=60.
  606.  
  607. # index "Formatting commands" "PAGEEJECT"
  608. # index "PAGEEJECT"
  609. PAGEEJECT:  Says that pages are to be terminated with the standard page eject
  610. sequence (the female symbol--decimal 12--followed by a carriage return and line
  611. feed) instead of padding the pages with blank lines.  This is the default value
  612. and is the same thing as saying "PAGEEJECT=\012\013\010".  See also:
  613. PAGEEJECT=string and PAGEFILL.
  614.  
  615. # index "Formatting commands" "PAGEEJECT=string"
  616. # index "PAGEEJECT=string"
  617. PAGEEJECT=string:  Says that pages are to be terminated with a user-defined
  618. character sequence instead of padding the pages with blank lines.  The main
  619. reason for using this instead of just PAGEEJECT is if you want to remove the
  620. CR/LF that typically follows each page eject.  Another reason is to use
  621. "PAGEEJECT=1\013\010" for files being generated for IBM mainframes that use
  622. carriage control characters.  See also:  PAGEEJECT and PAGEFILL.
  623.  
  624. # index "Formatting commands" "PAGEFILL"
  625. # index "PAGEFILL"
  626. PAGEFILL:  Says that pages are to be ended by padding them with blank lines up
  627. to the specified PAGE=n value.  You are essentially using PAGEFILL if you
  628. specify a footer; pages have to be filled up with blank lines to read the
  629. footer line.  See also: PAGEEJECT and PAGEEJECT=string.
  630.  
  631. # index "Formatting commands" "PARAGRAPH"
  632. # index "PARAGRAPH"
  633. PARAGRAPH:  Says that a new paragraph is about to begin.  This is primarily used
  634. when you have something like bulleted text which might not be properly aligned.
  635. For example:
  636.  
  637. # unit verbatim
  638.         # align width 40 indent 5-2
  639.         * First bulleted item
  640.         # paragraph
  641.         * Second bulleted item.  Note that this would have been considered
  642.         to be part of the first paragraph since it started in column 1 and
  643.         there was no blank line between them.
  644. # end
  645.  
  646. #
  647. # index "Formatting commands" "RIGHT"
  648. # index "RIGHT"
  649. RIGHT:  Moves all text to be flush to the right margin.  Doesn't adjust any
  650. spacing between words or anything.  See also:  ALIGN, CENTER, JUSTIFY, VERBATIM,
  651. and WRAP.  See also WIDTH.
  652.  
  653. # index "Formatting commands" "-RIGHT"
  654. # index "-RIGHT"
  655. -RIGHT:  Same thing as VERBATIM.
  656.  
  657. # index "Formatting commands" "RULE"
  658. # index "RULE string"
  659. RULE=string:  Specifies that a string is to be repeated the width of the line.
  660. This is used to separate sections.  The string can be a single character (like
  661. "RULE=-"), multiple characters (like "RULE="- ""), it can contain decimal and
  662. hexadecimal characters (like "RULE=\066\097\116"), it can be "RULE=NULL" (which
  663. typically results in a blank line), or just simply "RULE" (which is the same
  664. thing as "RULE=-").  Personally, if your printer supports IBM graphics
  665. characters, I find RULE=\196 to be the most pleasing of the rule lines.  (See
  666. BRUCEHEX.DOC file.)
  667.  
  668. # index "Formatting commands" "SINGLE"
  669. # index "SINGLE"
  670. SINGLE:  Single-spaces all text.  This is the default spacing.  See also:
  671. DOUBLE, SPACING=n, and TRIPLE.
  672.  
  673. # index "Formatting commands" "SPACING=n"
  674. # index "SPACING=n"
  675. SPACING=n:  Sets spacing between lines as "n" number of lines.  See also:
  676. DOUBLE (which is SPACING=2), SINGLE (SPACING=1), and TRIPLE (SPACING=3).
  677.  
  678. # index "Formatting commands" "TITLE"
  679. # index "TITLE"
  680. TITLE ...  END:  Defines a title to appear at the top of each page.  Any number
  681. of lines can appear in the title.  The title ends with a marker line that
  682. contains the "end" command; if no "end" command is provided, the program
  683. presumes there is one after the last line of your file.  Spacing, indentation,
  684. width, and alignment cannot vary within the title; the last one assigned will
  685. win.  See "control codes" discussion below for characters that can appear in the
  686. title.  To eliminate the title, define a title without any lines in it.  See
  687. also:  FOOTER ...  END, HEADER ...  END and UNIT ...  END.  Example:
  688.  
  689. # unit verbatim
  690.         # title center width=80
  691.         This is my program!
  692.  
  693.         # end
  694. # end
  695.  
  696. # indent 3
  697. If you plan to change the title within the document, make sure you redefine
  698. it before the new page is generated.  For example:
  699.  
  700. # unit verbatim
  701.         (text)
  702.         # title center width=80
  703.         Index
  704.  
  705.         # end
  706.         #
  707. # end
  708.  
  709. If you define it after the page eject, the new title will not take effect until
  710. a subsequent page (if any) is generated.  By the same token, make sure the title
  711. is defined in the document before any text is filled in if you want the title to
  712. appear on the very first page of the reformatted document.
  713.  
  714. #
  715. A very useful title is the following:
  716.  
  717. # unit verbatim
  718.         # title center width=80
  719.         ^O%12%                         ^B%3%                       Revised: ^A
  720.  
  721.         # end
  722. # end
  723.  
  724. Consult the control code discussion afterward but this will fill in the output
  725. file's name (taking up 12 spaces so all of your titles look about the same),
  726. the page number (taking up 3 spaces for the page number), and the input file's
  727. date.
  728.  
  729. # indent 3-3
  730. # index "Formatting commands" "-TITLE"
  731. # index "-TITLE"
  732. # index "TITLE" "Deactivating"
  733. -TITLE:  Turns off the current title specification.  See TITLE ... END.
  734.  
  735. # index "Formatting commands" "TRIPLE"
  736. # index "TRIPLE"
  737. TRIPLE:  Triple-spaces all text.  See also: DOUBLE, SINGLE, and SPACING=n.
  738.  
  739. # index "Formatting commands" "UNIT"
  740. # index "UNIT"
  741. UNIT ... END:  Defines a unit of text with its own unique formatting.  Units
  742. can have formatting which differs from the text around it and changing the
  743. formatting within the Unit will not affect the other text.  Has same features
  744. that TITLE ... END has; see that discussion.
  745.  
  746. # indent 3
  747. A typical use for the UNIT command is in combination with VERBATIM.  This is
  748. frequently used when you're aligning or justifying most of the text and then you
  749. have one section that isn't to be changed at all.
  750.  
  751. # indent 3-3
  752. # index "Formatting commands" "VERBATIM"
  753. # index "VERBATIM"
  754. VERBATIM:  Specifies that the text which follows should not be aligned,
  755. justified, etc.  See also: ALIGN, CENTER, JUSTIFY, RIGHT, and WRAP.  See also
  756. WIDTH.
  757.  
  758. # index "Formatting commands" "WIDTH=n"
  759. # index "WIDTH=n"
  760. WIDTH=n:  Specifies the default line width.  (Page lengths are controlled by the
  761. PAGE=command.) Default value:  WIDTH=80.  (Note that LENGTH=n is accepted as a
  762. synonym for WIDTH=n.) See also:  ALIGN, CENTER, JUSTIFY, RIGHT, VERBATIM, and
  763. WRAP.
  764.  
  765. # index "Formatting commands" "WRAP"
  766. # index "WRAP"
  767. # index "Streamed text" "WRAP command"
  768. WRAP:  Specifies that long lines (longer than the specified line width) in the
  769. text which follows should be wrapped.  Lines which are shorter than the
  770. specified line width are not affected at all.  Primarily of use in files
  771. produced by a word-processor since they typically write the entire paragraph as
  772. a stream.  Also useful for printing source code.  See also:  ALIGN, CENTER,
  773. JUSTIFY, RIGHT, and VERBATIM.  See also WIDTH, WRAPBOL=string, and
  774. WRAPEOL=string.
  775.  
  776. # index "Formatting commands" "-WRAP"
  777. # index "-WRAP"
  778. -WRAP:  Same thing as VERBATIM.
  779.  
  780. #
  781. # index "Formatting commands" "WRAPBOL"
  782. # index "WRAPBOL=string"
  783. WRAPBOL=string:  Is used with the WRAP command to indicate that continued lines
  784. are to begin with the specific string.  This is useful for source code listings.
  785. Initially defaults to WRAPBOL=NULL.  An example of its use:
  786.  
  787. # unit verbatim
  788.         # length=50
  789.         # wrap
  790.         # wrapbol=" > "
  791.         # wrapeol=" <"
  792.         IF Word2$ = "" THEN
  793.           CALL WriteError("Missing required " + Item$ + " parameter", "", SourceText$)
  794.         ELSEIF VAL(Word2$) < MinVal% OR VAL(Word2$) > MaxVal% THEN
  795.           CALL WriteError("Invalid " + Item$ + " parameter", "", SourceText$)
  796.         ELSE
  797.           CkParmN% = VAL(Word2$)
  798.         END IF
  799. # end
  800.  
  801. will result in the following output:
  802.  
  803. # unit verbatim
  804.         IF Word2$ = "" THEN
  805.           CALL WriteError("Missing required " + Item$ + <
  806.          > " parameter", "", SourceText$)
  807.         ELSEIF VAL(Word2$) < MinVal% OR VAL(Word2$) > <
  808.          > MaxVal% THEN
  809.           CALL WriteError("Invalid " + Item$ + " <
  810.          > parameter", "", SourceText$)
  811.         ELSE
  812.           CkParmN% = VAL(Word2$)
  813.         END IF
  814. # end
  815.  
  816. # index "Formatting commands" "WRAPEOL"
  817. # index "WRAPEOL=string"
  818. WRAPEOL=string:  Is used with the WRAP command to indicate that if the line
  819. can't fit on the current line, the end of the line is to be tagged with the
  820. specified string.  This is useful for source code listings.  Initially
  821. defaults to WRAPEOL=NULL.  See the example under the WRAPBOL=string command.
  822.  
  823. #
  824. # index "Database-related commands"
  825. # indent 0
  826. # rule=-
  827.                            Database-related functions
  828.  
  829. The PAGINATE command provides some features to allow you to use it to read in
  830. and print out ASCII-delimited and dBase files.  For example:
  831.  
  832.         # from ascii
  833.         "Apples",10,5
  834.         "Bananas",20,10
  835.  
  836. will come out as:
  837.  
  838.         Apples   10  5
  839.         Bananas  20 10
  840.  
  841. You can use this capability to embed tables within a report.  You can also
  842. combine this with SORT=varspec, SELECT=varspec, and SUM=varspec specifications
  843. to have the report sorted on specified columns or to subset the columns that get
  844. printed out.  There are some restrictions to all of this and these are described
  845. within each option as appropriate below.
  846.  
  847. NOTE:  In general, combining FROM ASCII or FROM DBF or several of the other
  848. data-base related functions with options like ALIGN and JUSTIFY will not work.
  849. The formatting options will, in general, be ignored.
  850.  
  851. # index "Sorting" "Example"
  852. It's often the case that you will want to deal only with a single data set,
  853. and you'll have no need for actual text.  For example, let's say that you really
  854. want something that will sort a file that contains a lot of data.  No problem:
  855.  
  856.         PAGINATE infile outfile /-PAGE /SORT=1,10
  857.  
  858. # index "dBase files" "Example"
  859. Another example would be that you have something like a dBase file and you want
  860. to print it out.  Again, no problem.  Create a simple control file:
  861.  
  862. # unit
  863. # verbatim
  864.         # heading
  865.         ^H
  866.  
  867.         # end
  868.         # from dbf
  869.         # include sample.dbf
  870. # end
  871.  
  872. and then create your tables with:
  873.  
  874.         PAGINATE ctlfile outfile
  875.  
  876. In general, keep in mind that sorting, totaling, and other special data base
  877. function requests should appear before the data are actually read in.  This
  878. means #SORT or #SUM should appear before the #INCLUDE statement.
  879.  
  880.  
  881. #
  882. # index "Database-related commands" "Default values"
  883. Default initial values (database-related functions):
  884.  
  885.         BAD=ABORT
  886.         -BREAK
  887.         -DELETED
  888.         DELIMS=",,,
  889.         FROM FIXED
  890.         GAP=2
  891.         INMISS=NULL
  892.         INMISSC=NULL
  893.         OUTMISS=NULL
  894.         OUTMISSC=NULL
  895.         SELECT=NULL
  896.         SEPARATOR=" | "
  897.         SORT=NULL
  898.         SUM=NULL
  899.  
  900. # indent 3-3
  901. # index "Database-related commands" "BAD=ABORT"
  902. # index "BAD=ABORT"
  903. BAD=ABORT:  Says that if the program runs into an invalid data value,
  904. it should abort processing entirely.
  905.  
  906. # index "Database-related commands" "BAD=MISSING"
  907. # index "BAD=MISSING"
  908. BAD=MISSING:  Says that if the program runs into an invalid data value, it
  909. should set the value of that variable as "missing" and continue processing.
  910.  
  911. # index "Database-related commands" "BAD=SKIP"
  912. # index "BAD=SKIP"
  913. BAD=SKIP:  Says that if the program runs into an invalid data value, it should
  914. skip the entire data record and continue processing with the next record.
  915.  
  916. # index "Database-related commands" "BREAK"
  917. # index "BREAK"
  918. BREAK=varspec:  BREAK provides a way of generating subtotals or subgroupings
  919. within a listing.  Whenever the value of the variable specified changes, the
  920. program will generate either a blank line or a subtotal (if SUM=varspec has been
  921. specified).  If subtotals are generated, at the end it will generate a grand
  922. total.
  923.  
  924. # index "Database-related commands" "BREAK NULL"
  925. # index "BREAK NULL"
  926. BREAK=NULL:  Turns off all subtotalling.  This is initially the default.
  927.  
  928. # index "Database-related commands" "-BREAK"
  929. # index "-BREAK"
  930. -BREAK:  Same as BREAK=NULL.
  931.  
  932. # index "Database-related commands" "DELETED"
  933. # index "DELETED"
  934. DELETED:  Says to process deleted records as well as non-deleted records from
  935. dBase files.
  936.  
  937. # index "Database-related commands" "-DELETED"
  938. # index "-DELETED"
  939. -DELETED:  Says to skip deleted records.
  940.  
  941. # index "Database-related commands" "DELIMS"
  942. # index "DELIMS"
  943. # index "Hexadecimal codes"
  944. DELIMS=aroundstrings,aroundnums,betweenfields:  Allows you to specify the
  945. delimiters (in sequence) around string fields, around numeric fields, and
  946. between fields.  Defaults to:
  947.  
  948. # unit verbatim
  949.         DELIMS=",,,
  950. # end
  951.  
  952. # indent 3
  953. (Use quotes around character strings, nothing around numeric data, and the third
  954. comma indicates that there is a comma between fields.) The replacement string
  955. can include hexadecimal codes (in the &Hxx format) or decimal codes (in the \ddd
  956. format) if necessary so either of the following would put a tab between fields:
  957.  
  958. # unit verbatim
  959.         DELIMS=",,&H09
  960.         DELIMS=",,\009
  961. # end
  962.  
  963. See the BRUCEHEX.DOC file.
  964.  
  965. # indent 3-3
  966. # index "Database-related commands" "FROM ASCII"
  967. # index "FROM ASCII"
  968. # index "ASCII-delimited files"
  969. # index "Files" "ASCII-delimited"
  970. FROM ASCII:  Specifies that the next non-marker lines contain ASCII-delimited
  971. records.  The ASCII-delimited records can be embedded within the report or
  972. stored as a separate file (brought in with an INCLUDE statement).  See also:
  973. FROM DBF and FROM FIXED and most of the other commands in this section.  See
  974. also:  "Field-definition file" discussion.
  975.  
  976. # index "Database-related commands" "FROM DBF"
  977. # index "FROM DBF"
  978. # index "dBase files"
  979. # index "Files" "dBase"
  980. FROM DBF:  Specifies that the next INCLUDE statement is a dBase file.  Unlike
  981. with FROM FIXED and FROM ASCII, the dBase file has to be external to the control
  982. cards.  The output itself, however, will be included with the regular output
  983. file.  See also: FROM ASCII and FROM FIXED and most of the other commands in
  984. this section.  See also: "Field-definition file" discussion.
  985.  
  986. # index "Database-related commands" "FROM FIXED"
  987. # index "FROM FIXED"
  988. FROM FIXED:  Specifies that the input file is a fixed-field file.  Any document
  989. with regular text (for example, a letter to your best buddy) is considered
  990. fixed-field by the program; if you classify it as anything else, the program
  991. will try to parse it all.  See also:  FROM ASCII and FROM DBF.
  992.  
  993. # index "Database-related commands" "-GAP"
  994. # index "-GAP"
  995. -GAP:  Same as "GAP=0".
  996.  
  997. # index "Database-related commands" "GAP=n"
  998. # index "GAP=n"
  999. GAP=n:  Specifies the number of spaces to appear between columns when printing
  1000. fielded data.  If, for example, two columns of numbers are printed, the GAP
  1001. parameter specifies that "n" number of spaces are to appear between these
  1002. columns.  You can specify "GAP=0" if you don't want any gap to be inserted.
  1003. Defaults to GAP=2.
  1004.  
  1005. # index "Database-related commands" "HEADER"
  1006. # index "HEADER"
  1007. # index "Column headers"
  1008. HEADER ... END:  Defines a set of column headers that should appear before
  1009. the actual data.  Typically, you can bring these in from the actual dBase file
  1010. or else use whatever you've specified in the field-definition file by using the
  1011. "^H" control code.  Headers are affected by the MULTICOLUMN specification.
  1012. Otherwise, they are treated pretty much like Titles and Footers.  See the
  1013. discussion of TITLE ... END.
  1014.  
  1015. # index "Formatting commands" "-HEADER"
  1016. # index "-HEADER"
  1017. # index "HEADER" "Deactivating"
  1018. -HEADER:  Turns off the current header specification.  See HEADER ... END.
  1019.  
  1020. # index "Database-related commands" "INCLUDE filename"
  1021. # index "INCLUDE filename"
  1022. # index "Files" "Adding"
  1023. INCLUDE filename:  Adds text from another file in at this point.  If the routine
  1024. has been told that this is a FROM DBF or FROM ASCII file, it will process the
  1025. file appropriately.  The filename specification can include drive and path
  1026. information if desired.
  1027.  
  1028. # index "Database-related commands" "INCLUDE INDEX"
  1029. # index "INCLUDE INDEX"
  1030. INCLUDE INDEX:  Creates an index listing at this point in the document.  See
  1031. also: INDEX.
  1032.  
  1033. # index "Database-related commands" "INDEF filename"
  1034. # index "INDEF filename"
  1035. # index "Field-definition file"
  1036. INDEF filename:  Specifies that the file characteristics for the input file
  1037. which follows are contained in a field-definition file specified as "filename".
  1038. The filename spec can include drive and path information if desired.  See the
  1039. discussion of "Field-definition files" below.  See also: INDEF NULL.
  1040.  
  1041. # index "Database-related commands" "INDEF NULL"
  1042. # index "INDEF NULL"
  1043. INDEF NULL:  Says there is no input file definition for what follows.  Typically
  1044. used to turn off the previously-specified input field-definition file.  See
  1045. also: INDEF filename.
  1046.  
  1047. # index "Database-related commands" "-INDEF"
  1048. # index "-INDEF"
  1049. -INDEF:  Same thing as INDEF NULL.
  1050.  
  1051. #
  1052. # index "Database-related commands" "INDEX"
  1053. # index "INDEX"
  1054. # index "See Also references"
  1055. INDEX "word" [ "word" ]...  [DUMMY]:  Saves an index record, with the specified
  1056. text and the current page number, at this point.  The index is then printed out
  1057. when you add an INCLUDE INDEX option.  The multiple word specifications allow
  1058. you to specify up to 3 levels of indexing.  For example,
  1059.  
  1060. # unit verbatim
  1061.         # index "Computers" "Maintenance"
  1062.         # index "Computers" "Hardware"
  1063.         # eject
  1064.         # index "Computers" "Hardware"
  1065.         # index "Computers" "Software"
  1066.         # include index
  1067. # end
  1068.  
  1069. # indent 3
  1070. will generate output that looks in part like this:
  1071.  
  1072. # unit verbatim
  1073.         Computers
  1074.           Hardware; 1, 2
  1075.           Maintenance; 1
  1076.           Software; 2
  1077. # end
  1078.  
  1079. # index "MULTICOLUMN" "With INDEX"
  1080. # index "INDEX" "With MULTICOLUMN"
  1081. You can use MULTICOLUMN in combination with the INDEX command.  Just make sure
  1082. you specify the MULTICOLUMN before the INCLUDE INDEX statement as in:
  1083.  
  1084. # unit verbatim
  1085.         # multicolumn 3
  1086.         # include index
  1087. # end
  1088.  
  1089. # index "DUMMY index references"
  1090. If DUMMY is specified, the page number is not displayed for this item.  This is
  1091. typically done when you want the index to provide a cross-reference but you
  1092. don't really want any page numbers showing up.  For example:
  1093.  
  1094. # unit verbatim
  1095.         # index "Hardware" "(See Computers)" DUMMY
  1096. # end
  1097.  
  1098. My personal preference is to put all DUMMY index references near the start of
  1099. your document so you can find them more easily.
  1100.  
  1101. # indent 3-3
  1102. # index "Database-related commands" "INMISS=val"
  1103. # index "INMISS=val"
  1104. INMISS=val:  Specifies for ASCII-delimited and dBase input files which numeric
  1105. values are to be considered indicators for missing values.  Missing values
  1106. are not included in summations.  Defaults to INMISS=NULL.  See also:
  1107. INMISSC=val, OUTMISS=val, and OUTMISSC=val.
  1108.  
  1109. # index "Database-related commands" "INMISSC=val"
  1110. # index "INMISSC=val"
  1111. INMISSC=val:  Specifies for ASCII-delimited and dBase input files which
  1112. character values are to be considered indicators for missing values.  Defaults
  1113. to INMISSC=NULL.  See also: INMISS=val, OUTMISS=val, and OUTMISSC=val.
  1114.  
  1115. # index "Database-related commands" "MULTICOLUMN"
  1116. # index "MULTICOLUMN"
  1117. # index "SEPARATOR" "With MULTICOLUMN"
  1118. MULTICOLUMN=n ...  END:  Specifies that a given block is to be arranged in a
  1119. multicolumn format.  The number of columns is specified as "n"; "MULTICOLUMN=2"
  1120. would set up a dual-column output.  The SEPARATOR string appears between each of
  1121. the columns.  (MULTICOLUMN", by the way, can be abbreviated "MULTI" or
  1122. "MULTICOL".)
  1123.  
  1124. # indent 3
  1125. Make sure you put any CENTER or ALIGN or whatever statements after the
  1126. MULTICOLUMN statement (VERBATIM will result in lines being truncated).  Any
  1127. width specification ("MULTICOLUMN=2 WIDTH=80") is used to determine the total
  1128. line width, not the width of each column within the line.  The width of each
  1129. column is the total line width (typically 80) divided by the number of columns
  1130. minus the width of the separator string.
  1131.  
  1132. Otherwise, MULTICOLUMN has the same features that TITLE ...  END has; see that
  1133. discussion.  (Remember, unless provided otherwise, the "END" command is presumed
  1134. to be after the last line of your input file.) See also:  SEPARATOR=string.
  1135. Example:
  1136.  
  1137. # unit verbatim
  1138.         # multicolumn 3 separator=" | "
  1139.         lines
  1140.         lots of lines
  1141.         still more
  1142.         # end
  1143. # end
  1144.  
  1145. # indent 3-3
  1146. # index "Database-related commands" "NULLS"
  1147. # index "NULLS"
  1148. NULLS:  Says that the program will accept values that begin with a decimal
  1149. zero as being a valid value.  Defaults to NULLS.  See also: -NULLS.
  1150.  
  1151. # index "Database-related commands" "-NULLS"
  1152. # index "-NULLS"
  1153. -NULLS:  Says that values which begin with a decimal zero should be treated
  1154. as missing by the program.  Defaults to NULLS.  See also: NULLS.
  1155.  
  1156. # index "Database-related commands" "OUTDEF filename"
  1157. # index "OUTDEF filename"
  1158. # index "Field-definition file"
  1159. OUTDEF filename:  Specifies the field-definition file to create.  Typically, the
  1160. only reason you'd ever use this command is if you want the program to create a
  1161. field-definition file for a dBase input file.  (See the discussion of
  1162. "Field-definition file" later.)  See also:  OUTDEF NULL.
  1163.  
  1164. # index "Database-related commands" "OUTDEF NULL"
  1165. # index "OUTDEF NULL"
  1166. OUTDEF NULL:  Turns off the output field-definition file specification.  See
  1167. also: OUTDEF filename.
  1168.  
  1169. # index "Database-related commands" "-OUTDEF"
  1170. # index "-OUTDEF"
  1171. -OUTDEF:  Same as OUTDEF NULL.
  1172.  
  1173. # index "Database-related commands" "OUTMISS=val"
  1174. # index "OUTMISS=val"
  1175. OUTMISS=val:  Specifies what value will be substituted for missing numeric
  1176. input values on output.  Initially defaults to OUTMISS=NULL.  See also:
  1177. INMISS=val, INMISSC=val, and OUTMISSC=val.
  1178.  
  1179. # index "Database-related commands" "OUTMISSC=val"
  1180. # index "OUTMISSC=val"
  1181. OUTMISSC=val:  Specifies what value will be substituted for missing character
  1182. input values on output.  Initially defaults to OUTMISSC=NULL.  See also:
  1183. INMISS=val, INMISSC=val, and OUTMISS=val.
  1184.  
  1185. # index "Database-related commands" "RESET=string"
  1186. # index "RESET=string"
  1187. RESET=string:  Specifies a character string to stick at the end of the file, to
  1188. reset the printer after the document is printed.  A page eject character (or any
  1189. other user-defined string in the case of PAGEEJECT=string) is typically added
  1190. automatically if /EJECT is specified.  The string can contain special characters
  1191. by using a "\" followed by the three-digit ASCII code for the character.  The
  1192. typical use for this would be to issue a printer reinitialization string.  On a
  1193. Hewlett-Packard printer, this would probably be RESET=\027E.  See also:
  1194. SETUP=string.
  1195.  
  1196. # index "Database-related commands" "SELECT=varspec"
  1197. # index "SELECT=varspec"
  1198. SELECT=varspec:  Specifies which variables or columns should show up in the
  1199. ultimate file.  This allows you to take, for example, a text file and only print
  1200. the middle 10 columns of it or else to take a dBase file and only print certain
  1201. variables.  See the discussion of "Varspecs" later.  See also: SELECT=NULL.
  1202.  
  1203. # index "Database-related commands" "SELECT=NULL"
  1204. # index "SELECT=NULL"
  1205. SELECT=NULL:  Specifies that all variables or columns should show up.  This is
  1206. initially the default.  See also: SELECT=varspec.
  1207.  
  1208. # index "Database-related commands" "-SELECT"
  1209. # index "-SELECT"
  1210. -SELECT:  Same thing as SELECT=NULL.
  1211.  
  1212. # index "Database-related commands" "SEPARATOR"
  1213. # index "SEPARATOR"
  1214. SEPARATOR=string:  Specifies the string to appear between columns in a
  1215. multicolumn output.  The string can contain special characters by using a "\"
  1216. followed by the three-digit ASCII code for the character.  For example, to have
  1217. a graphic vertical bar, use SEPARATOR=\032\179\032 or else enter it directly as
  1218. SEPARATOR=" │ ".  Initially defaults to SEPARATOR=" | ".  (In case that reflows
  1219. when you reformat this documentation, that's quote, space, vertical bar, space,
  1220. quote).  See also:  MULTICOLUMN=n.
  1221.  
  1222. # index "Database-related commands" "SETUP=string"
  1223. # index "SETUP=string"
  1224. SETUP=string:  Specifies the character string to strick at the beginning of the
  1225. file, to initialize the printer before the document is printed.  Typically, you
  1226. might use an initialization string that sets the printer in compressed,
  1227. landscape, or whatever mode.  The string can contain special characters by using
  1228. a "\" followed by the three-digit ASCII code for the character.  On a
  1229. Hewlett-Packard printer, this would typically be one of the following codes:
  1230.  
  1231. # unit verbatim
  1232.         SETUP=\027E             (portrait mode, 80 column)
  1233.         SETUP=\027E\027(s16.66H (portrait mode, 132 column)
  1234. # end
  1235.  
  1236. # indent 3
  1237. On an Epson MX dot-matrix printer, you would typically use these codes:
  1238.  
  1239. # unit verbatim
  1240.         SETUP=\015              (portrait mode, 80 column)
  1241.         SETUP=\018              (portrait mode, 132 column)
  1242. # end
  1243.  
  1244. See also: RESET=string.
  1245.  
  1246. # indent 3-3
  1247. # index "Database-related commands" "SORT=varspec"
  1248. # index "SORT=varspec"
  1249. SORT=varspec:  Specifies that the lines which follow should be sorted according
  1250. to a particular group of columns or variables.  See the discussion of "Varspecs"
  1251. later.  Sorting is done based on a case-sensitive search ("Apple" and "Banana"
  1252. will appear before "air").  Note that sorting works well for character strings
  1253. but negative numbers can cause it all sorts of problems.  The sort field
  1254. specification is limited to 50 characters.  Note that you cannot combine sorting
  1255. specifications (for example, descending for some columns and ascending for
  1256. others.) Initially defaults to SORT=NULL.  See also:  SORT=NULL.  Basic sorting
  1257. specifications available here (see each separately):
  1258.  
  1259. # unit verbatim
  1260.         SORT      --> case-sensitive, ascending sort
  1261.         SORTD     --> case-sensitive, descending sort
  1262.         SORTI     --> case-insensitive, ascending sort
  1263.         SORTDI    --> case-insensitive, descending sort
  1264.         SORTID    --> case-insensitive, descending sort
  1265. # end
  1266.  
  1267. # index "Database-related commands" "SORT=NULL"
  1268. # index "SORT=NULL"
  1269. SORT=NULL:  Turns off any sorting specification.  This statement is vital if you
  1270. have any text appearing after a sorted section.  Remember, you cannot have
  1271. multiple sorting specifications going on so this is the same as all of the
  1272. following:  -SORT, -SORTI, -SORTD, -SORTID, -SORTDI, SORTI=NULL, SORTD=NULL,
  1273. SORTDI=NULL, and SORTID=NULL.  This statement is initially the default.
  1274.  
  1275. # index "Database-related commands" "-SORT"
  1276. # index "-SORT"
  1277. -SORT:  Same as SORT=NULL.
  1278.  
  1279. # index "Database-related commands" "SORTD=varspec"
  1280. # index "SORTD=varspec"
  1281. SORTD=varspec:  Similar to SORT=varspec but sorting is done in descending
  1282. sequence.  See SORT=varspec and SORT=NULL.
  1283.  
  1284. # index "Database-related commands" "SORTD=NULL"
  1285. # index "SORTD=NULL"
  1286. SORTD=NULL:  Same as SORT=NULL.
  1287.  
  1288. # index "Database-related commands" "-SORTD"
  1289. # index "-SORTD"
  1290. -SORTD:  Same as SORT=NULL.
  1291.  
  1292. # index "Database-related commands" "SORTDI=varspec"
  1293. # index "SORTDI=varspec"
  1294. SORTDI=varspec:  Similar to SORT=varspec but sorting is done in descending
  1295. sequence and sorting is case insensitive.  Identical to SORTID=varspec.  See
  1296. SORT=varspec and SORT=NULL.
  1297.  
  1298. # index "Database-related commands" "SORTDI=NULL"
  1299. # index "SORTDI=NULL"
  1300. SORTDI=NULL:  Same as SORT=NULL.
  1301.  
  1302. # index "Database-related commands" "-SORTDI"
  1303. # index "-SORTDI"
  1304. -SORTDI:  Same as SORT=NULL.
  1305.  
  1306. # index "Database-related commands" "SORTI=varspec"
  1307. # index "SORTI=varspec"
  1308. SORTI=varspec:  Same as SORT=varspec except the sorting is done in a
  1309. case-insensitive manner ("big" shows up between "Apple" and "Caramel").  See
  1310. SORT=varspec and SORT=NULL.
  1311.  
  1312. # index "Database-related commands" "SORTI=NULL"
  1313. # index "SORTI=NULL"
  1314. SORTI=NULL:  Same as SORT=NULL.
  1315.  
  1316. # index "Database-related commands" "-SORTI"
  1317. # index "-SORTI"
  1318. -SORTI:  Same as SORT=NULL.
  1319.  
  1320. # index "Database-related commands" "SORTID=varspec"
  1321. # index "SORTID=varspec"
  1322. SORTID=varspec:  Same as SORTDI=varspec.
  1323.  
  1324. # index "Database-related commands" "SORTID=NULL"
  1325. # index "SORTID=NULL"
  1326. SORTID=NULL:  Same as SORT=NULL.
  1327.  
  1328. # index "Database-related commands" "-SORTID"
  1329. # index "-SORTID"
  1330. -SORTID:  Same as SORT=NULL.
  1331.  
  1332. # index "Database-related commands" "SUM"
  1333. # index "Adding Columns Of Numbers" "(See SUM)" DUMMY
  1334. # index "SUM"
  1335. SUM=varspec:  Summarizes a group of numbers and presents the total after the
  1336. items are displayed.  Initially defaults to SUM=NULL.  See also:  SUM=NULL.
  1337.  
  1338. # indent 3
  1339. An example of summing might be like the following:
  1340.  
  1341. # unit verbatim
  1342.   # from fixed
  1343.   # sort=28-34
  1344.   # sum=28-34,43-49,57-62,73-78
  1345.    370 DISK STORAGE           $75.14         $35.58       $23.28          $49.16
  1346.    370 DISK STORAGE           $12.80          $6.26        $6.24          $12.76
  1347.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1348.    370 DISK STORAGE            $0.00          $0.00       $11.38          $22.76
  1349.    370 DISK STORAGE           $61.56         $29.64       $11.40          $23.68
  1350.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1351.    370 DISK STORAGE            $0.72          $0.13        $0.13           $0.72
  1352.    370 DISK STORAGE            $1.99          $0.13        $1.64          $16.40
  1353.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1354.    370 DISK STORAGE            $0.27          $0.13        $0.13           $0.27
  1355.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1356.    370 DISK STORAGE          $195.48         $94.12       $39.28          $81.58
  1357.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1358.    370 DISK STORAGE          $130.01         $90.84       $24.99          $35.77
  1359.    370 DISK STORAGE            $8.10          $3.90        $2.62           $5.44
  1360.   # -sum
  1361. # end
  1362.  
  1363. This will sort the 15 lines and summarize the four columns of numbers.
  1364.  
  1365. # indent 3-3
  1366. # index "Database-related commands" "SUM=NULL"
  1367. # index "SUM=NULL"
  1368. SUM=NULL:  Turns off summarization.
  1369.  
  1370. # index "Database-related commands" "-SUM"
  1371. # index "-SUM"
  1372. -SUM:  Same as SUM=NULL.
  1373.  
  1374. #
  1375. # indent 0
  1376. # index "Control codes"
  1377. # index "Page numbers"
  1378. # index "Date-stamps"
  1379. # index "Time-stamps"
  1380. # index "Column headers"
  1381. # index "Titles"
  1382. # index "^B"
  1383. # index "^D"
  1384. # index "^T"
  1385. # index "^N"
  1386. # index "^A"
  1387. # index "^I"
  1388. # index "^H"
  1389. # index "^O"
  1390. # index "%n%"
  1391. Control codes:
  1392.  
  1393. Within titles, headers, and footers, you can embed the following codes.  These
  1394. codes are case-sensitive; "^b^" will not translated as the current page number.
  1395. These codes will be expanded on output:
  1396.  
  1397.         ^B      current page number
  1398.         ^D      pagination date (in mm/dd/yy or appropriate country format)
  1399.         ^T      pagination time (in hh:mm format)
  1400.         ^N      name of the input file (without drive or path information)
  1401.         ^A      input file's creation date (in mm/dd/yy or appropriate country
  1402.                 format)
  1403.         ^I      input file's creation time (in hh:mm format)
  1404.         ^H      column headers (when appropriate)
  1405.         ^O      output file's name (without drive or path information)
  1406.  
  1407. You can also immediately follow any of the control codes with a field width by
  1408. including one or two digits within two percentage signs.  For example, "^O%12%"
  1409. will force the output file's name to be 12 characters in length.  This is useful
  1410. for making sure that the headers are all a uniform length, something which would
  1411. otherwise be complicated because the length of the page number can vary.
  1412.  
  1413. Without using the length codes, formatting commands like centering will be
  1414. adjusted based on the replacement contents for these codes.  A line containing a
  1415. one-digit page number will be centered differently than the exact same line
  1416. containing a three-digit page number.
  1417.  
  1418. Example:
  1419.  
  1420.         # title center width 80
  1421.         File ^N listing, page ^B
  1422.  
  1423.         # end
  1424.  
  1425. or
  1426.  
  1427.         # title center width 80
  1428.         ^O%12%                         ^B%3%                       Revised: ^A
  1429.  
  1430.         # end
  1431.  
  1432. #
  1433. # index "Varspecs"
  1434. # index "Specifying columns"
  1435. # index "Specifying variables"
  1436. # index "Columns" "Specifying"
  1437. Varspecs:
  1438.  
  1439. Several of the commands (for example, SELECT and SORT) expect you to pass in a
  1440. "varspec" parameter.  Varspec's indicate which variables or columns to process.
  1441.  
  1442. The format for the varspec is:
  1443.  
  1444.         n[-n] [ , n-[n] ]...
  1445.  
  1446. where "n" is a single variable/column.  "n-n" indicates you want a range of
  1447. variables/columns.
  1448.  
  1449. For FROM ASCII or FROM DBF, the "n" corresponds to a variable number.  For FROM
  1450. FIXED, the "n" corresponds to a physical one-byte column.  For example:
  1451.  
  1452.         # from ascii
  1453.         # select 1,3
  1454.         "Testing",2,4
  1455.         "All",5,7
  1456.         "This",1,6
  1457.  
  1458. says to display the 1st and 3rd variables and results in something like this:
  1459.  
  1460.         Testing  4
  1461.         All      7
  1462.         This     6
  1463.  
  1464. On the other hand, if you're processing fixed-fielded data, the varspec will
  1465. select individual columns.  So:
  1466.  
  1467.         # from fixed
  1468.         # select 1-10,15
  1469.         1234567_10_2345678
  1470.         Testing   abcdefgh
  1471.         All       abcdefgh
  1472.         This      abcdefgh
  1473.  
  1474. will come out like this:
  1475.  
  1476.         Testing   e
  1477.         All       e
  1478.         This      e
  1479.  
  1480. #
  1481. # index "Field-definition file"
  1482. # index "ASCII-delimited files"
  1483. # index "dBase files"
  1484. Field-definition file:
  1485.  
  1486. For data files (ASCII-delimited, dBase, and fixed field input files), you can
  1487. use PAGINATE.EXE to present a reasonably formatted listing of variables.  Unless
  1488. you are reading a dBase file, this program requires a field-definition file to
  1489. figure out the characteristics for each field and also to set certain file
  1490. characteristics.  If you're processing an ASCII-delimited input file, the
  1491. routine can try to create a field-definition file for you if desired.
  1492.  
  1493. The definition file can be created with any text editor.  The definition file
  1494. consists of several records with the following fields separated by spaces.
  1495. Except for the record type indicator (which must begin in column 1), all other
  1496. fields can be placed in any columns:
  1497.  
  1498.         (1) record type (see below)
  1499.         (2) length of field on input
  1500.         (3) number of decimal places for numeric data (if you don't know,
  1501.             put a "?" here; for non-numeric data, a "0" is fine) on output
  1502.         (4) length of field on output
  1503.  
  1504. Any characters after the field length are treated as comment fields.  You would
  1505. typically use this to enter the field name or column position or any other
  1506. information of use to you.
  1507.  
  1508. The data record types accepted by this routine are as follows:
  1509.  
  1510.         type C = character data (leading spaces are trimmed)
  1511.              V = verbatim character data (no leading spaces are trimmed)
  1512.              N = numeric
  1513.              L = logical (T or F)
  1514.              D = date (in yyyymmdd format)
  1515.              M = memo fields (only for dBase input files; ignored on output)
  1516.  
  1517. The data fields should be in the order the fields are found in the source file.
  1518.  
  1519. Note that for fixed field files, you have to account for every byte in the file.
  1520. If you have something like this:
  1521.  
  1522.         12345678_1_2345678_2_2345678_3      (column positions)
  1523.         APPLE    X Y    12 BANANAS
  1524.  
  1525. Even though you may think you only have five fields, the following .DEF file
  1526. will NOT work:
  1527.  
  1528.         ; Bad .DEF file:  Note does not account for blank spaces
  1529.         C   8 0   8 Fruit1
  1530.         C   1 0   1 Class1
  1531.         C   1 0   1 Class2
  1532.         N   5 0   5 Value
  1533.         C  11 0  11 Fruit2
  1534.  
  1535. #
  1536. You may want the Fruit1 field to be in columns 1 through 8 and Class1 to be in
  1537. column 10 but the routine will not know to skip column 9 so it will start
  1538. reading Class1 beginning in column 9, Class2 beginning in column 10, etc.  To
  1539. drop the blank positions, you have to add dummy fields on input and ask for them
  1540. to be dropped on output:
  1541.  
  1542.         ; Good .DEF file:  Spaces between fields are accounted for
  1543.         C   8 0   8 Fruit1
  1544.         C   1 0   0 Filler
  1545.         C   1 0   1 Class1
  1546.         C   1 0   0 Filler
  1547.         C   1 0   1 Class2
  1548.         C   1 0   0 Filler
  1549.         N   5 0   5 Value
  1550.         C   1 0   0 Filler
  1551.         C  11 0  11 Fruit2
  1552.  
  1553. You can also use the input field length and output field lengths to either drop
  1554. fields using other formats (by specifying a zero length for the output field
  1555. length) or for creating fields on output (by specifying a zero length for the
  1556. input field length).  You can also use this to expand on contract a field.  For
  1557. example, if Fruit1 is 8 characters long but you only want it to occupy 4
  1558. characters on output (thus the field would be truncated), specify 8 for the
  1559. input field length and 4 for the output field length.
  1560.  
  1561. If the output field length is wider than the input field length, the data values
  1562. will be shifted right or left depending on the data type.  In general, numeric
  1563. fields are shifted right (so extra spaces show up in front of the number) and
  1564. all other field types (character, logical, or date) are shifted left.
  1565.  
  1566.  
  1567. #
  1568. # index "Parameters" "Specifying"
  1569. # index "INI file"
  1570. # index "SET PAGINATE environmental variable"
  1571. # index "Marker commands" "From the command line"
  1572. Specifying parameters:
  1573.  
  1574. Parameters for this program can be set in the following ways.  The last setting
  1575. encountered always wins:
  1576.   - Read from an *.INI file (see BRUCEINI.DOC file),
  1577.   - Through the use of an environmental variable (SET PAGINATE=whatever), or
  1578.   - From the command line (see "Syntax" below)
  1579.  
  1580. In most cases, the marker commands themselves can be passed in at the command
  1581. line or through one of the other methods specified above.  The only difference
  1582. is that the marker commands then begin with "/" instead of (by default) "#".
  1583. Some marker commands (like TITLE ... END) don't make sense in the command line.
  1584.  
  1585.  
  1586. # index "Character-translation file"
  1587. # index "/Linitfile parameter"
  1588. # index "Graphics characters" "Removing"
  1589. # index "Non-printable characters" "Removing"
  1590. # index "Characters" "Removing"
  1591. # index "(NONE) replacement"
  1592. # index "/Iinitfile parameter"
  1593. Character-translation file:
  1594.  
  1595. PAGINATE will process a character-translation (lookup) table if one is found.
  1596. This table can be in your standard *.INI file (for example, PAGINATE.INI) if
  1597. desired or it can be a separate file specified using the /Linitfile parameter.
  1598.  
  1599. This table allows you to replace all instances of one character in your input
  1600. file with another when you write the file out.
  1601.  
  1602. What would you use this for?  Your document might contain characters like
  1603. graphic characters.  You might have problems if you wanted to e-mail this
  1604. document to someone or print it on a printer than didn't recognize the
  1605. characters.
  1606.  
  1607. #
  1608. For example, something like:
  1609.  
  1610. # unit verbatim
  1611.          ┌─┬─┐   ╔═╦═╗
  1612.          │ │ │   ║ ║ ║
  1613.          ├─┼─┤   ╠═╬═╣
  1614.          │ │ │   ║ ║ ║
  1615.          └─┴─┘   ╚═╩═╝
  1616. # end
  1617.  
  1618. looks great on the screen but it might print out horribly.
  1619.  
  1620. If you want, you can tell PAGINATE to do a one-for-one character replacement on
  1621. any characters.  This is done through the character-translation file.  This
  1622. file, which can be embedded in the standard PAGINATE.INI file, consists of a
  1623. series of lines in the following format:
  1624.  
  1625.         inchar = outchar
  1626.  
  1627. where "inchar" is the character to change from and "outchar" is what to change
  1628. the character to.  Both portions can consist of regular non-space ASCII text
  1629. characters (like "A" or "z") as well as hexadecimal values (in the form &Hxx) or
  1630. decimal values (in the form \nnn).  (See the BRUCEHEX.DOC file.) To remove a
  1631. character entirely, assign it the value of (NONE).  You cannot use a space or
  1632. equal sign in either "inchar" or "outchar"; use the hexadecimal or decimal
  1633. representations instead.  The table does not have to be in any specified order.
  1634. Lines can end with "/*" followed by a comment if you want.  Examples:
  1635.  
  1636.         \186 = |     /* ║ becomes |
  1637.         \205 = -     /* ═ becomes -
  1638.         \206 = +     /* ╬ becomes +
  1639.         \027 = (NONE)  /* Remove excape characters entirely
  1640.  
  1641. Since lines beginning with "/" are treated as command-line defaults, you must
  1642. use \047 or &H2F if you want to override the definition of "/".
  1643.  
  1644. NOTE:  If a character-translation file is specified, all instances of Alt-0
  1645. will be removed from the resulting file.  (This is how the program
  1646. handles replacements with (NONE)).  Redefine \000 as \032 or something if you
  1647. want to keep them.
  1648.  
  1649. # index "Alt-255 key" "Removing"
  1650. Note that Alt-255 is automatically translated to Alt-32 (regular space)
  1651. even if character-translation table is used.  Alt-255 is used internally by
  1652. the program to handle things like bullets and such.  It is also the recommended
  1653. character to use to avoid certain combinations of words from wrapping.
  1654.  
  1655. Blank lines or those beginning with the following are ignored as comments:
  1656.  
  1657.         ;    (semi-colon)
  1658.         :    (colon)
  1659.         '    (quote)
  1660.  
  1661. # index "PAGNOASC.INI"
  1662. The lookup tables can also be read from a different table specified by the
  1663. /Linitfile parameter.  Use the enclosed PAGNOASC.INI as your lookup file if you
  1664. want to remove all non-standard characters from your file.  Modify as necessary.
  1665.  
  1666.  
  1667. #
  1668. # index "Examples"
  1669. # index "Directories" "Multicolumn"
  1670. # index "Formatting commands" "MARKER=c" "Example"
  1671. # index "MARKER=c" "Example"
  1672. Examples:
  1673.  
  1674. This section adds some examples of how you can use PAGINATE.  I'll add to it
  1675. over time.
  1676.  
  1677. Multicolumn Directories:  You want to generate a multicolumn listing of
  1678. directories which are sorted going down the page instead of across the page
  1679. like "DIR /W" does.  PAGINATE can handle this fairly easily.
  1680.  
  1681. Create a control file called C:\DIRW.CTL with these statements (the SETUP and
  1682. RESET statements work for Hewlett-Packard printers to put you into compressed
  1683. mode):
  1684.  
  1685.         #WIDTH 132
  1686.         #SETUP "\027E"
  1687.         #RESET "\027E\027(s16.66H"
  1688.         #MULTICOLUMN 7
  1689.         #MARKER=*
  1690.  
  1691. If you don't want it to be in a compressed mode, use the following control file:
  1692.  
  1693.         #WIDTH 80
  1694.         #MULTICOLUMN 5
  1695.         #MARKER=*
  1696.  
  1697. (The #MARKER=* is in there because a number of shareware companies have
  1698. gotten into using weird characters as the first letter of the file name to
  1699. make sure the file sorts higher in an alphabetical list.  Several programs
  1700. may begin with a pound sign but none can begin with an asterisk.)  Then create a
  1701. batch file called DIRW.BAT:
  1702.  
  1703.         DIR /ON > TEMP.TXT
  1704.         PAGINATE TEMP.TXT TEMP.OUT /CC:\DIRW.CTL /OVERWRITE
  1705.         DEL TEMP.TXT
  1706.  
  1707. This will route your directory to a disk file and rewrite it as TEMP.OUT in a
  1708. multicolumn format with printer controls.
  1709.  
  1710.  
  1711. # index "Windows" "Long-line files"
  1712. # index "Lines" "Wrapping long ones"
  1713. # index "Notepad" "Converting from"
  1714. Those long-line things you get from writing out the file from Windows:  You've
  1715. done this.  You ask for a text file.  They've created it using the Windows
  1716. notepad.  You look at it and the lines scroll endlessly--one line per paragraph.
  1717. How are you supposed to print that?!
  1718.  
  1719. Simple.  Let's say the file name is NOTEPAD.TXT.  Just issue the following
  1720. command:
  1721.  
  1722.         PAGINATE NOTEPAD.TXT /ALIGN /WIDTH=80
  1723.  
  1724.  
  1725. #
  1726. # index "Syntax"
  1727. Syntax:
  1728.  
  1729. # unit
  1730. # verbatim
  1731.     PAGINATE [ filespec | @listfile ] [ outfile ] [ /Cctlfile ] [ /DEBUG ]
  1732.       [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ]
  1733.       [ /marker command ]...
  1734.       [ /EXT=.xxx ] [ /P ] [ /BEEP ] [ /MONO ]
  1735.       [ /Iinitfile | /-I ] [ /Linitfile ] [ /? ] [ /?&H ]
  1736. # end
  1737.  
  1738. where:
  1739.  
  1740. # index "Filespec parameter"
  1741. # index "Files" "Input"
  1742. "filespec" tells the routine which file or files are to be processed.  It can
  1743. include path information if desired.  It can also include standard DOS wildcards
  1744. as long as an output file is not specified.  The input files can contain INCLUDE
  1745. statements to add in other files to process.  If no input specification
  1746. (filespec or @listfile) is provided, you'll be prompted for one.
  1747.  
  1748. # index "@listfile parameter"
  1749. # index "Files" "Input"
  1750. "@listfile" allows you to have a variety of file specifications saved in a text
  1751. file named "listfile".  Each line in the file should consist of one file
  1752. specification, each of which can include a path and wildcards if desired.  Blank
  1753. lines and lines beginning with semi-colons, colons, or quotes are ignored.  If
  1754. no input specification (filespec or @listfile) is provided, you'll be prompted
  1755. for one.
  1756.  
  1757. # index "Outfile parameter"
  1758. "outfile" specifies the name of the output file that is to contain the resulting
  1759. text.  By default, the output file name will be the name of the input file with
  1760. a .PAG extension.  (The default .PAG extension can be overridden using the
  1761. "/EXT=.xxx" parameter.)
  1762.  
  1763. # index "Ctlfile parameter"
  1764. # index "/Cctlfile parameter"
  1765. "/Cctlfile" is basically the same thing as the infile but it typically contains
  1766. only marker commands.  For example, you might have a straight text file
  1767. contained in "infile" and then use the "ctlfile" to say how that text file
  1768. should be processed.
  1769.  
  1770. # index "/DEBUG parameter"
  1771. "/DEBUG" is used for debugging purposes.  You might use it when you get an
  1772. error message that doesn't clearly tell you where the error occurred.  /DEBUG
  1773. will show you the text as it's processed and let you see what's actually being
  1774. processed and written.
  1775.  
  1776. # index "/OVERWRITE parameter"
  1777. "/OVERWRITE" says to overwrite the output file if it exists already.
  1778.  
  1779. # index "/-OVERWRITE parameter"
  1780. "/-OVERWRITE" says to abort if the output file exists already.
  1781.  
  1782. # index "/APPEND parameter"
  1783. "/APPEND" says to append (add) to the output file if it exists already.  This
  1784. option is only available if you're creating either a fixed-field or ASCII-
  1785. delimited output file.
  1786.  
  1787. # index "/OVERASK parameter"
  1788. "/OVERASK" says to ask if the output file exists already.  This is initially
  1789. the default.
  1790.  
  1791. "/marker command" allows you to specify one or more marker commands.  These are
  1792. spelled out in this documentation.  Note that not all marker commands can appear
  1793. in the command line whereas all marker commands can instead be embedded in
  1794. either the control file or the document itself.
  1795.  
  1796. # index "/EXT=.xxx parameter"
  1797. "/EXT=.xxx" allows you to specify a different default file extension for the
  1798. output file.  This parameter only matters if you do not explicitly specify an
  1799. output file name.  The default value is "/EXT=.PAG".
  1800.  
  1801. #
  1802. # index "/PAUSE parameter"
  1803. # index "/P parameter"
  1804. "/P" (or "/PAUSE") waits for you to press ENTER if there is a compilation error
  1805. and then returns you to DOS.  This is useful if you're using PAGINATE to process
  1806. a whole series of files.  The default value is "/-P" ("/-PAUSE").
  1807.  
  1808. # index "/-PAUSE parameter"
  1809. # index "/-P parameter"
  1810. "/-P" (or "/-PAUSE") says to return to DOS without prompting you if there is a
  1811. compilation error.  This is initially the default.
  1812.  
  1813. # index "/BEEP parameter"
  1814. "/BEEP" says to sound a tone when the program is finished executing.  The
  1815. default value is "/-BEEP".
  1816.  
  1817. # index "/-BEEP parameter"
  1818. "/-BEEP" says to not sound a tone when the program finishes.  This is initially
  1819. the default.
  1820.  
  1821. # index "/MONO parameter"
  1822. # index "/-COLOR parameter"
  1823. "/MONO" (or "/-COLOR") does not try to override screen colors.  Initially
  1824. defaults to "/COLOR".
  1825.  
  1826. # index "/COLOR parameter"
  1827. # index "/-MONO" parameter"
  1828. "/COLOR" (or "/-MONO") allows screen colors to be overridden.  This is initially
  1829. the default.
  1830.  
  1831. # index "/Iinitfile parameter"
  1832. "/Iinitfile" says to read an initialization file with the file name "initfile".
  1833. The file specification *must* contain a period.  Initfiles are described in the
  1834. BRUCEINI.DOC file.  Initially defaults to "/IPAGINATE.INI".
  1835.  
  1836. # index "/-I parameter"
  1837. # index "/INULL parameter"
  1838. "/-I" (or "/INULL") says to skip loading the initialization file.
  1839.  
  1840. # index "/Linitfile parameter"
  1841. "/Linitfile" says that the "Character-translation table" codes are found in a
  1842. file other than from the default "/Iinitfile" file.  This is primarily useful if
  1843. you want to have a master *.INI file and a separate code lookup table.
  1844. PAGNOASC.INI is provided as one sample character-translation table.  It removes
  1845. all graphics and other possibly non-printable characters from the output file.
  1846.  
  1847. # index "/? parameter"
  1848. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  1849.  
  1850. # index "/?&H parameter"
  1851. "/?&H" gives you a hexadecimal and decimal conversion table.
  1852.  
  1853.  
  1854. #
  1855. # index "Return codes"
  1856. # index "ERRORLEVEL codes"
  1857. Return codes:
  1858.  
  1859. PAGINATE returns the following ERRORLEVEL codes:
  1860.  
  1861.         0 = no problems
  1862.       254 = errors encountered in processing input files
  1863.       255 = syntax problems or /? requested
  1864.  
  1865.  
  1866. # index "Guthrie, Bruce"
  1867. # index "Wayne Software"
  1868. # index "bguthrie@nmaa.org"
  1869. # index "e-mail contact"
  1870. # index "Author"
  1871. Author:
  1872.  
  1873. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  1874. and redistribution provided relevant documentation is kept with the program, no
  1875. changes are made to the program or documentation, and it is not bundled with
  1876. commercial programs or charged for separately.  People who need to bundle it in
  1877. for-sale packages must pay a $50 registration fee to "Wayne Software" at the
  1878. following address.
  1879.  
  1880. Additional information about this and other Wayne Software programs can be found
  1881. in the file BRUCE.DOC which should be included in the original ZIP file.  The
  1882. recent change history for this and the other programs is provided in the
  1883. HISTORY.ymm file which should be in the same ZIP file where "y" is replaced by
  1884. the last digit of the year and "mm" is the two digit month of the release;
  1885. HISTORY.611 came out in November 1996.  This same naming convention is used in
  1886. naming the ZIP file (PAGINymm.ZIP) that this program was included in.
  1887.  
  1888. Comments and suggestions can also be sent to:
  1889.  
  1890.                 Bruce Guthrie
  1891.                 Wayne Software
  1892.                 113 Sheffield St.
  1893.                 Silver Spring, MD 20910
  1894.  
  1895.                 fax: (301) 588-8986
  1896.                 e-mail: bguthrie@nmaa.org
  1897.                 http://www.geocities.com/SiliconValley/Lakes/2414
  1898.  
  1899. Please provide an Internet e-mail address on all correspondence.
  1900.  
  1901. # title center width=79
  1902. PAGINATE Index                      ^B%3%                       Revised: ^A
  1903.  
  1904. # end
  1905. #
  1906. # multicolumn 2
  1907. # include index
  1908. # end
  1909.