View previous topic :: View next topic
|
Author |
Message |
sureshmurali Warnings : 1 New User
Joined: 25 Nov 2010 Posts: 70 Location: Sivakasi, India
|
|
|
|
Hi
This is my COBOL program :
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. PRGM1.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT FILE1 ASSIGN TO DDNAME1.
DATA DIVISION.
FILE SECTION.
FD FILE1.
LABEL RECORDS ARE STANDARD.
BLOCK CONTAINS 6 RECORDS.
01 REC1 PIC IS X(80).
WORKING-STORAGE SECTION.
01 FLAG PIC IS X(1) VALUE IS 'N'.
88 EOF VALUE 'Y'.
01 GRP1.
05 VAR1 PIC IS X(80).
PROCEDURE DIVISION.
OPEN INPUT FILE1.
PERFORM UNTIL EOF
READ FILE1 AT END MOVE 'Y' TO FLAG
NOT END DISPLAY REC1
END-READ
END-PERFORM.
CLOSE FILE1.
STOP RUN. |
While compiling this program, i am getting MAXCC = 12 with the following msgs.
"LABEL" was invalid. Scanning was resumed at the next area "A" item, level-number, or the start of the next clause.
"BLOCK" was invalid. Scanning was resumed at the next area "A" item, level-number, or the start of the next
clause.
The purpose of adding these statements was, i was told by my friend that " if the file was initially created with the DCB parameter BLKSIZE=400 bytes and if we refer this file in our COBOL prgm and include BLOCK CONTAINS 6 RECORDS for it (6 * 80 = 480 bytes-which is more than the actual block size in which with the file was created initially), there will be an error". To test this i was trying to write this. But above was the error.
This is the version i am using :
IBM Enterprise COBOL for z/OS 4.2.0
Please clarify
Thanks |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
sureshmurali wrote: |
Hi
This is my COBOL program :
FD FILE1.
LABEL RECORDS ARE STANDARD.
BLOCK CONTAINS 6 RECORDS.
While compiling this program, i am getting MAXCC = 12 with the following msgs.
"LABEL" was invalid. Scanning was resumed at the next area "A" item, level-number, or the start of the next clause.
"BLOCK" was invalid. Scanning was resumed at the next area "A" item, level-number, or the start of the next
clause.
|
RTFM
You have extra periods that are causing the error messages. Remove the period after FILE1 and STANDARD then try again. [/b] |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
also code BLOCK CONTAINS 0 RECORDS Then the requirement will be satisfied by the blocksize of the INPUT FILE1 |
|
Back to top |
|
|
|