View previous topic :: View next topic
|
Author |
Message |
balaji81_k
Active User
Joined: 29 Jun 2005 Posts: 155
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
WHy not use ISRSUPC - it already exists and is far more efficient that REXX |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Thanks Pedro, I think I will now go and take my medication |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|