Page 2 of 2

Re: B054 NOT A VALID FILE

PostPosted: Sat Jun 11, 2011 12:30 am
by BillyBoyo
You definitely cannot do the READ, which makes the 2nd WRITE UPDATE pointless.

Try to remove the READ and the 2nd WRITE UPDATE just to see if the first WRITE UPDATE will get through the compile.

Re: B054 NOT A VALID FILE

PostPosted: Sat Jun 11, 2011 12:52 am
by BillyBoyo
This was jiggetting about in the back of my mind, so looked it up to confirm:

The PUT and WRITE statements can be used with automatic input of a
VSAM file, except when using synchronized file processing. (emphasis added)


So, you have some re-thinking to do.

Three general ways:

1. Change to JOB INPUT NULL (or JOB INPUT just-one-file) and do your own matching
2. Keep the matched processing, but output a "key" record to a VIRTUAL file and have a second JOB to carry out the updates
3. Some other approach (even another language)

If you can let us know what you are trying to achieve with the matching and file updates, we might be able to give some guidance.

Re: B054 NOT A VALID FILE

PostPosted: Sat Jun 11, 2011 5:04 am
by BillyBoyo
Hi, I just read the first part of your first post.

Your VSAM file is going to be in the order of the key that you are matching on.

I'm assuming KSDS because you have a READ. If you have the full key on the transaction file:

JOB INPUT TRANSACTION-FILE

build key (or use key already on transaction file if contiguous)
READ vsam
do stuff
WRITE vsam
GET vsam
do other stuff
WRITE vsam

If you don't have the full key (I suspect you do), use POINT, GET in a loop, then WRITE, GET, WRITE.