Hi folks,
I have an input file say FILE1. I need to write matching records in one file (FILE2) and unmatched into another file(FILE3).
I want to use only SYNCSORT.
FILE2 (Based on the INCLUDE condition that I have) will contain :
(include 1,1,EQ,CH'A',AND,6,1,,EQ,CH'B',AND,11,1,EQ,CH'C')
A1234B1111C1111
A2345B2343C4563
A5678B3234C2346
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello KrishnaChaitanya and welcome to the forums,
You should be able to do what you want using Syncsort JOIN and/or JOINKEYS.
There are several examples in the manual. There are also some topics in the JCL section of the forum (Syncsort topics are part of JCL - DFSORT is in the DFSORT section of the forum).
JOIN is used when you want matched/unmatched records from 2 separate input files. If I understand the OP, there is only 1 input file. Please correct me if I am wrong.
Based on the sample input records and the required output, it looks like this can be done with 2 simple outfils:
Thanks Alissa... Actually I found many posts with two input files and matchd and unmatchd output files, but not with one input and multiple output files.