From: Jeff H. <Je...@Je...> - 2020-08-03 20:37:00
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>A new stage that complements PARSE: PICKPARSE. This selects records by relations using Rexx's PARSE:</p> <p> <blockquote type="cite">/** pickparse<br> <tt><br> </tt><tt> +--ONE--+ +--(2)---------------------------+</tt><tt><br> </tt><tt>>>--PICKPARSE--+-------+--parse_template_Dstring--v--+--------------------------+--+--><</tt><tt><br> </tt><tt> +--ALL--+ +--logic_template_Dstring--+</tt><tt><br> </tt><tt> +--ELSE_Dstring-(1)--------+</tt><tt><br> </tt><br> Records are parsed via the parse_template_delimited_string.<br> Variables are named $n, where n is 1 to 9.<br> The values of the variables are put into the logic_template_delimited_string<br> replacing $n and evaluated. If TRUE, the record is put out on the stream<br> numbered by the dstring's position. The stream for a Dstring of ELSE is<br> used if no previous logic Dstring is TRUE. If there is no specific ELSE,<br> there is an implied one at the end; if that stream is not connected, the<br> record is discarded.<br> If ONE then the record is put out on, at most, one stream: the first one<br> matched. If ALL then the record is put out on all streams matched.<br> The parse_template and logic_template(s) follow normal NetRexx rules.<br> (1) Implied ELSE after last specified dstring.<br> (2) Up to 10 logic_Dstrings may be specified to go to up to 11 ouput streams<br> (including an implied ELSE).<br> <br> <br> Example:<br> <tt>pickparse /. $1 $2 +3 ./ /$1 = 'UNCLE'/ /$2 = 'SAM' & $1 = 'UNCLE'/</tt><br> <br> */<br> </blockquote> This completes the set of four stages featuring REGEX and PARSE to select or change records.</p> <p>Comments, ideas, etc. are requested. Thank you.<br> </p> </body> </html> |