Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us