Page 1 of 1

SORT JCL to seperate Matched and unmatched records

Posted: Tue Jun 08, 2010 6:58 pm
by vikasbs
I've two file with FB record formate

File A - Record length - 9
File B - Records Lenght - 300

I need to comparea a number from File A in position ( 1,9) to a number
in FIle B in position (2,9).

My Requirement

1) I want two output files OUT1 with matched records from File B

2) Output file OUT2 with unmatched records from File A.

In the output file OUT1 I want the whole record for the matched records to come inthe output.In the OUT2 just the numbers shouold be enough.

Request you to give me the SORT and ICETOOL JCL.

Kindly let me know for more information.

Re: SORT JCL to seperate Matched and unmatched records

Posted: Wed Jun 09, 2010 3:33 pm
by Anuj Dhawan
You mihgt like to review your post again for these lines:
vikasbs wrote:I need to comparea a number from File A in position ( 1,9) to a number in FIle B in position (2,9).
For File A - number is of length 9 while for File B it's of just 8 - two numbers of differnet number of digits can never be same unless you are keeping the possibilty of having leading-zero in some numbers; but even if so - you've not stated that.

SORT JCL to seperate Matched and unmatched records

Posted: Fri Jun 11, 2010 1:44 pm
by vikasbs
Hi Anuj,

The number in File A starts from collumn 1

- - - - + - - - - 1
11 11 1 1 11 1
The same number in File A in File B start from collumn 2

- - - - + - - - - 1 -
21 11 1 1 1 11 1

Hope I am clear.

Regards
Vikas

Posted: Tue Jun 15, 2010 6:17 pm
by Anuj Dhawan
So yo actually menat (2,10) - length of key is 9.

Please have a look at "Create files with matching and non-matching records at location: http://www.ibm.com/support/docview.wss? ... g3T7000094. You might need to make some adjustments, but it should give you a start.

Good Luck :)

Topic deleted by Admin

Posted: Mon Jan 25, 2016 10:04 pm
by academyindia4
<< Content deleted By Admin >>