Syncsort SEQNUM question

Go down

Syncsort SEQNUM question

Post  kasthuri on Sun Jan 27, 2013 5:02 pm

Hi,

Is there a way, using SYNCSORT, to add sequence numbers to a file, but only increment when a key field changes?

For example, I have this file:
Code:
AAAAA A1
AAAAA A1
BBBBB B1
BBBBB B1
CCCCC C1
CCCCC C1
AAAAA A2
AAAAA A2
AAAAA A2
BBBBB B2
BBBBB B2
CCCCC C2
CCCCC C2
AAAAA A3
...


I'd like to add sequence numbers as such:
Code:
AAAAA A1 1
AAAAA A1 1
BBBBB B1 2
BBBBB B1 2
CCCCC C1 3
CCCCC C1 3
AAAAA A2 4
AAAAA A2 4
AAAAA A2 4
BBBBB B2 5
BBBBB B2 5
CCCCC C2 6
CCCCC C2 6
AAAAA A3 7
...


Thanks in advance for your help,

kasthuri

Posts : 212
Join date : 2013-01-27

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum