creating a vsam file using jcl

6.1k views Asked by At

I am trying to create a VSAM file using IDCAMS utility in JCL. MAXCC code that it returns is 0000.

But the newly created vsam file is not displayed in the list when I try to list it using 3.4.

Can anyone help me on this.?

The code that I have used is :

//VSAM0001 JOB (ACCT),CLASS=A,MSGLEVEL=(1,1
//             NOTIFY=&SYSUID,MSGCLASS=A   
//STEP0001 EXEC PGM=IDCAMS                 
//SYSPRINT DD  SYSOUT=*                    
//SYSIN    DD  *                           
    DEFINE CLUSTER -                       
       (NAME(DOMAIN.MYFILE.MYVSAM) -   
       VOL(AGH419) -                   
       KEYS(16 0) -                    
       RECORDSIZE(120 120) -           
       INDEXED -                       
       REUSE ) -                       
    DATA -                                 
      (NAME(DOMAIN.MYFILE.MYVSAM.DATA) - 
      CISZ(8192) -                      
      RECORDSIZE(120 120) -             
      FSPC(0 0) ) -                     
    INDEX -                                
      (NAME(DOMAIN.MYFILE.MYVSAM.INDEX) )
/*                         
3

There are 3 answers

0
Dave Nagy On

All messages will have an id (e.g., IEA1235) that can be used when searching for what generated the message.

You need to specify space in your IDCAMS 'DEFINE'. Look in your manual (or online) for specifying space for VSAM clusters.

0
dsolimano On

As the author wrote in the comments:

Thank you all for the response. IBM's LookAt utility helped. I have not specified the CYL parameter which is required because of which I have got the INCORRECT SPECIFICATION OF SPACE ALLOCATION.Now it is working. – Kinjal Shah

0
Kinjal Shah On

While creating VSAM file using IDCAMS utility, you need to specify all the storage parameters that are required like CYL, TRK etc..If you miss out any of these parameters then JCL won't be able to know where to store the newly created VSAM. So, in DEFINE portion of your JCL file, supply all the necessary storage parameters and you are good to go. :) Hope this helps.!