Throughout this book, the following notation is used to describe the format of COBOL statements:
it is an indication that the material is mandatory for ANSI'74 COBOL (American National Standards Institute publication X3.23-1974) but may be optionally omitted as an extension to that language specification. The symbol adjacent to the box or appearing in the margin indicates the dialects of COBOL in which that material is optional. See rule 12 for further details on dialect features.
In the General Formats, the ellipsis represents the position at which repetition may occur at the user's option. The portion of the format that may be repeated is determined as follows:
Given ... in a clause or statement format, scanning right to left, determine the } or ] immediately to the left of the ...; continue scanning right to left and determine the logically matching { or [; the ... applies to the words between the determined pair of delimiters.
The only distinction Micro Focus COBOL makes between COBOL/370 and IBM VS COBOL II is that for the procedure-pointer format, the default length is eight bytes rather than four bytes.
To help you keep to the appropriate dialect - that of your target system - this book shows the dialects in which each feature appears. In the text, features outside ANS X3.23-1974 are in separate paragraphs, with a symbol indicating the dialect at the start of the paragraph. Where a complete section is a separate dialect, the heading of the section is followed by a symbol in a paragraph by itself. A phrase which is part of a separate dialect is separated out into a paragraph on its own, marked as indicated above. In syntax diagrams, features outside ANS X3.23-1974 are enclosed in boxes, with symbols adjacent to the boxes or in the margin.
The symbols used are as follows:
These bubbles reflect support only for a particular syntax and its semantics. You have to use Compiler directives to effect a set of reserved words associated with a particular dialect. See the appendix Reserved Words in this book and your Compatibility Guide, if your COBOL system has one, for a list of the reserved words for various dialects.
Thus, for example, if you are developing a program for use on IBM OS/VS COBOL, you can use the unmarked features plus any marked OSVS; while if developing solely for your COBOL environment you can use any feature. If you supply the FLAG Compiler directive when you invoke the system software, your COBOL system software flags any features outside the given dialect. You can also use the FLAGAS Compiler directive to turn flagging messages into error messages.
Extra reserved words needed by features outside ANS X3.23-1985 are reserved only when the appropriate dialect-control directive is present; this means you can ensure that only the words reserved in the specified dialect are reserved on your target system. If you use only features that need no extra reserved words, and whose effects are the same in all dialects, you need not specify a dialect-control directive.
The dialect-control directive specifying the ANS X3.23-1985 dialect also causes the few ANS 3.23-1974 features not allowed in ANS X3.23-1985 to be flagged with a warning message.