All VMRGRW control statements follow these general rules:
- VMRGRW differs from other report writers in that it uses a free format. This means that statements in a VMRGRW control file are not required to begin or end in specific columns. A single statement can span more than one line without the use of a continuation character.
- The VMRGRW control file must be a fixed-length file with a record length of 80.
- Each VMRGRW control statement must start with the name of the control statement--FILE, COMPUTE, and so on. For a complete list of VMRGRW control statements, see Control File Statement Summary.
- Each statement must start on a new line.
- Each statement must end with a period.
- Commas (,) and equal signs (=) are ignored by VMRGRW and can be used anywhere in a statement to increase clarity.
- Literals and constants are always enclosed in single quotation marks (' ').
- A hexadecimal literal is coded as a literal string with a leading X (for example, X'010203').
- A statement with an asterisk in column 1 is a comment. VMRGRW ignores the rest of the line.
- In statements where you can define a field type, select one from the following table of valid field types.
Type | Maximum Length | Comments |
A/N | 256 bytes | Alphanumeric |
BINP | 4 bytes | Binary always positive |
BINS | 4 bytes | Binary signed |
BIT | 8 bytes | Binary. Available to the BIT test statement |
P/D | 8 bytes | Packed decimal |
P/N | 7 bytes | Packed decimal, no sign nibble |
Z/D | 16 bytes | Zoned decimal |
- All field names, except those you create or define, are from the appropriate product data definition tables.
- You can define up to 300 fields with DEFINE and REDEFINE statements. This limit applies to the total number of predefined fields built into VMRGRW plus any fields you have defined or redefined.
- There are three predefined date format fields:
Field | Format | Description |
TODAY | mm/dd/yy | Eight-byte character field containing the current date |
C5JULIAN | yyyyddd | Four-byte character field containing the current Julian date |
P5JULIAN | yyyyddd | Four-byte packed decimal field containing the current Julian date |