GDG Member existence

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
iChandhu
Member
Posts: 5
Joined: Mon Jun 29, 2009 4:07 pm
Location: Bangalore

GDG Member existence

Post by iChandhu » Thu Jul 16, 2009 2:26 pm

Is it possible to find out if the GDG has any versions created?

I want to check if the versions exist and then go copy all the versions into a local PDS.
JCL is abending if the versions are not available and if I try to copy all versions.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Thu Jul 16, 2009 5:18 pm

Yes it is possible.
Natarajan
Chennai

iChandhu
Member
Posts: 5
Joined: Mon Jun 29, 2009 4:07 pm
Location: Bangalore

Post by iChandhu » Thu Jul 16, 2009 5:45 pm

How ??
I mean using IDCAMS ??

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

Post by Anuj Dhawan » Fri Jul 17, 2009 10:33 pm

Probably you mean "Generations". Generations and versions both are valid terms in the context of "GDS" but they have very different meanings.
if the versions exist and then go copy all the versions
You can use "gdg-base" as input...?
Regards,
Anuj

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

Post by Anuj Dhawan » Fri Jul 17, 2009 10:36 pm

In this
if the versions exist and then go copy all the versions into a local PDS.
bold text needs explanation? :?
JCL is abending if the versions are not available and if I try to copy all versions.
If you show us the JCL used and the SYSOUT messages from the failed job, some one can have a better suggestion.
Regards,
Anuj

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

checking GDG versions availability with IDCAMS LISTCAST

Post by Natarajan » Mon Jul 20, 2009 2:12 pm

Hi Chandu,

Here is solutions for this.

Code: Select all

//PS010 EXEC PGM=IDCAMS 
//SYSPRINT DD DUMMY 
//SYSOUT DD SYSOUT=* 
//SYSIN DD * 
LISTCAT LEVEL('DEV.GDG.BASE') 
/* 
This Utility will return (RC = 0) Zero if GDG Generation exists for the base mentioned in LISTCAT option.

If the GDG base does not have any generation then it will return code of 4.
Natarajan
Chennai

smitha Shetty
Member
Posts: 1
Joined: Thu May 01, 2014 12:40 pm

Post by smitha Shetty » Thu May 01, 2014 12:42 pm

Hi,

I tried using LISTCAT level commang but it is returning RC code as 0000 for everything. I need to copy all the versios of GDG into another GDG is versions exists. This is throwing a JCL error is versions are not present. Can somebody please guide?

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu May 01, 2014 1:12 pm

The LISTCAT gives a return code of zero as it successfully undertook the task assigned to it. no datasets to list? No problem, do not list - success! Could not read the catalog? Woops - error! If you are going down the listcat route you need to write the output to a dataset, write a program to analyze that dataset and issue a return code based on the analysis. The next step would run/not run dependent on that return code.

I presume you mean generation and not version - the bit after the V in GxxxxVxx is the version wheras Gxxxx is the generation. Also no JCL error was "thrown" - things are not "thrown" on the mainframe. Your job may have failed with a JCL error.
Regards
Nic

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

Post by Anuj Dhawan » Mon May 12, 2014 12:01 pm

This is throwing a JCL error is versions are not present.
From memory - you should get a RC=4, if the GDG Base exists and not an error. Can you please show us the error you are getting.

ALSO, you've replied to a 5 year old post - it's usually better to start a new thread with your question and in doing so you might refer back to the previous post you've looked at otherwise your own question get mingled with the original question of previous thread and you might not get a direct answer to your question.
Regards,
Anuj

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Mon May 12, 2014 1:18 pm

seems to have disappeared!
Regards
Nic

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