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

A010 INVALID FILE REFERENCE


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
asingh786

New User


Joined: 15 Oct 2008
Posts: 2
Location: NewYork

PostPosted: Wed Nov 11, 2009 4:32 am
Reply with quote

Hi,

I'm new to Easytrieve. I'm getting A010 INVALID FILE REFERENCE - SYSUT3 in my code below. I searched this forum for my error but nothing useful for me.

I'm using 3 files, SUSUT1,SYSUT3 as input and SYSUT2 as output.
I dont want to use IF MATCHED logic so please suggest something in this code. Thanks!

Code:
JOB INPUT NULL                       
*                                     
INIT-UT1                             
    GET SYSUT1                       
    IF EOF SYSUT1                     
       STOP                           
    END-IF                           
*                                     
  IND = 31                           
  IF SMP-FUND   EQ  'XYZ'             
     PERFORM READ-UT3                 
     DO WHILE IND > 0                 
         IF SMP-DAY(IND) EQ '1'       
             SMP-PRICE(IND) = NEW-PRC
         END-IF                       
         IND = IND - 1               
     END-DO                           
     PUT SYSUT2 FROM SYSUT1           
  ELSE                               
     PUT SYSUT2 FROM SYSUT1     
  END-IF                       
*                               
 GOTO INIT-UT1                 
*********************           
READ-UT3. PROC                 
GET-UT3                         
*                               
    GET SYSUT3   <-- A010 INVALID FILE REFERENCE -  SYSUT3   
    IF EOF SYSUT3               
       GOTO END-UT3                 
    END-IF                     
    IND3  = IND3 +   1         
   GOTO  GET-UT3               
*                               
END-UT3                         
END-PROC   

Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 11, 2009 6:01 am
Reply with quote

Hello and welcome to the forum,

You have not posted enough of the code. . . How is SYSUT3 deifned?

If you have 2 files sorted by the same key, why would you prefer not to use MATCHED? If the files do not have the same key in the same sequence, MATCHED won't work so should not be a matter pf preference.

Please use the "Code" tag when posting code, jcl, data, etc that need alighment preserved.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 11, 2009 2:56 pm
Reply with quote

Make sure SYSUT3 contains records...

O.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 12, 2009 12:42 am
Reply with quote

Hello,

And that you don't read SYSUT3 "again" after end of file. . .
Back to top
View user's profile Send private message
asingh786

New User


Joined: 15 Oct 2008
Posts: 2
Location: NewYork

PostPosted: Thu Nov 12, 2009 1:07 am
Reply with quote

Thanks for your responce guys.

Is there any way to close SYSUT3 and open it again because I've to read it again and again.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 12, 2009 1:10 am
Reply with quote

The Truth Is Out There.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 12, 2009 1:13 am
Reply with quote

Quote:
I've to read it again and again.

I have heard that again and again.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 12, 2009 1:23 am
Reply with quote

Reading a file over and over again is not recommended. A table kept in memory would be much faster.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 12, 2009 2:24 am
Reply with quote

Hello,

Quote:
Is there any way to close SYSUT3 and open it again because I've to read it again and again.
Only by choice. . . It is surely not a business requirement.

If you post what you really want to accomplish, someone may have a suggestion. You need to post the particulars of your requirement.

Opening/Closing a file many times to prevent doing a bit of actual coding is almost always not acceptable. . .
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 5
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
Search our Forums:

Back to Top