> Does it report if the two files contain the same records but in different
order?

Gil,

Yes it can. Here is an example (assuming the compare key is 10 bytes)

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//INA      DD *
GIL
MARTIN
PAUL
ELARDUS
KOLUSU
//INB      DD *
MARTIN
PAUL
ELARDUS
GIL
KOLUSU
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  JOINKEYS F1=INA,FIELDS=(1,10,A)
  JOINKEYS F2=INB,FIELDS=(1,10,A)
  REFORMAT FIELDS=(F1:1,15,F2:11,5)
  INREC BUILD=(01,10,
               C'IS RECORD # ',
               11,05,
               C' IN FILE 1 AND IN FILE 2, IT IS RECORD # ',
               16,05)
/*
//JNF1CNTL DD *
  INREC OVERLAY=(11:SEQNUM,5,FS)
/*
//JNF2CNTL DD *
  INREC OVERLAY=(11:SEQNUM,5,FS)
/*

The output from the above job is

ELARDUS   IS RECORD #     4 IN FILE 1 AND IN FILE 2, IT IS RECORD #     3
GIL       IS RECORD #     1 IN FILE 1 AND IN FILE 2, IT IS RECORD #     4
KOLUSU    IS RECORD #     5 IN FILE 1 AND IN FILE 2, IT IS RECORD #     5
MARTIN    IS RECORD #     2 IN FILE 1 AND IN FILE 2, IT IS RECORD #     1
PAUL      IS RECORD #     3 IN FILE 1 AND IN FILE 2, IT IS RECORD #     2

Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on
07/06/2018 06:34:39 AM:

> From: Paul Gilmartin <[email protected]>
> To: [email protected]
> Date: 07/06/2018 06:36 AM
> Subject: Re: DFSORT - a quick way to compare two huge files
> Sent by: IBM Mainframe Discussion List <[email protected]>
>
> On Fri, 6 Jul 2018 06:49:38 -0500, Elardus Engelbrecht wrote:
> >
> >The example I posted may help you, but please note, the contents
> are first sorted and then records which are the same in both files
> are copied into one file and records which appear once in either
> will be copied to the right output.
> >
> Does it report if the two files contain the same records but in
> different order?
> This may or may not matter to the OP.
>
> >>Since you don't say what will happens when you get a record which
> appears in file 1 or file 2 or in both files, look at
> >>
> >>https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/
> com.ibm.zos.v2r1.icea100/ice2ca_Example_3_-
> _Create_files_with_matching_and_non-matching_records.htm
> >>
> >>I quote from above URL:
> >>
> >>This example shows how you can match records in input data sets 1
> and 2 to produce three output data sets with:
> >>
> >>    ON fields that appear in both input data set 1 and input data set 2
> >>    ON fields that appear only in input data set 1
> >>    ON fields that appear only in input data set 2
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to