Purpose | Argument | Streams | Usage | Examples | Related
(1) ┌─FROM─1─┐ >>──STEM──name.──┬────────┬──┼────────┼──────────────────────────────────────────────>< └─BUFfer─┘ └─FROM─n─┘
(2) ┌─FROM─1─┐ >>──STEM──name.──────────────┼────────┼──┬────────┬──┬──────┬────────────────────────>< └─FROM─n─┘ └─APPend─┘ └─KEEP─┘
Notes: (1) Where STEM does not have an input stream connected. (2) When specified in any other position.
Use the STEM stage to retrieve(1), or set(2), an ooRexx compound variable whose name begins with the stem you specify.
The stem name of an ooRexx variable is that part of a variable name up to and including the last period, for example; pipe.var. is the stem of the ooRexx variables pipe.var.1, pipe.var.2, and pipe.var.3.
When STEM is the first stage of a pipeline, STEM retrieves variables. Before STEM can be used to retrieve variables, variable name.0 must contain the number of variables whose value you want to retrieve. The value should be 0 or a positive integer.
For each variable retrieved, STEM writes a separate record containing the variable's value to its primary output stream. By default, output records are written beginning with name.1, followed by name.2, name.3 and so on until the number of records written equals the value of name.0.
Without specifying additional stage command arguments; the output records are written in ascending order of the numeric suffix of the variables until the number of records written equals the size of the stem. When STEM is not the first stage of a pipeline, STEM sets variables. By default, when STEM is used to set variables, it sets one variable for each record in its primary input stream. Variables name.1 through name.n, where n is the number of records in the primary input stream, are set to the contents of the first through the nth input stream record, respectively. After n records have been set, STEM sets the variable name.0 to the number of variables that were set.
console:
Candy Apple Cavendish Lady Finger Williams
console:
This is the first line that I want.. ..followed by this one!
console:
Gretsch Hofner Gibson Fender Peavey