IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error related to File Status


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
antonrino.b

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Fri Aug 18, 2006 9:39 pm
Reply with quote

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
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Aug 18, 2006 9:49 pm
Reply with quote

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
View user's profile Send private message
antonrino.b

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Fri Aug 18, 2006 9:51 pm
Reply with quote

I checked changing to upper case also. still getting the same error.
But ideally the case shouldnt be a problem.
Back to top
View user's profile Send private message
antonrino.b

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Fri Aug 18, 2006 10:04 pm
Reply with quote

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
View user's profile Send private message
pattabiraman.baskaran

New User


Joined: 10 Aug 2006
Posts: 23

PostPosted: Tue Aug 22, 2006 8:40 am
Reply with quote

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
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Tue Aug 22, 2006 3:17 pm
Reply with quote

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
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Tue Aug 22, 2006 3:26 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top