VSAM file for testing

Post your questions related to VSAM

Moderator: Moderator Group

Post Reply
Clads
Member
Posts: 1
Joined: Sun Jan 10, 2010 8:01 pm

VSAM file for testing

Post by Clads » Sun Jan 10, 2010 8:17 pm

Hi,
I am using a VSAM KSDS dataset as an input file for PL/1 program. I have setup this file for testing purpose. I need this file to have a record length of 15 bytes, with first 9bytes as the key. I am loading the VSAM dataset using a PS file of lrecl = 15 bytes. But, the KSDS shows the rba as 80 bytes.
Could you please help me to setup this file?

Thanks,
Clads

anv2010
Member
Posts: 5
Joined: Fri Feb 05, 2010 12:11 am
Location: New Jersey, US
Contact:

Post by anv2010 » Fri Feb 05, 2010 12:36 am

How did you define the VSAM KSDS cluster?

I've used the following IDCAMS DEFINE command:

Code: Select all

DEFINE CLUSTER(NAME('RAIXN.ANV.KSDSTEST')                            -
        CYLINDERS(1 1)                                               -
        BUFSP(66048)                                                 -
        FSPC(15 15)                                                  -
        IXD                                                          -
        KEYS(9 0)                                                   - 
        OWNER(RAIXN)                                                 -
        SHR(2 4) )                                                    
 DATA(NAME('RAIXN.ANV.KSDSTEST.DATA')                                -
        VOL(RA6093)                                                  -
        CISZ(32768)                                                  -
        RECORDSIZE(15 15) )                                           
 INDEX(NAME('RAIXN.ANV.KSDSTEST.INDEX')                              -
        VOL(RA6093)                                                  -
        CISZ(512) )                                                   
to create a VSAM KSDS cluster with the following attributes:

Code: Select all

------------------- VSAM Allocation Facility (KSDS cluster) -------------------
Command ===>                                                                   
                                                                               
VSAM object                                                                    
   Cluster name  ===> RAIXN.ANV.KSDSTEST                                       
   Data name     ===> RAIXN.ANV.KSDSTEST.DATA                                  
   Index name    ===> RAIXN.ANV.KSDSTEST.INDEX                                 
                                                                               
Cluster parameters                                                             
   Freespace CI  ===> 15             (Percent of free space in CIs)            
   Freespace CA  ===> 15             (Percent of free space in CAs)            
   Share Region  ===> 2              (1, 2, 3, 4)                              
   Share System  ===> 4              (3, 4)                                    
   Key Length    ===> 9                                                        
   Key Offset    ===> 0                                                        
   Space Units   ===> C              (C=CYL, T=TRACK, R=REC)                   
   Primary alloc ===> 1                                                        
   Second  alloc ===> 1                                                        
                                                                               
Data Component Parameters             Index Component Parameters               
   Volser    ===> RA6093                 Volser    ===> RA6093                 
   CI size   ===> 32768                  CI size   ===> 512                    
   Avg recsz ===> 15                     Imbed     ===> N                      
   Max recsz ===> 15                     Replicate ===> N                      
                                                                               

Code: Select all

--------------- VSAM Allocation Facility (Additional parameters) -------------
Command ===>                                                                  
                                                                              
Space Distribution                                                            
   Destagewait    ===>               (Y/N - destaging)                        
   Ordered        ===> N             (Y/N - ordered volumes)                  
   Stage          ===>               (S=STAGE, B=BIND C=CYLF)                 
   To(date)       ===>               (YYYYDDD)                                
   For(days)      ===>               (0 - 9999)                               
                                                                              
Data management                                                               
   Erase          ===> N             (Y/N - erase upon delete)                
   Reuse          ===> N             (Y/N - reusable dataset)                 
   Speed          ===> N             (Y/N - perform storage upon insert record
   Recatalog      ===>               (Y/N - define cluster in ICF catalog)    
                                                                              
Data Layout                                                                   
   Spanned        ===> N             (Y/N - span CI boundaries)               
   Bufferspace    ===> 66048         (0 - 1676704)                            

Code: Select all

--------------------- VSAM Allocation Facility (Security) ---------------------
Command ===>                                                                   
                                                                               
Specify Security Parameters                                                    
   Attempts     ===>               (Max times operator can try password entry) 
   Code         ===>               (Code name for the entry being defined)     
   Auth.routine ===>               (User-Security-Verify-Routine name)         
   Auth. parms  ===>               (Parameters to be passed to the USVR)       
   Master       ===>               (The password dataset)                      
   Control      ===>                                                           
   Read         ===>                                                           
   Update       ===>                                                           
   Except. exit ===>               (Name of the exception exit module)         
   Owner        ===> RAIXN         (Owner-id of the entry being defined)       
   Write check  ===> N             (Y- Check on record update or insert)       
As you can see average and maximum records size is 15. The key starts at offset zero (0) for nine (9) bytes.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Feb 06, 2010 10:38 pm

Clads - please run a LISTCAT against your VSAM and show us the results.
Regards,
Anuj

Post Reply

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



Other References
Mainframe Tools and others