Just one more thought.

The reason it is very helpful to show this information is:
If the code that is executing is only checking for some but not ALL of the 
status codes from VSAM - the Length Mismatch may be incorrect.  How is that so? 
 Take the following example

In COBOL I code the IO Section with a STATUS area to contain the return code 
from an OPEN on VSAM dataset

If in my code just after my open I have (this is generalized logic not Cobol 
specific coding)

IF STATUS = 0 then Continue_Read
Else Perform OPEN_ERROR thru OPEN_ERROR_END

More code here

OPEN_ERROR
  Display " ERROR OPENING VSAM FILE"
  EXIT
OPEN_ERROR_END

What this does is it expects the open to always be 0 and anything else a 
failure.
Therefore, this code will fail a majority of the time with a non-descript error 
condition.
However, if you look at the VSAM STATUS RETURN CODES, you see that a 90 is a 
good open.

So the code should look more like this:

OPEN_ERROR
  If Status = 90 Then Display "  some text STATUS CODE: " status
  If Status = 91 Then Display "  some text STATUS CODE: " status
  If Status = 92 Then Display "  some text STATUS CODE: " status
  EXIT
OPEN_ERROR_END


The code would check for any condition code and produce a message for any of 
them that might really be an issue.  Sometimes IBM adds codes, so it is 
important to always review return codes for access methods periodically to see 
if anything new crops up.

If you code has fall through and not checking on every possible status from 
VSAM write, you might have a catch all situation that will lead to incorrect 
analysis.

I would recommend that your error routine provide diagnostic info (if it does 
not already) that is the vsam status code return from WRITE.  If all it does is 
state "wrong length record" then it may be misleading.

Does this help?

Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Lizette Koehler
> Sent: Friday, June 27, 2014 7:34 PM
> To: [email protected]
> Subject: Re: AW: [IBM-MAIN] VSAM File issue in read
> 
> Ron,
> You may need to step through the code with a testing facility and see why the 
> code
> is not doing what you need.
> 
> I think there are several products that could help you debug this issue.  But 
> VSAM
> just does what it does.  If you need to have the READ/WRITE process 
> differently
> then you will need to understand how the code currently is working and then 
> find the
> logical solution to you issue.
> 
> If you could provide the section of the code that is writing the record, how 
> the
> branch is done to get the error message you see, and then the IO section for 
> the
> VSAM dataset, the list might be able to provide better suggestions.
> 
> Lizette
> 
> 
> > -----Original Message-----
> > From: IBM Mainframe Discussion List [mailto:[email protected]]
> > On Behalf Of Ron Thomas
> > Sent: Friday, June 27, 2014 7:00 PM
> > To: [email protected]
> > Subject: Re: AW: [IBM-MAIN] VSAM File issue in read
> >
> > We are getting abend while reading the record in the assembler code,
> > the error is due to the length mismatch.
> >
> > Thanks
> > Ron T
> >

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to