B054 NOT A VALID FILE



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

B054 NOT A VALID FILE

Postby needhelp » Fri Jun 10, 2011 11:38 pm

I have a large VSAM file, I need to update a small portion. The file containing the updates is in a single record and the VSAM file has the data in 2 records. I am doing a match initially and then reading the next VSAM record. On both the writes and the read of the vsam file I am getting this error. Is this too complex for easytrieve and should I use COBOL instead.
Here is the vsam file in the JCL and the relevant portions of the easytrieve:

//MIMAST DD DSN=userid.MIMAST,DISP=SHR,
// BUFNO=30

FILE MIMAST VS UPDATE

JOB INPUT (MIMAST KEY(MIM-BK, MIM-REC, MIM-REGION, MIM-CUST, +
MIM-CUSTBIN, MIM-INDR) +
INFILE KEY(IN-BANK, IN-REC, IN-REGION, +
IN-CUST, IN-CUSTBIN, IN-INDR)) +
FINISH DISPLAY-TOTAL

IF MATCHED
WRITE MIMAST UPDATE STATUS
*******B054 NOT A VALID FILE - MIMAST
READ MIMAST KEY WS-KEY STATUS
*******B054 NOT A VALID FILE - MIMAST
WRITE MIMAST UPDATE STATUS
*******B054 NOT A VALID FILE - MIMAST
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: B054 NOT A VALID FILE

Postby Robert Sample » Fri Jun 10, 2011 11:50 pm

The first observation is that if you want to update a file, you need DISP=OLD. DISP=SHR allows for read but not write access, in general.
Robert Sample
Global moderator
 
Posts: 3657
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 270 times

Re: B054 NOT A VALID FILE

Postby needhelp » Fri Jun 10, 2011 11:54 pm

I've tried disp=old and disp=mod and I still get the same error.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: B054 NOT A VALID FILE

Postby BillyBoyo » Fri Jun 10, 2011 11:57 pm

The B054 is a compile-time message. Have you looked it up in the manual?

You are doing "matched file processing". I strongly suspect you will be prevented from doing the READ because if you did, you'd put the matching all-to-pot.

Unconnected, but why bother with STATUS if you can't be bothered to check it? As in any language, use the status of file IO and check it, every time.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: B054 NOT A VALID FILE

Postby BillyBoyo » Sat Jun 11, 2011 12:00 am

:) Manual not much help with the message.

What are you trying to do? You haven't, in the code you've shown, changed anything on the file.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: B054 NOT A VALID FILE

Postby needhelp » Sat Jun 11, 2011 12:04 am

For simplicity sake, I did not include the entire program. All that takes place between the IF MATCHED and WRITE is moving the INFILE fields to the MIMAST fields.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: B054 NOT A VALID FILE

Postby dick scherrer » Sat Jun 11, 2011 12:05 am

Hello,

Have you compared the Easytrieve file definition in the code to the DEFINE that created the vsam file?

Is there some other Easytrieve code that successfully reads this file? Writes to it?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: B054 NOT A VALID FILE

Postby needhelp » Sat Jun 11, 2011 12:11 am

There are many different record types and formats within this vsam file, I am only trying to update just one of them. The MIM-REC field is the part of the key that points the the specific record type. My format is much smaller than many of the others. I can't find any other easytrieve code in house that does an update to this file, there are many that just read it.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: B054 NOT A VALID FILE

Postby dick scherrer » Sat Jun 11, 2011 12:16 am

Hello,

It sounds like your Easytrieve definition may not be complete/compatible with the actual file.

Most places i've been have an Easytrieve file definition for their vsam files. Is there some reason you cannot use the complete defiition rather than some subset?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: B054 NOT A VALID FILE

Postby needhelp » Sat Jun 11, 2011 12:23 am

I will give that a try, thank you.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post