Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
GDG gen check using REXX

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: GDG gen check using REXX
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: 8405
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 18, 2018 9:40 pm    Post subject:
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: 672
Location: The Universe

PostPosted: Thu Apr 19, 2018 3:19 am    Post subject:
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: 8735
Location: Welsh Wales

PostPosted: Thu Apr 19, 2018 12:19 pm    Post subject:
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    Post subject:
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    Post subject:
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: 10535
Location: italy

PostPosted: Thu Apr 19, 2018 4:46 pm    Post subject: Reply to: GDG gen check using REXX
Reply with quote

topic locked
it belongs to the [in]famous category of
http://ibmmainframes.com/viewtopic.php?t=20820
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.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Will this code extract 1 byte from fi... pkmurali CLIST & REXX 8 Sat Nov 10, 2018 11:13 pm
No new posts Error reading file in REXX module ashek15 CLIST & REXX 3 Wed Oct 24, 2018 4:50 am
No new posts Encoding using rexx pkmurali CLIST & REXX 2 Sat Sep 08, 2018 1:05 am
No new posts Can we call QMF proc from REXX ? batu544 CLIST & REXX 6 Fri Aug 03, 2018 11:03 am
No new posts REXX CGI - Hello World vasanthz All Other Mainframe Topics 4 Fri Jul 13, 2018 3:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us