MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Merge 2 Different PDS members in Rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Bee_bop
Beginner


Joined: 12 Dec 2005
Posts: 29
Topics: 15
Location: Singapore

PostPosted: Thu Dec 22, 2005 1:04 am    Post subject: Merge 2 Different PDS members in Rexx Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Dec 22, 2005 1:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Bee_bop
Beginner


Joined: 12 Dec 2005
Posts: 29
Topics: 15
Location: Singapore

PostPosted: Thu Dec 22, 2005 1:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Dec 22, 2005 4:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Bee_bop
Beginner


Joined: 12 Dec 2005
Posts: 29
Topics: 15
Location: Singapore

PostPosted: Thu Dec 22, 2005 5:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Dec 22, 2005 6:18 am    Post subject: Reply with quote

Bee_bop,

You can use the ALLOC command itself for concatenating two or more datasets. Check this link
http://publibz.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/IKJ3C220/2.1.2.3?SHELF=&DT=20000626172615&CASE=

Hope this helps,

Cheers,
Phantom
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Dec 22, 2005 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message
Bee_bop
Beginner


Joined: 12 Dec 2005
Posts: 29
Topics: 15
Location: Singapore

PostPosted: Thu Dec 22, 2005 8:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group