View previous topic :: View next topic |
Author |
Message |
Bee_bop Beginner
Joined: 12 Dec 2005 Posts: 29 Topics: 15 Location: Singapore
|
Posted: Thu Dec 22, 2005 1:04 am Post subject: Merge 2 Different PDS members in Rexx |
|
|
Hi Experts,
Would like to ask, I'm already done with my Rexx but there is additional requirement.
Currrent set-up :
I'm parsing a certain string say 'AAAA' is the value. I'll compare it with a parameter file and verify if 'AAAA' is existing in the parameter.
Additional requirement :
The user would want to maintain 2 parameter file. sample is First.pds(xxx) and First.pds(yyy). Could you please provide me a way on how will I merge members XXX and YYY in Rexx so that I could use it to compare with whatever string I get from Parse command.
Thanks in advance. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Dec 22, 2005 1:38 am Post subject: |
|
|
Bee_Bop,
First of all, how are you reading your parameter file currently ? Are you using ISREDIT Macros to search a string or do you capture the contents of the member into a stem variable using EXECIO DISKR command ?
Thanks,
Phantom |
|
Back to top |
|
|
Bee_bop Beginner
Joined: 12 Dec 2005 Posts: 29 Topics: 15 Location: Singapore
|
Posted: Thu Dec 22, 2005 1:50 am Post subject: |
|
|
Hi Phantom,
Since input is small, I am capturing the contents of the member into a stem variable using EXECIO DISKR command and check each entry if the String value returned by Parse command is existing on that parameter.
- Thanks. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Dec 22, 2005 4:11 am Post subject: |
|
|
Bee_bop,
Since you are using EXECIO, the simplest way that I could think of would be to Concatenate both your PDS members to the same DD Name and then issue EXECIO DISKR.
Pls try and let us know if you face any problems. (I hope you use ALLOC command to allocate the member, then use CONCAT command to concatenate the second member also the same DDNAME).
Hope this helps,
Cheers,
Phantom |
|
Back to top |
|
|
Bee_bop Beginner
Joined: 12 Dec 2005 Posts: 29 Topics: 15 Location: Singapore
|
Posted: Thu Dec 22, 2005 5:13 am Post subject: |
|
|
Phantom,
Sorry Im still learning Rexx. Could you provide me sample code for this wherein I
can format my coding ? Haven't encountered yet using Concat command.
Thanks Much.
- Eugene |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Dec 22, 2005 7:41 am Post subject: |
|
|
Bee_bop,
How small is your input file ?
Concatenating the PDS members and then reading would get you the records in an unsorted way. It might also cause duplicates for the string that you are trying to search. As you would be knowing, searching a string in unsorted data is not effecient.
Try calling ICETOOL from your REXX program. The input file is the concatenation of the PDS members. In TOOLIN, you can use COUNT operator with EMPTY option that will use another control card. This other control card will have a INCLUDE COND statement created dynamically for the search string. If the string is not found, you will get a return code of 12 else, it will be zero.
REXX examples for calling DFSORT/ICETOOL are documented here. REXX Examples _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Bee_bop Beginner
Joined: 12 Dec 2005 Posts: 29 Topics: 15 Location: Singapore
|
Posted: Thu Dec 22, 2005 8:47 pm Post subject: |
|
|
Hi,
Thank you all for your replies. Hope this will work, my parameter resides on same PDS name.
Data will be about 50 entries only, I compare the Parsed string to the data until EOF. If it is found, I'll activate the switch.
Thanks Much,
-Bee_bop |
|
Back to top |
|
|
|
|