Sort to mark duplicate record and delete one of them



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Sort to mark duplicate record and delete one of them

Postby Shireesha09 » Wed Nov 10, 2010 1:15 pm

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
Shireesha09
 
Posts: 2
Joined: Fri May 21, 2010 6:10 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Thu Nov 11, 2010 1:56 am

Hello,

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

Which release of which sort product is used on your system?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post