From: <hp...@we...> - 2022-06-07 08:45:37
|
Hello René! Am 06.06.2022 um 22:23 schrieb René Jansen: >> On 4 Jun 2022, at 16:20, hp...@we... wrote: > […] >> Back to the subject. […] Instead of >> >>> say length("ABC") >> >> I have to put it this way: >> >>> say "ABC".length >> >> What a progress! Re-use of old-style REXX routines impossible. > > Glad you said that. This is one of the improvements of 4.04 - there you can use Classic Rexx notation for all built-in-functions (BIFs). In this case, I did that and the original decision to have only oo-invocation is Mike’s. The saying goes 'the better is the death of the good', but since I am faster with what I'm used to, it must be much better. So thank you to bring back the old-style notation, I'm looking forward to V4.04. >> OK, back to the subject. >> [...] Something >> adequate the GLOBALV concept of VM/CMS? Well, that would require >> some kind of "pull" in ooRexx after the NetRexx pipe finished, a >> "push" of the results (variables set directly) would be more >> appropriate. >> > We have to speak to Rony about this, I am sure BSF4ooRexx has a fitting solution here. With my finding of this WE I made the next step and prepared a DIY stage, which (hopefully) could serve as beginning of Varload. It filters and rearranges the content of VilMA.INI to be used by an interpret() -- no options at the moment: > /* p4varload_1.nrx: prepare for kind of VARLOAD */ > import org.netrexx.njpipes.pipes. > class p4varload_1 extends stage > method run() > loop forever > line = Rexx peekto() > parse line.upper sc +1 vn (sc) sv /* UPPER to force keyword SYMBOLIC */ > /* First: nice pitfall could be IF expression, expression, expression, ... THEN */ > /* length(sc) > 0 to avoid filter STRIP!L -- whild strip is missing here */ > /* pos(sc, '* ') = 0 is the default COMMENT "* " */ > /* the plan is to put the output to stack or stem and interpret it line by line */ > /* I was unable to split the clause and inject "inline" comments */ > if sc.length > 0 & '* '.pos(sc) = 0 then output(vn '=' sv) > readto() > catch StageError > rc = rc() > end > exit(rc*(rc<>12)) BTW, to be in conformity with CMS Pipelines the stage LOCATE should work with all abbreviations down to L. What I describe in the comment as "nice pitfall" is in fact a nasty surprise sice it works just in contrary to ooRexx and C. A commentline like > /* pos(sc, '* ') = 0 is the default COMMENT /* / */ was rejected by the compiler (or translator?) for "unbalanced /*" what is kind of overdone. The output of p4varload_1 looks nice: > C:\prgm\NetRexx\examples\VilMA>ripe "(sep !) < vilma.ini!p4varload_1!term > VIMDR = C:\PRGM\REXX\VILMA\ > CTLDR = C:\PRGM\HP-EMULATORS\V41\ > VILDR = C:\PRGM\HP-EMULATORS\VIRTIL\ > DELTA = 3 > ITLVL = STD.VILMA > CTRLS = VILMA.CONTROLLERS > TPCPT = TYPICAL.CAPTION > DIAPOS = 321 23 Now we "only" need to interpret this in ooRexx. Because I am a little unhappy with the "if sc.length > 0 &..." I tried to insert something like > addpipe "(sep !) *in:!strip!l!*in:" but the compiler doesn't like the way I put it -- and I can't find sufficing documentation about addpipe. Now, without help, I'm at the road's end. Best, M. |