[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ISO specification violation in GnuCOBOL tests?
From: |
Robert Dubner |
Subject: |
ISO specification violation in GnuCOBOL tests? |
Date: |
Thu, 29 Jun 2023 11:20:08 -0500 (CDT) |
In the 3.2-rc2 .\tests\testsuite.src\run_file.at at line 5807, there is
this test:
AT_SETUP([INDEXED SEQUENTIAL with variable records])
In that test, there is this FILE-CONTROL paragraph:
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT f ASSIGN DISK
INDEXED
RECORD KEY f-key
ACCESS RANDOM.
and there is this instruction
READ f
AT END
DISPLAY "Failed: EOF"
STOP RUN ERROR
END-READ
In both the ISO 1989-2014 specification and the IBM Language References,
READ FORMAT 1 is for sequential access, and allows the NEXT, PREVIOUS, and
AT END phrases.
The READ FORMAT2 is for random access, and allows the KEY, INVALID, and
NOT INVALID phrases.
In the GnuCOBOL programmer's guide 3.2, "7.8.31.1. Sequential READ" is
similar to FORMAT 1, and "7.8.31.2. Random READ" is similar to FORMAT 2.
In the test code, ACCESS is RANDOM, but there is an AT END phrase.
That seems contradictory. Should that not be a syntax error?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ISO specification violation in GnuCOBOL tests?,
Robert Dubner <=