COBOL Manual for TNS/E Programs (H06.03+)
Run-Time Diagnostic Messages
HP COBOL Manual for TNS/E Programs—520347-003
48-52
Message List
•
The specifications in the OPEN statement, or the attributes derived during the
open operation by some other means (such as from an applicable command
interpreter ASSIGN command), conform to:
°
The open mode is INPUT or OUTPUT.
°
The exclusion mode is EXCLUSIVE if OPEN OUTPUT is specified.
°
The exclusion mode is PROTECTED if OPEN INPUT is specified.
233
Cause. OPEN OUTPUT file name SHARED was specified, and another process had
the file open (in any exclusion mode).
Effect. The OPEN statement is unsuccessful with I-O status error 30 and
GUARDIAN-ERR 12.
Recovery. If you do not want to delete all of the information in the file, change the
OPEN statement to
OPEN I-O file-name SHARED
and if necessary, specify OPTIONAL in the SELECT clause for the file.
If you do want to delete all of the information in the file, add a null Declarative Portion
for this file to the program, recompile it (to allow the run unit to continue), and change
the code to something like this:
PERFORM WITH TEST AFTER UNTIL file-status (1: 1) = "0"
OPEN OUTPUT the-file SHARED
IF file-status (1: 1) NOT = "0"
IF file-status = "30"
AND GUARDIAN-ERR = 12
(count these, send a message, or take other
appropriate action)
ENTER TAL "DELAY" USING some-time
ELSE
(issue some other error and terminate
program)
END-IF
END-IF
END-PERFORM
where file-status appears in the FILE STATUS clause in the SELECT clause, and
some-time is the number of 0.01-second intervals to delay.
Each occurrence of this error produces a message on the home terminal or in the
execution log.
OPEN OUTPUT SHARED specified for open disk file










