NetRexx xclasses now available

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

NetRexx xclasses now available

Pierantonio Marchesini
Hello everybody:

  sorry for this rather long posting. Indeed, I hope it will
interest you enough to justify the length.

  The "xclasses" package is now available for anybody.
It is still beta level. If you'd like to see more functionality,
please let me know.

  For any comment, suggestion, etc. feel free to contact me.

------------------------------------------------------------

    This is the manifest for a package called
  "Extended Programmer Toolkit for NetRexx Script Applications".
    To make the thing shorter, I've decided to identify
  the package also with the name "NetRexx Xclasses".

  The "NetRexx Xclasses" are available at:

     http://wwwinfo.cern.ch/news/netrexx/xclasses

-- the main idea

    When writing script applications, some of the tasks are
  really always the same.

    Among those tasks, you might find:
      - parsing command line options;
      - executing system commands;
      - reading (and interpreting) configuration files;
      - handle socket connections, FTP & HTMLs;
      - handle error conditions and tracebacks;
      - etc.

    Just looking at my Classical REXX code, I find that
  99% of the programs always contain a "kernel-set" of
  procedures. Not only, but some programs get themselves
  called by all the others.

    In my NetRexx Tutorial I've put some of this functionality
  in some of the examples.

    The idea is to package all this in a better way, and offer
  a Toolkit for NetRexx Script Applications.


-- features

  o - extended classes to support
       - basic option & configuration parsing
       - interface with the system
       - socket operations
       - HTML operations
       - file & directory operations
       - date & time operations
       - etc.

  o - public domain code

  o - all classes available in a single JAR file

  o - source code available


-- examples

  To give you the real "feeling" of what I'm talking about,
  here are some examples of code fragments (which are also
  fully functional programs by themselves):

   -- 1.00
   -- execute a command
   cmd = xexec('jar -cvf test.jar *.class')
   if cmd.rc <> 0
     then xsys.die(300,'error from jar command.')

   -- 2.00
   -- print 31 Dec 1998 from European format to Julian
   say xsys.xdate('E','31/12/98','J')
   -- print next Monday in Julian format
   say xsys.xdate('NEXT','MONDAY','J')

   -- 3.00
   -- a simple FINGER client
   parse arg user'@'node
   cs = xsock(node,'FINGER')
   cs.send(user)
   cs.receive()
   cs.close()
   exit

   -- 4.00
   -- read record 123 of a recfm=F lrecl=80 file
   fid = xfile('test.test')
   fid.options('recfm=F,lrecl=80')
   say fid.recread(123)

   -- 5.00
   -- a simple FTP session
   say 'This is just a small test connecting to "asisftp.cern.ch".'
   ftpc = xftp('asisftp.cern.ch')
   ftpc.cmd('user anonymous [hidden email]')
   ftpc.cmd('ascii')
   ftpc.cmd('replace Y')
   ftpc.cmd('get wylbur.help')
   exit

   -- 6.00
   -- will fetch ALL the html files contained in the
   --   Tutorial HTML URL
   base = 'http://wwwinfo.cern.ch/news/netrexx/html/'   -- this is where the tutorial is
   page = xurl(base'nr_toc.html')                       -- and this is where the TOC is
   page.options('notrace info noreplace')
   page.fetchall('html')

   Look at the "demo" subdirectory for many other examples.

------------------------------------------------------------

----------------------------------------------------------------
Pierantonio Marchesini                                  C.E.R.N.
ETH Zurich                                     CH-1211 GENEVE 23
email: [hidden email]    Phone: +41.22.767.50.23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx xclasses now available

J. Pedone
If anyone is interested -

Pierantonio' excellent documentation has been converted to os/2 inf
format.  Let me know if you want a copy.

j.

On Tue, 14 Jul 1998 09:39:59 +0200, Pierantonio Marchesini wrote:

>Hello everybody:
>
>  sorry for this rather long posting. Indeed, I hope it will
>interest you enough to justify the length.
>
>  The "xclasses" package is now available for anybody.
>It is still beta level. If you'd like to see more functionality,
>please let me know.
>
>  For any comment, suggestion, etc. feel free to contact me.
>
>------------------------------------------------------------
>
>    This is the manifest for a package called
>  "Extended Programmer Toolkit for NetRexx Script Applications".
>    To make the thing shorter, I've decided to identify
>  the package also with the name "NetRexx Xclasses".
>
>  The "NetRexx Xclasses" are available at:
>
>     http://wwwinfo.cern.ch/news/netrexx/xclasses
>
>-- the main idea
>
>    When writing script applications, some of the tasks are
>  really always the same.
>
>    Among those tasks, you might find:
>      - parsing command line options;
>      - executing system commands;
>      - reading (and interpreting) configuration files;
>      - handle socket connections, FTP & HTMLs;
>      - handle error conditions and tracebacks;
>      - etc.
>
>    Just looking at my Classical REXX code, I find that
>  99% of the programs always contain a "kernel-set" of
>  procedures. Not only, but some programs get themselves
>  called by all the others.
>
>    In my NetRexx Tutorial I've put some of this functionality
>  in some of the examples.
>
>    The idea is to package all this in a better way, and offer
>  a Toolkit for NetRexx Script Applications.
>
>
>-- features
>
>  o - extended classes to support
>       - basic option & configuration parsing
>       - interface with the system
>       - socket operations
>       - HTML operations
>       - file & directory operations
>       - date & time operations
>       - etc.
>
>  o - public domain code
>
>  o - all classes available in a single JAR file
>
>  o - source code available
>
>
>-- examples
>
>  To give you the real "feeling" of what I'm talking about,
>  here are some examples of code fragments (which are also
>  fully functional programs by themselves):
>
>   -- 1.00
>   -- execute a command
>   cmd = xexec('jar -cvf test.jar *.class')
>   if cmd.rc <> 0
>     then xsys.die(300,'error from jar command.')
>
>   -- 2.00
>   -- print 31 Dec 1998 from European format to Julian
>   say xsys.xdate('E','31/12/98','J')
>   -- print next Monday in Julian format
>   say xsys.xdate('NEXT','MONDAY','J')
>
>   -- 3.00
>   -- a simple FINGER client
>   parse arg user'@'node
>   cs = xsock(node,'FINGER')
>   cs.send(user)
>   cs.receive()
>   cs.close()
>   exit
>
>   -- 4.00
>   -- read record 123 of a recfm=F lrecl=80 file
>   fid = xfile('test.test')
>   fid.options('recfm=F,lrecl=80')
>   say fid.recread(123)
>
>   -- 5.00
>   -- a simple FTP session
>   say 'This is just a small test connecting to "asisftp.cern.ch".'
>   ftpc = xftp('asisftp.cern.ch')
>   ftpc.cmd('user anonymous [hidden email]')
>   ftpc.cmd('ascii')
>   ftpc.cmd('replace Y')
>   ftpc.cmd('get wylbur.help')
>   exit
>
>   -- 6.00
>   -- will fetch ALL the html files contained in the
>   --   Tutorial HTML URL
>   base = 'http://wwwinfo.cern.ch/news/netrexx/html/'   -- this is where the tutorial is
>   page = xurl(base'nr_toc.html')                       -- and this is where the TOC is
>   page.options('notrace info noreplace')
>   page.fetchall('html')
>
>   Look at the "demo" subdirectory for many other examples.
>
>------------------------------------------------------------
>
>----------------------------------------------------------------
>Pierantonio Marchesini                                  C.E.R.N.
>ETH Zurich                                     CH-1211 GENEVE 23
>email: [hidden email]    Phone: +41.22.767.50.23
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
>[hidden email]
>with the following message in the body of the note
>unsubscribe ibm-netrexx <e-mail address>
>


[hidden email]                         (\         /)
http://www.flash.net/~jpedone        (\    -   /)
                                                       (\   ( )  /)
                                                       (/ <  > \)
                                                          (/\/\)
                                                          /    \
                                                        (        )
Even my cleaning lady won't do Windows.
E Pluribus UNIX.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx xclasses now available

mcbrides
>If anyone is interested -
>
>Pierantonio' excellent documentation has been converted to os/2 inf
>format.  Let me know if you want a copy.
>

I'll be very happy to take one. Thank you.


--

/-------------------------------------\
| Jerry McBride                       |
|                                     |
|                ([hidden email]  |
\-------------------------------------/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx xclasses now available

mcbrides
In reply to this post by Pierantonio Marchesini
>Hello everybody:
>
>  sorry for this rather long posting. Indeed, I hope it will
>interest you enough to justify the length.
>
>  The "xclasses" package is now available for anybody.
>It is still beta level. If you'd like to see more functionality,
>please let me know.
>
>  For any comment, suggestion, etc. feel free to contact me.
>
>------------------------------------------------------------

Anyone know what happend to Pireantonio? I've found a real sleeper of a bug in
one of the classes in his XCLASSES package.

--

/-------------------------------------\
| Jerry McBride                       |
|                                     |
|                ([hidden email]  |
\-------------------------------------/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx xclasses now available

Massimiliano Marsiglietti
> Anyone know what happend to Pireantonio? I've found a real sleeper of a
> bug in one of the classes in his XCLASSES package.

Probably he's on holidays.. I have sent him a message and didn't
get any answer.. With some luck he's on a beach (or perhaps
climbing a mountain) right now. :-)

Max

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx xclasses now available

mcbrides
>> Anyone know what happend to Pireantonio? I've found a real sleeper of a
>> bug in one of the classes in his XCLASSES package.
>
>Probably he's on holidays.. I have sent him a message and didn't
>get any answer.. With some luck he's on a beach (or perhaps
>climbing a mountain) right now. :-)
>

Actually, he's alive and well... still working... <G> IT's just that his email
account isn't receiving and mail. Everything I send him, get's bounced back...

So...

The bug in the XCLASSES that I found is: In XSOCK, method receive(), while in
NNTP mode, will sometimes terminate the reception of a message before the
actual end of text is received. In "NNTP SPEAK", the end of message is a single
period ".". In the mentioned method, a compare is made using a single "=" or
a non-strict compare, to see if the last line from the NNTP server is the EOT
signal. This should be a double "==" or strict compare. Since most usenet
posters have no idea how messages are flowed from server to server to client,
they will sometimes use a series of spaces and a period to space out their
text. It's looks great, but with XSOCK as it is, it will toss an exception
sooner or later...

---

/-------------------------------------\
| Jerry McBride                       |
|                                     |
|                ([hidden email]  |
\-------------------------------------/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>