Out of sequence error in VSAM Repro.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Baresh Ba
Registered Member
Posts: 15
Joined: Thu Oct 16, 2014 8:22 pm

Out of sequence error in VSAM Repro.

Post by Baresh Ba »

Hi,

In one of the production we got the following error:

Code: Select all

IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:                             
000000  C6E3F0F5 C5F7F4F1 F120241C D3F0F0F0   00404040 40404040 40404040 4040
We omitted these records but then there were more more records and it kept on coming - is there a way to figure out in a single go all the records which are out of sequence.

I know the real process is to figure out how the input got out of sequence but during support you want to solve the situation in hand first. Please advise if there is a way out.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Out of sequence error in VSAM Repro.

Post by Robert Sample »

Out of sequence errors usually indicate something in the process has changed, meaning the key location / key length of the VSAM data set no longer matches the input data to be added to it. This doesn't really have any quick fixes since you need to find out why the discrepancy. The down-and-dirty method would be simply to sort the input data into the sequence matching the VSAM data set, but since you don't know what changed in the process nor why the sequences no longer match, you risk putting invalid / bad data into your VSAM data set by doing so.
Baresh Ba
Registered Member
Posts: 15
Joined: Thu Oct 16, 2014 8:22 pm

Re: Out of sequence error in VSAM Repro.

Post by Baresh Ba »

Thanks Robert. That was my approach too.

But to my surprise one of my senior told me that it was a 'space allocation' problem with VSAM. It was not an out of sequence error. I am not sure how did he identify that, perhaps based on previous experience about the Job which failed. As it was an year end processing of the Job it can happen but how can we know that when I didn't any message about the space abend in the spool?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Out of sequence error in VSAM Repro.

Post by Robert Sample »

The Messages and Codes manual is pretty clear about the cause of an IDC3314I message:
IDC3314I RECORD xxx OUT OF SEQUENCE
Explanation
The key of the record to be written is less than or equal to the key of the last record written.
The reason for the out of sequence could be related to year-end processing, but it is unlikely to be related to the size of the VSAM data set (unless it is not extended format and is running against the 4GB limit; in such a case I would think the error message would be different).
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”