Joined: 06 Oct 2009 Posts: 45 Location: Melbourne, Australia
Many years ago, I wrote a Rexx formatter that would compress or expand the lines of a Rexx program. Back in VM days, I think. Unfortunately, when I went travelling (and worked on FACOM), I lost this. And subsequent attempts to redo it have run up against a lack of time and/or will to get it done right.
Does anyone know of, or have, something like this? My current one unpacks properly, but only if you have a very long, variable length, record (as I must not have written something to split line if they're too big). And it doesn't justify based on the number of do/select/end in place...
Not urgent, but I thought I might expand some of my Rexxes (or at least have the option) for when I retire. As the compressed ones are not necessarily the easiest for those who might come after me!
Joined: 06 Oct 2009 Posts: 45 Location: Melbourne, Australia
Pedro wrote:
I am not aware of any such tools.
But it might be helpful to use the ISPF editor and specify the highlight commands:
Code:
HI ON
HI REXX
HI LOGIC
HI PAREN
And also set a PF key to be: :TS
and then use by moving cursor to where you want to split a line and then press the PF key.
In a separate effort, try using VS CODE editor on Windows.
Thanks, Pedro.
Trying to avoid having to do it all manually, as most of the ones I want to format are well over 1000 lines (expanding to over 3000 when I only have one statement per line).
I've had a look at the last one I wrote and it seems to work, except I didn't complete the formatting section - so, for example, the if statements can extend to 100's of characters long. I guess I'll just have to work at it.
The other thing I put into it was the compression side, so it would be squeezed into the minimum possible space, yet still be executable Rexx. The idea was that someone would just run the macro to expand it...make their changes...save and test it...then compress it again to save space. I guess that's not so much of a problem nowadays. I think I even used LZW Rexx implementation to compress/decompress comments.
Damn! Looks like I'm going to have to try to re-invent the wheel. I might have them on one of those small floppy disks, but no way to read it any more!