From: J L. T. <jlt...@ma...> - 2023-01-05 11:37:19
|
Wow! Now I can hardly wait for the next release! Thank you so much. Leslie On 2023-01-04 13:10:24 Jeff Hennick wrote: > I have made a major update to the SPEC stage (and expect it is the last > for it for a while). It will be in the next release of NetRexx. It is > currently available from SourceForge. Since it uses the "stageExit" > method, it can only be compiled into the full NetRexxC.jar. > > CMS Pipelines has built into the SPEC stage its own programming language. > It is Rexx-like-but-not-quite-Rexx. For NetRexx Pipelines, I did not -- > and recommend we do not -- attempt to duplicate it. What we have built in, > and I have used instead, is the worlds best scripting language: NetRexx. > This gives all the power, but with a somewhat different syntax, of the CMS > version. I have incorporated this into the "Conversion" phase, with the > key word NETREXX (or NR) and a delimitedString containing the NetRexx > source. In running, this code is encapsulated in a method. The data > selected in the Input phase is available as the variable data. And > whatever is returned is passed to the Output phase of the stage. (As a > convenience, if the last statement is not RETURN, the statement "return > data" is automatically added.) So all of these pipes work the same (giving > cba): pipe "literal abc | spec 1-* NR /return data.reverse/ 1 | cons" > pipe "literal abc | spec 1-* NR @rev = data.reverse; return rev@ 1 | cons" > pipe "literal abc | spec 1-* NR %data = data.reverse% 1 | cons" > CMS also has COUNTERs. Here in NetRexx, COUNTER is a class property and > can be used as a full fledged NetRexx indexed variable, for example > counter[3] or counter['gold']. Counters are persistent for the life of the > stage and shared across all NR invocations within a SPEC stage. (CMS has a > limited number of counters available, and suggests specifying the number > needed in the SPEC options. NetRexx has no such limitations and the > COUNTERS option is ignored.) This NetRexx code can also use Identified > Fields, below, similarly to counters. The syntax is field["a"], for > example. Like CMS, fields are identified by a single letter, case > sensitive, so up to 52 are available. DANGER: Since the full power of > NetRexx is available, you can get yourself in trouble! Also, this code is > three levels deep, and error messages may point to the wrong thing, at the > "wrong time." Debugging can be a bear. You have been warned. > > These new Field Identifiers are are specified by a letter and colon before > an input range. (There may be no blank between the letter and colon, there > may be a space between the identifier and the range specifier.) The letter > is any of the 52 a-zA-Z, and is case sensitive. > > Another new feature may make the sometimes dense options string a little > easier to read. Groups of Id-Input-Convert-Output may now have a > non-functional comma separating them. (At least at this time, the comma > must have a BLANK after it, and optionally before it and must be in the > right place.) > > This update now fully supports multiple output streams as well as inputs. > The output range of "." has been added, it is of use with Identified Fields > and NR. It causes no output from that input range. Also,in NetRexx > Pipelines only, an input range of "." gives a data field of "". This may > be of use with the new NETREXX converter phase. > > There are confirmation tests for (I think) all of the relevant options in > the examples/pipes directory. > > The documentation is now: > > > . > . > ========= > Jeff -- |