HP 3000 Manuals

Procedure Division [ COBOL/HP-UX Language Reference for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Language Reference for the Series 700 and 800

Procedure Division 

The ACCEPT Statement 

Format 

Format 2 of the ACCEPT statement in the Nucleus is enhanced with
additional options as follows:

	       Click here to view figure.
            

Syntax Rule 

There are no restrictions on the class, category or usage of the
identifier.  However, the actual value placed into the identifier and the
validity of moving such values to the identifier are dependent on the
FROM clause.  See the General Rules for more information.

General Rules 

   1.  The value returned from the ACCEPT FROM LINE NUMBER phrase is
       always numeric.

   2.  Under the UNIX operating system, the value returned by the ACCEPT
       FROM LINE NUMBER clause denotes the device number of the terminal
       attached to standard input.  This value is unique for each login
       line and is implementation dependent.
       [REV BEG]

       Under Data General Interactive COBOL, only 2 digits are accepted;
       duplicate numbers can, therefore, arise.[REV END]

   3.  The ACCEPT FROM USER NAME option returns a user-id number on UNIX
       systems, or spaces on systems where such a concept is meaningless.

   4.  The FROM ESCAPE KEY option returns the two digit code generated by
       a termination key.

   5.  The EXCEPTION STATUS item contains a three-character code that
       identifies the type of exception condition that has occurred
       during the exception of a CALL or CALL PROGRAM statement.  Its
       PICTURE clause is 9(3).

       If EXCEPTION STATUS is to be examined this should be done
       immediately following the CALL or CALL PROGRAM statement.  There
       must be nothing between the CALL and ACCEPT FROM EXCEPTION STATUS,
       including an exception status.  File I-O operations will alter the
       exception status value making it unpredictable.

The CALL Statement 

Format 

The following format of the CALL statement is supported:

     CALL PROGRAM pgm-id-lit [USING {data-name}]...
     [ON EXCEPTION imperative-stmt]

General Rule 

This format is treated as equivalent to a CHAIN statement.

The COPY INDEXED Statement 

If you specify the DG system directive when you submit your source files
to your COBOL system, the COPY verb can be followed by the word INDEXED.
The word INDEXED is treated as documentary.

The DISPLAY Statement 

If you specify the DG system directive when you submit your source files
to your COBOL system, the behavior of the DISPLAY statement with the WITH
NO ADVANCING option is changed to be as in Data General Interactive
COBOL.

File Sharing Syntax 

If you specify the DG system directive when you submit your source files
to your COBOL system, the default lock mode for both ISAM and relative
files is MANUAL WITH LOCK ON MULTIPLE RECORDS.

The OPEN Statement 

The OPEN verb can be followed by the keyword EXCLUSIVE. It is treated as
equivalent to the WITH LOCK phrase.

The READ Statement 

The file-name and the optional word RECORD can be followed by the keyword
LOCK. It causes the READ statement to acquire a lock on the record read.

This does not apply to line sequential files.



MPE/iX 5.0 Documentation