Hi All,
Please find the sample file below:
NAME ID NUMBER
-------------------------------------------------------------------------------------------------- ---------
abcdefgheija;lksdf 11000000
*** LOCKED ***
PARENT 3887
TRAN NO: 03
PARENT
PARENT
NAME ID NUMBER
-------------------------------------------------------------------------------------------------- ---------
bbcdeqgheija;lksdf 11300000
DATE: 02-MAR-2010
SOURCE CORRECTION: Y
NAME ID NUMBER
-------------------------------------------------------------------------------------------------- ---------
vbcdewgheija;lksdf 10200000
DATE: 15-DEC-2010
NAME ID NUMBER
-------------------------------------------------------------------------------------------------- ---------
cvbcdeegheija;lksdf 10300000
*** LOCKED ***
MIDDLE INITIAL:
DATE: 03-JUN-2010
<<<<< EOF>>>>
I am trying to print the lines starting from name till next name is encountered, but only if "LOCKED" term is present in the details of that person.
Any input or psuedocode in Perl script is welcome. Right now my code is either printing the whole file or the lines with LOCKED term.
Thanks in advance,
Niel.