Hi.
Having a tough time understanding why I am getting the following syntax error. I am using Microsoft Cobol Compiler v2.2.
Invalid SELECT sentence. C:\temp\test.txt
Unrecognizable element is ignored C:\temp\test.txt
Here is the small program I am trying to get a clean compile on....this is the only error I have left. Any help would be appreciated!
Thanks.
Gino.
IDENTIFICATION DIVISION.
PROGRAM-ID. SCROCCUR.
AUTHOR. Gino Fremani.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT IN-FILE ASSIGN 'C:\TEMP\TEST.TXT'.
DATA DIVISION.
FILE SECTION.
FD IN-FILE
LABEL RECORDS ARE STANDARD.
01 INPUT-REC.
05 ID-IN PIC XXXX.
05 NAME-IN PIC X(20).
WORKING-STORAGE SECTION.
01 INDICATORS.
05 EOF-IND PIC XXX VALUE "NO ".
01 RESPONSES.
05 SCR-RESP-WS PIC X VALUE SPACES.
05 CUR PIC 99 VALUE 4.
05 CT PIC 9 VALUE 0.
SCREEN SECTION.
01 DATA-SCREEN.
05 HDR-INFO.
10 VALUE "DATA SCREEN" BLANK SCREEN
LINE 01 COLUMN NUMBER is PLUS 30.
10 VALUE "ID #" LINE 03 COLUMN NUMBER IS PLUS 12.
10 VALUE "NAME" LINE 03 COLUMN NUMBER IS PLUS 17.
05 INFO-SCR-IN.
10 ID-ON-SCR-IN LINE 04 COLUMN NUMBER IS PLUS 12
PIC XXXX FROM ID-IN.
10 NAME-ON-SCR-IN LINE 04 COLUMN NUMBER IS PLUS 17
PIC X(20) FROM NAME-IN.
05 RESP-INFO.
10 VALUE "C - TO CONTINUE"
LINE 16 COLUMN NUMBER IS PLUS 30.
10 VALUE "Q - TO QUIT"
LINE 17 COLUMN NUMBER IS PLUS 30.
10 VALUE "ENTER CHOICE:"
LINE 19 COLUMN NUMBER IS PLUS 30.
10 RESPONSE-SCR
LINE 19 COLUMN NUMBER IS PLUS 45
PIC X TO SCR-RESP-WS.
PROCEDURE DIVISION.
MAINLINE.
PERFORM A-100-INITIALIZE.
PERFORM B-100-PROCESS.
PERFORM C-100-TERMINATE.
STOP RUN.
A-100-INITIALIZE.
OPEN INPUT IN-FILE.
B-100-PROCESS.
READ IN-FILE
AT END
MOVE "YES" TO EOF-IND.
PERFORM B-200-LOOP
UNTIL EOF-IND = "YES" OR SCR-RESP-WS = "Q".
B-200-LOOP.
MOVE 4 TO CUR.
MOVE 0 TO CT.
DISPLAY HDR-INFO.
PERFORM B-300-SETUP
UNTIL CT > 4 OR EOF-IND = "YES" OR SCR-RESP-WS = "Q".
DISPLAY RESP-INFO.
ACCEPT RESP-INFO.
B-300-SETUP.
ADD 1 TO CUR.
ADD 1 TO CT.
DISPLAY INFO-SCR-IN.
READ IN-FILE
AT END
MOVE "YES" TO EOF-IND.
C-100-TERMINATE.
CLOSE IN-FILE.
Having a tough time understanding why I am getting the following syntax error. I am using Microsoft Cobol Compiler v2.2.
Invalid SELECT sentence. C:\temp\test.txt
Unrecognizable element is ignored C:\temp\test.txt
Here is the small program I am trying to get a clean compile on....this is the only error I have left. Any help would be appreciated!
Thanks.
Gino.
IDENTIFICATION DIVISION.
PROGRAM-ID. SCROCCUR.
AUTHOR. Gino Fremani.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT IN-FILE ASSIGN 'C:\TEMP\TEST.TXT'.
DATA DIVISION.
FILE SECTION.
FD IN-FILE
LABEL RECORDS ARE STANDARD.
01 INPUT-REC.
05 ID-IN PIC XXXX.
05 NAME-IN PIC X(20).
WORKING-STORAGE SECTION.
01 INDICATORS.
05 EOF-IND PIC XXX VALUE "NO ".
01 RESPONSES.
05 SCR-RESP-WS PIC X VALUE SPACES.
05 CUR PIC 99 VALUE 4.
05 CT PIC 9 VALUE 0.
SCREEN SECTION.
01 DATA-SCREEN.
05 HDR-INFO.
10 VALUE "DATA SCREEN" BLANK SCREEN
LINE 01 COLUMN NUMBER is PLUS 30.
10 VALUE "ID #" LINE 03 COLUMN NUMBER IS PLUS 12.
10 VALUE "NAME" LINE 03 COLUMN NUMBER IS PLUS 17.
05 INFO-SCR-IN.
10 ID-ON-SCR-IN LINE 04 COLUMN NUMBER IS PLUS 12
PIC XXXX FROM ID-IN.
10 NAME-ON-SCR-IN LINE 04 COLUMN NUMBER IS PLUS 17
PIC X(20) FROM NAME-IN.
05 RESP-INFO.
10 VALUE "C - TO CONTINUE"
LINE 16 COLUMN NUMBER IS PLUS 30.
10 VALUE "Q - TO QUIT"
LINE 17 COLUMN NUMBER IS PLUS 30.
10 VALUE "ENTER CHOICE:"
LINE 19 COLUMN NUMBER IS PLUS 30.
10 RESPONSE-SCR
LINE 19 COLUMN NUMBER IS PLUS 45
PIC X TO SCR-RESP-WS.
PROCEDURE DIVISION.
MAINLINE.
PERFORM A-100-INITIALIZE.
PERFORM B-100-PROCESS.
PERFORM C-100-TERMINATE.
STOP RUN.
A-100-INITIALIZE.
OPEN INPUT IN-FILE.
B-100-PROCESS.
READ IN-FILE
AT END
MOVE "YES" TO EOF-IND.
PERFORM B-200-LOOP
UNTIL EOF-IND = "YES" OR SCR-RESP-WS = "Q".
B-200-LOOP.
MOVE 4 TO CUR.
MOVE 0 TO CT.
DISPLAY HDR-INFO.
PERFORM B-300-SETUP
UNTIL CT > 4 OR EOF-IND = "YES" OR SCR-RESP-WS = "Q".
DISPLAY RESP-INFO.
ACCEPT RESP-INFO.
B-300-SETUP.
ADD 1 TO CUR.
ADD 1 TO CT.
DISPLAY INFO-SCR-IN.
READ IN-FILE
AT END
MOVE "YES" TO EOF-IND.
C-100-TERMINATE.
CLOSE IN-FILE.