home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
nwos2utl.zip
/
README
< prev
Wrap
Text File
|
1995-10-02
|
3KB
|
84 lines
NWUTILS.DLL - A limited Netware External Function Library for REXX
This Netware external function library for REXX was written by Scotty Hudson.
This software is free. You may do anything you choose with this software.
The author and the company he works for is in no way responsible for any
damages that may be incurred from the use of this software. The author in no
way has any affiliation with Novell Inc.
Netware is a trademark of Novell Inc.
With this said here goes: I have to preform daily task on 200+ fileservers at
certain times each day. I needed a way to automate this using OS/2 because the
link between many of these servers is very slow and DOS sessions in OS/2
don't take avantage of PBURST. In DOS you can redirect standard in to login.exe
or map.exe, but you can't in OS/2. To solve this I wrote this DLL for REXX. It
only has three functions in it. ( I needed something fast and these were all I
needed to get the job done. )
Directions:
First you need to register the DLL and the functons with REXX. These two
statements will do the trick.
call RXFuncAdd 'NWLoadFuncs', 'NWUTILS', 'NWLoadFuncs'
call NWLoadFuncs
Make sure that NWUTILS.DLL is in your libpath. I put mine in my netware
directory.
Function 1 - NWAttach
This function attaches to a specific file server.
This function takes three arguments: fileserver, login name, password
example:
ret = NWAttach( "FileServer", "LoginName", "Password" )
The return codes are:
success -> 0
connection failure -> 1
invalid password -> 2
just can't attach -> 3
NWCALLS.DLL intialzation failure -> 4
invalid number of args -> 5
Function 2 - NWCkConn
This function checks to see if you are connected. This is useful to check to
see if you are attached to a fileserver before you try to do so. Remember all
Netware connections in OS/2 are global. If you have a background task running
you don't want to kill it by attaching again.
This function only takes on argument: fileserver
example:
ret = NWCkConn( "FileServer" )
The return codes are:
if connected -> 0
if not connected -> 1
Function 3 - NWLogout
This function is self explanitory. It logouts and detaches from a fileserver.
This function takes one argument: fileserver
example:
ret = NWLogout( "FileServer" )
success -> 0
failure -> 1
I hope this is some use to someone. I use it everyday and have yet to have a
problem with it. I don't know how well it will work on Netware 4.x fileservers,
but it seems to do the job with 3.x fileservers. I do not claim to be a C
programmer and my code is rather messy, so that is why I did not include
it with this package. Sometime I would like to clean up the code and add some
more useful functions to it. If anyone has any questions feel free to email me.
Scotty Hudson
shudson@cbrl.cbrlcorp.com