I am looking for some help on below requirement.
START AAAAAA 030054 000001 0801
MIKE EMPLOYEE DETAILS
11111111111111111111111111111111111111111 XXXX
22222222222222222222222222222222222222222 XXXX
MARK EMPLOYEE DETAILS
11111111111111111111111111111111111111111 YYYY
22222222222222222222222222222222222222222 YYYY
DATE201408
START BBBBBB 030054 000001 0801
JOHN EMPLOYEE DETAILS
11111111111111111111111111111111111111111 ZZZZ
22222222222222222222222222222222222222222 ZZZZ
DATE201407
TREJ EMPLOYEE DETAILS
11111111111111111111111111111111111111111 WWW
22222222222222222222222222222222222222222 WWW
MIKE EMPLOYEE DETAILS
11111111111111111111111111111111111111111 XXXX
22222222222222222222222222222222222222222 XXXX
MARK EMPLOYEE DETAILS
11111111111111111111111111111111111111111 YYYY
22222222222222222222222222222222222222222 YYYY
DATE201408
START BBBBBB 030054 000001 0801
JOHN EMPLOYEE DETAILS
11111111111111111111111111111111111111111 ZZZZ
22222222222222222222222222222222222222222 ZZZZ
DATE201407
TREJ EMPLOYEE DETAILS
11111111111111111111111111111111111111111 WWW
22222222222222222222222222222222222222222 WWW
Above is the sample data and you can see from one START to other START there will be one DATE field available. I need date field value(ex-201408) within every START to be merged on to the corresponding first START(first row) of every record group preferably at the end as shown below.
START AAAAAA 030054 000001 0801 201408
MIKE EMPLOYEE DETAILS
11111111111111111111111111111111111111111 XXXX
22222222222222222222222222222222222222222 XXXX
MARK EMPLOYEE DETAILS
11111111111111111111111111111111111111111 YYYY
22222222222222222222222222222222222222222 YYYY
DATE201408
START BBBBBB 030054 000001 0801 201407
JOHN EMPLOYEE DETAILS
11111111111111111111111111111111111111111 ZZZZ
22222222222222222222222222222222222222222 ZZZZ
DATE201407
TREJ EMPLOYEE DETAILS
11111111111111111111111111111111111111111 WWW
22222222222222222222222222222222222222222 WWW
MIKE EMPLOYEE DETAILS
11111111111111111111111111111111111111111 XXXX
22222222222222222222222222222222222222222 XXXX
MARK EMPLOYEE DETAILS
11111111111111111111111111111111111111111 YYYY
22222222222222222222222222222222222222222 YYYY
DATE201408
START BBBBBB 030054 000001 0801 201407
JOHN EMPLOYEE DETAILS
11111111111111111111111111111111111111111 ZZZZ
22222222222222222222222222222222222222222 ZZZZ
DATE201407
TREJ EMPLOYEE DETAILS
11111111111111111111111111111111111111111 WWW
22222222222222222222222222222222222222222 WWW
Every group will start with 'START' at first position
I tried using OUTREC IFTHEN GROUP, but am not able to cut the DATE field which is at the bottom or middle of every group and merge back to the START of the rec.
basically OUTREC IFTHEN GROUP START and END considers the first of the record only.
it is okAY even an output below as well. I dont mind if any extra data has to populated at the end to achieve this but just need the corresponding date value in every START record(first rec) whatever position maybe.
START AAAAAA 030054 000001 0801 201408
MIKE EMPLOYEE DETAILS 201408
11111111111111111111111111111111111111111 XXXX 201408
22222222222222222222222222222222222222222 XXXX 201408
MARK EMPLOYEE DETAILS 201408
11111111111111111111111111111111111111111 YYYY 201408
22222222222222222222222222222222222222222 YYYY 201408
DATE201408 201408
START BBBBBB 030054 000001 0801 201407
JOHN EMPLOYEE DETAILS 201407
11111111111111111111111111111111111111111 ZZZZ 201407
22222222222222222222222222222222222222222 ZZZZ 201407
DATE201407 201407
TREJ EMPLOYEE DETAILS 201407
11111111111111111111111111111111111111111 WWW 201407
22222222222222222222222222222222222222222 WWW 201407
MIKE EMPLOYEE DETAILS 201408
11111111111111111111111111111111111111111 XXXX 201408
22222222222222222222222222222222222222222 XXXX 201408
MARK EMPLOYEE DETAILS 201408
11111111111111111111111111111111111111111 YYYY 201408
22222222222222222222222222222222222222222 YYYY 201408
DATE201408 201408
START BBBBBB 030054 000001 0801 201407
JOHN EMPLOYEE DETAILS 201407
11111111111111111111111111111111111111111 ZZZZ 201407
22222222222222222222222222222222222222222 ZZZZ 201407
DATE201407 201407
TREJ EMPLOYEE DETAILS 201407
11111111111111111111111111111111111111111 WWW 201407
22222222222222222222222222222222222222222 WWW 201407
Any help is appreciated and let me know for any more info.
Thanks