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
 

 

How to use both condition and join in one syncsort command?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
yoelb

New User


Joined: 26 Apr 2007
Posts: 4
Location: Israel

PostPosted: Sun Apr 29, 2007 12:36 pm    Post subject: How to use both condition and join in one syncsort command?
Reply with quote

I have two input files: one with a list of IDs and another with transactions records, which the ID is included in each transaction record in a specific place.
I want to create one sorted output with all the fields from the transaction file.

In this output, I want to mark the records which match the ID in the IDs list file by changing the value of one of their fields.


Can this be done with syncsort?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Apr 29, 2007 12:41 pm    Post subject:
Reply with quote

Hello,

Please post sample data from both input files and what the output from those sample inputs should contain.

When you post the 3 files, please use the "Code" tab at the top of the reply [anel.
Back to top
View user's profile Send private message
yoelb

New User


Joined: 26 Apr 2007
Posts: 4
Location: Israel

PostPosted: Sun Apr 29, 2007 1:31 pm    Post subject:
Reply with quote

IDs list (input):
Code:
 
11
12
13


Transactions list (input):
Code:

10,OK
11,OK
12,OK
13,OK
14,OK


Output file (for all matching IDs - the "OK" should be replaced with "REJECT") :
Code:

10,OK
11,REJECT
12,REJECT
13,REJECT
14,OK
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2007 4:18 am    Post subject:
Reply with quote

Hello,

Your initial post asks about "both condition and join" in one run (if i understood correctly).

From the sample data posted, i'm not sure where "condition" might apply. Please clarify.

This requirement would easily be met with a small COBOL program.

So far, i'm not sure if Syncsort will do exactly what you've shown as your requirement. I'll look some more. . .
Back to top
View user's profile Send private message
yoelb

New User


Joined: 26 Apr 2007
Posts: 4
Location: Israel

PostPosted: Mon Apr 30, 2007 12:42 pm    Post subject: Re: How to use both condition and join in one syncsort comma
Reply with quote

Thanks.
The example I gave describes my problem better than my first message.

I'm looking for a solution in syncsort, to be called via SYSTEM call from a CPP class.

We are dealing with large files so I prefer to perform it in syncsort if possible, rather than in the CPP.

Regards.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Apr 30, 2007 12:50 pm    Post subject:
Reply with quote

yoelb,

Your examples shows only one occurence of a given key in each file. If this is the case, why dont you concatenate both the IP files (in the order IDs and Transactions file) and remove the duplicates. Before concatenating reformat the IDs file with REJECT string.
Back to top
View user's profile Send private message
yoelb

New User


Joined: 26 Apr 2007
Posts: 4
Location: Israel

PostPosted: Tue May 08, 2007 12:37 pm    Post subject:
Reply with quote

Sorry, the example is just to simplify things so it will be more understandable.
The key will occur in many records in the Transactions list.
Also, the key appears somewhere in the middle of the record and not as presented in the example as the first field (again, I wanted to focus on the problem).

Can it be done in syncsort?

Thanks.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm


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