From: René J. <rvj...@xs...> - 2021-10-30 14:28:19
|
Hi Leslie, Colin, This source needs the pipes compiler - please try with pipc (pipc: aliased to java org.netrexx.njpipes.pipes.compiler) - it needs that step to sort out the variable inclusion. Colins analysis that the NetRexx compiler cannot handle this is correct. If you can include a version of the source that does not include | (pipes) at the start I can easier check that for you. Best regards, René. > On 28 Oct 2021, at 12:36, J Leslie Turriff <jlt...@ma...> wrote: > > I'm trying to use a simple pipeline in a NetRexx routine, but nrc doesn't like my > variable substitution: > > ~/bin/NetRexx > | $ echo $JAVA_HOME > | > | @05:27:11,leslie@pinto rc=0 > | ~/bin/NetRexx > | $ echo $CLASSPATH > | .:/home/leslie/bin/NetRexx/:/usr/java/jdk-17:/usr/local/NetRexx-4.01-GA/lib/NetRexxF.jar > | @05:27:21,leslie@pinto rc=0 > | ~/bin/NetRexx > | $ cat newTree.nrx > | -- .-----------------------------------------------------------------------. -- > | -- | Change Log | -- > | -- |Version Date Description | -- > | -- |------- ---------- ----------------------------------------------------| -- > | -- | | -- > | -- |1.0 2021-10-27 Creation | -- > | -- '-----------------------------------------------------------------------' -- > | import org.netrexx.njpipes.pipes. > | trace off > | parse arg treeBase > | treePipe(Rexx(treeBase)) > | exit 0 > | ------------------------------------------------------------------------------- > | method treePipe(treeArguments) > | pipe (fixTree) > | command /usr/bin/tree {treeArguments} > | | tree: split at /[/ > | | merge: specs select 1 1-* next > | select 0 1-* next > | select 2 1-* next > | | console > | ? tree: split at /]/ | attrs: > | ? attrs: | merge: > | --===========================================================================-- > | @05:27:31,leslie@pinto rc=0 > | ~/bin/NetRexx > | $ nrc newTree.nrx > | NetRexx portable processor 4.01-GA build 573-20210320-2000 > | Copyright (c) RexxLA, 2011,2021. All rights reserved. > | Parts Copyright (c) IBM Corporation, 1995,2008. > | Program newTree.nrx > | 16 +++ command /usr/bin/tree {treeArguments} > | +++ ^ > | +++ Error: Unexpected character found in source: '{' (hexadecimal encoding: 007B) > | Compilation of 'newTree.nrx' failed [one error] > | @05:27:40,leslie@pinto rc=2 > > I can't see what I'm doing differently to what is described in "How to use a pipe in a > NetRexx program", page 24 of "Pipelines Guide and Reference"; I tried first putting the > pipeline into the implicit main() method, then in a separate method; neither worked, so I > looked through the examples in the NetRexx package and noticed the import statement, but > adding that didn't help either. > What am I doing wrong? > > Leslie > -- > Distribution: openSUSE Leap 15.3 x86_64 > java version "17" 2021-09-14 LTS > Java(TM) SE Runtime Environment (build 17+35-LTS-2724) > Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing) > NetRexx portable processor 4.01-GA build 573-20210320-2000 > > > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |