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

List of members in a PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kanna n

New User


Joined: 04 Oct 2007
Posts: 12
Location: pune

PostPosted: Wed Jan 06, 2010 3:00 pm
Reply with quote

Hi,

Do we have any utility to get the information of a PDS like the list of members present in a PDS, when they modified last time.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 06, 2010 3:14 pm
Reply with quote

sure
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 06, 2010 4:08 pm
Reply with quote

If you need to write your own, remember working with a PDS means using the ISPF Library Management Services. In this case, the LMMLIST service.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 06, 2010 4:14 pm
Reply with quote

Hi Kevin,

as far as I see it he is opting for a ready for use solution.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jan 06, 2010 5:06 pm
Reply with quote

Or of course you could research IEHLIST as an option.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Jan 06, 2010 8:21 pm
Reply with quote

Go to ISPF Option 3.1 and print the index listing of the PDS (option 'X').
Back to top
View user's profile Send private message
viveksurya

New User


Joined: 08 Jun 2009
Posts: 36
Location: Bangalore

PostPosted: Thu Jan 07, 2010 12:23 pm
Reply with quote

Hi Kanna,

Besides utility, u can get the required details using the following procedure:

Open PDS & type following in the command line,
"SAVE '2nd level qualifier' "
This will save all the members' name and attributes into a flat file named <ur userid>.<2nd level qualifier>.MEMBERS

Here is the illustration:

Code:
VIEW              VS059U.TEST.JCLLIB                        Row 00001 of 00008
Command ===> SAVE DETAILS                                     Scroll ===> CSR 
           Name     Prompt       Size   Created          Changed          ID   
_________ JOINREC                  39  2010/01/05  2010/01/05 04:31:00  VS059U
_________ MATCHREC                 52  2010/01/06  2010/01/06 03:09:28  VS059U
_________ OUTREC01                 31  2009/12/28  2009/12/28 01:32:03  VS059U
_________ OUTREC1                  34  2009/12/28  2009/12/29 00:14:57  VS059U
_________ RECJOIN                  43  2010/01/05  2010/01/05 05:36:02  VS059U
_________ SAMUNSTR                 25  2009/12/23  2009/12/23 05:43:54  VS059U
_________ SUMOVRLY                 34  2009/12/29  2009/12/29 01:20:16  VS059U
_________ TSTCOUNT                 35  2010/01/05  2010/01/05 04:20:55  VS059U
          **End**                                                             


The dataset where details are saved will look like this:

Code:
 VIEW       VS059U.DETAILS.MEMBERS                          Columns 00009 00080
 Command ===>                                                  Scroll ===> CSR 
 ****** ***************************** Top of Data ******************************
 000001    JOINREC                01.75 10/01/05 04:31    39    39     0 VS059U
 000002    MATCHREC               01.03 10/01/06 03:09    52    52     0 VS059U
 000003    OUTREC01               01.70 09/12/28 01:32    31    31     0 VS059U
 000004    OUTREC1                01.71 09/12/29 00:14    34    31     0 VS059U
 000005    RECJOIN                01.01 10/01/05 05:36    43    44     0 VS059U
 000006    SAMUNSTR               01.68 09/12/23 05:43    25  1411     0 VS059U
 000007    SUMOVRLY               01.71 09/12/29 01:20    34    34     0 VS059U
 000008    TSTCOUNT               01.75 10/01/05 04:20    35    35     0 VS059U


Hope you had same requirement.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Jan 07, 2010 9:45 pm
Reply with quote

Hello,

Quote:
Do we have any utility to get the information of a PDS like the list of members present in a PDS, when they modified last time.
Only if the statistics have been generated. . . On many partitioned datasets, statistics are not available. . .
Back to top
View user's profile Send private message
sam_ok

New User


Joined: 22 Mar 2007
Posts: 18
Location: Hong Kong

PostPosted: Thu Oct 21, 2010 12:32 pm
Reply with quote

Bill Dennis wrote:
Go to ISPF Option 3.1 and print the index listing of the PDS (option 'X').


Do you know how to use JCL to print index listing of a PDS ?

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu Oct 21, 2010 12:39 pm
Reply with quote

Please DO NOT tag your question onto an existing one, even though YOU might think this a good idea.

And to answer your question, Yes I do.
Go read my previous post in this thread and you will find your answer.
Back to top
View user's profile Send private message
sam_ok

New User


Joined: 22 Mar 2007
Posts: 18
Location: Hong Kong

PostPosted: Thu Oct 21, 2010 2:42 pm
Reply with quote

You mean "IEHLIST with LISTPDS " ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu Oct 21, 2010 2:47 pm
Reply with quote

Exactement
Back to top
View user's profile Send private message
sam_ok

New User


Joined: 22 Mar 2007
Posts: 18
Location: Hong Kong

PostPosted: Thu Oct 21, 2010 2:54 pm
Reply with quote

The output of "IEHLIST with LISTPDS" is great different from PX line command (print index) in ISPF 3.4 menu, or using 'SAVE' primary command.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu Oct 21, 2010 3:15 pm
Reply with quote

Yes, but you asked for a utility that will list PDS members. IEHLIST does exactly what you requested.

If you want further information from the PDS then you have to actually say exactly what it is that you want to see.
Back to top
View user's profile Send private message
sam_ok

New User


Joined: 22 Mar 2007
Posts: 18
Location: Hong Kong

PostPosted: Thu Oct 21, 2010 3:46 pm
Reply with quote

HERE IS MY FINAL SOLUTION....

(1) Go to www.jaymoseley.com/hercules/cbtware/listpds.htm
(2) Download listpds.tgz (There is a download link)
(3) Extract the source code from listpds.tgz. The source code is written by Assembler language.
(4) Upload the source to your MVS host
(5) Compile it. Remember using the following SYSLIB:
.....
//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
// DD DSN=SYS1.MODGEN,DISP=SHR
.....
//SYSLMOD DD DSN=SYS2.LINKLIB,DISP=SHR
.....

(6) Submit the following JCL to run LISTPDS. For details, you may refer to point no. (1)

//JOBLIB DD DISP=SHR,DSN=SYS2.LINKLIB
//STEP1 EXEC PGM=LISTPDS
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSLIB DD DISP=SHR,DSN=DRVUSER.JCL.SSL

Hope the above information is useful.
icon_razz.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Oct 21, 2010 6:32 pm
Reply with quote

Your final solution disregards the most elementary rules of a good organization
what has been requested can be achieved using vanilla system utilities!
loading and installing software without proper authorization is sometimes cause for lawful termination
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 21, 2010 6:46 pm
Reply with quote

sam_ok, if an application programmer tried your solution at my site, their first problem would be that library SYS2.LINKLIB does not exist. Then if they changed the JCL you provided to use an existing SYSx.LINKLIB, they would find that they cannot update any of the SYSx.LINKLIB at all and would generate a RACF error message. There would then be close management scrutiny of the approval process used to implement the software solution you proposed. Your solution is site-specific, not generic, and ignores a number of common security protocols designed to prevent system problems -- all of which could, very easily, cause an application programmer's employment status to change rapidly.

There are very good reasons why software installations at mainframe sites are typically handled by systems programmers.
Back to top
View user's profile Send private message
sam_ok

New User


Joined: 22 Mar 2007
Posts: 18
Location: Hong Kong

PostPosted: Mon Oct 25, 2010 1:12 pm
Reply with quote

I am a system programmer. icon_cool.gif

I provided the solution. There should be lot of procedures to follow for promoting such a program to production environment.

Of course, the whole process must conform to the security policy of a company.
Back to top
View user's profile Send private message
sam_ok

New User


Joined: 22 Mar 2007
Posts: 18
Location: Hong Kong

PostPosted: Mon Oct 25, 2010 2:44 pm
Reply with quote

No need to compile an alien program....

I copied it from another forum.

Step 1: Create the following REXX (saved it as "LIST01")

=============================================
/* REXX */
/* QUICK ISPF SAVE OF MEMBER STATS. */
ARG DS G
/* DS IS THE DATA SET NAME TO GET THE STATS FROM. */
/* G IS THE MIDDLE QUALIFER OF THE SAVED DATA SET */
/* THE SAVED DATA SET NAME WILL BE USERID.G.MEMBERS */
IF G = '' THEN G = 'LIST01'
IF DS = '' THEN DS = 'TCPIP.AEZAMODS'
ADDRESS ISPEXEC
"CONTROL ERRORS RETURN"
"LMINIT DATAID(STATID) DATASET('"DS"')"
IF RC = 0 THEN DO
"LMOPEN DATAID("STATID")"
"LMMLIST DATAID("STATID") OPTION(SAVE) STATS(YES) GROUP("G")"
END
"LMFREE DATAID("STATID")"
=============================================

Step 2: Create the following JCL:

=============================================
//ALOCPROF EXEC PGM=IEFBR14
//PROFILE DD UNIT=3390,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1,5)),DCB=(LRECL=80,
// BLKSIZE=0,DSORG=PO,RECFM=FB),VOL=SER=PSPP01,
// DSN=DRVUSER.ISPF.TEMPPROF
//*-------------------------------------------------------------------*
//* INVOKE ISPF *
//*-------------------------------------------------------------------*
//BATCHPDF EXEC PGM=IKJEFT01,DYNAMNBR=128
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSLIB
// DD DISP=SHR,DSN=ISP.SISPSENU
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
//ISPPROF DD DSN=DRVUSER.ISPF.TEMPPROF,DISP=(OLD,DELETE)
//ISPTABL DD DSN=DRVUSER.ISPF.TEMPPROF,DISP=OLD
//ISPTLIB DD DSN=DRVUSER.ISPF.TEMPPROF,DISP=OLD
// DD DISP=SHR,DSN=ISP.SISPTENU
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB)
//ISPLIST DD SYSOUT=*,
// DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//SYSEXEC DD DISP=SHR,DSN=ISP.SISPEXEC
//SYSPROC DD DISP=SHR,DSN=ISP.SISPCLIB
// DD DISP=SHR,DSN=DRVUSER.JCL.CNTL <== contains "LIST01" REXX code
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(DRVUSER)
ISPSTART CMD(%LIST01) NEWAPPL(ISR)
=============================================

*** RESULT ***

You will get the print PDS listing formatted output or "SAVE" PDS listing output.

HORRAY !!! :P
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 How to create a list of SAR jobs with... CA Products 3
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts List of quiesced jobs JCL & VSAM 3
Search our Forums:

Back to Top