Re: Declaration of INDEXED file



NO! Show us ALL the READs, ALL the REWRITEs and ALL the DELETEs. The output
from $SEARCH would be just peachy!

Honestly Volker you're one of the (many superlatives (No. 1 being
"lazyiest")) VAX COBOL programmers I've seen.

Just pay the money and get someone in who knows what they're doing. (Or just
could be arsed looking up a manual)

Regards Richard Maher.

PS. I wonder what happens if you don't have an INVALID KEY on a read and
don't have a DECLARATIVES section for the file?

"Volker" <envo_nutznetz@xxxxxxxxxxxxxxxx> wrote in message
news:d9oikn.2rg.1@xxxxxxxxxxxxxxxxxxxxxxxxx
> 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.
>
>


.