HP 3000 Manuals

HP COBOL II/iX Enhancement [ COMMUNICATOR 3000 MPE/iX Release 5.0 (Core Software Release X.50.20) ] MPE/iX Communicators


COMMUNICATOR 3000 MPE/iX Release 5.0 (Core Software Release X.50.20)

HP COBOL II/iX Enhancement 

Julia Rodriguez 
Computer Languages Operation 

File Status 48 For Write to ACCESS SEQUENTIAL File 

With the version of HP COBOL II/iX A.04.09, the run-time library more
fully conforms to the ANSI'85 Standard when the ANSI85 entry point is
used.  If a WRITE to an ACCESS SEQUENTIAL file opened in I/O mode is
detected, the run-time library returns a File Status 48 and aborts the
program with the following error message:

     FILE NOT OPENED or MODE INCORRECT [47,48,49,9x] WRITE (COBERR 638)

If you intend to replace a record in the file using a WRITE statement
following a valid READ, use the REWRITE statement for an ACCESS
SEQUENTIAL file opened in I/O mode.  If you intend to add records to the
file, you should open the file for EXTEND or use ACCESS DYNAMIC.

Compatibility With Older Programs 

An extension to HP COBOL II/iX has allowed a WRITE to an ACCESS
SEQUENTIAL file opened in I/O mode.  This extension was a COBOL'68
feature carried over to HP COBOL II, and allows you to read and write to
a terminal.  The use of this extension is not recommended.

The operation of the extension is defined as follows:

   *   If the last operation was a successful READ on a direct access
       device, the run-time library replaces the WRITE statement with a
       REWRITE statement and continues processing.

   *   If a successful READ operation did not precede the WRITE, the
       WRITE statement is not altered.  The WRITE will add records to the
       file for indexed files and terminal output devices.

The extension to allow a WRITE to an ACCESS SEQUENTIAL file opened in I-O
mode will continue to operate exactly as before if the extension is
turned on.  There are three methods you can use to turn on this extension
to ensure compatibility with older programs.  The first method requires
no recompilation of source programs.  The second method requires
recompilation but allows the use of 1985 COBOL standard features, except
the new status codes.  The third method requires recompilation and
restricts the user to 1974 standard features.

These methods are:

   1.  Set the COBRUNTIME character position 10 to W. The run-time error
       handler has been enhanced to process the illegal WRITEs according
       to the setting of the COBRUNTIME environment variable.  Setting
       the COBRUNTIME character position 10 to W instructs the run-time
       library to use the extension.  If character position 10 is not
       set, or is set to a value other than W, the run-time library
       processes the WRITEs according to the rules for the compiler entry
       point used (ANSI74 or ANSI85).

   2.  Recompile the program using the $CONTROL STAT74 option.  The WRITE
       extension will be used.

   3.  Recompile the program using the ANSI74 entry point of the
       compiler.  The WRITE extension will be used.

Impact 

Few programs are affected by this change.  The methods to provide
compatibility do not require source code changes.
[REV BEG]

Informational Message 

Informational message number 984 has been added to tell users to break up
large paragraphs or sections.

984 

PROCEDURE ! (!) IS TOO COMPLEX FOR EFFICIENT OPTIMIZATION.

Cause      The above section or paragraph has too many statements to
           optimize in a reasonable length of time.  The second number is
           a complexity factor based on the number of statements.  Note
           that a paragraph may appear to be small but generates a high
           complexity factor due to the amount of code generated for the
           statements in that paragraph.  For example, some statements,
           such as INITIALIZE, may have a high complexity factor.
[REV END]



MPE/iX Communicators