View previous topic :: View next topic
|
Author |
Message |
Agni
New User
Joined: 22 Nov 2007 Posts: 83 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
Praveen Padasalagi Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 2 Location: Chennai
|
|
|
|
you make the following changes in ur jcl
//SYSUT2 DD DSN = MYID.HLQUAL.DATEFILE (0) DISP=(NEW,CATLG,DELETE) |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Praveen,
did you test your code because it's not going to work.
Gerry |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I think Praveen will get the message(s)
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
Agni
New User
Joined: 22 Nov 2007 Posts: 83 Location: Chennai
|
|
|
|
I commented the LIKE parameter line and submitted the JCL. It worked fine. Thanks all. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|