REXX Tips & Tricks, Version 2.80

Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs

NETUTL - REXX functions that enhance NET commands

Name     NetUtil - REXX functions that enhance NET commands 
Version  Ver 1.23, 25.12.96
Author   Shintaroh Hori 
         Yamato Lab, IBM Japan 
         (see EMail Addresses)
Distrib. EWS 
Type     REXX DLL 
Price    -
Source   BBS 
         Name: NETUTL.* 

Description taken from the file NETUTIL.ANN from this package: 
NetUtil.DLL is a REXX function package which includes REXX functions that 
simulate and enhance NET commands of IBM OS/2 LAN Server products. It also 
includes functions that can perform what NET commands do not offer. 
It is designed to provide REXX programmers with ease-of-use interface and 
more capabilities than NET commands. 

Note:  IBM offers an applet WSLSRXUT("LAN Server/Warp Server REXX API 
       extension") as a free AS-IS software from a Web site; 
       NetUtil has less functions than WSLSRXUT, but I think it will be 
       more friendly to use than WSLSRXUT because NetUtil is is an 
       implementation of NET commands as REXX functions but WSLSRXUT is an 
       implementation of LAN Server APIs as REXX functions. 
 Advantage of NetUtil functions 
   *  It sets information directly into REXX variables. 
   *  It offers more simple interface than NET commands. 
   *  It provides non-ADMIN users with limited information that cannot be 
      obtained by NET commands. 
   *  There are also useful functions of non-NET command type. 
   *  It returns an exact return code from NET APIs. 
 NetUtil makes a REXX program simple 
 Here is an example of REXX program that lists all the group names of a 
 logon domain and the user ids within the groups. (Imagine your coding 
 work if you have to code it with NET GROUP command.) 

 /* Example: */
    if NetGroup('Query','out','.')=0 then
      do i=1 to out.0
           /* group id*/
        say out.i.0gid
           /* comment for this group */
        say out.i.0remark
           /* number of users */
        do j=1 to out.i.0
           /* user id within the group*/
          say out.i.j

Inf-HTML End Run - Successful