IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to query MAXGENS of an existing PDSE version 2 via batch


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Nov 28, 2017 4:41 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts RC query -Time column CA Products 3
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
Search our Forums:

Back to Top