MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Accessing a cluster in same jcl where it is created.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Wed Aug 30, 2006 1:30 am    Post subject: Accessing a cluster in same jcl where it is created. Reply with quote

I am a beginner in mainframes.

I have the following jcl

//step10 -->contains idcams to delete a cluster
//step20 --->Creating the cluster file
//step30 ----> loading(using repro) the cluster file with the input dataset with disp=shr


In step30, i am getting jcl error "The cluster is not cataloged".Actually
i am creating this cluster in step20.I am using the cluster with disp=shr
in step30.How to solve this problemAppreciate your help.

vj
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Wed Aug 30, 2006 3:15 am    Post subject: Reply with quote

vjkumk,

I guess your STEP20 was not executed successfully .Check the Conditon code for STEP20 it might be 12.So in STEP30 you are trying to REPRO from and input file to a VSAM Cluster which was not existing.Try this code:
Code:

//STEP010  EXEC PGM=IDCAMS                                             
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  DELETE (SHEKAR.KSDS.VSAM)                                             
  IF MAXCC = 8 THEN SET MAXCC = 0                                       
/*                                                                     
//STEP020  EXEC PGM=IDCAMS                                             
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  DEFINE CLUSTER                      -                                 
     (                                -                                 
     NAME(SHEKAR.KSDS.VSAM)           -                                 
     VOLUME(* *)                      -                                 
     KEYS(1 0)                        -                                 
     FREESPACE(20 10)                 -                                 
     BUFFERSPACE(12288)               -                                 
     INDEXED                          -                                 
     TRK (5 1)                        -                                 
     )                                -                                 
  DATA (                              -                                 
     NAME(SHEKAR.KSDS.VSAM.DATA)      -                                 
     VOLUME(* *)                      -                                 
     CONTROLINTERVALSIZE(1024)        -                                 
       )                              -                                 
  INDEX(                              -                                 
       NAME(SHEKAR.KSDS.VSAM.INDEX)   -                                 
       VOLUME(* *)                    -                                 
       CONTROLINTERVALSIZE(1024)      -                                 
       )                                                               
/*                                                                     
//STEP030  EXEC PGM=IDCAMS                                             
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//IN       DD DSN=SHEKAR.TEST.IN,DISP=SHR                               
//OUT      DD DSN=SHEKAR.KSDS.VSAM,DISP=SHR                             
//SYSIN   DD *                                                         
  REPRO   INFILE(IN) OUTFILE(OUT)                                       
/*                                                                     
//                     

After successful execution of the Job you can view the data in the KSDS Cluster.
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Wed Aug 30, 2006 4:33 am    Post subject: Reply with quote

Shekar,

The job fails before executing any step with JCL interpreter error.

In our shop, we have a rexx tool to check the job syntax.Before submitting the
job,we use to run the tool,the tool say that at step30(Repro step),
the cluster file is not cataloged,after ignoring this error ,
if we submit the jcl ,it gives the JCL intepreter error.
In spool i see a message "Dataset not found--(cluster file)".
Is this problem related to JES?we are using JES3.


VJ
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Wed Aug 30, 2006 5:27 am    Post subject: Reply with quote

vjkumk,

Yeah in some shops make use of REXX tool which scans the JCL for any errors and then submission is done.Can you not submit directly the job which i had posted to you and let me know from you ?
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Wed Aug 30, 2006 6:22 am    Post subject: Reply with quote

Shekar,

I did not run the job posted by you,but this is actual jcl which is causing the problem.
The below error message is produced by the rexx tool,if we ignore this message and submit the job, it leads to JCLERR .This problem did not occur if the cluster is already available.

Is this problem related to JES3?

i think that JES3 checks for availability of input dataset/cluster before executing the job.Please excuse ,if i am wrong.


1 ERROR MESSAGE(S)
.JCP0722E DATASET 'USE1.IMS.RGTPM3O.TEST.CLUSTER' IS NOT CATALOGED -- (J)33

Code:

//USE17107 JOB ,'TEST',REGION=0M,MSGLEVEL=1,MSGCLASS=1,CLASS=F,     
//             NOTIFY=USE1                                             
//FPDF20   EXEC PGM=IDCAMS                                             
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  *                                                       
    DEFINE -                                                           
       CLUSTER ( -                                                     
         NAME(USE1.IMS.RGTPM3O.TEST.CLUSTER) -             
         UNIQUE -                                                       
         INDEXED -                                                     
         KEYS (9,5) -                                                   
         RECORDSIZE (16420,16420) -                                     
         FREESPACE (10 1) -                                             
         SHR (3,3) -                                                   
         SPEED -                                                       
         FOR (365) -                                                   
         VOLUMES (*)) -                                                 
       DATA ( -                                                         
         CONTROLINTERVALSIZE (32768) -                                 
         CYLINDERS (17,6) -                                             
         NAME(USE1.IMS.RGTPM3O.TEST.DATA)) -               
       INDEX ( -                                                       
         CONTROLINTERVALSIZE (32768) -                                 
         NAME(USE1.IMS.RGTPM3O.TEST.INDEX) -               
         TRACKS    (1,1))                                               
    IF MAXCC LT 9 THEN SET MAXCC EQ 0                                   
                  ELSE SET MAXCC EQ 16                                 
/*                                                                     
//FPFP30 EXEC PGM=IDCAMS                                               
//SYSPRINT DD SYSOUT=*                                                 
//IN1      DD DSN=USE1.D000000.TESTIN,
//OUT1     DD DSN=USE1.IMS.RGTPM3O.TEST.CLUSTER, 
//            DISP=SHR                                       
//SYSIN    DD *                                               
   REPRO INFILE(IN1) -                                       
         OUTFILE(OUT1)                                       
   IF MAXCC GT 0 THEN SET MAXCC EQ 16                         
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Aug 30, 2006 7:13 am    Post subject: Reply with quote

vjkumk,

Change your FPFP30 step to the following and and run the job

Code:

//FPFP30   EXEC PGM=IDCAMS             
//SYSPRINT DD  SYSOUT=*                 
//SYSIN    DD  *                       
  REPRO IDS('USE1.D000000.TESTIN')            -       
        ODS('USE1.IMS.RGTPM3O.TEST.CLUSTER')  REPLACE 
  IF MAXCC GT 0 THEN SET MAXCC EQ 16
/*                                     


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Wed Aug 30, 2006 11:00 pm    Post subject: Reply with quote

Kolusu,

hats off to you,great,it worked.


I will be glad ,if you explain, why i had the problem earlier and how did this replace statement in the sysin card solves the problem.Please let me know the details.



cheers,
VJ
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Aug 31, 2006 8:21 am    Post subject: Reply with quote

Quote:

I will be glad ,if you explain, why i had the problem earlier and how did this replace statement in the sysin card solves the problem.Please let me know the details.

vjkumk,

Your system validates the datasets present/declared in the JCL . It ignores the dsnames appearing in the Control cards. You are creating the vsam cluster within the sysin control cards a step above. So follow the same convention for the repro step also.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Thu Aug 31, 2006 10:14 am    Post subject: Reply with quote

Kolusu,


Thanks a lot.Your forum is excellent by giving instant solution.Keep up the good work.


cheers,
VJ
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group