Posted: Tue Mar 08, 2005 10:28 am Post subject: Search more than one string using an utility
Hi
I was using the following code in my REXX program to copy the uncommented lines of a COBOL program in to one temp dataset.
Code:
ADDRESS TSO
"FREE FI (SYSOUT SORTIN SORTOUT SYSIN)"
"ALLOC FI (SYSOUT) DA('"SYSOUT_DS"') SHR REUSE"
"ALLOC FI (SORTIN) DA('"FROM_DS"') SHR REUSE"
"ALLOC FI (SORTOUT) DA('"TO_DS"') SHR REUSE"
"ALLOC FI (SYSIN) DA('"COPY_DS"') SHR REUSE"
ADDRESS LINKMVS ICEMAN
The COPY_DS will contain the follwoing code.
Code:
SORT FIELDS=COPY
OMIT FORMAT=SS,COND=(7,1,EQ,C'*')
END
My requirement is, I need to search for more than one string ( strings are desided dynamically from some other dataset) in that copied program. If any of the strings is found in the program then say RESULT - Y. Otherwise RESULT - N.
Presently I am using "F ALL " in an ISREDIT MACRO, called from my REXX program. Is there a way to search the strings simillar to the method I copied the program excluding comments.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Mar 08, 2005 11:50 am Post subject:
It's not clear what you're trying to do. Please show an example of your input records and what you want your output records to look like, and explain the example.
Note (perhaps this might actually answer your question):
Code:
OMIT FORMAT=SS,COND=(7,1,EQ,C'*')
is a meaningless use of SS. SS is for substring searches. Since you're only looking for one character in a specific position, it would make more sense to use:
Code:
OMIT FORMAT=CH,COND=(7,1,EQ,C'*').
SS would be appropriate for something like this:
Code:
OMIT FORMAT=SS,COND=(7,1,EQ,C'*.%$')
where you are looking for * or . or % or $ in position 7. Alternatively, you could specify that as:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks for the reply. My requirement is some thing like this. I will be having four stings STRING_1, STRING_2, STRING_3, STRING_4 in member_1 of dataset_1. I just want to know whether any of these strings are present in member_1 of dataset_2 or not. Just one indicator "Y / N" is enough. This should be run from a REXX program.
Is it possible to do the same with ADDRESS LINKMVS ICEMAN.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Mar 09, 2005 11:26 am Post subject:
Still not clear. Please show an example of your input records in member_1 of dataset_1 and member_1 of dataset_2, and what you want your output to look like, and explain the example. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Currently I am using an ISREDIT macro which has a command "F ALL XXXX". I am running this macro on the dataset in which I need to search for a string. Since I am having more than 1 string, I am calling this macro in a loop by changing the value of XXXX. Here the tool becomes slow and consumes more time. Can you please suggest me an another method of doing the same.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum