Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to copy a latest GDG generation to another GDG base?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Jun 03, 2008 10:48 am    Post subject: How to copy a latest GDG generation to another GDG base?
Reply with quote

Hi All,

I am trying to copy a latest GDG generation to another GDG as below.

HLQUAL.DATEFILE - Source GDG
MYID.HLQUAL.DATEFILE - Destination GDG

Here i am using the below JCL to copy the latest GDG generation to another GDG after creating the destination GDG base. Please find the below JCL.


Code:

//XXXXXXXX JOB (@),YYY,CLASS=G,MSGCLASS=V,NOTIFY=&SYSUID       
//STEP1   EXEC PGM=IDCAMS                                       
//SYSPRINT DD   SYSOUT=*                                       
//SYSIN   DD   *                                               
          DEFINE GDG(NAME(MYID.HLQUAL.DATEFILE )   -
                 LIMIT(3)                           -           
                 NOEMPTY                            -           
                 SCRATCH)                                       
/*                                                             
//*                                                             
//STEP2    EXEC PGM=IEBGENER,REGION=1024K                       
//SYSPRINT DD SYSOUT=*                                         
//SYSUT1   DD DISP=SHR,DSN=HLQUAL.DATEFILE (0)               
//SYSUT2   DD DISP=(NEW,CATLG,DELETE),                         
//          DSN=MYID.HLQUAL.DATEFILE (+1),           
//          LIKE=HLQUAL.DATEFILE(0)                     
//*


When i submitted the above JCL, i got an error as follows.

Code:

XXXXXXX STEP2 SYSUT2 - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
IGD17118I REFERENCED DATA SET HLQUAL.DATEFILE IS NOT A NONVSAM DATA SET OR A VSAM CLUSTER
IGD17407I CATALOG ERROR ATTEMPTING TO LOCATE REFERENCED DATA SET HLQUAL.DATEFILE
IGD17409I FAILURE OCCURRED IN DATA SET PROPERTIES MERGE WHILE ATTEMPTING TO DEFINE DATA SET MYID.HLQUAL.DATEFILE G0001V00


I just tried with one IDCAMS and one IEBGENER step. I need to do this for around 30 GDGs. So it would be tedious to have latest GDG generation in the IEbGENER step rather than referring like (0)th generation. Is there any other way to copy a latest GDG generation to another GDG base?

Thanks in advance
Agni.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Jun 03, 2008 11:12 am    Post subject: Reply to: How to copy a latest GDG generation to another GDG
Reply with quote

Code:
//SYSUT1   DD DISP=SHR,DSN=HLQUAL.DATEFILE (0)               
//SYSUT2   DD DISP=(NEW,CATLG,DELETE),                         
//          DSN=MYID.HLQUAL.DATEFILE (+1),           
//          LIKE=HLQUAL.DATEFILE(0)                     


the space after the dataset name, is it a typo ??
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 03, 2008 11:12 am    Post subject:
Reply with quote

Hello,

Code:
//SYSUT1   DD DISP=SHR,DSN=HLQUAL.DATEFILE (0)
If the jcl you submitted has a space between the E and the (0), remove the space ant try again.

I do not believe you need this. . .
Code:
//         LIKE=HLQUAL.DATEFILE(0) 
When you copy a file with IEBGENER, dcb attributes are copied from the input to the output.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 03, 2008 11:28 am    Post subject:
Reply with quote

Hi,
if I read this correctly then I don't think it's going to work anyway.


Quote:
DO NOT use LIKE= to model the characteristics of a PDS member coded in JCL, a GDG, or a temporary data set. Also, please note that the EXPDT or RETPD dates are NOT copied by LIKE. LIKE should not be coded on the same DD statement with the SYSOUT, DYNAM or REFDD parameters.



Gerry
Back to top
View user's profile Send private message
Praveen Padasalagi
Warnings : 1

New User


Joined: 03 Jun 2008
Posts: 2
Location: Chennai

PostPosted: Tue Jun 03, 2008 11:29 am    Post subject: jcl
Reply with quote

you make the following changes in ur jcl

//SYSUT2 DD DSN = MYID.HLQUAL.DATEFILE (0) DISP=(NEW,CATLG,DELETE)
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 03, 2008 11:32 am    Post subject: Re: jcl
Reply with quote

Praveen Padasalagi wrote:
you make the following changes in ur jcl

//SYSUT2 DD DSN = MYID.HLQUAL.DATEFILE (0) DISP=(NEW,CATLG,DELETE)

Yes, very good, and then you will over write the existing zero generation of the output, thus eliminating the previous copied version, and also bringing into question the need for a GDG in such circumstances.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 03, 2008 11:32 am    Post subject:
Reply with quote

Hello,

Quote:
you make the following changes in ur jcl

//SYSUT2 DD DSN = MYID.HLQUAL.DATEFILE (0) DISP=(NEW,CATLG,DELETE)
Did you test this before posting?

Pretty much by definition, gen(0) must already be cataloged. . .

Please test before posting a suggestions.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 03, 2008 11:35 am    Post subject:
Reply with quote

Hi Praveen,
did you test your code because it's not going to work.


Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 03, 2008 11:36 am    Post subject:
Reply with quote

Hi,
I think Praveen will get the message(s)


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jun 03, 2008 12:15 pm    Post subject:
Reply with quote

Hi,

- There is no need to code LIKE= to model the characteristics of a PDS member coded in JCL, a GDG, or a temporary data set.

- This,
Quote:
a space between the E and the (0)

if coded, should give an error in syntax check.
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Jun 03, 2008 1:43 pm    Post subject: Reply to: How to copy a latest GDG generation to another GDG
Reply with quote

I commented the LIKE parameter line and submitted the JCL. It worked fine. Thanks all.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 03, 2008 7:58 pm    Post subject:
Reply with quote

Hello,

Quote:
if coded, should give an error in syntax check.
Not in the original sysut1 dd statement. As it is at the end of the statement, the space will turn the (0) into a comment. An abend other than syntax may occur.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us