How to Use DFSORT JOINKEYS to Get Matching Records

DFSORT Logic to get matching records from two or more input files, using the JOINKEYS parameter.

Comedy

Syntax for JOINKEYS

JOINKEYS F1=IN1,FIELDS=(22,3,A,55,9,D) 
JOINKEYS F2=IN2,FIELDS=(15,3,A,1,9,D)

Explanation

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

Also read

Discover more from Srinimf

Subscribe now to keep reading and get access to the full archive.

Continue reading