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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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