You can use JOIN function of DFSORT: //ST100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //FILE1 DD * DSNAME01 DSNAME09 DSNAME02 DSNAME27 DSNAME04 /* //FILE2 DD * DSNAME09 DSNAME04 /* //SORTOUT DD SYSOUT=* //SYSIN DD * JOINKEYS F1=FILE1,FIELDS=(1,44,A) JOINKEYS F2=FILE2,FIELDS=(1,44,A) JOIN UNPAIRED,F1,ONLY REFORMAT FIELDS=(F1:1,80) SORT FIELDS=COPY /*
Output is: DSNAME01 DSNAME02 DSNAME27 I assumed dsnames are at 1,44 and lrecl is 80. JOINKEYS UNPAIRED,F1,ONLY means output only unpaired keys records from FILE1. Best regards. Max <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Mail priva di virus. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> Il giorno gio 23 lug 2020 alle ore 10:11 R.S. < r.skoru...@bremultibank.com.pl> ha scritto: > I have the following case: > > Large (thousands) list containing filenames, > filea10002 > fileb10041 > filec20043 > filed39093 > longfileabc > anotherfile > ... > > and small (dozens) list of filename "exlusions" > longfileabc > fileb10041 > ... > > Short list is subset of long list. All files has fixed lentgh name, no > other fields exist in the record. > The goal is to exclude from large list all the entries which are present > in the short list. > Lists are unsorted, but I think it doesn't matter. I see it is candidate > for REXX script, but DFSORT job seems to be more elegant. > Any clue? > > > -- > Radoslaw Skorupka > Lodz, Poland > > > > > > ====================================================================== > > Jeśli nie jesteś adresatem tej wiadomości: > > - powiadom nas o tym w mailu zwrotnym (dziękujemy!), > - usuń trwale tę wiadomość (i wszystkie kopie, które wydrukowałeś lub > zapisałeś na dysku). > Wiadomość ta może zawierać chronione prawem informacje, które może > wykorzystać tylko adresat.Przypominamy, że każdy, kto rozpowszechnia > (kopiuje, rozprowadza) tę wiadomość lub podejmuje podobne działania, > narusza prawo i może podlegać karze. > > mBank S.A. z siedzibą w Warszawie, ul. Senatorska 18, 00-950 Warszawa, > www.mBank.pl, e-mail: kont...@mbank.pl. Sąd Rejonowy dla m. st. Warszawy > XII Wydział Gospodarczy Krajowego Rejestru Sądowego, KRS 0000025237, NIP: > 526-021-50-88. Kapitał zakładowy (opłacony w całości) według stanu na > 01.01.2020 r. wynosi 169.401.468 złotych. > > If you are not the addressee of this message: > > - let us know by replying to this e-mail (thank you!), > - delete this message permanently (including all the copies which you have > printed out or saved). > This message may contain legally protected information, which may be used > exclusively by the addressee.Please be reminded that anyone who > disseminates (copies, distributes) this message or takes any similar > action, violates the law and may be penalised. > > mBank S.A. with its registered office in Warsaw, ul. Senatorska 18, 00-950 > Warszawa,www.mBank.pl, e-mail: kont...@mbank.pl. District Court for the > Capital City of Warsaw, 12th Commercial Division of the National Court > Register, KRS 0000025237, NIP: 526-021-50-88. Fully paid-up share capital > amounting to PLN 169.401.468 as at 1 January 2020. > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN