Regarding GDG

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Regarding GDG

Post by sreekanth1984 » Thu Oct 15, 2009 11:19 am

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.......

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Oct 15, 2009 11:58 am

are you cataloging the GDG when you create it?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Post by sreekanth1984 » Thu Oct 15, 2009 12:08 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)
//

Gerry Ciccheti
Member
Posts: 16
Joined: Thu Jul 30, 2009 7:52 am

Post by Gerry Ciccheti » Mon Oct 19, 2009 6:39 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

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Oct 20, 2009 5:40 pm

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)
//
1. Are you defining a GDG Model here, as the DDName (and the low level qualifier of DSN) suggests that?

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

sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Post by sreekanth1984 » Tue Oct 20, 2009 7:18 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...

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Oct 21, 2009 2:28 pm

sreekanth1984 wrote:Its a type error. I'm using same data set names for creating both index and model.
Such errors would lead you to have no or late solution, so please try to avoid them.
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...
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.

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

expat
Member
Posts: 1
Joined: Sat Oct 24, 2009 5:49 pm

Post by expat » Sat Oct 24, 2009 5:54 pm

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 ?

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Oct 26, 2009 2:04 pm

Welcome on Board Big B... :)
Regards,
Anuj

Post Reply

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



Other References
Mainframe Tools and others