Post by Stefan on Oct 25, 2020 9:51:41 GMT -5
I'd have to agree with Robert and George. (That statement borders on strong praise when you realise that if you cut me I bleed REXX!)
I also have a lot of macros for repetitive stuff while working in SPFLite and because I use the SPFLite's edit capabilities to manipulate files. An IMACRO is a easy way to logically control such an edit session. And edit macros provide access to ALL thinBasic capabilities, including subroutines, I/O, environmental access, etc. You're not limited to SPFLite calls. In that respect it is similar to REXX under TSO and ISPF/PDF but of course without most of the ISPEXEC Dialog Manager functions.
On the downside, thinBasic is another language to learn, but it really isn't hard. It is, however, rather more picky about variable types and command syntax than REXX. And the interpreter is not nearly as savvy as REXX when it comes to parsing statements and reporting errors. So during development, most errors come from undefined variables, using a numeric variable where I need a string or failing to code an operator between two terms where REXX would just have assumed abuttal.
I find coding an edit macros to perform a complex "Read-file, Find/Change X to Y on certain lines only, add this, remove that, write file" is simple in thinBasic using SPFLite editor as the engine. Much simpler that doing it all myself in REXX. That said, I use REXX to manipulate the world outside SPFLite. But such programs may well pass their output/log file to SPFLITE for easy viewing using its auto colorisation.
George and Robert... Given the level of Edit Macro functionality (and examples of how to achieve many REXX ISREDIT via thinBasic calls), is it perhaps time to close this thread?
I also have a lot of macros for repetitive stuff while working in SPFLite and because I use the SPFLite's edit capabilities to manipulate files. An IMACRO is a easy way to logically control such an edit session. And edit macros provide access to ALL thinBasic capabilities, including subroutines, I/O, environmental access, etc. You're not limited to SPFLite calls. In that respect it is similar to REXX under TSO and ISPF/PDF but of course without most of the ISPEXEC Dialog Manager functions.
On the downside, thinBasic is another language to learn, but it really isn't hard. It is, however, rather more picky about variable types and command syntax than REXX. And the interpreter is not nearly as savvy as REXX when it comes to parsing statements and reporting errors. So during development, most errors come from undefined variables, using a numeric variable where I need a string or failing to code an operator between two terms where REXX would just have assumed abuttal.
I find coding an edit macros to perform a complex "Read-file, Find/Change X to Y on certain lines only, add this, remove that, write file" is simple in thinBasic using SPFLite editor as the engine. Much simpler that doing it all myself in REXX. That said, I use REXX to manipulate the world outside SPFLite. But such programs may well pass their output/log file to SPFLITE for easy viewing using its auto colorisation.
George and Robert... Given the level of Edit Macro functionality (and examples of how to achieve many REXX ISREDIT via thinBasic calls), is it perhaps time to close this thread?