From: <hp...@we...> - 2022-06-16 06:57:07
|
Hi Rony! Am 15.06.2022 um 13:54 schrieb Rony G. Flatscher: > ... cut ... >> i) the ooRexx integration per Address "" ... input ... output >> force some changes, there is only one output connection possible, >> [...] > > No, there are two output connections possible! One for stdout > ("output") and one for stderr ("error"), cf. "rexxref.pdf", "2.1 > ADDRESS". LOL! You suggest to misuse stderr as ordinary output? Nice. And how may I make NetRexx Pipelines distinguish which one to use? Testing how to convert the following I also tried with two 'term' (as "opposite" console), which both sent output to stdout. This is why I opted for an _unambiguous_ output sequence, just to simplify the post-processing. > /* filter with lookup as OS/2 stage locate lacks option anyof */ > -- call RxPipe '(end ?) file "' || vilif || '"', > -- '! strip!l!nlocate 1 /*/!a:take!var conif', /** 1 **/ > -- '?a:!b:lookup 1 detail!stem livil.', /** 2 **/ > -- '?literal +-!fblock 1!b:' > if SysFileExists(vilif) then do > f = .stream~new(vilif) > address '' ripe '"(sep ! end ?) cons!strip!locate!nlocate 1 /*/', > '!a: drop!locate 1 any /+-/!b: fanin!term', > '?a: ! elastic !b:', > with input stream (f) output stem livil. > drop f > /* post-processing */ > conif = livil.[livil.0] > livil.0 -= 1 > ... Could stderr really be some serious help in this case? Another brain-twisting example of double-use stdin (original pipe as comment first): > -- call RxPipe '(end ?) var nck!a:lookup f1 master!spec f2 1!var doubl', > -- '?stem selid.!a:' > in. = selid.; in.0 += 1; in.[in.0] = nck /* prepare input */ > address '' ripe '"(sep ! end ?) cons!x: take last!a:lookup f1 master!spec f2 1!term', > '?x:!a:', > with input stem in. output stem out. error stem fail. Result (in trace mode): > 1145 *-* address '' ripe '"(sep ! end ?) cons!x: take last!a:lookup f1 master!spec f2 1!term', '?x:!a:', with input stem in. output stem out. error stem fail. > >>> "@java -cp "D:\PRGM\NetRexx\lib\NetRexxF.jar;.;D:\PRGM\NetRexx\lib\NetRexxC.jar;" org.netrexx.njpipes.pipes.runner "(sep ! end ?) cons!x: take last!a:lookup f1 master!spec f2 1!term ?x:!a:" > >K> "INPUT" => "0" > >K> "OUTPUT" => "OUT." > >K> "ERROR" => "FAIL." > say out.0 > 1 What could be the single line of output as expected. > say fail.0 > 0 What indicates (for me), there is no error to report. > say out.1 > Error (specs) - pd673a59 - Missing data selector at field2 Ah -- big surprise. What signifies "pd673a59"? Roaring silence of NetRexx 4.03 Pipelines Guide and Reference regarding 'data selector'. Then, rather an academical question, how may "address '' ... with input/output/error" handle all streams of lookup? Best, M. |