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

Equivalent of a dataset list (as 3.4) in a Rexx batch

1,273 views
Skip to first unread message

emmanuel LEROI

unread,
Mar 27, 2003, 5:38:09 AM3/27/03
to
Hello list !
Is there a (easy?) way to obtain an equivalent of a 3.4 under ISPF in a
rexx batch.

In fact, i've got, in input of my exec, a pattern like : HLQ1.SEQ.X* for
exemple.
I want to obtain a list of cataloged dataset matching with the pattern and
their associated volumes.
Is there a function (or other) to do that ?

Thank's to all who can help me !
Regards.
Emmanuel.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Prasanna Kannan , Tidel Park - Chennai

unread,
Mar 27, 2003, 6:16:28 AM3/27/03
to
emmanuel,

below commands can be put in a rexx macro and executed in match mode.

DSLISTID = 0
"ISPEXEC LMDINIT LISTID(DSLISTID) DATASET('"<dataset pattern>"') ENQ(SHR)"

'ISPEXEC LMDLIST LISTID('DSLISTID') OPTION(SAVE) GROUP(<group name>)'


this will cause the members to be saved under the name HFX.datasets
if you print this dataset you will get the datasets matching the pattern and
their volumes..

Hope this helps.

regards,
Prasanna

Prasanna Kannan , Tidel Park - Chennai

unread,
Mar 27, 2003, 6:27:32 AM3/27/03
to
emmanuel,

you can also use listds command in batch mode,.....

regards,
prasanna

Ken MacKenzie

unread,
Mar 27, 2003, 6:56:52 AM3/27/03
to
Emmanuel,

You could try using the LISTCAT command and trapping the output. Use
something like this:

dslevel = 'HLQ1.SEQ'
x = Outtrap('LC.')
"LISTCAT LEVEL('"dslevel"') VOLUME"
x = Outtrap('OFF')
Do i = 1 To lc.0
/* Process the lines as appropriate */
End

A sample of the LISTCAT output:
NONVSAM ------- BXIAS1.X117424.ASM
IN-CAT --- SYS1.CATALOG.VXU0013
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2002.184
RELEASE----------------2 EXPIRATION------1999.365
ACCOUNT-INFO-----------------------------------(NULL)
DSNTYPE----------LIBRARY
SMSDATA
STORAGECLASS ---STANDARD MANAGEMENTCLASS------M02
DATACLASS --------(NULL) LBACKUP ---0000.000.0000
VOLUMES
VOLSER------------LIB299 DEVTYPE------X'3010200F'

emmanuel LEROI
<Emmanue...@AG2R.COM> To: TSO-...@VM.MARIST.EDU
cc:
Sent by: TSO REXX Discussion List Subject: Equivalent of a dataset list (as 3.4) in a Rexx batch
<TSO-...@VM.MARIST.EDU>

Thursday March 27, 2003 10:23
Please respond to TSO REXX
Discussion List

Kragøe Per

unread,
Mar 27, 2003, 7:40:39 AM3/27/03
to
I have used listcat for many years, and I will not recomend it because the
format is changing over time. If you are using ISPF in batch I would
recomend the LMDLIST function. It also supports generic HLQ (eg. SYS*.CEE*),
sometimes a nice function.

An other function I found some years ago, that I use:
ADDRESS ISPEXEC "TBCREATE DSLGTAB NAMES(QCLPREF QCLDSN QCLDSN1 QCLDSN2)
NOWRITE REPLACE"
ADDRESS TSO "ICQGCL00 P("PREFIX") QUAL1("QUAL1") QUAL2("QUAL2") EXACT(N)
TABLE(DSLGTAB)"

It updates the ISPF table, and you may skip through the table using the
column QCLDSN.

Regards Per Kragře
EDB Fellesdata as

0 new messages