≫ I have two PS datasets having some programming codes , Is it possible to compare these two PS and produce a third PS datasets by removing duplicate entries ?
Jake, There are a couple of DFSORT smart tricks which shows the usage of Joinkeys • Join fields from two files on a key • Join fields from two files record-by-record • Cartesian join • Create files with matching and non-matching records Check this link http://www-01.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094 And here is a simple example assuming the matching key is 20 bytes starting from position 1 //STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //INA DD * JAKE ANDERSON HAS MULTIPLE RECORDS JAKE ANDERSON IBM-MAIN GIL //INB DD * ABC KOLUSU KOLUSU JAKE ANDERSON //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY JOINKEYS F1=INA,FIELDS=(1,20,A) JOINKEYS F2=INB,FIELDS=(1,20,A) JOIN UNPAIRED REFORMAT FIELDS=(?,F1:01,80, F2:01,80) INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'1'), BUILD=(C'FOUND IN FILE-1 ONLY |',02,80)), IFTHEN=(WHEN=(1,1,CH,EQ,C'2'), BUILD=(C'FOUND IN FILE-2 ONLY |',82,80)), IFTHEN=(WHEN=(1,1,CH,EQ,C'B'), BUILD=(C'MATCHED IN BOTH FILES|',02,80,C'|',82,80)) /* //JNF1CNTL DD * SUM FIELDS=NONE /* //JNF2CNTL DD * SUM FIELDS=NONE /* 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
