PACKAGE statement(?)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PACKAGE statement(?)

Jeff Hennick
I am having a problem understanding the PACKAGE system, I think.

I come to Netrexx from Rexx with only little Java experience.  The NRL3
has little to say about using PACKAGE, and I have yet to find a good
Java introduction to the subject that appears to be useful with NetRexx.

My primary interest in Netrexx is NJPipes.  I am working in Windows 10.  
The environmental variable is set: CLASSPATH=.;C:\Program
Files\NetRexx\lib\NetRexxF.jar

I have installed Netrexx 3.04 and am able to run NJPipes including
writing my own stages.  I have retrieved the source code from GitHub.  
It is when I want to change an existing stage that I get into trouble.

As a simple example foe why a change is desirable, the INSERT stage is
defined as:

                                +-BEFORE-+
>>--INSERT--|delimitedString|--+--------+----->>
                                +-AFTER--+

(I hope the spacing comes through. The BEFORE and AFTER options come
after the delimitedString.)

Unfortunately, the stage currently shipping works fine when either
BEFORE or AFTER is specified, but does not default to BEFORE is neither
is present.

The bug fix is a simple adding ", a=''" to the line "when a='BEFORE',
a='' then".

But after compiling the stage to a class and attempting to run it, I get:

  +++ Error: Class reference is ambiguous (more than one class matches
'insert')

(If I do all the renaming to INSERT1, for example, and comment out the
PACKAGE statement, it works fine.)

The source has these two lines:

package org.netrexx.njpipes.stages
import org.netrexx.njpipes.pipes.

I have attempted to set up directories to match the package and compile
the NJPipes sources into these: c:\users\jeff\documents\njpies -
my\lib\org\netrexx\njpipes\stages and \pipes but all my tries at
modifying the pipe.cmd such as @set
classpath=c:\users\jeff\documents\pipes -
my\lib\org\netrexx\njpipes\pipes;c:\users\jeff\documents\pipes - my\lib
and the like have not worked.

So, any and all ideas on how to get this all working would be welcomed.  
For now, I am going the rename-route to get things working, and I have a
number of stages, with a lot of test cases for each, just about ready to
go.  My goal is to ultimately bring NJPipes up to the current CMS
Pipelines level as much as possible and reasonable.  (And maybe a bit
better in some cases.  For example, adding a REGEX option to CHANGE.)

Thank you,
Jeff Hennick

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PACKAGE statement(?)

ThSITC
Regarding the *more than one class matches 'xxxxxxx'* :

I did suggest (actually already Year's ago) that *NetRexx* should be so
kind *and* give a *Listing of the Full Class-Names*
of the *ambiguous classes*.

*I* personally *think* that this would help a lot to reduce worries,
hurries, and pain from NetRexx users.

Unfortunately, I don't yet *know* there this *Msg* is located in the
*NetRexx* Source.

If Yes (maybe Rene Vincent Jansen might be able to advise) ...
... I could patch this by my own (may be)  ...

Thomas Schneider

www.db-123.com
www.thsitc.com
================================================================================

Am 12.04.2016 um 22:10 schrieb Jeff Hennick:

> I am having a problem understanding the PACKAGE system, I think.
>
> I come to Netrexx from Rexx with only little Java experience.  The
> NRL3 has little to say about using PACKAGE, and I have yet to find a
> good Java introduction to the subject that appears to be useful with
> NetRexx.
>
> My primary interest in Netrexx is NJPipes.  I am working in Windows
> 10.  The environmental variable is set: CLASSPATH=.;C:\Program
> Files\NetRexx\lib\NetRexxF.jar
>
> I have installed Netrexx 3.04 and am able to run NJPipes including
> writing my own stages.  I have retrieved the source code from GitHub.  
> It is when I want to change an existing stage that I get into trouble.
>
> As a simple example foe why a change is desirable, the INSERT stage is
> defined as:
>
>                                +-BEFORE-+
>>> --INSERT--|delimitedString|--+--------+----->>
>                                +-AFTER--+
>
> (I hope the spacing comes through. The BEFORE and AFTER options come
> after the delimitedString.)
>
> Unfortunately, the stage currently shipping works fine when either
> BEFORE or AFTER is specified, but does not default to BEFORE is
> neither is present.
>
> The bug fix is a simple adding ", a=''" to the line "when a='BEFORE',
> a='' then".
>
> But after compiling the stage to a class and attempting to run it, I get:
>
>  +++ Error: Class reference is ambiguous (more than one class matches
> 'insert')
>
> (If I do all the renaming to INSERT1, for example, and comment out the
> PACKAGE statement, it works fine.)
>
> The source has these two lines:
>
> package org.netrexx.njpipes.stages
> import org.netrexx.njpipes.pipes.
>
> I have attempted to set up directories to match the package and
> compile the NJPipes sources into these: c:\users\jeff\documents\njpies
> - my\lib\org\netrexx\njpipes\stages and \pipes but all my tries at
> modifying the pipe.cmd such as @set
> classpath=c:\users\jeff\documents\pipes -
> my\lib\org\netrexx\njpipes\pipes;c:\users\jeff\documents\pipes -
> my\lib and the like have not worked.
>
> So, any and all ideas on how to get this all working would be
> welcomed.  For now, I am going the rename-route to get things working,
> and I have a number of stages, with a lot of test cases for each, just
> about ready to go.  My goal is to ultimately bring NJPipes up to the
> current CMS Pipelines level as much as possible and reasonable.  (And
> maybe a bit better in some cases.  For example, adding a REGEX option
> to CHANGE.)
>
> Thank you,
> Jeff Hennick
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Loading...