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:
The symbols used are as follows:
These features are extensions to ANS X3.23-1974 that appear in IBM OS/VS COBOL. | |
These features are extensions to ANS X3.23-1985 that appear in IBM VS COBOL II. | |
These features are extensions to ANS X3.23-1985 that are supported in IBM SAA AD/Cycle COBOL/370, but not in IBM VS COBOL II. | |
These features are extensions to ANS X3.23-1985 that are supported in IBM COBOL for OS/390 & V2R2, but not in IBM SAA AD/Cycle COBOL/370. | |
These features are extensions to ANS X3.23-1985 that are supported in Enterprise COBOL for z/OS, but not IBM COBOL for OS/390. | |
These features are features defined in ANS X3.23-1985 which are not supported under ANS X3.23-1974. | |
These features are extensions to ANS X3.23-1985 that appear in the X/Open CAE Specification, COBOL language (XPG-4). | |
These features are extensions to ANS X3.23-1985 that are specific to Micro Focus COBOL. | |
These features are features defined in ISO/IEC 1989:2002 which are not supported under ANS X3.23-1985. | |
These Micro Focus COBOL features are only supported under the Microsoft .NET managed CLR platform. These features may be referred to as COBOL for .NET or NET COBOL. | |
These Micro Focus COBOL features are only supported under the JVM managed platform. These features may be referred to as COBOL for JVM or JVM COBOL. |
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.
In the following example, the ID element is valid with OSVS, VSC2 and Micro Focus COBOL dialects:
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.