IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Jun 03, 2008 11:12 am
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

Moderator Emeritus


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

PostPosted: Tue Jun 03, 2008 11:12 am
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: 1702
Location: Australia

PostPosted: Tue Jun 03, 2008 11:28 am
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
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: 8796
Location: Welsh Wales

PostPosted: Tue Jun 03, 2008 11:32 am
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

Moderator Emeritus


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

PostPosted: Tue Jun 03, 2008 11:32 am
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: 1702
Location: Australia

PostPosted: Tue Jun 03, 2008 11:35 am
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: 1702
Location: Australia

PostPosted: Tue Jun 03, 2008 11:36 am
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

Superior Member


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

PostPosted: Tue Jun 03, 2008 12:15 pm
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
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

Moderator Emeritus


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

PostPosted: Tue Jun 03, 2008 7:58 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts Use Copy Utility DB2 7
Search our Forums:

Back to Top