Copy down based on condition

Hello:

I need to copy down some data from the previous record in to the next record based on the below conditions

If position 41- 59 of the current record is same as the previous record and the value of position 62 is not equal to 1 then

copy the previous records value for positions 144-184 (only if the current records value is empty)

copy the previous records value for positions 184-220 (only if the current records value is empty)

copy the previous records value for positions 224-244 (only if the current records value is empty)

copy the previous records value for positions 244-246 (only if the current records value is empty)

copy the previous records value for positions 246-251 (only if the current records value is empty)

Input:

xxxx     xxxx24        68xxx          001234564              2RICHAR                   JANI                                           123456789001 HILLSIDE TERRACE                                                            HXXXXXXXXXXXX       XX77964      USA
xxxx     xxxx14        47xxx          009999996              1PALMER                   SMITH                                          9876543210009 MUNDALE WAY WEST                                                           MEXXXXX             XX38135      USA
xxxx     xxxx14        47xxx          009999996              2PALMER                   REBECCA                                        987654321                                                                                                                 USA
xxxx     xxxx14        47xxx          009999996              3SAL                      MIS                                            987654321                                                                                                                 USA
xxxx     xxxx14        47xxx          009999996              3PALMER                   JAMES                                          9876543210009 MUNDALE WAY WEST                                                           MXXXXXX             XX38135      USA


Desired Output :

xxxx     xxxx24        68xxx          001234564              2RICHAR                   JANI                                           123456789001 HILLSIDE TERRACE                                                            HXXXXXXXXXXXX       XX77964      USA
xxxx     xxxx14        47xxx          009999996              1PALMER                   SMITH                                          9876543210009 MUNDALE WAY WEST                                                           MEXXXXX             XX38135      USA
xxxx     xxxx14        47xxx          009999996              2PALMER                   REBECCA                                        9876543210009 MUNDALE WAY WEST                                                           MEXXXXX             XX38135      USA
xxxx     xxxx14        47xxx          009999996              3SAL                      MIS                                            9876543210009 MUNDALE WAY WEST                                                           MXXXXXX             XX38135      USA
xxxx     xxxx14        47xxx          009999996              3PALMER                   JAMES                                          9876543210009 MUNDALE WAY WEST                                                           MXXXXXX             XX38135      USA

Appreciate your help !

I think you should show us what have you tried so far and what is the problem with the approach