Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error related to File Status

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: Error related to File Status
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    Post subject: Re: Error related to File Status
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    Post subject:
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    Post subject: Re: Error related to File Status
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    Post subject:
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    Post subject: Re: Error related to File Status
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    Post subject: Re: Error related to File Status
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us