IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Trying to write two output files based on condition


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
msrini

New User


Joined: 12 Apr 2010
Posts: 5
Location: India

PostPosted: Mon Aug 09, 2010 6:14 pm
Reply with quote

I have set of records in two files. I need to search for one record in file1 for all records in file2 for specific column values and if any match occurs, then write to a out1 file(one output file), and if it's not matched write to different output file (out2).

Can any one shed some light on this.

Thanks,
Srini
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 09, 2010 6:15 pm
Reply with quote

Don't go there using REXX if the data volumes are high. Use your sort product, far more efficient.
Back to top
View user's profile Send private message
msrini

New User


Joined: 12 Apr 2010
Posts: 5
Location: India

PostPosted: Mon Aug 09, 2010 6:20 pm
Reply with quote

But I want to search for one record (different specific columns) for all records in file2. Can post same jcl pls ?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Aug 09, 2010 7:12 pm
Reply with quote

No matter what way you try to achieve your goal, you have given very little information that anyone could use in suggesting a solution. The description you have given is unclear. icon_rolleyes.gif

Garry.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 09, 2010 7:32 pm
Reply with quote

msrini wrote:
But I want to search for one record (different specific columns) for all records in file2. Can post same jcl pls ?
There is a "SEARCH" button at the top of every page which can be used very easily.

There are numerous examples of the sort product being used to accomplish this task. As stated previously, REXX is not the best tool for this is the data volumes are high as its I/O handling is a resource eater.

Please do not tread the path of having already decided the solution and not deviating from that solution. This particular topic has been discussed many many times and for virtually all occurences SORT was the best solution.

Anyway, as Garry has pointed out, you have not given nearly enough information for anyone to be of any help to you.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top