Yifat,

With DFSORT, you can use STOPAFT=1 on the maintask instead of reading all 
the joined/unpaired records.

Sample control cards

//STEP0100 EXEC PGM=SORT 
//SYSOUT   DD SYSOUT=* 
//INA      DD DISP=SHR,DSN=Your Input File1
//INB      DD DISP=SHR,DSN=Your Input File2
//SORTOUT  DD SYSOUT=* 
//SYSIN    DD * 
  JOINKEYS F1=INA,FIELDS=(1,5,A) 
  JOINKEYS F2=INB,FIELDS=(1,5,A) 
  JOIN UNPAIRED,F1,ONLY 
  OPTION COPY,STOPAFT=1 
//*

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on 
11/05/2012 06:07:46 AM:

> From: Yifat Oren <[email protected]>
> To: [email protected], 
> Date: 11/05/2012 06:12 AM
> Subject: Data Set Comparison Using Sort
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> Hello,
> 
> I'm doing a Data set comparison using JOINKEYS statements.
> 
> I'm trying to find a way to stop the Sort as soon as it finds the first
> non-matching (UNPAIRED) record - that is, we've determined the data sets 
are
> not identical - no need to keep matching records.
> 
> Something like STOPAFT=1 but for the output data set.
> 
> The only solution I could come up with was writing an E35 exit for
> UNPAIRED,ONLY run that will end with RC=16 as soon as it gets called.
> 
> Is there a more elegant possibility?
> 
> Thanks,
> Yifat Oren
> 
> 
> 
> ----------------------------------------------------------------------
> 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