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
 

 

A010 INVALID FILE REFERENCE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: A010 INVALID FILE REFERENCE
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

Site Director


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

PostPosted: Wed Nov 11, 2009 6:01 am    Post subject:
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: 2360
Location: Israel

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

Make sure SYSUT3 contains records...

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

Site Director


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

PostPosted: Thu Nov 12, 2009 12:42 am    Post subject:
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    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 12, 2009 1:10 am    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Nov 12, 2009 1:13 am    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 12, 2009 1:23 am    Post subject:
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

Site Director


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

PostPosted: Thu Nov 12, 2009 2:24 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts StreamWeaver language reference chetanambi Compuware & Other Tools 1 Wed Jul 05, 2017 12:50 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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