Sri Hari,
Thank you, now it is really clear and simple.
I like the JNFnCNTL DDs.

However I have further questions:

1. SUM FIELDS=NONE  - is it just to omit duplicates of SUM records?

2. How to get ABC records with no corresponding SUM record?
In the example I would also have MARIA record in another report.
It can be second ICEMAN run, my input file is not big.


Regards
--
Radoslaw Skorupka
Lodz, Poland



W dniu 07.09.2021 o 15:41, Sri h Kolusu pisze:
The goal is to get list of NAMEs from ABC record, but only if exist SUM
record with same NAME value.

Radoslaw,

It is quite simple to compare two records using JOINKEYS feature of DFSORT.
Here is a JCL which will give you the desired results.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//INA      DD DISP=SHR,DSN=Your Input VB file
//INB      DD DISP=SHR,DSN=Your Same Input VB file
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
   OPTION COPY
   JOINKEYS F1=INA,FIELDS=(96,10,A)
   JOINKEYS F2=INB,FIELDS=(14,10,A)
   REFORMAT FIELDS=(F1:1,4,5)
/*
//JNF1CNTL DD *
   INCLUDE COND=(5,3,SS,EQ,C'ABC')
/*
//JNF2CNTL DD *
   INCLUDE COND=(5,3,SS,EQ,C'SUM')
   SUM FIELDS=NONE
/*


Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation



----------------------------------------------------------------------
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

Reply via email to