
Pipes for NetRexx and Java                           Version 0.48  May 16, 1999


Copyright (c) E. J. Tomlinson <tomlins@cam.org>, 1997.  All rights reserved


    This code is Beta and will contain bugs.  Use it at your own risk.

    Pipes for Netrexx and Java is PROVIDED AS IS AND COMES WITH NO WARRANTY OF
    ANY KIND, EITHER EXPRESSED OR IMPLIED.  IN NO EVENT WILL THE COPYRIGHT
    HOLDER BE LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.

    Parts of njPipes are Distributed under the GNU GENERAL PUBLIC LICENSE with
    NO WARANTEES of ANY kind. See CopyLeft.Txt for the licence and information
    on using, copying, modifing, and distributing this program.

    Not withstanding the above disclaimers, I am very interested in suggestions,
    problems, bugs, and questions.

Installation and Requirements

    To run Pipes for NetRexx and Java you need both Java and NetRexx runtime
    support installed.  To write your own pipes or stages you need compilers for
    both Java and NetRexx.  The OS2 JDK release for JAVA 1.1.7A and NetRexx 1.148
    where used to develop this code.  NetRexx 1.132 is required to use version
    025 and above as inner classes are used.

    The installation has changed in release 025.  The core classes for pipes
    and stages have been moved into njpipesC.jar.  This file may be added to your
    your CLASSPATH.

    To install create an njpipes directory, cd into it and unzip njpipes.zip.
    Then unzip the versioned njpipes file, unzip njpipes046.zip.  This will build
    the directory structure with with examples, docuementation, the njpipesC.jar,
    a pipe.bat and pipe.cmd.  If you unzipped on a drive other than C: or you
    placed njpipes in a subdirectory, edit the .bat (W95, NT) or the .cmd (OS/2)
    file to point to your njpipes.jar and you can start pipeing.

    Alternately you can add njpipesC.jar to your CLASSPATH.

    For NT the following variables or their equivalent need to be defined in the
    Control Panel, System, Environment page as user variables.  This assumes
    you are using the sun <a href="http://java.sun.com/products/jdk/1.1/">JDK</a> with the performance pack applied.

    CLASSPATH = c:\jdk1.1.6\lib\NetRexxC.zip;c:\njpipes\njpipesC.jar;c:\NetRexx;.;c:\jdk1.1.6\lib\classes.zip
    JAVA_COMPILER = symcjit
    PATH = C:\jdk1.1.6\bin;.;

    To test your installation CD into the njpipes directory and type:

    (W95, NT)

    pipe "(test) literal arg() ! dup 999 ! count words ! console"

    (OS/2)

    pipe "(test) literal arg() ! dup 999 ! count words ! console"

    The first time you use the pipe command in a new directory it will
    create a default pipes.cnf file for you.

    If you have added the njpipes.jar to your CLASSPATH you can also use:

    java pipes.compiler (test) literal arg() ! dup 999 ! count words ! console

    You should see a message that the pipe compiler is processing your pipe and
    soon after that messages from the NetRexx compiler as it processes the pipe.

    To run the pipe type:

    java test some words

    The pipe should then output:

    2000

|   If you have had njPipes working and it fails after a reinstall, it may be
|   due to source you have recompiled.  Its a good idea to delete any .class
|   files you have created in the pipes, stages or tests directories.  Also
|   check the readme.  There maybe requirements to recompile some of your
|   pipes.  The stageExit method, now used quite a bit, is a two edged sword.
|   On one hand it generates much faster pipes, on the other hand, it often
|   requires pipes to be recompiled.

Recient History

   0.50  - Released May 30, 1999
         - Fixed a stall occuring when interruped threads, with the interrupt
           caught by ThreadPool, were reused.
         - Fixed a thread safety problem in ELASTIC
         - Improved the timeout options in TCPDATA and TCPCLIENT, they also
           byte[] instead of strings.  This was done since converting to and
           from strings sometimes scrambles binary data (more research on
           encodings...)
         - Changed DELBLOCK it now handles byte[] to help keep tcpdata andn
           tcpclient efficent.  The EOF option was broken, its fixed now.
         - Changed DISKR, DISKW and DISKA to handle byte[] when using streams.
         - Added INSERT which handles byte[].  This should be used instead of
           SPECS to add LF or CR .
   0.49  - Released May 21, 1999
         - compiled with 1.2.1 and netrexx 1.148
         - Added preliminary support added to .njp compiler for files containing
           java source!  See the (some what messy) java samples in vectort1.njp,
           overtest.njp and addtest4.njp
         - Added code to generate a dummy .nrx file containing the public class
           in a .java file.  This allows NetRexx to compile class that depend on
           the java source.
         - Modified sort to accept arguements in the same order as CMS
         - Fixed rc logic in drop stage
         - Fixed shortcut code for {n} where n is numeric.
   0.48  - Released May 16, 1999
         - Fixed a (nasty) bug involving reusing pipe objects.
         - Added the reuse() method to the stage class.  To use it override
           it in your stage.  It was added so there was a foolproof way to
           reset a stage when its pipe object is reused.  (doSetup is intended
           for use with dynamic arguements in call or added pipes)
         - Added the cont option and defaulted it to comma.
         - fixed return code logic in some stages and in selectInput/Output
         - Added the Emsg methods
         - Added arguement debug option (128)
         - Changed stages so the run methods are not final

    Planned for the next month or three (pending BUGS! and my time)

    0.xx - make pipe objects java beans.
    0.xx - implement the new StageError/Emsg code in all stages
    0.xx - rewrite the stage class to use notifyAll/wait to pass data and
           interrupt to pass flow control info (ie. severs...).  This will
           result in an implementation that is easier to understand and
           maintain.

Trademarks

    Java is a trademark of Sun Microsystems

    Windows NT is a trademark of MicroSoft

    The following terms, are trademarks or registered
    trademarks of IBM Corporation in the United States and/or other countries:

    IBM
    OS/2
    NetRexx
    CMS

