>> From what I have read, I can show matched items or unmatched items, but not
>> items greater than a key, while skipping those less than or equal. I can do
>> this programmatically, but I am already using SORT to create the two files,
Don,
Yes, DFSORT can do greater than key matches. Here is sample. The output is
slightly different from what you have posted, but the essence is the same. I
used the date at position 23 to perform the key comparisons.
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//MAST DD *
DBCFMPR 151 RO90903 20160707 2016189
DBCFMPR 151 RO91404 20160808 2016221
DBCFMPR 151 RO94085 20170127 2017027
DBCFMPR 151 RO94783 20170329 2017088
DBCFMPR 151 RO95548 20170414 2017104
DBCFMPR 151 RO95719 20170531 2017151
DBCFMPR 151 RO99532 20171214 2017348
DBCFMPR 151 RO99997 20180308 2018067
DBCFMPR 151 SO09143 20190715 2019196
DBCFMPR 151 SO09510 20190809 2019221
DBCFMPR 151 LU00071 20210128 2021028
DBCFMPR 151 LU07865 20221115 2022319
DBCFMPR 151 LU09582 20230412 2023102
DBCGSPR 151 SO12776 20200428 2020119
DBCGSPR 151 LU00053 20210121 2021021
DBCLKPR 151 RO91115 20160726 2016208
DBCL1PR 151 SO15660 20210407 2021097
DBCL1PR 151 LU01081 20210622 2021173
DBCL1PR 151 LU04745 20220415 2022105
DBCL1PR 151 LU05861 20220727 2022208
DBCL1PR 151 LU07115 20221011 2022284
DBCNSPR 151 LU01224 20210518 2021138
DBDMPPR 151 LU07309 20221207 2022341
DBDSMPR 151 LU02338 20210913 2021256
DBDSMPR 151 LU02807 20210921 2021264
DBDSMPR 151 LU09582 20230412 2023102
//APAR DD *
DBCFMPR 151 LU00071
DBCL1PR 151 LU01081
DBCMPPR 151
DBCNSPR 151 LU01224
DBDMPPR 151
DBDSMPR 151 LU02807
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=MAST,FIELDS=(01,08,A,
14,08,A)
JOINKEYS F2=APAR,FIELDS=(01,08,A,
14,08,A)
JOIN UNPAIRED
REFORMAT FIELDS=(F1:01,40,
F2:01,25,
?)
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(01,65,JFY=(SHIFT=LEFT))),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(01,08),
PUSH=(70:01,08,
80:23,08,
90:66,01)),
IFTHEN=(WHEN=INIT,
OVERLAY=(92:66,01,CHANGE=(8,C'1',C'MISSING',
C'2',C'BASE ',
C'B',C'CURRENT'),
NOMATCH=(C' ')))
OUTFIL INCLUDE=(90,01,SS,EQ,C'B,2',AND,
23,08,CH,GE,80,08,CH),
IFTHEN=(WHEN=(66,01,SS,EQ,C'B,2'),
BUILD=(01,40,92,08)),
IFTHEN=(WHEN=NONE,
BUILD=(13X,14,26,X,92,08))
/*
The output from this is
DBCFMPR 151 LU00071 20210128 2021028 CURRENT
LU07865 20221115 2022319 MISSING
LU09582 20230412 2023102 MISSING
DBCL1PR 151 LU01081 20210622 2021173 CURRENT
LU04745 20220415 2022105 MISSING
LU05861 20220727 2022208 MISSING
LU07115 20221011 2022284 MISSING
DBCMPPR 151 BASE
DBCNSPR 151 LU01224 20210518 2021138 CURRENT
DBDMPPR 151 BASE
LU07309 20221207 2022341 MISSING
Thanks,
Kolusu
DFSORT Development
IBM Corporation
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN