Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to avoid/Omit Addtional qualifer while using LMDINIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to avoid/Omit Addtional qualifer while using LMDINIT
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Nov 27, 2014 7:06 pm    Post subject: Reply to: How to avoid/Omit Addtional qualifer while using L
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    Post subject: Reply to: How to avoid/Omit Addtional qualifer while using L
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts Join and Omit records- Master File no... shajeeth DFSORT/ICETOOL 5 Tue Jan 26, 2016 8:16 pm
No new posts OMIT other unsatisfied records in OUT... tvinodkumar7 DFSORT/ICETOOL 6 Thu Jan 08, 2015 1:33 pm
No new posts Omit a group of records if meet some ... abby.qiong.zhang DFSORT/ICETOOL 6 Sun May 04, 2014 2:45 pm
No new posts Use SORT to Split file and omit some ... abby.qiong.zhang DFSORT/ICETOOL 13 Mon Apr 21, 2014 11:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us