Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Jul 13, 2018 11:48 am Post subject:
jayram99,
1. You have been a member of this forum for a long time and by now you should know how to use CODE tags. I added them for you this time but make sure you follow the rules.
2. The timestamp you show is NOT a standard format. You need to convert the 3 character month name to 2 digit month number and then re-arrange the timestamp to the format YYYYMMDD:time format.
3. Your SUM FIELD=NONE will not work as you are sorting on 2 Fields and unless both of the fields are duplicates you will not discard any duplicates.
Assuming your input file has an LRECL of 80 and RECFM of FB use the following DFSORT/ICETOOL JCL which will give you the desired results. If your input has RECFM=VB then you need to put the modified timestamp right after the RDW so as to preserve the Variable length records.
Code:
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
1234567 ABCDEF 1.00000000 . 13APR2017:00:01:43.894091
1234567 ABCDEF 1.00000000 0.00000000 11JUL2018:23:59:11.117038
1234567 ABCDEF 0.00000000 1.00000000 11JUL2018:23:59:11.126017
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,7,CH) FIRST USING(CTL1)
//CTL1CNTL DD *
INREC OVERLAY=(81:44,04, $ YEAR
41,03,CHANGE=(2,C'JAN',C'01', $ JAN TO 01
C'FEB',C'02', $ FEB TO 02
C'MAR',C'03', $ MAR TO 03
C'APR',C'04', $ APR TO 04
C'MAY',C'05', $ MAY TO 05
C'JUN',C'06', $ JUN TO 06
C'JUL',C'07', $ JUL TO 07
C'AUG',C'08', $ AUG TO 08
C'SEP',C'09', $ SEP TO 09
C'OCT',C'10', $ OCT TO 10
C'NOV',C'11', $ NOV TO 11
C'DEC',C'12'), $ DEC TO 12
NOMATCH=(C'00'),
39,02, $ DAY
48,16) $ TIME
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum