Page 1 of 1

Sort to mark duplicate record and delete one of them

PostPosted: Wed Nov 10, 2010 1:15 pm
by Shireesha09
Hi,

I need a sort card that satisfies the below criteria.

A file sorted by plan and date,for every duplicate Plan and Date record, the record having 'A' in Ind field should be removed in the Output and the corresponding record with 'S' in Ind field should be written to Output file along with a character 'I' (for Ignoring 'A') inserted at the end of the record.

The input file layout

Command ===>
****** ***************************** T
Plan Ind Date
000100 111111 S 12102008
000200 111111 A 12102008
000300 111112 A 10122006
000400 111113 S 10102005
000500 111115 S 10112004
000600 111115 A 10112004
****** **************************** Bo

Desired output :
Command ===>
****** ****************************************** T
Plan Ind Date Ind-ignored
000100 111111 S 12102008 i
000200 111112 A 10122006
000300 111113 S 10102005
000400 111115 S 10112004 i
****** ******************************************* Bo

Can anyone guide me in getting this sort card.

Thanks

Re: Sort to mark duplicate record and delete one of them

PostPosted: Thu Nov 11, 2010 1:56 am
by dick scherrer
Hello,

Your topic is not a jcl question - it is a sort question.

Which release of which sort product is used on your system?