From: <hp...@we...> - 2022-06-14 22:43:52
|
Hi, at least I have done the first not-for-test-only NetRexx pipe. A very simple one, read a file, discard comments, save first record in a variable, save rest in a stem. Alas, some points displease: i) the ooRexx integration per Address "" ... input ... output force some changes, there is only one output connection possible, but this pipe has two, a variable and a stem. Thus I had to solve this in the post-processing. ii) the input file consists of 10 records, 5 comment and 5 data, what is close to nothing. Nonetheless it takes almost 1.7 seconds to process, what is way too much for almost nothing. I hope there is a chance to accelerate it notedly. iii) labels require a blank after the colon, iv) stage Locate can't be abbreviated to L, (yes, sure, this and the point before is of minor importance, I know, but it adds to the annoying differences to what I'm accustomed), v) nonexistent input file ends processing of the ooRexx program with an error. I assume this is due to the Address input/output enclosure, Pipelines would just set the variable and the stem accordingly. Here what it was (set as comment) and how I replaced it: > -- call RxPipe '(end ?) file "' || vilif || '"!strip!l!nlocate 1 /*/!a:take!var conif', > -- '?a:!b:lookup 1 detail!stem livil.', > -- '?literal +-!fblock 1!b:' /* filter with lookup as locate missing option anyof */ > 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 For a simpler post-processing I replaced take by drop. The changes for a missing input file are not shown. All suggestions for speed-up are welcome. Best, M. |