HP 3000 Manuals

Ch 4. LANGUAGES [ COMMUNICATOR 3000/XL XL RELEASE 3.0 ] MPE/iX Communicators


COMMUNICATOR 3000/XL XL RELEASE 3.0

Chapter 4  LANGUAGES 

HP COBOL II/XL Enhancements 

by Jan Merrill 
Systems Technology Division 

This version of the HP COBOL II/XL compiler has been enhanced with
several new features and improvements.  Two of the features are HP
extensions to ANSI COBOL'85.  These features are similar to corresponding
features documented in the X/Open Portability Guide Issue 3.  The third
improvement provides better reporting of nonstandard COBOL features when
you use the $CONTROL STDWARN compiler option.  For more information on
these new enhancements, refer to the related article in the "Technical
Articles" section in this Communicator.

DYNAMIC FILE ASSIGNMENT 

With the new dynamic file assignment enhancement of the HP COBOL II/XL
compiler, you can assign logical files to physical files or devices at
run time.  For example, you can write a utility program that processes a
list of file names, or a menu program that processes files selected by
the user at run time.  The file assignment can be changed during the
course of program execution.

SPECIAL REGISTER FOR INTERPROGRAM COMMUNICATION 

The HP COBOL II/XL compiler includes a new special register that can be
set in a called program and referenced by the invoking program.  The
invoking program can access the special register by calling the
subprogram with the GIVING phrase.  The special register, called
RETURN-CODE, is defined as PICTURE S9(9) BINARY. The special register
allows you to use a COBOL subprogram as a function, similar to an HP
Pascal or HP C function.

IMPROVED REPORTING OF NONSTANDARD COBOL FEATURES 

The $CONTROL STDWARN compiler option requests that the compiler detect
and flag HP extensions to standard COBOL. These are features in your
source file that are part of COBOL II, but are not part of one of three
levels of Federal Standard COBOL (FIPS). For any nonstandard COBOL
features, the compiler displays warning messages with message numbers in
the range 500 to 899.  The compiler was modified to accurately indicate
the line number, sequence number, and column number of the first letter
of the word or phrase detected as a nonstandard feature.  The compiler
also flags occurrences of the two new enhancements included in this
version of the compiler.



MPE/iX Communicators