Skip to Content
Custom Search

Can we read empty VSAM file using COBOL

1 reply [Last post]
Anonymous

 

We know that we face abend when we try to read an empty vsam file in a cobol program, some file status 35 comes.

We generally would place a low value record (null record as we refer) to overcome this problem.

But I fail to understand what could be the logic behind this restriction.

"; ; ; ;

The only thing that I could think of, is that if vsam is empty then we do not have any value for the key and thus is not readable, but when we put a null record then the first record can be read. Please let me know if you agree with this.

Sponsored Listing
Anonymous
As a rule I create a VSAM

As a rule I create a VSAM initial load program. It opens the file as output, writes a record, deletes the record just written [y'all don't want to process an unrelated record - especially when doing sequential access to the VSAM dataset]. After executing the initial load program other applications can open the VSAM dataset in I-O mode.   

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 11 guests online.
Dr. Radut | forum