Regarding GDG
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 12
- Joined: Mon Oct 12, 2009 12:41 pm
Regarding GDG
Hi All:
Need information about GDG:
How to check the existance of GDG? For this I've used LISTCAT ENTRIES(GDG NAME) in my JCL and ran it. I got MAXCC is 4 and the message is showing GDG does not exist.
Hence I tried to create GDG with the same name which I used in LISTCAT statement, but I'm getting an error saying GDG already exist with the given name.
But when I tried to delete GDG with DELETE GDG NAME PURGE statement in my JCL, I could do it successfully....
Please provide me information related to this.......
Need information about GDG:
How to check the existance of GDG? For this I've used LISTCAT ENTRIES(GDG NAME) in my JCL and ran it. I got MAXCC is 4 and the message is showing GDG does not exist.
Hence I tried to create GDG with the same name which I used in LISTCAT statement, but I'm getting an error saying GDG already exist with the given name.
But when I tried to delete GDG with DELETE GDG NAME PURGE statement in my JCL, I could do it successfully....
Please provide me information related to this.......
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
-
- Member
- Posts: 12
- Joined: Mon Oct 12, 2009 12:41 pm
Below is my code:
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG(NAME(MFI01.user.GDGROUP1) -
LIMIT(3) -
NOEMPTY -
SCRATCH)
/*
//
//STEP020 EXEC PGM=IEFBR14
//GDGMODEL DD DSN=MFI01.user.GDMODEL1,
// DISP=(NEW,KEEP,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,0),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)
//
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG(NAME(MFI01.user.GDGROUP1) -
LIMIT(3) -
NOEMPTY -
SCRATCH)
/*
//
//STEP020 EXEC PGM=IEFBR14
//GDGMODEL DD DSN=MFI01.user.GDMODEL1,
// DISP=(NEW,KEEP,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,0),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)
//
-
- Member
- Posts: 16
- Joined: Thu Jul 30, 2009 7:52 am
Hi,
why are you creating a different dataset name from the one you are defining ?
Also when creating a new GDG, you must code MFI01.user.GDGROUP1(+1) and DISP=(,CATLG,DELETE)
Your delete is possibly working because you are deleting the GDG base entry.
In future, please show all of the output from executed runs,.
Gerry
why are you creating a different dataset name from the one you are defining ?
Also when creating a new GDG, you must code MFI01.user.GDGROUP1(+1) and DISP=(,CATLG,DELETE)
Your delete is possibly working because you are deleting the GDG base entry.
In future, please show all of the output from executed runs,.
Gerry
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
1. Are you defining a GDG Model here, as the DDName (and the low level qualifier of DSN) suggests that?sreekanth1984 wrote:Code: Select all
//STEP020 EXEC PGM=IEFBR14 //GDGMODEL DD DSN=MFI01.user.GDMODEL1, // DISP=(NEW,KEEP,DELETE), // UNIT=SYSDA, // SPACE=(TRK,0), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=800) //
If yes, MODEL is no longer required if DFSMS is installed and tailored correctly. Also, realize that only one model will ever need to be created, and that your storage administrators will have already created it.
2. You've used "KEEP" in DISP, any specific reason? Why not use "CATLG"?
3. And if the answer to question 1 is no -- read through what Gerry has said. Also, pay attention to the DISP parameters he has used.
Regards,
Anuj
Anuj
-
- Member
- Posts: 12
- Joined: Mon Oct 12, 2009 12:41 pm
Hi Gerry:
Its a type error. I'm using same data set names for creating both index and model.
While creating new version for the GDG i'm using MFI01.user.GDGROUP1(+1) and DISP=(,CATLG,DELETE) statement.
Hi Anuj:
Thanks for your response.
I know purpose of CATLG is to place an entry pointing to the data set in the system or user catalog.
and the purpose of KEEP is data set is to be kept on the volume if this step terminates normally.
Can you guys please explain the scenarios when we've to use each or exact purpose of each...
Its a type error. I'm using same data set names for creating both index and model.
While creating new version for the GDG i'm using MFI01.user.GDGROUP1(+1) and DISP=(,CATLG,DELETE) statement.
Hi Anuj:
Thanks for your response.
I know purpose of CATLG is to place an entry pointing to the data set in the system or user catalog.
and the purpose of KEEP is data set is to be kept on the volume if this step terminates normally.
Can you guys please explain the scenarios when we've to use each or exact purpose of each...
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Such errors would lead you to have no or late solution, so please try to avoid them.sreekanth1984 wrote:Its a type error. I'm using same data set names for creating both index and model.
If your site is SMS manged then KEEP will be treated as CATLG but for non-sms site with KEEP you need to provide the volume number as you said.I know purpose of CATLG is to place an entry pointing to the data set in the system or user catalog. and the purpose of KEEP is data set is to be kept on the volume if this step terminates normally.
Can you guys please explain the scenarios when we've to use each or exact purpose of each...
One example of using KEEP in DISP can be for such a data-set which I need to hand-over to client once created and as a programmer that data is no longer needed to me so I'd not like to keep the entry for that in my system or user catalog.
Regards,
Anuj
Anuj
If your site is SMS managed, and the ACS routines are correctly defined, there should me absolutely no need for a model or reference dataset, just create it as
Code: Select all
//DDNAME DD DSN=GDG base name(+1),DISP=(,CATLG,DELETE),
// RECFM=whatever, LRECL=whatever
If we are here to help the others,
then what are the others here for ?
then what are the others here for ?
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page