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 

How to copy all Generations from Input GDG to Output GDG
Goto page 1, 2, 3  Next
 
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
rk_pulikonda
Beginner


Joined: 27 May 2003
Posts: 22
Topics: 2
Location: India

PostPosted: Tue May 27, 2003 4:22 am    Post subject: How to copy all Generations from Input GDG to Output GDG Reply with quote

Hi Gurus,

Is there any way to copy all the generations in Input GDG to Output GDG (copy is one to one i.e first generation of input GDG to First Generation of Output GDG ,Second to Second ,etc..).
Let us assume we have only Output GDG base.

I have more than 50 Generations in Input.

Please help me !!

Thanks in advance.
_________________
Thanks
-Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue May 27, 2003 5:40 am    Post subject: Reply with quote

Pulikonda,

The following DFSORT/ICETOOL Jcl will give you the results.If you have syncsort at your shop then change PGM Synctool instead of Icetool.A brief explanation of the job.
1. The first step list all the GDG's for the Base USERID.XXX.FILEA using IDCAMS
2. Take the output from this step and create 3 files for copying the gdg's to the new gdg.
3. Now step030 will merge all these 3 files with a job card and submit to the INTRDR.


Code:

//STEP010  EXEC PGM=IKJEFT01                       
//*                                                 
//SYSTSPRT DD DSN=&L,                               
//            DISP=(,PASS),                         
//            SPACE=(CYL,(X,Y),RLSE),             
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)     
//SYSTSIN  DD *                                     
  LISTCAT ENT('USERID.XXX.FILEA GDG BASE') NAME                   
//***************************************************************
//STEP020  EXEC  PGM=ICETOOL                                   
//*                                                             
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//IN       DD DSN=&L,DISP=(OLD,DELETE)                           
//TOOL     DD DSN=&T,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//INDD     DD DSN=&I,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//OUTDD    DD DSN=&O,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//TOOLIN   DD *                                                 
  COPY FROM(IN) USING(CTL1)                                     
//CTL1CNTL DD *
  INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')                   
  OUTFIL FNAMES=TOOL,                                   
  OUTREC=(C' COPY FROM(GDG',                           
         SEQNUM,3,ZD,                                 
         C') TO(NEW',                                 
         SEQNUM,3,ZD,C')',80:X)                       
  OUTFIL FNAMES=INDD,                                   
  OUTREC=(C'//GDG',                                     
         SEQNUM,3,ZD,3X,                               
         C'DD',X,                                     
         C'DISP=SHR,',                                 
         C'DSN=',17,44,                               
         80:X)                                         
  OUTFIL FNAMES=OUTDD,                                 
  OUTREC=(C'//NEW',                               
        SEQNUM,3,ZD,3X,                         
        C'DD',X,                               
        C'DSN=USERID.XXX.FILEB.',34,8,C',',/,     
        C'//',12X,C'DISP=(NEW,CATLG,DELETE),',/,
        C'//',12X,C'UNIT=SYSDA,',/,             
        C'//',12X,C'SPACE=(CYL,(X,Y),RLSE)',   
        80:X)                                       
/*                                                     
//STEP030  EXEC  PGM=ICEMAN             
//SYSOUT   DD SYSOUT=*                 
//SYSIN    DD *                         
   OPTION COPY                           
/*                                     
//SORTOUT  DD SYSOUT=(*,INTRDR)         
//SORTIN   DD DATA,DLM=$$               
//TIDXXXXA JOB 'COPY',                 
//             CLASS=A,                 
//             MSGCLASS=Y,             
//             MSGLEVEL=(1,1),         
//             NOTIFY=TID               
//*                                     
//STEP0100 EXEC  PGM=ICETOOL           
//*                                     
//TOOLMSG  DD SYSOUT=*                 
//DFSMSG   DD SYSOUT=*   
//TOOLIN   DD *               
$$                                     
//         DD DSN=&T,DISP=(OLD,PASS)   
//         DD DSN=&I,DISP=(OLD,PASS)   
//         DD DSN=&O,DISP=(OLD,PASS)   
/*   


The output from this job is:
File Tool:
Code:

COPY FROM(GDG001) TO(NEW001)
COPY FROM(GDG002) TO(NEW002)
COPY FROM(GDG003) TO(NEW003)
COPY FROM(GDG004) TO(NEW004)
COPY FROM(GDG005) TO(NEW005)


File: INDD
Code:

//GDG001 DD DISP=SHR,DSN=USERID.XXX.FILEA.G0005V00
//GDG002 DD DISP=SHR,DSN=USERID.XXX.FILEA.G0006V00
//GDG003 DD DISP=SHR,DSN=USERID.XXX.FILEA.G0007V00
//GDG004 DD DISP=SHR,DSN=USERID.XXX.FILEA.G0008V00
//GDG005 DD DISP=SHR,DSN=USERID.XXX.FILEA.G0009V00
......
//GDG255 DD DISP=SHR,DSN=USERID.XXX.FILEA.G0255V00



File: OUTDD. In here you may need to change the outrec cards a lil bit, because the gdgbase name you gave is an example(USERID.XXX.FILEA).i.e the listcat output will have the gdg version name starting at pos 17.we need to grab the G000NV00 portion and stack it to the output GDG version name.In here I calculated that G000NV00 starts in position 34 and a length of 8 bytes. so change it accordingly.if your Input gdg has versions starting from 5, the output GDG also will have the version starting at 5.
Code:


//NEW001   DD DSN=USERID.XXX.FILEB.G0005V00,
//            DISP=(NEW,CATLG,DELETE),       
//            UNIT=SYSDA,                   
//            SPACE=(CYL,(X,Y),RLSE)         
....
//NEW255   DD DSN=USERID.XXX.FILEB.G0255V00,
//            DISP=(NEW,CATLG,DELETE),       
//            UNIT=SYSDA,                   
//            SPACE=(CYL,(X,Y),RLSE)         


Last edited by kolusu on Mon Feb 25, 2008 1:22 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rk_pulikonda
Beginner


Joined: 27 May 2003
Posts: 22
Topics: 2
Location: India

PostPosted: Tue May 27, 2003 11:06 pm    Post subject: Reply with quote

Hi Kolusu,

Thank you for your quick response.
This one will solve my problem but i am looking for an utility which can do this.

Is there any such one available ?

Thanks for your help advance
_________________
Thanks
-Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed May 28, 2003 5:24 am    Post subject: Reply with quote

pulikonda,

I am confused. DFSORT/ICETOOL is an UTILITY. Are looking for something specific?? I guess there is an user written exit program on CBTTAPE.

check out

http://www.cbttape.org/

Another simple of way of doing this to rename the existing GDG BASE to the new name.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rk_pulikonda
Beginner


Joined: 27 May 2003
Posts: 22
Topics: 2
Location: India

PostPosted: Wed May 28, 2003 11:23 am    Post subject: Reply with quote

Hi Kolusu,

What i mean is like IEBCOPY (copy one PDS to another PDS) do we have any such facility which will copy One GDG to another GDG.

Hope i am clear ..


Thanks
Ram.
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Mon Jun 02, 2003 12:18 am    Post subject: Reply with quote

Hi Ram,

You're clear, but you're also out of luck. Kolosu's approach or something similar is the only game in town.

Regards, Jack.
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Tue Jun 03, 2003 4:47 pm    Post subject: Reply with quote

Not that I've tried it, but you could probably use backup restore utilities eg DFSDSS to backup and then rename the GDG.
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
rk_pulikonda
Beginner


Joined: 27 May 2003
Posts: 22
Topics: 2
Location: India

PostPosted: Wed Jun 04, 2003 10:42 am    Post subject: Reply with quote

Thank you all for clarifying my doubts.
Thank you for your time.
_________________
Thanks
-Ram
Back to top
View user's profile Send private message
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Wed Jan 04, 2006 6:59 am    Post subject: Reply with quote

Code:

//STEP010  EXEC PGM=IKJEFT01                                         
//*                                                                 
//SYSTSPRT DD DSN=&L,                                               
//            DISP=(,PASS),                                         
//            SPACE=(CYL,(100,100),RLSE),                           
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)                     
//SYSTSIN  DD *                                                     
  LISTCAT ENT('***.***.*****.J4KCM.FID*****.MATCH') NAME             
//***************************************************************   
//STEP020  EXEC  PGM=ICETOOL                                         
//*                                                                 
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN       DD DSN=&L,DISP=(OLD,DELETE)                               
//TOOL     DD DSN=&T,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB   
//INDD     DD DSN=&I,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB   
//OUTDD    DD DSN=&O,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB   
//TOOLIN   DD *                                                     
  COPY FROM(IN) USING(CTL1)                                         
//CTL1CNTL DD *                                                     
 INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')                           
 OUTFIL FNAMES=TOOL,                                           
 OUTREC=(C' COPY FROM(GDG',                                   
         SEQNUM,3,ZD,                                         
         C') TO(NEW',                                         
        SEQNUM,3,ZD,C')',80:X)                                 
 OUTFIL FNAMES=INDD,                                           
 OUTREC=(C'//GDG',                                             
        SEQNUM,3,ZD,3X,                                       
        C'DD',X,                                               
        C'DISP=SHR,',                                         
        C'DSN=',34,27,                                         
        80:X)                                                 
 OUTFIL FNAMES=OUTDD,                                         
 OUTREC=(C'//NEW',                                             
        SEQNUM,3,ZD,3X,                                       
         C'DD',X,                                             
         C'DSN=AATLIB.PAY.AHOLD.',34,8,C',',/,                 
         C'//',12X,C'DISP=(NEW,CATLG,DELETE),',/,             
         C'//',12X,C'UNIT=SYSDA,',/,                         
          C'//',12X,C'SPACE=(CYL,(100,100),RLSE)',       
          80:X)                                         
/*                                                       
//STEP030  EXEC  PGM=ICETOOL                             
//SYSOUT   DD SYSOUT=*                                   
//SYSIN    DD *                                         
   OPTION COPY                                           
/*                                                       
//SORTOUT  DD SYSOUT=(*,INTRDR)                         
//SORTIN   DD DATA,DLM=$$                               
  //TIDXXXXA JOB 'COPY',                                 
  //             CLASS=A,                               
  //             MSGCLASS=X,                             
  //             MSGLEVEL=(1,1),                         
  //             NOTIFY=SVSYN1                           
  //*                                                   
  //STEP0100 EXEC  PGM=ICETOOL                           
  //*                                                   
  //TOOLMSG  DD SYSOUT=*                                 
  //DFSMSG   DD SYSOUT=*                                 
$$                                             
//         DD DSN=&C,DISP=(OLD,PASS)           
//         DD DSN=&T,DISP=(OLD,PASS)           
//         DD DSN=&I,DISP=(OLD,PASS)           
//         DD DSN=&O,DISP=(OLD,PASS)           
/*                                             
//                                             



I tried for a simillar requirement to me but i am getting the error



Code:


STEP030 SORTIN +001 - DATA SET NOT FOUND               
STEP030 - STEP WAS NOT EXECUTED.                       
030 /START 2006004.0642       


I tried but Unable to fix it
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jan 04, 2006 8:21 am    Post subject: Reply with quote

mainframemouli,

You need to correct the step030.

Add this line before $$
Code:

//TOOLIN  DD *


Delete this line after $$
Code:

//         DD DSN=&C,DISP=(OLD,PASS)             


Look at the example posted here

http://mvsforums.com/helpboards/viewtopic.php?p=3857#3857

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
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Wed Jan 04, 2006 9:35 am    Post subject: Reply with quote

I did What u have told and still i am getting the MAXCC=20. I am fixing it now
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jan 04, 2006 10:33 am    Post subject: Reply with quote

mainframemouli,

The above specified job creates a New job dynamically and submitts it via INTRDR. You can cross check to see if the job is created correctly. change the following statement in step030
Code:

//SORTOUT  DD SYSOUT=(*,INTRDR)     


to

Code:

//SORTOUT  DD SYSOUT=*


Now post the created JCL here and we will check for errors.

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


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Thu Jan 05, 2006 12:26 am    Post subject: Reply with quote

I am not getting the SYSOUT messages
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Jan 05, 2006 2:38 am    Post subject: Reply with quote

Mainframemouli,

Code:

//STEP030  EXEC  PGM=ICETOOL                             
//SYSOUT   DD SYSOUT=*                                   
//SYSIN    DD *                                         
   OPTION COPY                                           
/*                                                       
//SORTOUT  DD SYSOUT=(*,INTRDR)                         
//SORTIN   DD DATA,DLM=$$                               


When you use, ICETOOL the sysout messages are routed to //TOOLMSG and //DFSMSG and not to //SYSOUT. (See STEP030 above). Either Change the pgm name to PGM=SORT or use //TOOLMSG and //DFSMSG instead of //SYSOUT.

Also, as kolusu said, you need to use //TOOLIN instead of //SYSIN - for ICETOOL.

Hope this helps,

Cheers,

Phantom
Back to top
View user's profile Send private message
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Thu Jan 05, 2006 3:37 am    Post subject: Reply with quote

Its Working great. Thanks for all. Just I altered the Job card a bit.
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
Goto page 1, 2, 3  Next
Page 1 of 3

 
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