> Here we need to pull the 2'nd record to the Output as this is the
> latest date .
Ron,
Use the following DFSORT/ICETOOL JCL which will give you the desired
results
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
----+----1----+----2----+----3----+----4----+----5----+----6
000000604|9137|1100276393|2017-12-26|00007|DSD |
000000604|9137|1100278550|2018-01-09|00006|DSD |
000000605|9138|1100276393|2020-06-26|00007|DSD |
000000605|9138|1100278550|2018-01-09|00006|DSD |
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(01,14,CH) FIRST USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=(01,14,CH,A, $ ITEM_NBR + STORE_NBR
26,10,UFF,D) $ ITEM_DATE
/*
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