Reporting > Batch Documentation Facility > Available commands > DEFINE: Specify values
  
DEFINE: Specify values
The DEFINE command specifies values that were identified in the report specification file (.RPT) that is included in the document.
Syntax
DEFINE identifier text
The identifier must the same as that in the .RPT file.
Description
In the reporting specification file, user chosen identifiers or variables can be substituted with constants before running the report, using the Define dialog from the Report menu. Each specified constant becomes the replacement for the variable that has been referenced in the report definition file.
In the command sequences of the report definition file, each variable is already specified as a value in what is called a define statement. The DEFINE command in the DCF file allows the user to change this value without actually opening and editing the report definition file. When the report is run, the new value is automatically substituted wherever the identifier is found. The content or scope of a well-designed report can often be controlled simply by changing these values. The significance of these values, however, might not be self evident without referring to the descriptions in the report definition file.
All DCF DEFINE commands are reset after any report is run. This means that all DEFINE commands that apply to a particular report must be specified directly before that report is run and if the DEFINE is required for another report, it must be specified again.
Substitutions for DEFINE commands are only done in the REPORT sequences, not in any of the other Documentation Facility command sequences.
Example
The following command sequence sets a variable “CurrentDef” to a given value “T” and then run the report with “CurrentDef” replaced by “T”.
DEFINE CurrentDef T
REPORT "Symbol Listing" { }
See also
Available commands