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: 10524
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 regarding STOP REGION XX ABDU... ashek15 IMS DB/DC 10 Fri Oct 19, 2018 10:13 am
No new posts Facing issue while executing multi ro... aagarwal88 DB2 6 Tue Oct 02, 2018 8:11 am
No new posts DB2 SQL Query to fetch all instances ... MallikarjunSM DB2 2 Thu Sep 27, 2018 6:46 pm
No new posts Generate SQL query dynamically using ... vnktrrd DB2 7 Tue Aug 28, 2018 8:11 pm
No new posts How to add new LPARs and change exist... Alan Playford All Other Mainframe Topics 0 Thu Aug 23, 2018 5:52 pm

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