Syncsort



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Syncsort

Postby Gouthami_12 » Wed Jan 16, 2013 2:41 pm

Hi,

I have 2 input files.

IP1:

AB000AB00001 XXXX APA
AB000AB00002 XXXX APA
AB000AB00003 XXXX APA
AB000AB00004 XXXX APA

IP2:

AB000AB00001 XXXX APB
AB000AB00003 XXXX APB
AB000AB00004 XXXX APB
AB000AB00005 XXXX APB

My o/p should be

OP1:

AB000AB00001 XXXX APA
AB000AB00001 XXXX APB
AB000AB00003 XXXX APA
AB000AB00003 XXXX APB
AB000AB00004 XXXX APA
AB000AB00004 XXXX APB

OP2:

AB000AB00002 XXXX APA
AB000AB00005 XXXX APB

My output file should be exactly the same as i have posted here. The record in my second input file(IP2) must be written to the second row of my first output file (OP1)

Is this possible using syncsort? :)
Gouthami_12
 
Posts: 3
Joined: Wed Jan 16, 2013 12:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Syncsort

 

Re: Syncsort

Postby BillyBoyo » Wed Jan 16, 2013 3:36 pm

You want matches between files on one output file, and mismatches on another output file, whether from file 1 or file 2.

Can you have duplicate keys on either file?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Syncsort

Postby Gouthami_12 » Wed Jan 16, 2013 4:28 pm

Position 6-12 is the key field. whenever the key matches, the matched records need to be written to my OP1 from both input files file 1 and file 2.

No duplicates in both the files
Gouthami_12
 
Posts: 3
Joined: Wed Jan 16, 2013 12:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Syncsort

Postby Gouthami_12 » Thu Jan 17, 2013 2:14 pm

Can anyone help me on this??
Gouthami_12
 
Posts: 3
Joined: Wed Jan 16, 2013 12:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Syncsort

Postby enrico-sorichetti » Thu Jan 17, 2013 5:27 pm

You should remember that answering to questions is ...

on voluntary base
on our own time
free of charge

in other words when and if we feel like

soliciting for answers is quite improper
even more after such a short time interval
last useful post at Wed Jan 16, 2013 12:58 pm
useless post Thu Jan 17, 2013 10:44 am

there is no commitment to reply
there should be NO EXPECTATION for answers

if there is a strong need for an answer a forum might not be the best place to ask
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Syncsort

Postby BillyBoyo » Thu Jan 17, 2013 5:44 pm

You need to use JOINKEYS.

You need a REFORMAT.

You will need to test the first byte of each source record on the REFORMAT record, if either is blank, you have a mismatch, else you have a match.

There are examples here if you search.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post