Recently I needed to split a lot of records at a specific word instead of at a specific position. Of course the word did not occur at the same position in all records. I recalled the SPLIT funcion in ISPF EDIT. Fortunately the SPLIT function is available as an EDIT MACRO command and thus I invented the following REXX:
If you name this program TXTSPLIT you can execute the command TXTSPLIT FROM WHERE and it will split all records in your EDIT or VIEW session on all occurences of the word FROM and afterwords on the word WHERE. I think this is extremely clever especially when you take into consideration how small the program is.
Take note of the usage of USER_STATE. This is a feature in the EDIT MACRO language that makes it possible to recreate the original data position along with other settings when the EDIT MACRO has done its job. In this macro it is highly recommended to use. If it is not used you will be positioned at the last splitted record which can be very confusing.