IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

GDG gen check using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
raghuraman123

New User


Joined: 09 Nov 2017
Posts: 10
Location: India

PostPosted: Wed Apr 18, 2018 9:18 pm
Reply with quote

is it possible to check GDG current version empty or not? if its empty return the gdg base name as output, I have some 100 different gdg bases which we check manually whether the current gen is empty, I wish to automate this using REXX, any suggestion welcome.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8568
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 18, 2018 9:40 pm
Reply with quote

Quote:
is it possible to check GDG current version empty or not?
First, you need to get the terminology right. A GDG can have generations and versions, and they are different. So the question becomes, do you mean "current version" the way you said, or do you mean "current generation"? Are the generations on disk or tape?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 865
Location: The Universe

PostPosted: Thu Apr 19, 2018 3:19 am
Reply with quote

As Mr. Sample correctly says, terminology is critically important, and there is a critical difference between a "generation" in GDGs and a "version" in a GDG generation.

Fortunately, there is no such thing as an "empty" version in a GDG generation. I presume you really mean a GDG index with no generations.

I will assume you understand how to use the Rexx OUTTRAP capability. You need to "trap" the output from the TSO commands I will discuss later, but you should be able to discard most of this output for some of these commands.

Now then, your first task is to determine if the GDG index exists. You run the command LISTCAT ENTRIES('GDG index'). You can trap and discard the output from this command. If the return code from the command is not 0, the index does not exist.

If the index exists, the run LISTCAT LEVEL('GDG index') If the return code is 0, you want to review this output. You want to trap and examine the output from this command. You want to find at least one line that starts with 'NONVSAM ------- ' If you find at least one NONVSAM line, then the GDG is not empty.

Now that's not so hard, is it?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8793
Location: Welsh Wales

PostPosted: Thu Apr 19, 2018 12:19 pm
Reply with quote

Take a look at a utility I put on here some years ago, CSIUTIL - it may help you
Back to top
View user's profile Send private message
raghuraman123

New User


Joined: 09 Nov 2017
Posts: 10
Location: India

PostPosted: Thu Apr 19, 2018 4:19 pm
Reply with quote

thanks Robert, I learned the diff b/w version and generation, I will ask the question again with a scenario.

A**.XF.BMGX.XF76001 (GDG base)
A**.XF.BMGX.XF76001.G0279V00
A**.XF.BMGX.XF76001.G0280V00 (Current Generation)

Like above I have 100 different GDG's which I should check whether current generation is empty or not for all. Hope I am not confusing this time.

Expat, i will check on it.

And,Thanks for the responses.
Back to top
View user's profile Send private message
raghuraman123

New User


Joined: 09 Nov 2017
Posts: 10
Location: India

PostPosted: Thu Apr 19, 2018 4:25 pm
Reply with quote

Robert, the generation are in DISK(DASD)
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10697
Location: italy

PostPosted: Thu Apr 19, 2018 4:46 pm
Reply with quote

topic locked
it belongs to the [in]famous category of
Use [URL] BBCode for Links
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Calling Assembler from REXX PL/I & Assembler 5
No new posts REXX/CLIST tool for BCSR and EDSR CLIST & REXX 2
No new posts Calling Rexx program from Cobol CLIST & REXX 12
No new posts REXX script to beautify XML CLIST & REXX 1
No new posts TWS PIF (EQQYCOM) Rexx - Occurrence S... IBM Tools 0

Back to Top