Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting a list of PDS members

910 views
Skip to first unread message

Daryl Wells

unread,
May 14, 2003, 12:49:59 PM5/14/03
to
I need to build a list of PDS members that can be referenced sequentially
in order to build JCL. I was looking at LMDISPLAY and LMMLIST. I can get
LMDISPLAY to display a panel. But, I am unable to get LMMLIST to work.
Can anyone help me with LMMLIST or suggest another approach?

Also, on LMDISPLAY, how can you only display the member names instead of
all the data?

Daryl

Jeff Byrum

unread,
May 14, 2003, 1:20:21 PM5/14/03
to
DSN = data.set.name
xxx. = '' /* Clear array */
OTX = OUTTRAP('xxx.')
Address TSO "LISTDS '"DSN"' MEMBERS" /* Get dir list */
OTX = OUTTRAP('OFF')
Do i = 7 to xxx.0
MEMNAME = STRIP(SUBSTR(xxx.i,3,8))
If MEMNAME = '' then /* continued ALIAS info */
Iterate
/* handle member name */
End i

Michel Castelein

unread,
May 14, 2003, 1:55:09 PM5/14/03
to

"Daryl Wells" <daryl...@FCSO.COM> wrote in message
news:200305141628....@pickering.cc.nd.edu...

Invoke OUTTRAP() and issue the TSO LISTDS command with the MEMBER option.

Michel

------------------------------------------------------------
Michel Castelein
MVS, OS/390, and z/OS System Engineer & Education Consultant
e-mail Mic...@jeeves.be
Home page http://www.geocities.com/michelcastelein/
Company: Jeeves Systems Group, phone +32 2 251 66 50
http://www.jeevessystemsgroup.com
------------------------------------------------------------


Lionel B Dyck

unread,
May 14, 2003, 1:52:12 PM5/14/03
to
Here is an example:

/* rexx */

arg dsn imem
if dsn = "" then exit 8
Address ISPEXEC
"LMINIT DATAID(STATUS) DATASET("dsn")"
"LMOPEN DATAID("STATUS") OPTION(INPUT)"
parse value "" with member mem.
mem.0 = 0
do forever
if length(imem) = 0 then
"LMMLIST Dataid("status") OPTION(LIST) MEMBER(MEMBER) STATS(YES)"
else
"LmmList Dataid("status") Option(List) Member(member)",
"Pattern("imem")"
if rc > 7 then leave
c = mem.0 + 1
mem.c = member ,
ZLCDATE ZLMDATE ZLVERS ZLMOD ZLMTIME ZLCNORC,
ZLINORC ZLMNORC ZLUSER
mem.0 = c
end
"LMClose Dataid("status")"
"LMFree Dataid("status")"
say "Member ",
"ZLCDATE ZLMDATE ZLVERS ZLMOD ZLMTIME ZLCNORC" ,
"ZLINORC ZLMNORC ZLUSER"
do i = 1 to mem.0
say mem.i
end

--------------------------------------------------------------------
Lionel B. Dyck, Systems Software Lead
Kaiser Permanente Information Technology
25 N. Via Monte Ave
Walnut Creek, Ca 94598

Phone: (925) 926-5332 (tie line 8/473-5332)
E-Mail: Lionel...@kp.org
Sametime: (use Lotus Notes address)
AIM: lbdyck

Dave Salt

unread,
May 14, 2003, 2:01:39 PM5/14/03
to
It's easy enough to get LMMLIST working and I'm sure someone on the list
will post a message explaining how to do it (if they don't let me know and
I'll post something). However, you also asked for other approaches so here's
one you might not have considered...

Go into a member list and enter SAVE FISH on the member list command line.
You'll see a message saying "List saved"; press HELP and you'll see a longer
message telling you the name of the sequential data set in which the member
list was saved; i.e. 'yourprefix.FISH.MEMBERS'. You can import the list into
your JCL and use it as control cards, or you can have your program read the
member list from the sequential data set.

I'm not saying this is a better way to do it, only that it's "another
approach". HTH,

Dave Salt
http://www.soft-center.com

>From: Daryl Wells <daryl...@FCSO.COM>
>Reply-To: ISPF discussion list <ISP...@LISTSERV.ND.EDU>
>To: ISP...@LISTSERV.ND.EDU
>Subject: Getting a list of PDS members
>Date: Wed, 14 May 2003 11:28:17 -0500
>
>I need to build a list of PDS members that can be referenced sequentially
>in order to build JCL. I was looking at LMDISPLAY and LMMLIST. I can get
>LMDISPLAY to display a panel. But, I am unable to get LMMLIST to work.
>Can anyone help me with LMMLIST or suggest another approach?
>
>Also, on LMDISPLAY, how can you only display the member names instead of
>all the data?
>
>Daryl

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

Rob Zenuk

unread,
May 14, 2003, 8:27:03 PM5/14/03
to
Here is a quick and dirty example that uses LMMLIST, a temporary table, File
Tailoring and ISPF Edit to generate a member list inside anything you want.
It could be much more complete, but I didn't want to spend the time right now
to clean it up. I used to have a really sophisticated one of these several
years ago, but lost it...

Put the EXEC in SYSPROC or SYSEXEC and create an ISPF Skeleton in your
ISPSLIB (I have a sample below).

To use it from option 6 type:

===> LMMTABLE your.target.pds yourskel mem*

The results of the file tailoring will be presented in ISPF Edit and you can
change and submit at will.

Anyway, here is the LMMTABLE EXEC

/* REXX - LMMTABLE */
arg dsn skel pat .
if dsn = '' then exit(99)
if skel = '' then exit(98)
if pat = '' then pat = '*'
address ISPEXEC
"TBCREATE MEMBERS KEYS(MEMBER)"
"LMINIT DATAID(PDS) DATASET('"dsn"') ENQ(SHR)"
"LMOPEN DATAID("pds")"
do forever
"LMMLIST DATAID("pds") OPTION(LIST) STATS(YES) MEMBER(MEMBER)",
"PATTERN("pat")"
if RC = 8 then leave
"TBADD MEMBERS"
end
"LMMLIST DATAID("pds") OPTION(FREE)"
"LMCLOSE DATAID("pds")"
"LMFREE DATAID("pds")"
"FTOPEN TEMP"
"FTINCL" skel
"FTCLOSE"
"TBEND MEMBERS"
"VGET (ZTEMPF ZTEMPN)"
"EDIT DATASET('"ztempf"')"
address TSO
"FREE F("ztempn") DELETE"

The member name will be in a variable called MEMBER. It does generate member
stats, so you could actually use those in your skeleton too, but will need to
reference the ISPF manuals to get all the ZL* variables.

Here is a sample Skeleton to generate an IEBGENER:

//LISTMEMS JOB (0000),ROB,CLASS=A,MSGCLASS=X,NOTIFY=&ZUSER
//****************************************************************
//* PRINT A MEMBER LIST *
//****************************************************************
//PRINT EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
)DOT MEMBERS
&MEMBER
)ENDDOT
//SYSUT2 DD SYSOUT=*
//SYSIN DD DUMMY

The skeleton could be used to generate JCL, control cards, HTML, whatever...
There are lots of options with skeletons (see the manual).


Hope This Helps,
Robert Zenuk
robz...@aol.com

0 new messages