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

How to avoid/Omit Addtional qualifer while using LMDINIT


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

New User


Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Thu Nov 27, 2014 6:31 pm
Reply with quote

Hi All,

I am using to retrieve the list of dataset using the below rexx command
INPUTDS=XXX.YY.B*
ADDRESS TSO
"ISPEXEC LMDINIT LISTID(IDV) LEVEL("INPUTDS")"
DO FOREVER
ADDRESS TSO "ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"

IF RC= 0 THEN
SAY DSVAR
EXIT

But while using this we have get addtional qualifer dataset also.So how can we avoid/Omit Addtional qualifer

For example:
XXX.YY.B1
XXX.YY.B1.te1
XXX.YY.B2
XXX.YY.B3
XXX.YY.B4
XXX.YY.B4.te1
XXX.YY.B4.te2
XXX.YY.B1.te1


My requirement is to display,when we given XXX.YY.B* as INPUTDS

the results should be
XXX.YY.B1
XXX.YY.B2
XXX.YY.B3
XXX.YY.B4

how can we achive this.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Thu Nov 27, 2014 7:06 pm
Reply with quote

ISPF will return - as You have seen - all the datasets
which - as the name tells - will match the LEVEL keyword

You will have to discard on your own the unwanted ones

with something like

Code:
ds.1 = "lev1.lev2.lev3"
ds.2 = "lev1.lev2.lev3.lev4"
ds.0 = 2

do d = 1 to ds.0

   parse var ds.d l1 "." l2 "." l3 "." tail

   if tail = "" then ,
      say d left(ds.d,20) "GOOD"
   else
      say d left(ds.d,20) "VERY BAD"
end
Back to top
View user's profile Send private message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Thu Nov 27, 2014 7:46 pm
Reply with quote

Thanks Enrico.
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 OMIT first and last column of a pipe-... DFSORT/ICETOOL 1
No new posts Create Dynamic Sort card with Omit co... DFSORT/ICETOOL 9
No new posts Include or Omit with "ALL" ... DFSORT/ICETOOL 5
No new posts Display ZEDLMSG without Pressing F1 &... CLIST & REXX 8
No new posts Join and Omit records- Master File no... DFSORT/ICETOOL 5
Search our Forums:

Back to Top