Declaration of INDEXED file



Hi,

I'm trying to code a small program to work with a indexed file by means
of the Compaq (HP) Cobol on VMS. Here is what happens when compiling.
Any idea what I did wrong here? I was quite sure that this is the right
way to define an indexed file, it is also correct according to the
user's manual. Does anyone know what the compiler complains about
exactly? TIA.

[...]
FILE-CONTROL.
SELECT ACCFILE ASSIGN TO "ACC.DAT"
1
%COBOL-F-REANOLCLH, (1) INVALID KEY clause, AT END clause, or USE
procedure required for READ on file
%COBOL-F-WRINOLCLH, (1) INVALID KEY clause or USE procedure required for
WRITE on file
%COBOL-F-REWNOLCLH, (1) INVALID KEY clause or USE procedure required for
REWRITE on file
%COBOL-F-DELNOLCLH, (1) DELETE on file requires INVALID KEY clause or
USE procedure

ORGANIZATION IS INDEXED
ACCESS MODE IS RANDOM
RECORD KEY IS ACC-KEY
FILE STATUS IS W-FILE-STATUS.

DATA DIVISION.
FILE SECTION.
FD ACCFILE LABEL RECORD IS STANDARD.
01 ACC-REC.
05 ACC-KEY.
10 ACC-YEAR PIC 9(04).
10 ACC-NBR PIC 9(04).
05 [...]

WORKING-STORAGE SECTION.
01 W-FILE-STATUS PIC X(02).
[...]

Further down e.g. the READ is coded like: "READ ACCFILE INVALID KEY MOVE
"F" TO W-KZ.


.



Relevant Pages

  • Re: Declaration of INDEXED file
    ... > I'm trying to code a small program to work with a indexed file by means ... > %COBOL-F-REANOLCLH, INVALID KEY clause, AT END clause, or USE ... > Further down e.g. the READ is coded like: "READ ACCFILE INVALID KEY MOVE ...
    (comp.lang.cobol)
  • Re: Declaration of INDEXED file
    ... > I'm trying to code a small program to work with a indexed file by means ... > %COBOL-F-REANOLCLH, INVALID KEY clause, AT END clause, or USE ... > Further down e.g. the READ is coded like: "READ ACCFILE INVALID KEY MOVE ...
    (comp.lang.cobol)