From: J L. T. <jlt...@ma...> - 2021-10-28 10:53:15
|
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 |