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
 

 

Scanning PDS name for multiple strings

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 89

PostPosted: Mon Apr 08, 2013 5:18 pm    Post subject: Scanning PDS name for multiple strings
Reply with quote

Hi ,

I have written sample rexx to check the given dataset name contains the below strings .
Code:

pds.1  = 'load'   
pds.2  = 'cobol'   
pds.3  = 'ddiomap'
pds.4  = 'cntl'   
pds.5  = 'copy'   
pds.6  = 'dbrm'   
pds.7  = 'dclgen' 
pds.8  = 'proc'   
pds.9  = 'psb'     
pds.10 = 'rundeck'
pds.11 = 'tcm' 

dsname  = ‘AAA.BBB.COBOL’

DO I = 1 TO 11
  IF POS(PDS.I,DSNAME)  <> 0 THEN   
  do                                 
       SAY DSNAME
  end 




Is that possible to check multiple strings at one time by scanning a pds name ?.

Thanks
Balaji K
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Mon Apr 08, 2013 5:31 pm    Post subject:
Reply with quote

Quote:
Is that possible to check multiple strings at one time by scanning a pds name ?.


IIUYC I believe that is what your code does

*IIUYC = If I understand you correctly
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 08, 2013 5:45 pm    Post subject:
Reply with quote

WHy not use ISRSUPC - it already exists and is far more efficient that REXX
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2033
Location: Silicon Valley

PostPosted: Mon Apr 08, 2013 6:48 pm    Post subject: Reply to: Scanning PDS name for multiple strings
Reply with quote

Quote:
WHy not use ISRSUPC - it already exists and is far more efficient that REXX


I think the question is about the name of the PDS rather than the contents of the PDS. If my understanding is correct, ISRSUPC is not correct.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 08, 2013 6:55 pm    Post subject:
Reply with quote

Thanks Pedro, I think I will now go and take my medication icon_redface.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Mon Apr 08, 2013 7:10 pm    Post subject:
Reply with quote

Hello,
Quote:
Is that possible to check multiple strings at one time by scanning a pds name ?.

Are you looking for something like this?
Code:
/*REXX*/                                                               
STR = 'LOAD,COBOL,DDIOMAP,CNTL,COPY,DBRM,DCLGEN,PROC,PSB,RUNDECK,TCM'   
                                                                       
DSNAME  = 'AAA.BBB.COBOL'                                               
X=TRANSLATE(DSNAME,' ','.');                                           
LQUAL = WORD(X,WORDS(X))                                               
                                                                       
IF POS(LQUAL,STR)  <> 0 THEN                                           
 DO                                                                     
   SAY DSNAME                                                           
 END                                                                   
EXIT                                                                   
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


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