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: 260

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
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 to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm
No new posts Query on XMITIP abdulrafi All Other Mainframe Topics 1 Wed Oct 25, 2017 6:54 pm

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