Using sort comparing two files and pulling out the unpaired:
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,6,A)
JOINKEYS FILE=F2,FIELDS=(1,6,A)
JOIN UNPAIRED,F1,ONLY
SORT FIELDS=COPY
/*
JOINKEYS FILE=F1,FIELDS=(1,6,A)
JOINKEYS FILE=F2,FIELDS=(1,6,A)
JOIN UNPAIRED,F1,ONLY
SORT FIELDS=COPY
/*
here the F1&F2 represents file one and file two these two files are compared and the un-matching fields are taken out separately.
The fields 1 - represents initial position of the key, 2 - represents length of the key and A- represents the type of character.
Unpaired keys from file one will be taken out and put into separate file.
File - F1
A00001
B00001
C00001
D00001
A00001
B00001
C00001
D00001
File - F2
A00001
C00001
A00001
C00001
Output
B00001
D00001
B00001
D00001
No comments:
Post a Comment