2 Key Points You Never Ignore in JOINKEYS of DFSort

Best example for JOINSKEYS in sort to get output file only records of matching keys from two input files:

JOINKEYS F1=IN1,FIELDS=(22,3,A,55,9,D)

JOINKEYS F2=IN2,FIELDS=(15,3,A,1,9,D)

– You should not use same DD name on two statements (in F1 and F2)
– The order for both files should match (A- Ascending and D -Descending should be same)

Advertisements