I am trying to code the following logic:
My input file has following record:
xxxxxx
yy
zzz
xxxxxx
yy
zzz
yy
zzz
xxxxxx
yy
zzz
I have to do a FIND for 'xxxxxx', if its found in Nth record, I've to copy the (N+1)th record to the output file.
My Desired record (containg yy) will always occur between xxxxxx and zzz. So these 3 records kind of form a group record.
This complete group record can occur many times in the input file.
My Output file will be :
yy
yyy
yyy
I tried using
INREC IFTHEN=(WHEN=GROUP,
But my system has syncsort 1.3.0.2R and it doesn't support GROUP statement.
can anyone suggest me another method to achieve this.