We recently had a situation where a job was failing when it was trying to write records into an AIX file. We found that there the number of duplicate AIX keys were beyond the calculated limit which resulted in a boundary violation.
However, to rectify the situation, the production support guys ran the job after deleting the AIX file and then redefined and rebuilt the AIX file after the job completed successfully.
I would like to know the method they followed was correct and how come that worked. Shouldn't we get the same/similar problem while redefining the AIX for a VSAM which has too many duplicate AIX keys?
Redefining Alternate index
Moderator: Moderator Group
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Ask them for their explanation. Dig into the manuals, and see if it is an automatic update of the AIX when records are deleted from the file (assuming it is not an ESDS).
Alternate indexes can seem convenient, but carry a large overhead. Try to not use them in batch. If that is not possible, remove the alternate index, do any batch updates, then rebuild the alternate index. Every night. This will use much fewer resources. Also look to use them as little as possible.
Write some small programs and do some tests. For batch, you'll find two-file-match and extract-to-new-KSDS may give you big performance improvements, depending on how much the alternate index is used.
Alternate indexes can seem convenient, but carry a large overhead. Try to not use them in batch. If that is not possible, remove the alternate index, do any batch updates, then rebuild the alternate index. Every night. This will use much fewer resources. Also look to use them as little as possible.
Write some small programs and do some tests. For batch, you'll find two-file-match and extract-to-new-KSDS may give you big performance improvements, depending on how much the alternate index is used.
-
- Member
- Posts: 3
- Joined: Tue Apr 22, 2014 9:06 am
I found my answer. I had a look at the out of teh step which production support was using to rebuild the AIX.
IDC1646I 1729 EXCESS PRIME KEY VALUES FOR AIX KEY F0F0F0F0F0F0F0F0F0F0
IDC1653I PGCP.VSAM.PRD2.CMSA.AMDHZ.A1 BUILT WITH ERRORS
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4
This tells me that there was 1729 more duplicate AIX keys that the file could not handle. The job actually gave a RC of 4 but there was a step to set this to 0 just after which is why the job didn't fail. On digging a bit more I found that these 1729 extra records are dropped.
In response to your comment:
The AIX we are dealing with is of a file which is part of a cobol/Mainframe based product being used in multiple countries as part of our installation. So we cannot change that. However I do get the message that we shouldn't be using AIX unless we really really have no other option. Thanks for that.
IDC1646I 1729 EXCESS PRIME KEY VALUES FOR AIX KEY F0F0F0F0F0F0F0F0F0F0
IDC1653I PGCP.VSAM.PRD2.CMSA.AMDHZ.A1 BUILT WITH ERRORS
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4
This tells me that there was 1729 more duplicate AIX keys that the file could not handle. The job actually gave a RC of 4 but there was a step to set this to 0 just after which is why the job didn't fail. On digging a bit more I found that these 1729 extra records are dropped.
In response to your comment:
The AIX we are dealing with is of a file which is part of a cobol/Mainframe based product being used in multiple countries as part of our installation. So we cannot change that. However I do get the message that we shouldn't be using AIX unless we really really have no other option. Thanks for that.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
For "online" programs, alternate indexes can be very useful. In batch, however, heavy use (a ball-park figure for "heavy" is perhaps 5% of the records on the file, or less, not tried to evaluate it recently myself) is a performance killer. Easy to code. Runs like a dog with no legs.
Zeros in your key looks like some default value. If there is never a search using that key, then it is not problematic in itself. A thing about the design of a file with an alternate index, is to be very aware of duplicate values and their impact. That key should not have 1700+ duplicates, although you also may be stuck with that.
Zeros in your key looks like some default value. If there is never a search using that key, then it is not problematic in itself. A thing about the design of a file with an alternate index, is to be very aware of duplicate values and their impact. That key should not have 1700+ duplicates, although you also may be stuck with that.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page