The
-Cp compiler switch allows ACUCOBOL-GT to accept HP COBOL extensions to the ANSI 1985 Standard. These extensions are described
in the following subsections, organized in the order in which the extension occurs in a COBOL program.
The use of the
-Cp option with the ACUCOBOL-GT compiler triggers the following HP COBOL-specific behavior.
- The ACUCOBOL-GT precompiler for HP COBOL is invoked. The precompiler supports conditional compilation via these directives.
- $IF
- $SET
- $COMMENT
- $PREPROCESSOR
- $DEFINE
- $INCLUDE
Macro substitutions with parameters are supported. $CONTROL directives are not supported. However, many of the actions accomplished
by $CONTROL directives can be accomplished with ACUCOBOL-GT compiler switches. The precompiler is discussed in detail in
Preprocessor for HP COBOL.
- STRING/UNSTRING statements and relation conditions are accepted.
- The following HP COBOL extensions are accepted:
- The percent character (%) is allowed as an indicator of an octal-based numeric literal.
- HP extensions to the COPY statement, including those that copy a file from a resident library. COPY REPLACING statements within
nested Copy books are not supported.
- Special Names Paragraph switches
SW0 through
SW15
- The Special Names TOP and NO SPACE CONTROL phrases with the ADVANCING clause of the WRITE statement.
- The HP meaning of RANDOM in the File-Control paragraph
- The Procedure Division registers: CURRENT-DATE, TALLY, TIME-OF-DAY, and WHEN-COMPILED
- HP extensions to the ACCEPT statement
- HP extensions to the CALL statement
- The ENTRY statement
- The EXAMINE statement
-
The following HP COBOL extensions are not supported. These extensions are not commonly used and are largely considered to
be obsolete.
The following extensions cause ACUCOBOL-GT to issue a warning but do not cause compilation to terminate:
- COBOLLOCK
- COBOLUNLOCK
- EXCLUSIVE
- UN-EXCLUSIVE
These unsupported extensions are not recognized by the compiler and cause compilation to terminate:
- BEGINNING
- COMMON
- ENABLE
- ENDING
- FILE-LIMITS
- MORE-LABELS
- PROCESSING
- SEEK
Successful compilation results in the creation of an ACUCOBOL-GT object file that is ready for immediate execution by the
runtime. There is no link step.
Support for HP COBOL extensions and the call interface to HP COBOL system intrinsics is built directly into the ACUCOBOL-GT
compiler and runtime. ACUCOBOL-GT supports KSAM, IMAGE, and VPLUS through the HP COBOL intrinsic procedures and functions
specific to those components. KSAM can also be used with standard COBOL I/O (see section
Accessing KSAM Relative and Sequential Files). For more information about ACUCOBOL-GT support for system intrinsics, see
System Intrinsics.