I have to read a file (max of 10MB) which will have no new line characters, i.e. data in single line. and have to inster '\n' at every 100 characters. and if record starts with 'BUCA' then need to pick value of length 10 at position 71 and write it to a file otherwise drop the record.
I tried below, working fine up to inserting '\n' after every 100 characters but sending all the records into target file.
(output with new line after every 100 characters and pick 10 characters starting at position 71 from every record where record should start with "BUCA")
I'm sure I don't understand how you want to produce your desired output.
Edit: Now that code tags have been applied to your input data, it's a different story - pipe the fold result through a grep or awk cmd to filter out the BUCA lines and get your (obviously) second field value.