View previous topic :: View next topic
|
Author |
Message |
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
Code: |
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT KFIL70T-UNF
ASSIGN SYS012
FILE STATUS wKFIL70T.
WORKING-STORAGE SECTION.
01 wS-file-Status.
10 wKFIL70T PIC X(2) VALUE ZERO. |
I am getting the following error while I compile my COBOL pgm which has the above part of code.
Code: |
IGYGR1174-S "WKO770T" was not defined as a data-name in a record associated with this file. "WKO770T" was discarded. |
What is the problem? Where have I gone wrong? |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
I'm not a COBOL programmer, but does your problem have something to do with upper versus lower case. Try UC9999 to "upper case" the program logic:
Code: |
UC9999 program logic
000002
000003
000004
000005
|
|
|
Back to top |
|
|
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
I checked changing to upper case also. still getting the same error.
But ideally the case shouldnt be a problem. |
|
Back to top |
|
|
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
Code: |
IGYGR1174-S "wKFIL70T" was not defined as a data-name in a record associated with this file. "wKFIL70T" was discarded. |
Sorry, this is the error message I get. I wrongly pasted the error message. |
|
Back to top |
|
|
pattabiraman.baskaran
New User
Joined: 10 Aug 2006 Posts: 23
|
|
|
|
The reason could be because, you specify a group variable for file status and use a variable defined under that group variable in FILE-CONTROL, which could not be recognised by the compiler. Try compiling with this code,
Code: |
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT KFIL70T-UNF
ASSIGN SYS012
FILE STATUS wKFIL70T.
WORKING-STORAGE SECTION.
01 wKFIL70T PIC X(2) VALUE ZERO.
|
|
|
Back to top |
|
|
stly Warnings : 1 New User
Joined: 25 Jul 2005 Posts: 93
|
|
|
|
05 WS-temp-FILE-STATUS PIC X(02).
88 temp-FILE-STATUS-OK VALUE '00'.
88 temp-FILE-STATUS-EOF VALUE '10'.
SELECT SYNC-IN
ASSIGN TO TSYNC
FILE STATUS IS WS-temp-FILE-STATUS.
the above code will work fine.u got the problem bcoz u have coded 10 level which should not be according to my knowledge.
baskaran method is also correct |
|
Back to top |
|
|
stly Warnings : 1 New User
Joined: 25 Jul 2005 Posts: 93
|
|
|
|
sorry small mistake in my prev reply.
generally under 01 level all the file status are declared shown below.
01 WS-SWITCHES.
05 WS-temp-FILE-STATUS PIC X(02).
88 temp-FILE-STATUS-OK VALUE '00'.
88 temp-FILE-STATUS-EOF VALUE '10'.
05 WS-nor-FILE-STATUS PIC X(02).
88 nor-FILE-STATUS-OK VALUE '00'.
88 nor-FILE-STATUS-EOF VALUE '10'.
SELECT SYNC-IN
ASSIGN TO TSYNC
FILE STATUS IS WS-temp-FILE-STATUS.
SELECT nor-in
ASSIGN TO normal
FILE STATUS IS WS-nor-FILE-STATUS.
the above code will work fine.
baskaran method is also correct
correct me if i m wrong. |
|
Back to top |
|
|
|