A010 INVALID FILE REFERENCE issue (VSAM)



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

A010 INVALID FILE REFERENCE issue (VSAM)

Postby SteveM001 » Thu Aug 23, 2012 7:33 pm

HI,
We have a variable length VSAM file (12000 120004) that I have defined as follows:

 FILE ORDMSTR VS
  ORDMSTR-RECORD                                1 12000 A
    ORDMSTR-KEY                                 1     6 A
      ORDMSTR-ALPHA                             1     3 A
      ORDMSTR-REF-NUM-K                         4     3 P
    ORDMSTR-SEND-INFO                           7   315 A
      ORDMSTR-ORDER-YYMMDD                      7     4 P
      ORDMSTR-HHMMSS                           11     4 P

etc (more detail fields follow)

Read is coded:
READ ORDMSTR KEY ORDMSTR-KEY STATUS
IF ORDMSTR : FILE-STATUS EQ 0
   CONTINUE
ELSE
   DISPLAY '*** ERROR READING ORDER MASTER. '
           ' KEY: '  PARM-ALPHA PARM-REFNO
           ' FILE STATUS: ' ORDMSTR:FILE-STATUS
   GOTO JOB
END-IF


*****************************************************************************************
What am I missing? I thought this would work??

Thank you for your help,

Steve

Code'd and Aligned
SteveM001
 
Posts: 2
Joined: Thu Aug 23, 2012 6:56 pm
Has thanked: 3 times
Been thanked: 0 time

Re: A010 INVALID FILE REFERENCE issue (VSAM)

Postby dick scherrer » Thu Aug 23, 2012 9:21 pm

Hello and welcome to the forum,

Which line raised the error?

In the JES sysouts is there any other info?

We have many Easytrieve processes that do this - almost exactly the same way. Ours are:
READ ORDMSTR KEY(ORDMSTR-KEY) STATUS

Is there a DD statement for this file?
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
SteveM001 (Fri Aug 24, 2012 3:23 pm)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: A010 INVALID FILE REFERENCE issue (VSAM)

Postby BillyBoyo » Thu Aug 23, 2012 10:12 pm

We need to know which line the message points to.

I'd code

IF ORDMSTR


rather than what you have, but that is not the problem.

At a blind guess, I'd say you have accidently defined PARM-ALPHA PARM-REFNO as part of the VSAM file, but I prefer not to guess blindly.

Hello Dick,

The brackets/parenthesis are optional there - I like to use them as well, but not the problem.

These users thanked the author BillyBoyo for the post:
SteveM001 (Fri Aug 24, 2012 3:23 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: A010 INVALID FILE REFERENCE issue (VSAM)

Postby SteveM001 » Fri Aug 24, 2012 7:11 am

Gentlemen, thanks to your responses I fixed it. Problem had to do with the lookup key on the VSAM file being in the File Section. Once I used Working Storage to load a key and used the key for the reads it seemed golden. I had thought my syntax was hokey; but thanks to your affirmations, I was able to look elsewhere.

In answer to the question of what line was the error pointing to.. it was the loading of the keys just before the read. I was passing the parmfile values to the keyfield and then doing my read. As I said, once I built a working storage key structure and loaded to it, instead, the read (which now pointed to the WS-key) worked fine.

Thank you again for your help.

STeve
SteveM001
 
Posts: 2
Joined: Thu Aug 23, 2012 6:56 pm
Has thanked: 3 times
Been thanked: 0 time

Re: A010 INVALID FILE REFERENCE issue (VSAM)

Postby dick scherrer » Fri Aug 24, 2012 8:16 am

You're welcome - thank you for the follow up :)

d

These users thanked the author dick scherrer for the post:
SteveM001 (Fri Aug 24, 2012 3:22 pm)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post