View previous topic :: View next topic
|
Author |
Message |
purushoth_jp
New User
Joined: 12 Dec 2004 Posts: 22
|
|
|
|
All-
Is there is any way to list out all the dataset in a particular mask and to pick up the latest dataset. if so please let me know. thanks in advance.
for example.
i want to list out the datasets in this mask (C.CI.V010.C*.R01) and to pick up the latest dataset through REXX is there is any way?
to be more clear, if suppose im browsing this mask in ISPF 3.4 option. Let us assume that I'm getting 4 datasets
C.CI.V010.C8368.R01 MIGRAT2
C.CI.V010.C8369.R01 PBP248
C.CI.V010.C8370.R01 PBP168
C.CI.V010.C8371.R01 PBP191
then i want the latest dataset (C.CI.V010.C8371.R01) to be displayed in my screen through REXX. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
The best method would be the ISPF service LMDLIST, which accepts "mask" in the LEVEL parameter.
O. |
|
Back to top |
|
|
Steve Coalbran
New User
Joined: 01 Feb 2007 Posts: 89 Location: Stockholm, Sweden
|
|
|
|
Summat like...
Code: |
/*REXX(LM)*/
ARG dsmask .
ADDRESS ISPEXEC
"LMDINIT LISTID(LI) LEVEL("dsmask")"
IF( RC<>0 )THEN EXIT RC
"LMDLIST LISTID(&LI) GROUP(TEMPNAME) OPTION(SAVE)"
"LMDFREE LISTID(&LI)"
"BROWSE DATASET(TEMPNAME.DATASETS)" |
passed the mask as an argument?
Code: |
LM C.CI.V010.C*.R01 |
Adjust the code if you want the mask to follow standard TSO/ISPF naming conventions - ie no quote prepends the SYSPREF value. |
|
Back to top |
|
|
|