Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Trying to write two output files based on condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Trying to write two output files based on condition
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 09, 2010 6:15 pm    Post subject:
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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Aug 09, 2010 7:12 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 09, 2010 7:32 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us