IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Any JCL or VSAM Utility to get number of Unique Keys in AIX?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 51
Location: India

PostPosted: Mon Jan 17, 2022 10:20 am
Reply with quote

Hello Experts!

There is a KSDS AIX with Key Length 6 for Primary Key Length 7 and with the maximum possible as length = 229,380 (Any Alternate Index key can hold 32767 Unique records)

Unfortunately, due to business growth, the file is getting beyond 32767 records certain days (File gets cleaned up daily) for a non-unique alternate index.

Is there any JCL or VSAM Utility to get number of Unique Keys for each of the Non-Unique Alternate Index key? This is not a solution but I wanted to check if this is possible to keep a tab on the file until the permanent solution is developed.

Is removing the AIX the only solution and develop a solution outside VSAM to replace the functionality of AIX?

Code:

DEFINE ALTERNATEINDEX (           
       NAME(PIC.LIFTA4.ALT)       
       REL(PIC.LIFTFD.KSDS)       
       VOL(DOF098)               
       KEYS(6,228)               
       SHR(2,3)                   
       CYL(2 1)                   
       NONUNIQUEKEY               
       RECORDSIZE(18 229380)     
       BUFSP(40960)               
       CISZ(18432)               
       SPEED                     
       UPGRADE)                   
BLDINDEX                         
       INDATASET(PIC.LIFTFD.KSDS)
       OUTDATASET(PIC.LIFTA4.ALT)
       INTERNALSORT NOSORTCALL   
DEFINE PATH (                     
       NAME(PIC.LIFTP4.PATH)     
       PENT(PIC.LIFTA4.ALT))     



Regards,
Muru
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 582
Location: London

PostPosted: Wed Jan 26, 2022 3:21 pm
Reply with quote

In the IBM Using Data Sets manual it describes the AIX record layouts. It says that each data record has an indicator if it is for a unique record or not. So I guess you could run a SORT over the AIX data component directly to pull out the records that are unique.

www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc236855/$file/idad400_v2r4.pdf
Chapter 6: Organising VSAM datasets, on Page 99

Each record in the data component of an alternate index is of variable length and contains header data,
the alternate key, and at least one pointer to a base data record. Header data is fixed length and provides
the following information:
• Whether the alternate index data record contains primary keys or RBA pointers.
Whether the alternate index data record contains unique or nonunique keys.
• The length of each pointer.
• The length of the alternate key.
• The number of pointers.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts REASON 00D70014 in load utility DB2 6
Search our Forums:

Back to Top