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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Sun Apr 29, 2007 12:41 pm
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
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

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2007 4:18 am
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
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: 1436
Location: Bangalore,India

PostPosted: Mon Apr 30, 2007 12:50 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top