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

How to list datasets with particular mask


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
purushoth_jp

New User


Joined: 12 Dec 2004
Posts: 22

PostPosted: Sat Feb 24, 2007 5:33 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sat Feb 24, 2007 7:58 pm
Reply with quote

The best method would be the ISPF service LMDLIST, which accepts "mask" in the LEVEL parameter.

O.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Sun Mar 04, 2007 7:06 pm
Reply with quote

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
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
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