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 Previous  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
ranjit5311
Beginner


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Mon Mar 06, 2006 9:13 am    Post subject: Reply with quote

1.How can we do the same thing through the REXX program?
2. How we can use any utilities in REXX. Please explain with the sample code?
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: Mon Mar 06, 2006 9:39 am    Post subject: Reply with quote

Quote:

1.How can we do the same thing through the REXX program?

ranjit5311,

Allocate the GDG's as shown in this post for all the available generations and then copy them

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

Quote:

2. How we can use any utilities in REXX. Please explain with the sample code?


Check these links

http://mvsforums.com/helpboards/viewtopic.php?t=42&highlight=push

I suggest that you go thru this excellent tutorials

http://mvsforums.com/helpboards/viewforum.php?f=24

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


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Mon Mar 13, 2006 11:08 am    Post subject: Reply with quote

Hi Kolusu,

Quote:

Allocate the GDG's as shown in this post for all the available generations and then copy them

The link that u have given, discuss about the How to allocate the current vertion of GDG. But my problem is tht i want to copy all the verion of GDG in the new GDG


Also while creating the new GDG base, my requirement is that the GDG dataset limit of the new GDG shold be same as the older one.

All these thing i want to do in REXX. Actually my REXX program read the old GDG and new GDG name from a file. And it copies the all the verion of older one to new one.
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: Mon Mar 13, 2006 7:06 pm    Post subject: Reply with quote

Quote:

The link that u have given, discuss about the How to allocate the current vertion of GDG. But my problem is tht i want to copy all the verion of GDG in the new GDG


As I said you need to loop within the LISTCAT output like shown in that link until you have copied all the generations.

Quote:

Also while creating the new GDG base, my requirement is that the GDG dataset limit of the new GDG shold be same as the older one.


The rexx exec shown in the link posted by me reads the LISTCAT info of the gdg. so you have all the information you needed to create the new GDG.

Quote:

All these thing i want to do in REXX. Actually my REXX program read the old GDG and new GDG name from a file. And it copies the all the verion of older one to new one.


The code is available for 1 generation all you need to do is change it for all generations.

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
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Fri Apr 14, 2006 10:13 pm    Post subject: Reply with quote

Hi,

I am executing the following job to copy an input GDG base to output with versions from one to one.

Code:

//STEP010  EXEC PGM=IKJEFT01                   
//SYSTSPRT DD DSN=&L,                         
//            DISP=(,PASS),                   
//            SPACE=(CYL,(1,1),RLSE),         
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSTSIN  DD *                               
  LISTCAT ENT('XXXXX.XXXXXX.XXXXXXX') 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=',21,44,                             
         80:X)                                     
  OUTFIL FNAMES=OUTDD,                             
  OUTREC=(C'//NEW',                                 
        SEQNUM,3,ZD,3X,                             
        C'DD',X,                                   
        C'DSN=OUTPUT.XXX.DATAS.',34,8,C',',/,       
        C'//',12X,C'DISP=(NEW,CATLG,DELETE),',/,   
        C'//',12X,C'UNIT=SYSDA,',/,                 
        C'//',12X,C'SPACE=(CYL,(1,1),RLSE)',       
        80:X)                                       
/*                                                 
//STEP030  EXEC  PGM=ICEMAN                         
//SYSOUT   DD SYSOUT=*                             
//SYSIN    DD *                                     
   SORT FIELDS=COPY                 
/*                                   
//SORTOUT  DD SYSOUT=(*,INTRDR)     
//SORTIN   DD DATA,DLM=$$           
  //XXXXXXCP JOB 'COPY',             
  //             CLASS=T,           
  //             MSGCLASS=Y,         
  //             MSGLEVEL=(1,1),     
  //             NOTIFY=XXXXXX       
  //*                               
  //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)
/*                                   
//                                   


Though the job ends successfully with "0" return code I don't see either the output GDG base created or the versions of it. Do I need to create the OUTPUT GDG BASE before submitting this JCL?

Would you please let me know where I am going wrong.

TIA.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sat Apr 15, 2006 12:03 am    Post subject: Reply with quote

Hi,

I am able to find out why my JCL was not giving output GDG versions though it ended with 0 return code.

I was giving the wrong column positions in both INDD and OUTDD. Now, I've corrected it and am able to see the output Generations created.

Hats off to Kolusu.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sat Apr 15, 2006 12:33 am    Post subject: Reply with quote

Kolusu,

I am very sorry for posting several things here. I have been trying to correct my JCL from STEP030 onwards. Instead of having (OLD,PASS) I catalogued all the temporary files and executed the job till STEP020 only. I am able to see that the output generations are created IN THEM. But, when I continue to execute STEP030 I am not able to get it done.

Would you please let me know if the below is correct or any corrections are required?? Where am I going wrong?

Code:

//STEP030  EXEC  PGM=ICEMAN         
//SYSOUT   DD SYSOUT=*             
//SYSIN    DD *                     
   SORT FIELDS=COPY                 
/*                                 
//SORTOUT  DD SYSOUT=(*,INTRDR)     
//SORTIN   DD DATA,DLM=$$           
  //XXXXXXXX JOB 'COPY',           
  //             CLASS=T,           
  //             MSGCLASS=Y,       
  //             MSGLEVEL=(1,1),   
  //             NOTIFY=XXXXXX     
  //*                               
  //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)   
/*                                     
//                                     


I am very very sorry to bother you with many postings.

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sat Apr 15, 2006 12:51 am    Post subject: Reply with quote

I am not able to fix the error:

Code:

//SORTOUT  DD SYSOUT=(*,INTRDR)                                     
//SORTIN   DD DATA,DLM=@@                                           
//XXXXXXXX JOB (XXXXXX,XXXX),                                       
CAY6059S NO DELIMETER FOUND FOR DD DATA DATA SET.  JCL MAY HAVE BEEN FLUSHED, INCLUDING ANY OTHER JOBS FOLLOWING                 


Sad Confused Shocked
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sat Apr 15, 2006 1:44 am    Post subject: Reply with quote

At last, I have successfully executed this exercise. I had to change the DLM from $$ / @@ to XX.

It worked out for me.

Apologies and Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sat Apr 15, 2006 6:46 am    Post subject: Reply with quote

One more doubt I have. Instead of having G0001V00 can we have BKUPV001 or something like this?

Please help.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Sat Apr 15, 2006 6:59 am    Post subject: Reply with quote

Quote:

One more doubt I have. Instead of having G0001V00 can we have BKUPV001 or something like this?


If your Ouput is a gdg generation then you can only have G000nV00 as that is the standard for GDG's.

However you can create sequential datasets with BKUPV001 or rename the GDG versions like that. However if you do rename the GDG versions then they no longer will be attached to the GDG base.

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
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sun Apr 16, 2006 10:49 am    Post subject: Reply with quote

Yes Kolusu. That is a good point. Thank you.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Thu Apr 20, 2006 8:48 am    Post subject: Copy GDG to GDG (one to one). Reply with quote

Hi,

Here is another way of acheiving the same. I mean, copy a GDG generation to another new GDG generation on one to one basis.

Code:

Solution deleted by admin


Note: Before doing this , create the destination gdg base and then run this step, this will do finsh your task.

Courtesy: sateesh kumar
Email: sateesh555@yahoo.com
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Thu Apr 20, 2006 8:49 am    Post subject: Reply with quote

Kolusu, Would you please explain (if you know) how each parameter works here. Does this ADRDSSU simplifies several things like this?
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
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: Thu Apr 20, 2006 9:10 am    Post subject: Reply with quote

ranga_subham,

Please do NOT post solutions on this board if you are not the solution provider.

The solution you posted here does NOT copy a GDG generation to another new GDG generation on one to one basis, it just renames the existing GDG generations to the new GDG generations. You will no longer have the original GDG versions once the job ran.

Quote:

Kolusu, Would you please explain (if you know) how each parameter works here. Does this ADRDSSU simplifies several things like this?


Please learn to use the SEARCH feature. You have been on this site for quite some time and please don't expect to be spoon feed each and every time.

Simply search the forum for ADRDSSU and you will find a topic about the documentation of the the utility

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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 Previous  1, 2, 3  Next
Page 2 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