I need to compare a field of two consecutive records present in a seq file. My seq file looks like below :
ELENAME2 COBOLB 14NOV2013
ELENAME3 COBOLB 14NOV2013
ELENAME3 PACKDB2 14NOV2013
ELENAME4 COBOLB 14NOV2013
ELENAME5 COBOLB 14NOV2013
I need to compare the current record element name with the previous record element name. i.e., ELENAME2 with ELENAME1, ELENAME3 with ELENAME2, ELENAME3 with ELENAME3 and so on.... when the two element names matches(as in case of ELENAME3) i need to process a subroutine, else the code flow will continue.
Please help me out, how to do this...??