GDG Member existence
Moderators: Frank Yaeger, DikDude, Moderator Group
GDG Member existence
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.
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.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
In this
bold text needs explanation?if the versions exist and then go copy all the versions into a local PDS.
If you show us the JCL used and the SYSOUT messages from the failed job, some one can have a better suggestion.JCL is abending if the versions are not available and if I try to copy all versions.
Regards,
Anuj
Anuj
checking GDG versions availability with IDCAMS LISTCAST
Hi Chandu,
Here is solutions for this.
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.
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')
/*
If the GDG base does not have any generation then it will return code of 4.
Natarajan
Chennai
Chennai
-
- Member
- Posts: 1
- Joined: Thu May 01, 2014 12:40 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.
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
Nic
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
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.This is throwing a JCL error is versions are not present.
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
Anuj
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