Compare two records and make an abend



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Compare two records and make an abend

Postby Daouchiche » Mon Aug 21, 2017 6:26 pm

Hi,

I have two data sets as shown below :

Data Set 01
(Name age location ......)
---------
Ricardo 25 spain



Data Set 02
(Name age location ......)
---------
Ricardo 28 spain


I have to compare the two data sets (records), if 'AGE' is 'Less or Equal' than it's ok. But if 'AGE' of data set 02 Greater than data set 01 then abend.

Thanks for your help.

Coded and corrected terminology
Daouchiche
 
Posts: 17
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare two records and make an abend

Postby Aki88 » Mon Aug 21, 2017 10:40 pm

Hello,

I don't have a ready solution for this, though there is a logical construct:
a. Use JOINKEYS to match both the datasets on their keys
b. Going by your query, you're bothered about only the matched records
c. Use OUTFIL statement to reformat and INCLUDE data that matches your requirement
d. Have another OUTFIL statement in place on exclusion criteria and add NULLOFL check to set an RC
e. Use DFSORT PARM to override RC value with ABE (abend).

Example code can be found at:
http://ibmmainframes.com/about57721.html
http://ibmmainframes.com/about57267.html

I'll try coding a small sample if possible and post it at a later stage; though the aforementioned links provide enough to go on; and one of the posts is by Kolusu, so rest assured IT-WILL-WORK. :)
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Compare two records and make an abend

Postby Daouchiche » Tue Aug 22, 2017 5:17 pm

thanks Aki88, I'll try with those suggestion.
Daouchiche
 
Posts: 17
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post