As the clause separator is a semi-colon, the statements in a one-lined procedure are separated from each other with that semi-colon character.
To re-create a multi-line file from the one-lined procedure, it is thus necessary to cut the records at the semi-colons.
This can be done via several methods, and as we already mentioned in the text, the CMS Pipelines solution not only the easiest one, it is also the best performer.
The problem is however that a REXX statement separator character (;) can also be used in other situations, like literal strings...
It's clear that finding semicolons in literal strings is not an easy job, as it is also possible to have a string containing quotes, or a string in another string, as these examples demonstrate:
say "You'll have to turn to the left ; then to the right" say 'You''ll have to turn to the left ; then to the right' say 'The farmer said: "You''ll have to turn to the left ;', 'then to the right to find a /* sign"'
So, your MULTILINE procedure would have to keep track of the quotes and verify if the semicolon is inside a pair of quotes. Comments wouldn't give problems here as they are normally removed from ONELINEd procedures.
There are even other situations where a semi-colon can be used without being a statement separator, like in this case:
translate(xxx,' ',';.?')
Hit backward navigation button to return to the text.