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
 
How to query MAXGENS of an existing PDSE version 2 via batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Chuchulo Hatyzak

New User


Joined: 08 Nov 2017
Posts: 3
Location: Czech Republic

PostPosted: Wed Nov 22, 2017 10:23 pm    Post subject: How to query MAXGENS of an existing PDSE version 2 via batch
Reply with quote

Hello Mainframers

PDSE version 2 allows MAXGENS JCL keyword during data set creation to specify the maximum number of member generations. Is there any simple tool to query the MAXGENS value of an existing data set from batch/JCL?

I did some research and here is what I found so far:
1) LISTCAT will not help, because the info about PDSE version (1/2) and MAXGENS is not in the catalog. According to IBM, PDSE's V2 are self-describing.
2) I can display PDSE version and MAXGENS in ISPF 3.4 using line command I or S. I would like to get this info from a job.
3) IEBPDSE utility shows PDSE version, but does not show MAXGENS - this is the only part I am missing.
4) ISPF service DSINFO can display MAXGENS, but it is not straight-forward to run it from batch (requires to allocate ISPF libraries in a job step and is user dependent). I would like to use something simple as IEBPDSE to get the MAXGENS info.

Thanks
Chuchulo
Back to top
View user's profile Send private message

nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Tue Nov 28, 2017 4:22 pm    Post subject: Reply to: How to query MAXGENS of an existing PDSE version 2 via batch
Reply with quote

Hi; we use this

//S3 EXEC PGM=IKJEFT01,REGION=256M
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EX 'INPUT.DSN(A)'
member a contains (only works if relatively upto date maintenance installed)

Code:
/*REXX*/                                                       
CVT      = C2D(STORAGE(10,4))                                   
CVTDFA   = C2D(STORAGE(D2X(CVT + 1216),4))   /* CVT + 4C0 */   
DFAMGEN  = C2D(STORAGE(D2X(CVTDFA + 76),4))  /* DFA + 4C */     
SAY 'MAXGEN LIMIT:' DFAMGEN                                     
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10494
Location: italy

PostPosted: Tue Nov 28, 2017 4:41 pm    Post subject: Reply to: How to query MAXGENS of an existing PDSE version 2 via batch
Reply with quote

Quote:
4) ISPF service DSINFO can display MAXGENS, but it is not straight-forward to run it from batch (requires to allocate ISPF libraries in a job step and is user dependent). I would like to use something simple as IEBPDSE to get the MAXGENS info.


not complicated at all ...
You will only need the basic Ispf libraries
and a dataset containing Your rexx script

gazillions of examples around the forum
Back to top
View user's profile Send private message
Chuchulo Hatyzak

New User


Joined: 08 Nov 2017
Posts: 3
Location: Czech Republic

PostPosted: Fri Dec 08, 2017 2:09 am    Post subject: Re: Reply to: How to query MAXGENS of an existing PDSE version 2 via batch
Reply with quote

nevilh wrote:

Code:
/*REXX*/                                                       
CVT      = C2D(STORAGE(10,4))                                   
CVTDFA   = C2D(STORAGE(D2X(CVT + 1216),4))   /* CVT + 4C0 */   
DFAMGEN  = C2D(STORAGE(D2X(CVTDFA + 76),4))  /* DFA + 4C */     
SAY 'MAXGEN LIMIT:' DFAMGEN                                     


Hello nevilh

This works and it is a nice trick, but unfortunately it is not exactly what I wanted. This gives me the installation-wide limit for MAXGENS. What I wanted was to get MAXGENS which was used at the time of creation of a particular PDSE, which is anything between zero and the installation limit.

Thanks anyway.
Back to top
View user's profile Send private message
Chuchulo Hatyzak

New User


Joined: 08 Nov 2017
Posts: 3
Location: Czech Republic

PostPosted: Fri Dec 08, 2017 2:15 am    Post subject: Re: Reply to: How to query MAXGENS of an existing PDSE version 2 via batch
Reply with quote

enrico-sorichetti wrote:
not complicated at all ...
You will only need the basic Ispf libraries
and a dataset containing Your rexx script


Hello Enrico
I gave it a try and it was simpler than I thought. I will use it.
Thanks a lot.

Ch.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Query for fetching matching data in t... Poha Eater DB2 10 Mon Jul 09, 2018 6:06 pm
No new posts Varying List Select SQL Query In DB2 ... NikhilGuptaGaya DB2 5 Wed Jun 27, 2018 11:01 pm
No new posts How to force a select query to abend neo4u DB2 7 Mon Apr 23, 2018 1:36 pm
No new posts batch cobol/db2 paragraph fall thru a... alois eisshofer COBOL Programming 5 Wed Mar 14, 2018 12:21 am
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am

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