4. CA MICS Facilities › 4.6 Documentation Programs › 4.6.3 Document Program Documentation
4.6.3 Document Program Documentation
DOCUMENT is a formatting and print program for producing
documents with one or two columns of text per page. It is
written in SAS and is intended to read the text file produced
by DOCPICK. DOCUMENT reads this file, produces tables of
contents for the document, and does formatting under the
control of dollar command records. Documentation for DOCPICK
and for the set of allowable dollar commands is contained in
Sections 4.6.1 and 4.6.2.
The files used by DOCUMENT are as follows:
TEXT
This input file contains the text file created by
DOCPICK. This file is a sequential stream of text and
dollar commands.
TOC
This temporary file is created by DOCUMENT to store the
tables of contents. It is later read by DOCUMENT if the
tables of contents are requested.
REPORT
This output file contains the final version of the
document, complete with tables of contents if requested.
NOTE: Since DOCUMENT is a SAS program, it also requires all
the files normally required by SAS.
OVERVIEW OF PROGRAM OPERATION
The program is divided into three phases. Phase one reads
the text file and builds the three types of tables of
contents (general, detailed, and figures). They are written
to three SAS files: GENTOC, DETTOC, and FIGTOC.
Phase two reads the three tables of contents and writes an OS
data set containing all three. This file has the same format
as any short text member.
Phase three reads the text file again. It processes the $
control records encountered in the file and takes the action
requested by the record (e.g., skipping lines, starting new
columns, etc.). In addition, the third phase inserts the
tables of contents if a $$TOC card is encountered and formats
the text. The formatting may be for one or two columns to a
page for the short text members.
JCL FOR EXECUTION
DOCUMENT is usually executed after DOCPICK. A sample of the
JCL needed for both programs is contained in the MICSDOC
PROC.