home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / netut124.zip / netutil.inf (.txt) < prev    next >
OS/2 Help File  |  1999-10-22  |  73KB  |  2,700 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. NETUTIL.DLL is a REXX function package which includes REXX functions that 
  5. simulate and enhance NET commands of IBM OS/2 LAN Server products. It also 
  6. includes functions which can perform things that NET commands do not offer. 
  7.  
  8. It is designed to provide REXX programmers with ease-of-use interface and more 
  9. capabilities than NET commands. 
  10.  
  11. Note:   In applets of IBM OS/2 LAN Server of version 3 and 4, there is a 
  12.         similar REXX function package LSRXUT. Though the author is not so 
  13.         familiar with LSRXUT package, it seems to be an implementation of NET 
  14.         APIs as REXX functions. On the other hand, NetUtil package may be 
  15.         called an implementation of NET commands as REXX functions. 
  16.  
  17. Advantage of NetUtil functions: 
  18.  
  19.     It sets information directly into REXX variables. (See an example.) 
  20.     It offers more simple interface than NET commands. (See the example.) 
  21.     It provides non-ADMIN users with limited information that cannot be 
  22.      obtained by NET commands. (See an example.) 
  23.     There are also useful functions of non-NET command type. (See an example.) 
  24.     It returns an exact return code from NET APIs. 
  25.  
  26. (c) Copyright IBM Corporation 1995, 1999 
  27.  
  28.  
  29. ΓòÉΓòÉΓòÉ <hidden> Ease-of-use: Example of NetGroup ΓòÉΓòÉΓòÉ
  30.  
  31. To list all the group names of a logon domain and the user ids within the 
  32. groups by a REXX program, it would be complicated when it uses NET GROUP 
  33. command. (NET ADMIN command will be also required when it is run from a 
  34. requester machine.) 
  35.  
  36. By use of NetGroup function in NetUtil package, the REXX program is very 
  37. simple: 
  38.  
  39.  /* Example.  */
  40.  if NetGroup('Query','out','.')=0 then do
  41.    do i=1 to out.0
  42.      say out.i.0gid       /* group id*/
  43.      say out.i.0remark    /* comment for this group */
  44.  
  45.      do j=1 to out.i.0 /* number of users */
  46.        say out.i.j   /* user id within the group*/
  47.      end
  48.    end
  49.  end
  50.  
  51.  
  52. ΓòÉΓòÉΓòÉ <hidden> More capability for Non-ADMIN users: Example of NetUser ΓòÉΓòÉΓòÉ
  53.  
  54. An user of NetUtil who has not ADMIN privilege can list all the user ids in a 
  55. logon domain: 
  56.  
  57.  /* Example.  */
  58.  if NetUser('Query','out','.')=0 then do
  59.    do i=1 to out.0
  60.      say out.i.0uid         /* group id*/
  61.      say out.i.0remark      /* comment for this group */
  62.      say out.i.0fullname    /* fill name */
  63.      say out.i.0UserComment /* user comment */
  64.    end
  65.  end
  66.  
  67.  
  68. ΓòÉΓòÉΓòÉ <hidden> Functions of Non-NET command type ΓòÉΓòÉΓòÉ
  69.  
  70. NetUtil includes also useful functions of non-NET command type. Here are 
  71. examples: 
  72.  
  73.  /* Examples  */
  74.  parse value LsDCname() with rc domsrv
  75.  say 'Domain Controller of your logon domain is' domsrv
  76.  
  77.  srv = 'LS40SRV'
  78.  parse value LsServer('Disk',srv) with rc drive_list
  79.  say 'Server' srv 'has local drives of' drive_list
  80.  
  81.  /* Lists all the servers in a logon domain and put such information
  82.     on the servers as LS version, and so on, in REXX compound variables
  83.     with the stem OUT. */
  84.  rc = LsServer('Query','out','.')
  85.  
  86.  
  87. ΓòÉΓòÉΓòÉ 1.1. How to install and use ΓòÉΓòÉΓòÉ
  88.  
  89.     To install NETUTIL.DLL, copy it under a directory specified in the LIBPATH 
  90.      statement of your CONFIG.SYS file. 
  91.  
  92.     To use a function of NETUTIL.DLL in your REXX program, the function must 
  93.      have been registered in REXX. To register it, use REXX's build-in function 
  94.      RxFuncAdd. 
  95.  
  96.      Example  To register NetAlias function, issue the following instruction in 
  97.      a REXX program: 
  98.  
  99.           call RxFuncAdd 'NetAlias', 'NETUTIL', 'NetAlias'
  100.  
  101.     To register all the functions of NETUTIL.DLL, issue the following 
  102.      instruction in a REXX program: 
  103.  
  104.           call RxFuncAdd 'LsLoadFuncs', 'NETUTIL', 'LsLoadFuncs'
  105.           call LsLoadFuncs
  106.  
  107.     To drop all the registered functions of NETUTIL.DLL, issue the following 
  108.      instruction in a REXX program: 
  109.  
  110.           call LsDropFuncs
  111.  
  112. Note:   If you often use NetUtil functions, it is better to call LsLoadFuncs 
  113. from your STARTUP.CMD. 
  114.  
  115.  
  116. ΓòÉΓòÉΓòÉ 1.2. Restrictions ΓòÉΓòÉΓòÉ
  117.  
  118.   1. NETUTIL.DLL uses 32-bit API of IBM OS/2 LAN Server version 4.0, so the 
  119.      functions do not run on a machine where IBM OS/2 LAN Server products of 
  120.      versions less than 4.0 is running. 
  121.  
  122.      Note:   The functions can operate with servers of the earlier versions. 
  123.  
  124.   2. The current version of NETUTIL.DLL does not implement all the NET 
  125.      commands. 
  126.  
  127.   3. The current version of NETUTIL.DLL supports mainly for 'Query' verb. 
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 1.3. Change History ΓòÉΓòÉΓòÉ
  131.  
  132.  1.24  1999-10-22 
  133.  
  134.            LsDomName function was added. 
  135.            NETUTIL.DLL is now linked without /EXEPACK option, so NETUTIL.DL2 
  136.             file was dropped from the package. (NETUTIL.DLL should run under 
  137.             OS/2 v2.0 or above.) 
  138.  
  139.  1.23  1996 12/25 Output stem variable name that NetGroup function returns for 
  140.        user ids of a group id is changed from "stem.i.0uid.j" to "stem.i.j". 
  141.        Though old name is obsolete, it will remain on NETUTIL in some future 
  142.        releases for compatibilities. 
  143.  
  144.  1.22  1996 02/19 Fixed a bug of NetAlias function that returned only DISK 
  145.        aliases when alias argument is not specified or specified as an 
  146.        asterisk. 
  147.  
  148.  1.21  1996 02/11 NETUTIL.DL2 file was added for OS/2 v2.x users. It should be 
  149.        renamed to NETUTIL.DLL when it is used on OS/2 v2.x. 
  150.  
  151.        Some typo in INF file were fixed. 
  152.  
  153.  1.20  1995 12/29 New function and some enhancement added, and a bug is fixed. 
  154.  
  155.            NetApp function with 'Query' verb was added. 
  156.            'Connect' and 'Disconnect' verbs were added to NetUse function. 
  157.            NetUser function with 'Query' verb added following REXX variables 
  158.             to be set: 
  159.               -  stem.i.0LOGONALWAYS? 
  160.               -  stem.i.0LOGONHOURS.0  (=7) 
  161.               -  stem.i.0LOGONHOURS.t  (t=1 to 7) 
  162.               -  stem.i.0PWREQ? 
  163.               -  stem.i.0PWCHG? 
  164.               -  stem.i.0ACCOUNTACT? 
  165.               -  stem.i.0ACCOUNTDEL? 
  166.            NetUser function with 'Query' verb added detail of 2 to set 
  167.             information on group membership, assignment of network application, 
  168.             and logon assignment. 
  169.            SYS3175 error for NetUser function with no detail given was fixed. 
  170.  
  171.  1.10  1995 12/07 New function added and some bugs fixed: 
  172.  
  173.            NetAccess function with 'Query' and 'Delete' verbs was implemented. 
  174.            Fixed a bug of NetAdmin function when a command displays no 
  175.             outputs. 
  176.            Fixed a bug of NetAlias function. (Value in stem.i.0server was 
  177.             prefixed by extra two back slashes(\\) if the server is LS v4.0.) 
  178.  
  179.  1.00  1995 11/17 Initial release. 
  180.  
  181.  
  182. ΓòÉΓòÉΓòÉ 1.4. Support ΓòÉΓòÉΓòÉ
  183.  
  184. Support and enhancement of NetUtil is made on my free-time base. If you find 
  185. bugs or wishes for NetUtil, please append to NETUTIL FORUM on IBMLAN conference 
  186. disk. 
  187.  
  188.  
  189. ΓòÉΓòÉΓòÉ 2. Convention on NetUtil functions. ΓòÉΓòÉΓòÉ
  190.  
  191. NetUtil functions are grouped in two groups: 
  192.  
  193.   1. Netxxxx functions 
  194.  
  195.      Their names start with Net. They are implementation of NET commands, 
  196.      though not the exact one. 
  197.  
  198.      Note:   Syntax of a Netxxxx function is not the same as that of the 
  199.      corresponding NET command. 
  200.  
  201.   2. Lsxxxx functions 
  202.  
  203.      Their names start with Ls. They offers capabilities that are not provided 
  204.      by NET commands of IBM OS/2 LAN Server products. 
  205.  
  206. The first parameter of most Netxxxx functions is a verb such as 'Query'.  The 
  207. verb parameter is case-insensitive. Only the first character of a verb is 
  208. checked by a function unless described otherwise. So you can use both 'query' 
  209. and 'QUARK' as a 'Query' verb. 
  210.  
  211. Netxxxx function returns a REXX whole number. It is an return code. "0" means 
  212. successful completion of the function. If it is a negative, it means a syntax 
  213. and/or semantics error to invoke the function. Positive value is a return code 
  214. from NET API or OS/2 API. See Return codes from NetUtil functions. 
  215.  
  216. Parameters in syntax diagrams of NetUtil functions uses terms defined in 
  217. Syntactic Variables. 
  218.  
  219. In examples of how to use functions, the functions are assumed to have already 
  220. been registered in REXX. 
  221.  
  222.  
  223. ΓòÉΓòÉΓòÉ 2.1. Stem variables set by Query verb ΓòÉΓòÉΓòÉ
  224.  
  225. When a function is called with Query verb, stem is specified. After successful 
  226. completion, the function sets values for some items in REXX compound variables 
  227. with the stem. 
  228.  
  229. For example, the function call: 
  230.  
  231.  rc = NetAlias('Q','out','*')
  232. lists all the aliases defined in a logon domain, and sets REXX variables for 
  233. the items related to  the aliases. Some of them are as follows. 
  234.  
  235.  out.0           Number of aliases.
  236.  out.i.0ALIAS    Alias name  (i=1 to out.0)
  237.  out.i.0SERVER   Server name that defines the alias
  238.  out.i.0NETNAME  Netname for the alias
  239.  out.i.0PATH     Path for the Netname
  240.  
  241. Note that zero("0") is prefixed to each item name. (Such as 0ALIAS) This is an 
  242. intentional design for usage of stem in NetUtil functions. 
  243.  
  244. Suppose if an alias name were designed to be set in out.i.ALIAS, then following 
  245. REXX SAY statement would not displays a correct alias name if alias variable 
  246. has been set to a value other than 'ALIAS' explicitly: 
  247.  
  248.   alias ='*'
  249.   if NetAlias('Q','out',alias)=0 then /* list all the aliases */
  250.      do i=1 to out.0
  251.        say out.i.alias /* would say "OUT.1.*" ... */
  252.      end
  253.  
  254. The reason is that REXX thinks a symbol alias as a variable , retrieves a value 
  255. of the variable, and constructs a compound variable for the stem(out.). 
  256.  
  257. By prefixing a number such as 0 to alias, REXX thinks that the symbol 0alias is 
  258. not a variable but a constant 0ALIAS. (Any lowercase letters in a symbol is 
  259. always uppercased by REXX.) 
  260.  
  261. Thus the way makes REXX coding simple and error-free. That's why a zero is 
  262. prefixed to an item. 
  263.  
  264.  
  265. ΓòÉΓòÉΓòÉ 2.2. Flag variable ΓòÉΓòÉΓòÉ
  266.  
  267. Among REXX varaibles that are set by NetUtil functions, flag variables name 
  268. always ends with a question mark(?). Values of the flag variables are set to 
  269. either "1" or "0". 
  270.  
  271. An example is stem.i.0PWREQ? that is set by NetUser function with Query verb. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 2.3. Values returned in stem variable ΓòÉΓòÉΓòÉ
  275.  
  276. Values set in REXX compound varialbles of a stem for a function with Query verb 
  277. may be different from those returned by the NET command which the function 
  278. simulates. 
  279.  
  280. For example, stem.i.0TYPE variable set by NetAlias with Query verb will have 
  281. 'DISK', 'PRINT', or 'COMM'. Whereas, NET ALIAS command will return 'Files', 
  282. 'Printer', or 'Comm'. 
  283.  
  284. Values of 'DISK', 'PRINT', and 'COMM' are commonly used for type field in other 
  285. NetUtil functions such as NetUse, NetShare, and NetSess. That's why they are 
  286. different from those of NET ALIAS command. 
  287.  
  288. Computer name, that is, a requester or a server is always prefixed by double 
  289. back slashes(\\) when it is returned in a REXX variable. 
  290.  
  291.  
  292. ΓòÉΓòÉΓòÉ 2.4. Syntax Notation ΓòÉΓòÉΓòÉ
  293.  
  294. Syntax diagram for NetUtil functions is the same as what is described in a 
  295. document "IBM OS/2 Commands and Utilities", and terms in the document is also 
  296. used. 
  297.  
  298. In the syntax diagram for NetUtil functions, some special terms Syntactic 
  299. Variables are also used. 
  300.  
  301.  
  302. ΓòÉΓòÉΓòÉ 2.5. Syntactic Variables ΓòÉΓòÉΓòÉ
  303.  
  304. The following variables are used in syntax diagrams for NetUtil functions. 
  305.  
  306. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  307. ΓöéVariable ΓöéExample     ΓöéDescription                                  Γöé
  308. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  309. Γöéstem     ΓöéOUT.        ΓöéIt is a REXX stem. It may be                 Γöé
  310. Γöé         ΓöéData        Γöécase-insensitive. A period is not required,  Γöé
  311. Γöé         Γöédata.       Γöébut may be specified.                        Γöé
  312. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  313. Γöédom      ΓöéLS40DOM     ΓöéDomain name. See documents of IBM OS/2 LAN   Γöé
  314. Γöé         Γöé            ΓöéServer as for a valid domain name.           Γöé
  315. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  316. Γöéreq      ΓöéLS40REQ     ΓöéComputer name of a Requester. See documents  Γöé
  317. Γöé         Γöé            Γöéof IBM OS/2 LAN Server as for a valid        Γöé
  318. Γöé         Γöé            Γöécomputer name.                               Γöé
  319. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  320. ΓöélocReq   ΓöéMYMACH      ΓöéComputer name of a local machine where       Γöé
  321. Γöé         Γöé            ΓöéNetUtil function is executed.                Γöé
  322. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  323. Γöésrv      ΓöéLS40SRV     ΓöéComputer name of the machine where LAN ServerΓöé
  324. Γöé         Γöé            Γöéor OS/2 Peer is running.                     Γöé
  325. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  326. ΓöélocSrv   ΓöéLS40SRV     ΓöéLocal server. It is the server where NetUtil Γöé
  327. Γöé         ΓöéMY_SRV      Γöéfunction is executed.                        Γöé
  328. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  329. ΓöéDC       ΓöéLS40DCSRV   ΓöéIt is a computer name of a Domain            Γöé
  330. Γöé         Γöé            ΓöéController(DC) in a domain.                  Γöé
  331. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  332. Γöéuid      ΓöéUSERID      ΓöéAn user id. It is username defined in        Γöé
  333. Γöé         Γöé            Γöédocuments of LAN Server.                     Γöé
  334. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  335. Γöégid      ΓöéADMINS      ΓöéA group id. It is groupname defined in       Γöé
  336. Γöé         Γöé            Γöédocuments of LAN Server.                     Γöé
  337. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  338. Γöédetail   Γöé            ΓöéIt specifies a level of information that is  Γöé
  339. Γöé         Γöé            Γöéextracted by NetUtil functions with 'Query'  Γöé
  340. Γöé         Γöé            Γöéverb. It is an integer.                      Γöé
  341. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  342. ΓöéxDom     ΓöéLS40DOM     ΓöéIt specifies a domain name. If it is a       Γöé
  343. Γöé         Γöé   .        Γöédot(.), then a logon domain is used.         Γöé
  344. Γöé         Γöé            Γöé                                             Γöé
  345. Γöé         Γöé            ΓöéxDom:                                        Γöé
  346. Γöé         Γöé            Γöé Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇdomΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ                             Γöé
  347. Γöé         Γöé            Γöé    ΓööΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÿ                                Γöé
  348. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  349. ΓöéxReq     Γöé\\LS40REQ   ΓöéIt specifies a requester that starts with a  Γöé
  350. Γöé         Γöé    .       Γöédouble back slashes(\\). If it is a dot(.),  Γöé
  351. Γöé         Γöé\\MYMACH    Γöéthen it indicates a local requester.         Γöé
  352. Γöé         Γöé            Γöé                                             Γöé
  353. Γöé         Γöé            ΓöéxReq:                                        Γöé
  354. Γöé         Γöé            Γöé Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇ\\reqΓöÇΓö¼ΓöÇΓöÇΓöñ                            Γöé
  355. Γöé         Γöé            Γöé    ΓööΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÿ                               Γöé
  356. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  357. ΓöéxSrv     Γöé\\LS40SRV   ΓöéIt specifies a server that starts with a     Γöé
  358. Γöé         Γöé\\LS40DCSRV Γöédouble back slashes(\\). When it does not    Γöé
  359. Γöé         ΓöéLS40DOM     Γöéstart with a back slash(\), it should be xDomΓöé
  360. Γöé         Γöé   .        Γöé. In this context, xDom actually represents aΓöé
  361. Γöé         Γöé            ΓöéDC of the domain xDom.                       Γöé
  362. Γöé         Γöé            Γöé                                             Γöé
  363. Γöé         Γöé            Γöé xSrv:                                       Γöé
  364. Γöé         Γöé            Γöé Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇ\\srvΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ                           Γöé
  365. Γöé         Γöé            Γöé    ΓööΓöÇΓöÇΓöÇxDomΓöÇΓöÇΓöÿ                              Γöé
  366. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  367. ΓöéUNC      Γöé\\SRV\TOOLS ΓöéShared resource name in such a format as \\  Γöé
  368. Γöé         Γöé            Γöésrv\netname.                                 Γöé
  369. Γöé         Γöé            Γöé                                             Γöé
  370. Γöé         Γöé            Γöé UNC:                                        Γöé
  371. Γöé         Γöé            Γöé Γö£ΓöÇΓöÇ\\srv\netnameΓöÇΓöÇΓöñ                         Γöé
  372. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  373. Γöéres      ΓöéD:          ΓöéResource name for drive, directory, filename,Γöé
  374. Γöé         ΓöéD:\IBMLAN   Γöépipe, printer, or serial device.             Γöé
  375. Γöé         Γöé\PIPE       Γöé                                             Γöé
  376. Γöé         Γöé            Γöé res:                                        Γöé
  377. Γöé         Γöé            Γöé Γö£ΓöÇΓö¼ΓöÇdrive:ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ             Γöé
  378. Γöé         Γöé            Γöé   Γö£ΓöÇdrive:pathnameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ               Γöé
  379. Γöé         Γöé            Γöé   Γö£ΓöÇdrive:pathname\filenameΓöÇΓöñ               Γöé
  380. Γöé         Γöé            Γöé   Γö£ΓöÇ\PIPE\pipenameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ               Γöé
  381. Γöé         Γöé            Γöé   Γö£ΓöÇ\PRINT\queuenameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ               Γöé
  382. Γöé         Γöé            Γöé   ΓööΓöÇ\COMM\chardevqueuenameΓöÇΓöÇΓöÿ               Γöé
  383. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  384.  
  385.  
  386. ΓòÉΓòÉΓòÉ <hidden> locReq ΓòÉΓòÉΓòÉ
  387.  
  388. Computer name of a local machine where NetUtil function is executed. 
  389.  
  390.  
  391. ΓòÉΓòÉΓòÉ <hidden> locSrv ΓòÉΓòÉΓòÉ
  392.  
  393. Local server. It is the server where NetUtil function is executed. 
  394.  
  395.  
  396. ΓòÉΓòÉΓòÉ <hidden> uid ΓòÉΓòÉΓòÉ
  397.  
  398. An user id. It is username defined in documents of LAN Server. 
  399.  
  400.  
  401. ΓòÉΓòÉΓòÉ <hidden> gid ΓòÉΓòÉΓòÉ
  402.  
  403. A group id. It is groupname defined in documents of LAN Server. 
  404.  
  405.  
  406. ΓòÉΓòÉΓòÉ <hidden> xDom ΓòÉΓòÉΓòÉ
  407.  
  408. It specifies a domain name. If it is a dot(.), then a logon domain is used. 
  409.  
  410. xDom:
  411.  Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇdomΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ
  412.     ΓööΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÿ
  413.  
  414.  
  415. ΓòÉΓòÉΓòÉ <hidden> xReq ΓòÉΓòÉΓòÉ
  416.  
  417. It specifies a requester that starts with a double back slashes(\\). If it is a 
  418. dot(.), then it indicates a local requester. 
  419.  
  420. xReq:
  421.  Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇ\\reqΓöÇΓö¼ΓöÇΓöÇΓöñ
  422.     ΓööΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÿ
  423.  
  424.  
  425. ΓòÉΓòÉΓòÉ <hidden> xSrv ΓòÉΓòÉΓòÉ
  426.  
  427. It specifies a server that starts with a double back slashes(\\). When it does 
  428. not start with a back slash(\), it should be xDom. In this context, xDom 
  429. actually represents a DC of the domain xDom. 
  430.  
  431.  xSrv:
  432.  Γö£ΓöÇΓöÇΓö¼ΓöÇΓöÇ\\srvΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ
  433.     ΓööΓöÇΓöÇΓöÇxDomΓöÇΓöÇΓöÿ
  434.  
  435.  
  436. ΓòÉΓòÉΓòÉ <hidden> UNC ΓòÉΓòÉΓòÉ
  437.  
  438. Shared resource name in such a format as \\srv\netname. 
  439.  
  440.  UNC:
  441.  Γö£ΓöÇΓöÇ\\srv\netnameΓöÇΓöÇΓöñ
  442.  
  443.  
  444. ΓòÉΓòÉΓòÉ <hidden> res ΓòÉΓòÉΓòÉ
  445.  
  446. Resource name for drive, directory, filename, pipe, printer, or serial device. 
  447.  
  448.  res:
  449.  Γö£ΓöÇΓö¼ΓöÇdrive:ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
  450.    Γö£ΓöÇdrive:pathnameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  451.    Γö£ΓöÇdrive:pathname\filenameΓöÇΓöñ
  452.    Γö£ΓöÇ\PIPE\pipenameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  453.    Γö£ΓöÇ\PRINT\queuenameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  454.    ΓööΓöÇ\COMM\chardevqueuenameΓöÇΓöÇΓöÿ
  455.  
  456.  
  457. ΓòÉΓòÉΓòÉ 3. LsLoadFuncs ΓòÉΓòÉΓòÉ
  458.  
  459. Syntax: 
  460.  
  461.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  462.           Γöé                                 Γöé
  463.           Γöé ΓöÇΓöÇLsLoadFuncs()ΓöÇΓöÇ           Γöé
  464.           Γöé                                 Γöé
  465.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  466.  
  467. Syntax Description: 
  468.      No parameters are required. 
  469.  
  470. Operation: 
  471.      This function registers all the functions in NetUtil.DLL to REXX. 
  472.  
  473. Variables to be set: 
  474.      None. 
  475.  
  476. Returned string: 
  477.      None. 
  478.  
  479.  
  480. ΓòÉΓòÉΓòÉ 4. LsDropFuncs ΓòÉΓòÉΓòÉ
  481.  
  482. Syntax: 
  483.  
  484.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  485.           Γöé                                 Γöé
  486.           Γöé ΓöÇΓöÇLsDropFuncs()ΓöÇΓöÇ           Γöé
  487.           Γöé                                 Γöé
  488.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  489.  
  490. Operation: 
  491.      This function registers all the functions in NetUtil.DLL to REXX. 
  492.  
  493. Variables to be set: 
  494.      None. 
  495.  
  496. Returned string: 
  497.      None. 
  498.  
  499.  
  500. ΓòÉΓòÉΓòÉ 5. LsUtilVer ΓòÉΓòÉΓòÉ
  501.  
  502. Syntax: 
  503.  
  504.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  505.           Γöé                                 Γöé
  506.           Γöé ΓöÇΓöÇLsUtilVer()ΓöÇΓöÇΓöÇΓöÇ           Γöé
  507.           Γöé                                 Γöé
  508.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  509.  
  510. Operation: 
  511.      This function returns version number of NetUtil.DLL. 
  512.  
  513. Variables to be set: 
  514.      None. 
  515.  
  516. Returned string: 
  517.      Version number in such format as "1.02". 
  518.  
  519.  
  520. ΓòÉΓòÉΓòÉ 6. LsMyInfo ΓòÉΓòÉΓòÉ
  521.  
  522. Syntax: 
  523.  
  524.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  525.           Γöé                                 Γöé
  526.           Γöé ΓöÇΓöÇLsMyInfo()ΓöÇΓöÇΓöÇΓöÇ            Γöé
  527.           Γöé                                 Γöé
  528.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  529.  
  530. Operation: 
  531.      This function queries information of the caller, and returns a return 
  532.      code, an user id, a flag to indicate ADMIN user id or not, a computer 
  533.      name, a logon domain name, and the DC of the domain. 
  534.  
  535.      If some of the values is unknown, a question mark(?) is assigned to the 
  536.      values as a place holder. 
  537.  
  538. Returned string: 
  539.      rc  uid  admin?  \\locReq  domain  \\DCserver 
  540.  
  541.      Note:   If uid is an ADMIN user id, admin? is '1'. Otherwise, it is '0'. 
  542.  
  543. Required Privilege: 
  544.      GUEST, USER or ADMIN 
  545.  
  546. Examples: 
  547.      Here are examples. 
  548.  
  549.  
  550. ΓòÉΓòÉΓòÉ <hidden> Examples of LsMyInfo function ΓòÉΓòÉΓòÉ
  551.  
  552. Example: 
  553.  
  554. /* Example */
  555. parse value LsMyInfo() with rc uid admin? mach dom dc .
  556. if rc=0 then do
  557.    say 'My user id is' uid
  558.    if admin? then say 'It is an ADMIN user id.'
  559.    say 'My machine with back slashes(\\) is' mach
  560.    say 'Logon domain name is' dom
  561.    say 'DC name with back slashes(\\) is' dc
  562. end
  563. Exit
  564.  
  565.  
  566. ΓòÉΓòÉΓòÉ 7. LsDCname ΓòÉΓòÉΓòÉ
  567.  
  568. Syntax: 
  569.  
  570.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  571.           Γöé                                    Γöé
  572.           Γöé               ΓöîΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÉ           Γöé
  573.           Γöé ΓöÇLsDCname(ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇ)ΓöÇ   Γöé
  574.           Γöé               ΓööΓöÇΓöÇxDomΓöÇΓöÇΓöÿ           Γöé
  575.           Γöé                                    Γöé
  576.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  577.  
  578. Operation: 
  579.      This function queries DC of a domain specified by xDom Default is a logon 
  580.      domain. 
  581.  
  582.      It returns a return code and DC with double back slashes(\\) prefixed. 
  583.  
  584. Returned string: 
  585.      rc \\DCsrv 
  586.  
  587. Required Privilege: 
  588.      GUEST, USER or ADMIN 
  589.  
  590.  
  591. ΓòÉΓòÉΓòÉ 8. LsDomName ΓòÉΓòÉΓòÉ
  592.  
  593. Syntax: 
  594.  
  595.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  596.           Γöé                                     Γöé
  597.           Γöé                ΓöîΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ          Γöé
  598.           Γöé ΓöÇLsDomName(ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇ)ΓöÇ  Γöé
  599.           Γöé                ΓööΓöÇΓöÇ\\srvΓöÇΓöÇΓöÿ          Γöé
  600.           Γöé                                     Γöé
  601.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  602.  
  603. Operation: 
  604.      This function queries a domain name which the specified server srv belongs 
  605.      to. If there is no server name given, it returns a logon domain name. 
  606.  
  607.      It returns a return code and the domain name. 
  608.  
  609. Returned string: 
  610.      rc dom 
  611.  
  612. Required Privilege: 
  613.      GUEST, USER or ADMIN 
  614.  
  615.  
  616. ΓòÉΓòÉΓòÉ 9. LsLogonUser ΓòÉΓòÉΓòÉ
  617.  
  618. Syntax: 
  619.  
  620.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  621.           Γöé                                                           Γöé
  622.           Γöé                        ΓöîΓöÇ\\locSrvΓöÇΓöÉ                       Γöé
  623.           Γöé ΓöÇLsLogonUser(ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ     Γöé
  624.           Γöé                        Γö£ΓöÇΓöÇΓöÇxDomΓöÇΓöÇΓöÇΓöñ   ΓööΓöÇdetailΓöÇΓöÿ          Γöé
  625.           Γöé                        ΓööΓöÇΓöÇ\\srvΓöÇΓöÇΓöÇΓöÿ                       Γöé
  626.           Γöé                                                           Γöé
  627.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  628.  
  629. Operation: 
  630.      This function queries users who logged on to a domain which is specified 
  631.      by xDom or to a domain which a server srv belongs to. If xDom or \\srv is 
  632.      omitted, the default is a local server. 
  633.  
  634.      The information is set in REXX compound variables with the stem stem. 
  635.  
  636.      Detail information is obtained when detail is set to 1. 
  637.  
  638.      Note:   This function is similar to NET WHO command, but not the same. NET 
  639.              WHO also lists users who have logged on to other domains but have 
  640.              session(s) with servers in xDom or with srv. (The session may have 
  641.              been established by NET USE command or others.) 
  642.  
  643. Variables to be set: 
  644.  
  645.           stem.0                   Number of indexes for stem
  646.            (i=1 to stem.0 for variables below)
  647.           stem.i.0UID              An user id
  648.           stem.i.0USERCOMMENT      User comment
  649.           stem.i.0FULLNAME         Full name
  650.           stem.i.0COMPUTER   (*1)  Computer name of the user
  651.           stem.i.0LOGONTIME  (*1)  Date when the user logged on (*2)
  652.  
  653.           Note: 
  654.      (*1)       These variables are only set when detail is set to 1. 
  655.      (*2)       Date format is YYYY MM/DD hh:mm:ss. 
  656.  
  657. Returned string: 
  658.      rc 
  659.  
  660. Required Privilege: 
  661.      GUEST, USER or ADMIN 
  662.  
  663. Examples: 
  664.      Here are examples. 
  665.  
  666.  
  667. ΓòÉΓòÉΓòÉ <hidden> Examples of LsLogonUser function ΓòÉΓòÉΓòÉ
  668.  
  669. In the examples below, example of returned value is enclosed in left and right 
  670. parentheses in a comment area for a variable. 
  671.  
  672. Example 1:  List all the users who logged on to the domain that the caller 
  673. logged on to. 
  674.  
  675. /* Example 1 */
  676. retc = LsLogonUser('Q','out','.')
  677. if retc = 0 then
  678.   do i=1 to out.0
  679.     say out.i.0uid          /* ('MYADMIN') */
  680.     say out.i.0Computer     /* ('\\MYAPTIVA') */
  681.     say out.i.0UserComment  /* ('The Admin uid') */
  682.     say out.i.0Fullname
  683.   end
  684. Exit
  685.  
  686. Example 2:  List all the users who logged on to the domain LS40DOM. 
  687.  
  688. /* Example 2 */
  689. retc = LsLogonUser('Q','out','ls40dom',1)
  690. if retc = 0 then
  691.   do i=1 to out.0
  692.     say out.i.0uid 'logged on to LS40DOM from the machine',
  693.         out.i.0computer 'on' out.i.0logontime'.'
  694.   end
  695. Exit
  696.  
  697.  
  698. ΓòÉΓòÉΓòÉ 10. LsConnection ΓòÉΓòÉΓòÉ
  699.  
  700. Syntax: 
  701.  
  702.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  703.           Γöé                                                           Γöé
  704.           Γöé                         ΓöîΓöÇ\\locSrvΓöÇΓöÉ   ΓöîΓöÇ\\locReqΓöÇΓöÉ       Γöé
  705.           Γöé ΓöÇLsConnection(ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ)ΓöÇΓöÇ Γöé
  706.           Γöé                         ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇΓöÇΓöÇxReqΓöÇΓöÇΓöÇΓöñ       Γöé
  707.           Γöé                                        ΓööΓöÇnetnameΓöÇΓöÇΓöÿ       Γöé
  708.           Γöé                                                           Γöé
  709.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  710.  
  711. Operation: 
  712.      When a requester xReq is specified, this function lists all connections 
  713.      between a server xSrv and the requester xReq. If xReq is not specified, 
  714.      the default is the caller's machine. 
  715.  
  716.      When a shared resource netname is specified, this function lists all 
  717.      connections between a server xSrv and the shared resource xReq of the 
  718.      server. 
  719.  
  720.      If xSrv is not specified, default is a local server. 
  721.  
  722.      The connection information is set in compound variables with the stem 
  723.      stem. 
  724.  
  725. Variables to be set: 
  726.  
  727.           stem.0             Number of indexes for stem
  728.            (i=1 to stem.0 for variables below)
  729.           stem.i.0UID        An user id who has connection with the server.
  730.           stem.i.0COMPUTER   Computer name of the user  (*1)
  731.           stem.i.0NETNAME    Network name of the server's shared resource. (*2)
  732.           stem.i.0CONNTYPE   Connection type  (*3)
  733.           stem.i.0CONNTIME   Connection time (in sec)
  734.           stem.i.0CONNOPENS  Number of open files on the connection
  735.           stem.i.0CONNUSERS  Number of users on the connection (= 0 or 1)
  736.  
  737.           Note: 
  738.      (*1)       Value is the same as xReq including case of letters when xReq 
  739.                 is specified in the function. 
  740.      (*2)       Value is the same as netname including case of letters when 
  741.                 netname is specified in the function. 
  742.      (*3)       Value is 'DISK', 'PRINT', 'COMM', or 'IPC'. 
  743.  
  744. Returned string: 
  745.      rc 
  746.  
  747. Required Privilege: 
  748.      ADMIN 
  749.  
  750. Examples: 
  751.      Here are examples. 
  752.  
  753.  
  754. ΓòÉΓòÉΓòÉ <hidden> Examples for LsConnection ΓòÉΓòÉΓòÉ
  755.  
  756. In the examples below, we assume that: 
  757.  
  758.   1. Server LS40SRV has shared resource \\LS40SRV\OS2TOOLS. 
  759.   2. The caller has issued NET USE for \\LS40SRV\OS2TOOLS. 
  760.   3. The caller's machine and user id is \\LS40REQ and MYADM, respectively. 
  761.  
  762. Note:   Example of returned value is enclosed in left and right parentheses in 
  763. a comment area for a variable. 
  764.  
  765. Example 1:  Lists all connections with shared resource \\LS40SRV\OS2TOOLS. 
  766.  
  767. /* Example 1 */
  768. retc = LsConnection('out','\\LS40SRV','os2Tools')
  769. if retc = 0 then do
  770.   do i=1 to out.0
  771.     /* here is i-th user that has connection
  772.        with \\LS40SRV\OS2TOOLS.
  773.     */
  774.     say out.i.0uid      /* ('MYADM')     */
  775.     say out.i.0computer /* ('\\LS40REQ') */
  776.     say out.i.0netname  /* ('os2Tools')  */
  777.     say out.i.0conntype /* ('DISK')      */
  778.   end
  779. end
  780. Exit retc
  781.  
  782. Example 2:  Lists all connections between LS40SRV and the caller. 
  783.  
  784. /* Example 2 */
  785. retc = LsConnection('out','\\LS40SRV','\\Ls40Req')
  786. if retc = 0 then do
  787.   do i=1 to out.0
  788.     /* here is i-th shared resource of LS40SRV. */
  789.     say out.i.0uid      /* ='MYADM'      */
  790.     say out.i.0computer /* ='\\Ls40Req'  */
  791.     say out.i.0netname  /* ('OS2TOOLS')  */
  792.     say out.i.0conntype /* ('DISK')      */
  793.   end
  794. end
  795. Exit retc
  796.  
  797.  
  798. ΓòÉΓòÉΓòÉ 11. LsServer ΓòÉΓòÉΓòÉ
  799.  
  800. LsServer function supports for two verbs: 
  801.  
  802.     Disk 
  803.     Query 
  804.  
  805.  
  806. ΓòÉΓòÉΓòÉ 11.1. LsServer with Disk verb ΓòÉΓòÉΓòÉ
  807.  
  808. Syntax: 
  809.  
  810.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  811.           Γöé                                        Γöé
  812.           Γöé                  ΓöîΓöÇ\\locReqΓöÇΓöÉ          Γöé
  813.           Γöé ΓöÇLsServer('D',ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇ)ΓöÇΓöÇΓöÇ Γöé
  814.           Γöé                  ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ          Γöé
  815.           Γöé                                        Γöé
  816.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  817.  
  818. Operation: 
  819.      This function gets a list of local drives of a specified server xSrv. If 
  820.      there is no xSrv specified, it is a local machine. 
  821.  
  822.      A return code followed by the list is returned from this function. 
  823.  
  824. Variables to be set: 
  825.      None. 
  826.  
  827. Returned string: 
  828.      rc drive_list 
  829.  
  830. Required Privilege: 
  831.      GUEST, USER or ADMIN 
  832.  
  833. Examples: 
  834.      Here are examples. 
  835.  
  836.  
  837. ΓòÉΓòÉΓòÉ <hidden> Examples for LsServer with Disk verb ΓòÉΓòÉΓòÉ
  838.  
  839. In the examples below, example of returned value is enclosed in left and right 
  840. parentheses in a comment area for a variable. 
  841.  
  842. Example 1:  Get a list of local drives of the caller's machine. 
  843.  
  844. /* Example 1 */
  845. parse value LsServer('D') with retc drvlist
  846. if retc = 0 then do
  847.    say drvlist  /* ('C: D:') */
  848. end
  849. Exit
  850.  
  851. Example 2:  Get a list of local drives of DC of a logon domain. 
  852.  
  853. /* Example 2 */
  854. parse value LsServer('D','.') with retc drvlist
  855. if retc = 0 then do
  856.    say drvlist  /* ('C: D: E:') */
  857. end
  858. Exit
  859.  
  860. Example 3:  Get a list of local drives of DC of domain LS40DOM. 
  861.  
  862. /* Example 3 */
  863. parse value LsServer('D','ls40dom') with retc drvlist
  864. if retc = 0 then do
  865.    say drvlist  /* ('C: D: E: F: G:') */
  866. end
  867. Exit
  868.  
  869. Example 4:  Get a list of local drives of a server \\LS40SRV. 
  870.  
  871. /* Example 4 */
  872. parse value LsServer('D','ls40srv') with retc drvlist
  873. if retc = 0 then do
  874.    say drvlist  /* ('C: D: E: F: G: H: I:') */
  875. end
  876. Exit
  877.  
  878.  
  879. ΓòÉΓòÉΓòÉ 11.2. LsServer with Query verb ΓòÉΓòÉΓòÉ
  880.  
  881. Syntax: 
  882.  
  883.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  884.           Γöé                                                         (1)     Γöé
  885.           Γöé                         ΓöîΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÉ   ΓöîΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ   ΓöîΓöÇdefMΓöÇΓöÉ      Γöé
  886.           Γöé ΓöÇLsServer('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ)ΓöÇ Γöé
  887.           Γöé                         Γö£ΓöÇxDomΓöÇΓöñ   Γö£ΓöÇsrvtypesΓöÇΓöñ   ΓööΓöÇxReqΓöÇΓöÿ      Γöé
  888.           Γöé                         ΓööΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÿ   ΓööΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                 Γöé
  889.           Γöé                                                                 Γöé
  890.           Γöé                ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                                        Γöé
  891.           Γöé srvtypes:             Γöé                                        Γöé
  892.           Γöé             Γö£ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇΓöñ                                     Γöé
  893.           Γöé                 Γö£ΓöÇΓöÇDΓöÇΓöÇΓöñ                                         Γöé
  894.           Γöé                 Γö£ΓöÇΓöÇBΓöÇΓöÇΓöñ                                         Γöé
  895.           Γöé                 Γö£ΓöÇΓöÇSΓöÇΓöÇΓöñ                                         Γöé
  896.           Γöé                 Γö£ΓöÇΓöÇQΓöÇΓöÇΓöñ                                         Γöé
  897.           Γöé                 ΓööΓöÇΓöÇTΓöÇΓöÇΓöÿ                                         Γöé
  898.           Γöé                                                                 Γöé
  899.           Γöé Note: (1) defM depends on xDom. See Operation for detail.       Γöé
  900.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  901.  
  902. Operation: 
  903.      This function lists and gets information on active servers of given types 
  904.      in a domain xDom or in domains that a requester xReq is monitoring. 
  905.  
  906.      Note:   In general, a requester machine monitors a default domain, logon 
  907.              domain, and domains that are specified by OTHDOMAINS line in 
  908.              IBMLAN.INI or by /OTHDOMAINS parameter on NET START REQUESTER 
  909.              command. 
  910.  
  911.      When xDom is a dot(.), the caller's logon domain is used. When it is an 
  912.      asterisk(*), servers in all the domains that the requester xReq is 
  913.      monitoring are listed. 
  914.  
  915.      When xReq is a dot(.), it indicates the local machine. If xReq starts with 
  916.      double back slashes(\\), it must be the local machine, or a server which 
  917.      the caller can access to. If xReq is not specified, defM is decided by 
  918.      xDom as follows; 
  919.  
  920.          If xDom is either an asterisk(*) or a dot(.), or is not specified, 
  921.           defM is a local machine. 
  922.          Otherwise, defM is a DC of the domain xDom. 
  923.  
  924.      Note that OS/2 Peer machines will be included on the list if the OS/2 Peer 
  925.      machines are logged on to the domain. 
  926.  
  927.      Information on alias(es) is set in compound variables with the stem stem. 
  928.  
  929. Variables to be set: 
  930.  
  931.           stem.0                Number of indexes for stem
  932.            (i=1 to stem.0 for variables below)
  933.           stem.i.0SERVER        Server name
  934.           stem.i.0REMARK        Comment
  935.           stem.i.0VERMAJOR      Major version of LAN Server on the server
  936.           stem.i.0VERMINOR      Minor version of LAN Server on the server
  937.           stem.i.0PEER?         Peer server flag ("1" or "0")
  938.           stem.i.0HEXTYPE       Server type in HEX representation (*1)
  939.           stem.i.0TYPELIST      A list of server types. (*2)
  940.  
  941.           Note: 
  942.      (*1)       Value is a hexadecimal string of sv1_type field of 
  943.                 server_info_1 data structure of NetServerEnum2 API. See a 
  944.                 document of NET API for detail. 
  945.      (*2)       Value would be 'REQUESTER', 'SERVER', 'DC', 'BACKUP', 'SQL', 
  946.                 'TIMESRV', or a list of some of them. This value is an 
  947.                 human-readable representation of the one in (*1). 
  948.  
  949. Returned string: 
  950.      rc 
  951.  
  952. Required Privilege: 
  953.      GUEST, USER or ADMIN 
  954.  
  955. Examples: 
  956.      Here are examples. 
  957.  
  958.  
  959. ΓòÉΓòÉΓòÉ <hidden> Examples for LsServer with Query verb ΓòÉΓòÉΓòÉ
  960.  
  961. In the examples below, example of returned value is enclosed in left and right 
  962. parentheses in a comment area for a variable. 
  963.  
  964. Example 1:  List all the active servers in a logon domain. 
  965.  
  966. /* Example 1 */
  967. retc = LsServer('Q','out')
  968. if retc = 0 then
  969.   do i=1 to out.0
  970.     say out.i.0server    /* server name: (\\LS40DCSRV) */
  971.     say out.i.0remark    /* comments   */
  972.     say out.i.0VerMajor  /* major version: ('4') */
  973.     say out.i.0VerMinor  /* major version: ('0') */
  974.     say out.i.0peer?     /* peer server? : ('0') */
  975.     say out.i.0TypeList  /* Types: ('REQUESTER SERVER DC') */
  976.   end
  977. Exit
  978.  
  979. Note:   Even if you have not yet logged on to a domain, this example works. In 
  980.         that case, all the active servers in the primary domain and other 
  981.         domains that you might have specified are listed. 
  982.  
  983. Example 2:  List all the active Backup servers or DC in the domain LS40DOM. 
  984.  
  985. /* Example 2 */
  986. retc = LsServer('Q','out','LS40DOM','DB')
  987. if retc = 0 then
  988.   do i=1 to out.0
  989.     say out.i.0server    /* server name: ('\\LS40SRV') */
  990.     say out.i.0remark    /* comments   */
  991.     say out.i.0VerMajor  /* major version: ('4') */
  992.     say out.i.0VerMinor  /* major version: ('0') */
  993.     say out.i.0peer?     /* peer server? : ('0') */
  994.     say out.i.0TypeList  /* Types: ('REQUESTER SERVER BACKUP') */
  995.   end
  996. Exit
  997.  
  998.  
  999. ΓòÉΓòÉΓòÉ 12. NetAccess ΓòÉΓòÉΓòÉ
  1000.  
  1001. NetAccess function simulates NET ACCESS command. 
  1002.  
  1003. Note:   The current version of NetUtil.DLL supports for 'Query' verb and 
  1004. 'Delete' verb. 
  1005.  
  1006.  
  1007. ΓòÉΓòÉΓòÉ 12.1. NetAccess with Query verb ΓòÉΓòÉΓòÉ
  1008.  
  1009. Syntax: 
  1010.  
  1011.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1012.           Γöé                                                                 Γöé
  1013.           Γöé                          ΓöîΓöÇ\\locSrvΓöÇΓöÉ   ΓöîΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÉ               Γöé
  1014.           Γöé ΓöÇNetAccess('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1015.           Γöé                          ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇxResΓöÇΓöÇΓöñ   ΓöötreeΓöÿ      Γöé
  1016.           Γöé                                         Γö£ΓöÇaliasΓöÇΓöñ               Γöé
  1017.           Γöé                                         ΓööΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÿ               Γöé
  1018.           Γöé xRes:                                                           Γöé
  1019.           Γöé         Γö£ΓöÇΓöÇΓöÇresΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ                                       Γöé
  1020.           Γöé                  ΓööΓöÇ*ΓöÇΓöÿ                                          Γöé
  1021.           Γöé                                                                 Γöé
  1022.           Γöé tree = 1                                                        Γöé
  1023.           Γöé                                                                 Γöé
  1024.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1025.  
  1026. Operation: 
  1027.      This function gets access control profiles(ACP) with associated 
  1028.      permissions of resource xRes of a server xSrv. If xSrv is omitted, it is a 
  1029.      local server. 
  1030.  
  1031.      If xRes is not specified, but an alias name alias is specified, it gets 
  1032.      ACPs with associated permissions of resource for the alias defined in a 
  1033.      domain that the server xSrv belongs to. 
  1034.  
  1035.      If res is followed by an asterisk(*), it specifies all the resources that 
  1036.      starts with res. For example, if there are C:\IBMCOM and C:\IBMLAN 
  1037.      directories, 'C:\IBM*' specifies both C:\IBMCOM and C:\IBMLAN directories. 
  1038.  
  1039.      If xRes or alias is omitted, or an asterisk(*) is specified, the function 
  1040.      gets ACPs with associated permissions for all the resources of drives, 
  1041.      pipes, printers, and serial devices of the server xSrv. 
  1042.  
  1043.      If tree of 1 is specified, then the function gets ACPs with associated 
  1044.      permissions for the specified resource and all its subdirectories. 
  1045.  
  1046.      Information of the ACPs with associated permissions is set in compound 
  1047.      variables with the stem stem. 
  1048.  
  1049.      This function returns a return code(rc) of "0", even if there is no ACPs 
  1050.      for the specified resource. 
  1051.  
  1052.      If the function returns rc of "234", it means that LAN Server API could 
  1053.      not return all of ACPs so that the compound variables hold only part of 
  1054.      them. 
  1055.  
  1056. Variables to be set: 
  1057.  
  1058.           stem.0                    Number of indexes for stem
  1059.            (i=1 to stem.0 for variables below)
  1060.           stem.0             Number of indexes for stem.
  1061.           stem.i.0PATH       Path of the resource
  1062.           stem.i.0SUCCESS    Audit Success (*1)
  1063.           stem.i.0FAILURE    Audit Failure (*1)
  1064.            (j=1 to stem.i.0 for variables below)
  1065.           stem.i.0           Number of indexes for stem.i.
  1066.           stem.i.j.0UGNAME   User ID or Group ID
  1067.           stem.i.j.0GRP?     A flag to indicate Group ID.
  1068.           stem.i.j.0ACCESS   Access permissions (*2)
  1069.  
  1070.           Note: 
  1071.      (*1)       Value is 'ALL', 'NONE', or any combinations of 'OPEN', 'WRITE', 
  1072.                 'DELETE', or 'ACL' with separated each other by a blank. 
  1073.      (*2)       Value is 'N' or any combinations of 'R', 'W', 'C', 'X', 'D', 
  1074.                 'A', or 'P' without blanks between them. 
  1075.  
  1076. Returned string: 
  1077.      rc 
  1078.  
  1079. Required Privilege: 
  1080.      GUEST, USER, or ADMIN 
  1081.  
  1082.      If the caller has not ADMIN privilege, the function only gets ACPs with 
  1083.      Permission access right given to the caller or groups that the caller 
  1084.      belongs to. 
  1085.  
  1086. Examples: 
  1087.      Here are examples. 
  1088.  
  1089.  
  1090. ΓòÉΓòÉΓòÉ <hidden> Examples for NetAccess with Query verb ΓòÉΓòÉΓòÉ
  1091.  
  1092. In the examples below, example of returned value is enclosed in left and right 
  1093. parentheses in a comment area for a variable. 
  1094.  
  1095. Example 1:  List ACPs of directory resource d:\TOOLS and its subdirectories of 
  1096. a server LS40SRV. (It is assumed that the caller has ADMIN privilege.) 
  1097.  
  1098. /* Example 1 */
  1099. retc = NetAccess('Q','out','\\ls40srv','d:\tools',1)
  1100. if retc = 0 | retc = 234 then
  1101.   do i=1 to out.0
  1102.     say out.i.0path       /* ('D:\TOOLS\OS2') */
  1103.     say out.i.0success    /* ('NONE') */
  1104.     say out.i.0failure    /* ('OPEN WRITE') */
  1105.     do j=1 to out.i.0
  1106.        say out.i.0ugname  /* ('USERS') */
  1107.        say out.i.0grp?    /* ('1') */
  1108.        say out.i.0access  /* ('RX') */
  1109.     end
  1110.   end
  1111.  
  1112. Exit
  1113.  
  1114. Example 2:  List ACPs of directory resources that start with 'd:\IBM' of a DC 
  1115. of a domain LS40DOM. (It is assumed that the caller has ADMIN privilege.) 
  1116.  
  1117. /* Example 2 */
  1118. retc = NetAccess('Q','out','ls40dom','d:\ibm*',1)
  1119. if retc = 0 | retc = 234 then
  1120.   do i=1 to out.0
  1121.     say out.i.0path       /* ('D:\IBMAV2') */
  1122.     say out.i.0success    /* ('OPEN WRITE DELETE') */
  1123.     say out.i.0failure    /* ('ALL') */
  1124.     do j=1 to out.i.0
  1125.        say out.i.0ugname  /* ('HACKER') */
  1126.        say out.i.0grp?    /* ('0') */
  1127.        say out.i.0access  /* ('N') */
  1128.     end
  1129.   end
  1130.  
  1131. Exit
  1132.  
  1133.  
  1134. ΓòÉΓòÉΓòÉ 12.2. NetAccess with Delete verb ΓòÉΓòÉΓòÉ
  1135.  
  1136. Syntax: 
  1137.  
  1138.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1139.           Γöé                                                                   Γöé
  1140.           Γöé                            ΓöîΓöÇ\\locSrvΓöÇΓöÉ                           Γöé
  1141.           Γöé ΓöÇNetAccess('D',ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇxResΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1142.           Γöé                   ΓööstemΓöÿ   ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇaliasΓöÇΓöñ   ΓöötreeΓöÿ      Γöé
  1143.           Γöé                                           ΓööΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÿ               Γöé
  1144.           Γöé                                                                   Γöé
  1145.           Γöé xRes:                                                             Γöé
  1146.           Γöé         Γö£ΓöÇΓöÇresΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ                                           Γöé
  1147.           Γöé                ΓööΓöÇ*ΓöÇΓöÿ                                              Γöé
  1148.           Γöé                                                                   Γöé
  1149.           Γöé tree = 1                                                          Γöé
  1150.           Γöé                                                                   Γöé
  1151.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1152.  
  1153. Operation: 
  1154.      This function deletes access control profiles(ACP) with associated 
  1155.      permissions of resource xRes of a server xSrv. If xSrv is omitted, it is a 
  1156.      local server. 
  1157.  
  1158.      If xRes is not specified, but an alias name alias is specified, it deletes 
  1159.      ACPs with associated permissions of resource for the alias defined in a 
  1160.      domain that the server xSrv belongs to. 
  1161.  
  1162.      If res is followed by an asterisk(*), it specifies all the resources that 
  1163.      starts with res. For example, if there are C:\IBMCOM and C:\IBMLAN 
  1164.      directories, 'C:\IBM*' specifies both C:\IBMCOM and C:\IBMLAN directories. 
  1165.  
  1166.      If an asterisk(*) is specified instead of xRes or alias, the function 
  1167.      deletes ACPs with associated permissions for all the resources of drives, 
  1168.      pipes, printers, and serial devices of the server xSrv. 
  1169.  
  1170.      If tree of 1 is specified, then the function deletes ACPs with associated 
  1171.      permissions for the specified resource and all its subdirectories. 
  1172.  
  1173.      Information of deleted ACPs with associated permissions is set in compound 
  1174.      variables with the stem stem if it is specified. When stem is omitted, 
  1175.      performance of the function increases because there is no overhead to set 
  1176.      REXX variables. 
  1177.  
  1178.      This function returns a return code(rc) of "0", even if there is no ACPs 
  1179.      for the specified resource. 
  1180.  
  1181. Variables to be set: 
  1182.      (The same as in 'Query' verb if stem is specified.) 
  1183.  
  1184. Returned string: 
  1185.      rc 
  1186.  
  1187. Required Privilege: 
  1188.      ADMIN 
  1189.  
  1190. Examples: 
  1191.      Here are examples. 
  1192.  
  1193.  
  1194. ΓòÉΓòÉΓòÉ <hidden> Examples for NetAccess with Delete verb ΓòÉΓòÉΓòÉ
  1195.  
  1196. In the examples below, example of returned value is enclosed in left and right 
  1197. parentheses in a comment area for a variable. 
  1198.  
  1199. Example 1:  Delete ACPs of directory resource E:\ and its subdirectories of a 
  1200. server LS40SRV. 
  1201.  
  1202. /* Example 1 */
  1203. retc = NetAccess('Delete','out','\\ls40srv','E:\',1)
  1204. if retc = 0 then
  1205.   do i=1 to out.0
  1206.     say 'ACP of' out.i.0path 'deleted.'
  1207.   end
  1208.  
  1209. Exit
  1210.  
  1211. Example 2:  Delete ACPs of all the resources that are defined in a DC of a 
  1212. domain LS40DOM. (This example is too dangerous!!) 
  1213.  
  1214. /* Example 2 */
  1215. dom = 'ls40dom'
  1216. retc = NetAccess('D',,dom','*',1)  /* no stem */
  1217. if retc = 0 then
  1218.    say 'Deleted ACPs of all the resources defined in DC of' dom
  1219.  
  1220. Exit
  1221.  
  1222.  
  1223. ΓòÉΓòÉΓòÉ 13. NetAccounts ΓòÉΓòÉΓòÉ
  1224.  
  1225. NetAccounts function simulates NET ACCOUNTS command. 
  1226.  
  1227. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  1228.  
  1229.  
  1230. ΓòÉΓòÉΓòÉ 13.1. NetAccounts with Query verb ΓòÉΓòÉΓòÉ
  1231.  
  1232. Syntax: 
  1233.  
  1234.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1235.           Γöé                                                           Γöé
  1236.           Γöé                            ΓöîΓöÇ\\locReqΓöÇΓöÉ                   Γöé
  1237.           Γöé ΓöÇNetAccounts('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1238.           Γöé                            ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   ΓööΓöÇdetailΓöÇΓöÿ      Γöé
  1239.           Γöé                                                           Γöé
  1240.           Γöé                                                           Γöé
  1241.           Γöé detail = 1                                                Γöé
  1242.           Γöé                                                           Γöé
  1243.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1244.  
  1245. Operation: 
  1246.      This function gets global information on an User Account Database that is 
  1247.      maintained in a server xSrv. If xSrv is omitted, it is a local machine. 
  1248.      Note that the local machine may be a Requester or Peer machine. In this 
  1249.      case the information is retrieved from a local User Account Database. 
  1250.  
  1251.      The information is set in compound variables with the stem stem. 
  1252.  
  1253.      Detail information is obtained when detail is set to 1. In this case the 
  1254.      caller should have ADMIN privilege for a server xSrv. 
  1255.  
  1256. Variables to be set: 
  1257.  
  1258.           stem.0PWHISTLEN     Length of password history
  1259.           stem.0MINPWLEN      Minimum password length
  1260.           stem.0MINPWDAYS     Minimum password age (days)
  1261.           stem.0MAXPWDAYS     Maximum password age (days)  (*2)
  1262.           stem.0FORCEOFFTIME  Time(in sec) after which an user is forced off  (*2)
  1263.           stem.0SRVROLE (*1)  Role of the server xSrv
  1264.           stem.0DCSRV   (*1)  DC of a domain that the server xSrv belongs to (*3)
  1265.  
  1266.           Note: 
  1267.      (*1)       These variables are only set when detail is set to 1 and the 
  1268.                 caller has an ADMIN privilege. 
  1269.      (*2)       An asterisk(*) will be returned if there is no limitation. 
  1270.      (*3)       If xSrv is not specified, the value is a null string. 
  1271.  
  1272. Returned string: 
  1273.      rc 
  1274.  
  1275. Required Privilege: 
  1276.      GUEST, USER, or ADMIN 
  1277.  
  1278. Examples: 
  1279.      Here are examples. 
  1280.  
  1281.  
  1282. ΓòÉΓòÉΓòÉ <hidden> Examples for NetAccounts with Query verb ΓòÉΓòÉΓòÉ
  1283.  
  1284. Example of returned value is enclosed in left and right parentheses in a 
  1285. comment area. 
  1286.  
  1287. Example 1:  List global account information of the logon domain. 
  1288.  
  1289. /* Example 1 */
  1290. /* The caller's privilege may be USER or GUEST */
  1291. retc = NetAccounts('Q','out','.')
  1292. if retc = 0 then
  1293.    say out.0MinPwLen        /* ('4') */
  1294.    say out.0MaxPwDays       /* ('*') */
  1295.    say out.0MinPwDays       /* ('0') */
  1296.    say out.0ForceOffTime    /* ('*') */
  1297.    say out.0PwHistLen       /* ('8') */
  1298. Exit
  1299.  
  1300. In the example below, it is assumed that the caller has ADMIN privilege. 
  1301.  
  1302. Example 2:  List global account information of the server LS40SRV. 
  1303.  
  1304. /* Example 2 */
  1305. retc = NetAccounts('Q','out','\\ls40srv',1)
  1306. if retc = 0 then
  1307.    say out.0MinPwLen      /* ('4') */
  1308.    say out.0MaxPwDays     /* ('*') */
  1309.    say out.0MinPwDays     /* ('0') */
  1310.    say out.0ForceOffTime  /* ('*') */
  1311.    say out.0PwHistLen     /* ('8') */
  1312.  
  1313.    say out.0SrvRole       /* ('MEMBER') */
  1314.    say out.0DCsrv         /* ('\\LS40DCSRV') */
  1315. Exit
  1316.  
  1317.  
  1318. ΓòÉΓòÉΓòÉ 14. NetAdmin ΓòÉΓòÉΓòÉ
  1319.  
  1320. NetAdmin function simulates NET ADMIN command. 
  1321.  
  1322.  
  1323. ΓòÉΓòÉΓòÉ 14.1. NetAdmin function ΓòÉΓòÉΓòÉ
  1324.  
  1325. Syntax: 
  1326.  
  1327.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1328.           Γöé                                                   Γöé
  1329.           Γöé                       ΓöîΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÉ                    Γöé
  1330.           Γöé ΓöÇNetAdmin(ΓöÇΓöÇstemΓöÇΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓöÇcommandΓöÇΓöÇ)ΓöÇΓöÇ  Γöé
  1331.           Γöé                       ΓööΓöÇxSrvΓöÇΓöÿ                    Γöé
  1332.           Γöé                                                   Γöé
  1333.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1334.  
  1335. Operation: 
  1336.      This function executes a command command on a server xSrv. If xSrv is 
  1337.      omitted or a dot(.), it is DC of a logon domain. 
  1338.  
  1339.      Outputs from command are set in array variables for stem stem. Return code 
  1340.      from command is set in REXX's reserved variable RC. 
  1341.  
  1342.      NetAdmin function returns a return code from a NET API function itself or 
  1343.      the one set by NetAdmin function's internal logic. 
  1344.  
  1345. Variables to be set: 
  1346.  
  1347.           RC      Return code from command.
  1348.           stem.0  Number of indexes for stem
  1349.            (i=1 to stem.0 for variables below)
  1350.           stem.i  i-th outputs from executed command command.
  1351.  
  1352. Returned string: 
  1353.      rc 
  1354.  
  1355. Required Privilege: 
  1356.      ADMIN 
  1357.  
  1358. Examples: 
  1359.      Here are examples. 
  1360.  
  1361.  
  1362. ΓòÉΓòÉΓòÉ <hidden> Examples for NetAdmin ΓòÉΓòÉΓòÉ
  1363.  
  1364. Example 1:  Execute TYPE command on a DC of logon domain 
  1365.  
  1366. /* Example 1 */
  1367. retc = NetAdmin('out',,'TYPE c:\config.sys')
  1368. if rc=0 & retc = 0  then
  1369.   do i=1 to out.0
  1370.     say out.i  /* contents of CONFIG.SYS file */
  1371.   end
  1372. Exit
  1373.  
  1374. Example 2:  Execute NET USE command on a DC of LS40DOM 
  1375.  
  1376. /* Example 2 */
  1377. retc = NetAdmin('out','LS40DOM,'net use')
  1378. if rc=0 & retc = 0  then
  1379.   do i=1 to out.0
  1380.     say out.i  /* outputs from NET USE */
  1381.   end
  1382. Exit
  1383.  
  1384.  
  1385. ΓòÉΓòÉΓòÉ 15. NetAlias ΓòÉΓòÉΓòÉ
  1386.  
  1387. NetAlias function simulates NET ALIAS command. 
  1388.  
  1389. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  1390.  
  1391.  
  1392. ΓòÉΓòÉΓòÉ 15.1. NetAlias with Query verb ΓòÉΓòÉΓòÉ
  1393.  
  1394. Syntax: 
  1395.  
  1396.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1397.           Γöé                                                           Γöé
  1398.           Γöé                                  ΓöîΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÉ                 Γöé
  1399.           Γöé ΓöÇNetAlias('Q',ΓöÇstemΓöÇ,ΓöÇxAliasΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1400.           Γöé                                  Γö£ΓöÇxDomΓöÇΓöñ   ΓöödetailΓöÿ      Γöé
  1401.           Γöé                                  Γöö\\srvΓöÇΓöÿ                 Γöé
  1402.           Γöé                                                           Γöé
  1403.           Γöé                                              ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ    Γöé
  1404.           Γöé xAlias:   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ     alitypes:          Γöé    Γöé
  1405.           Γöé         Γö£ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöñ             Γö£ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöñ  Γöé
  1406.           Γöé           Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇaliasΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                   Γö£ΓöÇDΓöÇΓöñ      Γöé
  1407.           Γöé           ΓööΓöÇ*ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ                   Γö£ΓöÇPΓöÇΓöñ      Γöé
  1408.           Γöé               ΓööΓöÇalitypesΓöÇΓöÿ                     ΓööΓöÇCΓöÇΓöÿ      Γöé
  1409.           Γöé                                                           Γöé
  1410.           Γöé detail = 1                                                Γöé
  1411.           Γöé                                                           Γöé
  1412.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1413.  
  1414. Operation: 
  1415.      This function gets information on an alias xAlias that is defined in a 
  1416.      domain xDom or in a domain that a server srv belongs to. If \\srv is 
  1417.      specified, the server srv must be a DC or a Backup DC. Otherwise, this 
  1418.      function will return "2795". If there is no xDom or \\srv specified, the 
  1419.      default is a logon domain. 
  1420.  
  1421.      If xAlias is an asterisk(*), then information on all the aliases defined 
  1422.      in the domain is retrieved. 
  1423.  
  1424.      If valid alitypes follows the asterisk, then information on the aliases 
  1425.      which types meet alitypes is retrieved. Valid alitypes is 'D' for 
  1426.      directory alias, 'P' or printer alias, 'C' for serial device alias, or any 
  1427.      combinations of the three characters. Invalid character is treated as if 
  1428.      an asterisk is given. 
  1429.  
  1430.      Information on alias(es) is set in compound variables with the stem stem. 
  1431.  
  1432.      Detail information is obtained when detail is set to 1. 
  1433.  
  1434. Variables to be set: 
  1435.  
  1436.           stem.0                Number of indexes for stem
  1437.            (i=1 to stem.0 for variables below)
  1438.           stem.i.0ALIAS         Alias name
  1439.           stem.i.0REMARK        Remark
  1440.           stem.i.0TYPE          Type. (= DISK, PRINT, or COMM)  (*2)
  1441.           stem.i.0SERVER  (*1)  Server name that defines the alias
  1442.           stem.i.0NETNAME (*1)  Netname  of  the alias
  1443.           stem.i.0PATH    (*1)  Path spec of the alias
  1444.           stem.i.0WHEN    (*1)  When Shared. (= STARTUP, ADMIN, or REQUESTED) (*2)
  1445.           stem.i.0MAXUSERS(*1)  Max number of users  (*3)
  1446.           stem.i.0QUEUE   (*1)  Print/serial queue
  1447.           stem.i.0PRIORITY(*1)  Serial only: priority
  1448.           stem.i.0DEVPOOL (*1)  Serial only: device pool
  1449.           stem.i.0LOCATION(*1)  Location
  1450.  
  1451.           Note: 
  1452.      (*1)       These variables are only set when detail is set to 1. 
  1453.      (*2)       Values of alias type are different from what are returned by 
  1454.                 NET ALIAS command. 
  1455.      (*3)       An asterisk(*) is set for 'No limit' of NET ALIAS command. 
  1456.  
  1457. Returned string: 
  1458.      rc 
  1459.  
  1460. Required Privilege: 
  1461.      GUEST, USER, or ADMIN 
  1462.  
  1463. Examples: 
  1464.      Here are examples. 
  1465.  
  1466.  
  1467. ΓòÉΓòÉΓòÉ <hidden> Examples for NetAlias with Query verb ΓòÉΓòÉΓòÉ
  1468.  
  1469. Example 1:  List all aliases defined in a logon domain. 
  1470.  
  1471. /* Example 1 */
  1472. retc = NetAlias('Q','out')
  1473. if retc = 0 then
  1474.   do i=1 to out.0
  1475.     say out.i.0alias       /* alias name */
  1476.     say out.i.0type        /* alias type */
  1477.     say out.i.0remark      /* comments   */
  1478.   end
  1479. Exit
  1480.  
  1481. Example 2:  List all printer aliases defined in a domain LS40DOM. 
  1482.  
  1483. /* Example 2 */
  1484. /* Example of returned value is enclosed in
  1485.    left and right parentheses in a comment
  1486.    area.
  1487. */
  1488. retc = NetAlias('Q','out','*p','LS40DOM',1)
  1489. if retc = 0 then
  1490.   do i=1 to out.0
  1491.     say out.i.0alias    /* alias name */
  1492.     say out.i.0type     /* alias type: 'PRINT' */
  1493.     say out.i.0remark   /* comments   */
  1494.  
  1495.     say out.i.0server   /* server: ('\\LS40DCSRV') */
  1496.     say out.i.0netname  /* netname: ('4216-510')  */
  1497.     say out.i.0when     /* When Shared: ('STARTUP') */
  1498.     say out.i.0maxusers /* Max Users: ('*') */
  1499.     say out.i.0queue    /* Queue: ('4216-510') */
  1500.   end
  1501. Exit
  1502.  
  1503.  
  1504. ΓòÉΓòÉΓòÉ 16. NetApp ΓòÉΓòÉΓòÉ
  1505.  
  1506. NetApp function simulates NET APP command. 
  1507.  
  1508. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  1509.  
  1510.  
  1511. ΓòÉΓòÉΓòÉ 16.1. NetApp with Query verb ΓòÉΓòÉΓòÉ
  1512.  
  1513. Syntax: 
  1514.  
  1515.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1516.           Γöé                                                                     Γöé
  1517.           Γöé                                         ΓöîΓöÇΓöÇΓöÇ.ΓöÇΓöÇΓöÇΓöÉ                   Γöé
  1518.           Γöé ΓöÇΓöÇNetApp('Q',ΓöÇstemΓöÇ,ΓöÇxAppΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1519.           Γöé                               Γö£ΓöÇuidΓöÇΓöñ   Γö£ΓöÇxDomΓöÇΓöÇΓöñ   ΓööΓöÇdetailΓöÇΓöÿ      Γöé
  1520.           Γöé                               ΓööΓöÇΓöÇ.ΓöÇΓöÇΓöÿ   ΓööΓöÇ\\srvΓöÇΓöÿ                   Γöé
  1521.           Γöé                                                                     Γöé
  1522.           Γöé xApp:                            apptypes:    ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ             Γöé
  1523.           Γöé          ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                          Γöé             Γöé
  1524.           Γöé       Γö£ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöñ              Γö£ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöñ           Γöé
  1525.           Γöé          Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇappΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                     Γö£ΓöÇOΓöÇΓöñ               Γöé
  1526.           Γöé          ΓööΓöÇ*ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ                     ΓööΓöÇDΓöÇΓöÿ               Γöé
  1527.           Γöé              ΓööΓöÇapptypesΓöÇΓöÿ                                           Γöé
  1528.           Γöé                                                                     Γöé
  1529.           Γöé detail = 1                                                          Γöé
  1530.           Γöé                                                                     Γöé
  1531.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1532.  
  1533. Operation: 
  1534.      This function gets information on a public or a private application xApp 
  1535.      defined in a domain xDom or in a domain that a server srv belongs to. If 
  1536.      \\srv is specified, the server srv must be a DC or a Backup DC. Otherwise, 
  1537.      this function will return "2795". 
  1538.  
  1539.      If there is no xDom or \\srv specified, the default is a logon domain. 
  1540.  
  1541.      If uid is given, the application is a private application to the user uid. 
  1542.      Otherwise, it is a public application. 
  1543.  
  1544.      If xApp is not specified or an asterisk(*) is specified, the function gets 
  1545.      information on all the applications. (The applications are either public 
  1546.      or private.) 
  1547.  
  1548.      If xApp is an asterisk(*) followed by 'O' or 'D', information on OS/2 
  1549.      applications or DOS applications is obtained, respectively. 
  1550.  
  1551.      Information on the application(s) is set in REXX compound variables with 
  1552.      the stem stem. 
  1553.  
  1554.      Detail information is obtained when detail is set to 1. 
  1555.  
  1556. Variables to be set: 
  1557.  
  1558.           stem.0                 Number of indexes for stem
  1559.            (i=1 to stem.0 for variables below)
  1560.           stem.i.0APP            Application id
  1561.           stem.i.0REMARK         Remark
  1562.           stem.i.0TYPE           Application type (Either "OS/2" or "DOS")
  1563.           stem.i.0PUBLIC?        Indicates the application is public.
  1564.           stem.i.0COMMAND   (*1) Command and its parameter to invoke the application
  1565.           stem.i.0APPDIR    (*1) Application directory      (*2)
  1566.           stem.i.0APPDRIVE  (*1) Local drive used for the application (*3)
  1567.           stem.i.0WRKDIR    (*1) Application work directory (*2)
  1568.           stem.i.0WRKDRIVE  (*1) Local drive used as work area for the application. (*3)
  1569.           stem.i.0PROMPT?   (*1) Indicates a prompt at start up of the application
  1570.           stem.i.0INTERFACE (*1) Interface that the application uses. (*4)
  1571.           stem.i.0          (*1) Number of resources required by the application.
  1572.            (j=1 to stem.i.0 for variables below)
  1573.           stem.i.j.0ALIAS   (*1) Alias of the resource
  1574.           stem.i.j.0LOCAL   (*1) Local drive assigned to the alias (*3)
  1575.  
  1576.           Note: 
  1577.      (*1)       These variables are only set when detail is set to 1. 
  1578.      (*2)       Format of value is the same as what is used for /APPDIR and 
  1579.                 /WRKDIR options of NET APP command. 
  1580.      (*3)       Format of value is the same as what is used for /APPDRIVE and 
  1581.                 /WRKDRIVE options of NET APP command. 
  1582.      (*4)       Value is the same as what is used for /INTERFACE options of NET 
  1583.                 APP command. 
  1584.  
  1585. Returned string: 
  1586.      rc 
  1587.  
  1588. Required Privilege: 
  1589.      GUEST, USER, or ADMIN 
  1590.  
  1591.      Users without  ADMIN privilege can access information on all the public 
  1592.      applications and all the private applications of their own, but cannot 
  1593.      access to the one on private applications of others. 
  1594.  
  1595. Examples: 
  1596.      Here are examples. 
  1597.  
  1598.  
  1599. ΓòÉΓòÉΓòÉ <hidden> Examples for NetApp with Query verb ΓòÉΓòÉΓòÉ
  1600.  
  1601. In the examples below, example of returned value is enclosed in left and right 
  1602. parentheses in a comment area for a variable. 
  1603.  
  1604. Example 1:  List all the public applications defined in a logon domain. 
  1605.  
  1606. /* Example 1 */
  1607. dom ='.'
  1608. retc = NetApp('Q','out',,dom)
  1609. if retc = 0 then
  1610.   do i=1 to out.0
  1611.     say out.i.0app         /* application id ('CMVCINST') */
  1612.     say out.i.0type        /* alias type ('CMVCINST') */
  1613.     say out.i.0remark      /* comments   */
  1614.     say out.i.0public?     /* Public App? ('0') */
  1615.     say out.i.0command     /* command string ('instlall /r:cmvcos2.rsp') */
  1616.     say out.i.0AppDir      /* Appl Dir ('CMVC\INSTALL') */
  1617.     say out.i.0AppDrive    /* Appl Drive ('*') */
  1618.     say out.i.0WrkDir      /* Appl work Dir ('CMVC\INSTALL') */
  1619.     say out.i.0WrkDrive    /* Appl work Drive ('*') */
  1620.     say out.i.0prompt?     /* prompt? ('0') */
  1621.     say out.i.0interface?  /* I/F     ('PM') */
  1622.   end
  1623. Exit
  1624.  
  1625. Example 2:  List all the private applications defined in a logon domain. 
  1626.  
  1627. /* Example 2 */
  1628. myuid = 'HORI'
  1629. retc = NetApp('Q','out',myuid)
  1630. if retc = 0 then
  1631.   do i=1 to out.0
  1632.     say out.i.0app         /* application id ('KLONDIKE') */
  1633.     say out.i.0type        /* alias type ('OS/2') */
  1634.     say out.i.0remark      /* comments   */
  1635.     say out.i.0public?     /* Public App? ('1') */
  1636.     say out.i.0command     /* command string ('klondike') */
  1637.     say out.i.0AppDir      /* Appl Dir ('OS2APPS') */
  1638.     say out.i.0AppDrive    /* Appl Drive ('Z:') */
  1639.     say out.i.0WrkDir      /* Appl work Dir ('C:\OS2\APPS') */
  1640.     say out.i.0WrkDrive    /* Appl work Drive ('') */
  1641.     say out.i.0prompt?     /* prompt? ('0') */
  1642.     say out.i.0interface?  /* I/F     ('PM') */
  1643.   end
  1644. Exit
  1645.  
  1646.  
  1647. ΓòÉΓòÉΓòÉ 17. NetGroup ΓòÉΓòÉΓòÉ
  1648.  
  1649. NetGroup function simulates NET GROUP command. 
  1650.  
  1651. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  1652.  
  1653.  
  1654. ΓòÉΓòÉΓòÉ 17.1. NetGroup with Query verb ΓòÉΓòÉΓòÉ
  1655.  
  1656. Syntax: 
  1657.  
  1658.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1659.           Γöé                                                               Γöé
  1660.           Γöé                         Γöî\\locReqΓöÇΓöÉ   ΓöîΓöÇΓöÇ*ΓöÇΓöÇΓöÉ                 Γöé
  1661.           Γöé ΓöÇNetGroup('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1662.           Γöé                         ΓööΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇgidΓöÇΓöñ   ΓöödetailΓöÿ      Γöé
  1663.           Γöé                                       ΓööΓöÇΓöÇ*ΓöÇΓöÇΓöÿ                 Γöé
  1664.           Γöé                                                               Γöé
  1665.           Γöé detail = 1                                                    Γöé
  1666.           Γöé                                                               Γöé
  1667.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1668.  
  1669. Operation: 
  1670.      This function gets information on a group gid that is defined in a server 
  1671.      xSrv. If xSrv is omitted, it is a local machine. Note that the local 
  1672.      machine may be a Requester or Peer machine. In this case the information 
  1673.      is retrieved from a local User Account Database. 
  1674.  
  1675.      If gid is an asterisk(*) or is not specified, then information on all the 
  1676.      groups defined in the domain is retrieved. 
  1677.  
  1678.      To get information on special groups(USERS, ADMINS, and GUESTS), the 
  1679.      caller needs to have ADMIN privilege. 
  1680.  
  1681.      Information on group(s) is set in compound variables with the stem stem. 
  1682.  
  1683.      Detail information is obtained when detail is set to 1. 
  1684.  
  1685. Variables to be set: 
  1686.  
  1687.           stem.0               Number of indexes for stem
  1688.            (i=1 to stem.0 for variables below)
  1689.           stem.i.0GID          Group ID (Group name)   (*3)
  1690.           stem.i.0REMARK (*1)  Comment
  1691.           stem.i.0       (*2)  Number of indexes for stem.i.j (*4)
  1692.            (j=1 to stem.i.0 for variables below)
  1693.           stem.i.j       (*2)  An user id that belongs to the group.
  1694.  
  1695.           Note: 
  1696.      (*1)       This variable is only set if the caller's privilege is ADMIN. 
  1697.      (*2)       These variables are only set when detail is set to 1. 
  1698.      (*3)       Value is the same as gid including case of letters when gid 
  1699.                 other than an asterisk(*) is specified in the function. 
  1700.      (*4)       If the caller's privilege is ADMIN, or the caller belongs to 
  1701.                 the group except special groups(USERS, LOCAL, ADMINS, and so 
  1702.                 on), number of users in the group is set in this variable. 
  1703.                 Otherwise, the error code that is set by NET API internally is 
  1704.                 negated and set in this variable. For example, if stem.i.0 is 
  1705.                 "-5", it means "Access Denied". 
  1706.  
  1707. Returned string: 
  1708.      rc 
  1709.  
  1710. Required Privilege: 
  1711.      GUEST, USER, or ADMIN 
  1712.  
  1713. Examples: 
  1714.      Here are examples. 
  1715.  
  1716.  
  1717. ΓòÉΓòÉΓòÉ <hidden> Examples for NetGroup with Query verb ΓòÉΓòÉΓòÉ
  1718.  
  1719. Example 1:  List group ids defined in a logon domain. 
  1720.  
  1721. /* Example 1 */
  1722. /* The caller's privilege may be USER or GUEST */
  1723. retc = NetGroup('Q','out','.')
  1724. if retc = 0 then
  1725.   do i=1 to out.0
  1726.     say out.i.0gid         /* group id */
  1727.   end
  1728. Exit
  1729.  
  1730. In examples below, it is assumed that the caller has ADMIN privilege. 
  1731.  
  1732. Example 2:  List group ids defined in a server \\LS40SRV. 
  1733.  
  1734. /* Example 2 */
  1735. retc = NetGroup('Q','out','\\LS40SRV','*',1)
  1736. if retc = 0 then
  1737.   do i=1 to out.0
  1738.     say out.i.0gid         /* group id */
  1739.     say out.i.0remark      /* comment  */
  1740.     do j=1 to out.i.0
  1741.       say out.i.j     /* user id in this group */
  1742.     end
  1743.   end
  1744. Exit
  1745.  
  1746. Example 3:  List user ids in ADMINS group in a logon domain. 
  1747.  
  1748. /* Example 3 */
  1749. retc = NetGroup('Q','out','.','admins',1)
  1750. if retc = 0 then do
  1751.     say out.1.0gid         /* group id: ADMINS */
  1752.     say out.1.0remark      /* comment  */
  1753.     do j=1 to out.1.0
  1754.       say out.1.j     /* user id of ADMIN privilege */
  1755.     end
  1756. end
  1757. Exit
  1758.  
  1759.  
  1760. ΓòÉΓòÉΓòÉ 18. NetSess ΓòÉΓòÉΓòÉ
  1761.  
  1762. NetSess function simulates NET SESSION command. 
  1763.  
  1764. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  1765.  
  1766.  
  1767. ΓòÉΓòÉΓòÉ 18.1. NetSess with Query verb ΓòÉΓòÉΓòÉ
  1768.  
  1769. Syntax: 
  1770.  
  1771.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1772.           Γöé                                                                   Γöé
  1773.           Γöé                        ΓöîΓöÇ\\locSrvΓöÇΓöÉ   ΓöîΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÉ                    Γöé
  1774.           Γöé ΓöÇNetSess('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇΓöÇ Γöé
  1775.           Γöé                        ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇxReqΓöÇΓöñ   ΓööΓöÇdetailΓöÇΓöÿ       Γöé
  1776.           Γöé                                       ΓööΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÿ                    Γöé
  1777.           Γöé                                                                   Γöé
  1778.           Γöé detail = 1 or 2                                                   Γöé
  1779.           Γöé                                                                   Γöé
  1780.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1781.  
  1782. Operation: 
  1783.      This function gets information on sessions between a server xSrv and a 
  1784.      requester xReq. If xSrv is omitted, it is a local server. 
  1785.  
  1786.      If xReq is omitted or an asterisk(*) is specified, then session 
  1787.      information for all the machines who have sessions with the server is 
  1788.      obtained. 
  1789.  
  1790.      Information on sessions is set in compound variables with the stem stem. 
  1791.  
  1792.      If you have ADMIN privilege, you can specify detail to 1 or 2 to get more 
  1793.      detail information. 
  1794.  
  1795. Variables to be set: 
  1796.  
  1797.           stem.0                    Number of indexes for stem
  1798.            (i=1 to stem.0 for variables below)
  1799.           stem.i.0UID               An user id
  1800.           stem.i.0COMPUTER          Computer name of a user
  1801.           stem.i.0SESSTIME          Session time (in sec)
  1802.           stem.i.0IDLETIME          Idle    time (in sec)
  1803.  
  1804.           stem.i.0CLIENT",    (*1)  Type of client.   (*3)
  1805.           stem.i.0CONNS",     (*1)  Number of connections in the sesseon
  1806.           stem.i.0OPENS",     (*1)  Number of open files/devices/pipes
  1807.           stem.i.0USERS",     (*1)  Number of users in the session.(=0 or 1)
  1808.           stem.i.0GUEST?",    (*1)  Guest account used? (=0 or 1)
  1809.           stem.i.0ENCRYPT?"   (*1)  Password encrypted? (=0 or 1)
  1810.  
  1811.           stem.i.0            (*2)  Number of connections.   (*4)
  1812.            (j=1 to stem.i.0 for variables below)
  1813.           stem.i.j.0NETNAME   (*2)  Network name that the server provides.
  1814.           stem.i.j.0CONNTYPE  (*2)  Connection type.
  1815.           stem.i.j.0CONNTIME  (*2)  Connection time (in sec)
  1816.           stem.i.j.0CONNOPENS (*2)  Number of open files on the connection
  1817.           stem.i.j.0CONNUSERS (*2)  Number of users on the connection
  1818.  
  1819.           Note: 
  1820.      (*1)       These variables are only set when detail is set to 1 or 2. 
  1821.      (*2)       These variables are only set when detail is set to 2. As for 
  1822.                 these variables, refer to LsConnection function. 
  1823.      (*3)       The value is something like 'OS/2 LS 4.0'. It seems to indicate 
  1824.                 the LAN Server version of the server actually. 
  1825.      (*4)       The value should be equal to stem.0CONNS. 
  1826.  
  1827. Returned string: 
  1828.      rc 
  1829.  
  1830. Required Privilege: 
  1831.      GUEST, USER, or ADMIN 
  1832.  
  1833. Examples: 
  1834.      Here are examples. 
  1835.  
  1836.  
  1837. ΓòÉΓòÉΓòÉ <hidden> Examples for NetSess with Query verb ΓòÉΓòÉΓòÉ
  1838.  
  1839. Example 1:  List session information with DC of a logon domain and my machine. 
  1840.  
  1841. /* Example 1 */
  1842. retc = NetSess('Q','out','.','.')
  1843. if retc = 0 then
  1844.   do i=1 to out.0
  1845.     say out.i.0uid         /* user id */
  1846.     say out.i.0computer    /* machine name */
  1847.     say out.i.0sesstime    /* session time */
  1848.     say out.i.0idletime    /* idle time */
  1849.   end
  1850. Exit
  1851.  
  1852. In the example below, it is assumed that the caller has ADMIN privilege. 
  1853.  
  1854. Example 2:  List information on all the sessions with a server LS40SRV. 
  1855.  
  1856. /* Example 2 */
  1857. retc = NetSess('Q','out','\\ls40srv',,2)
  1858. if retc = 0 then
  1859.   do i=1 to out.0
  1860.     say out.i.0uid         /* user id */
  1861.     say out.i.0computer    /* machine name */
  1862.     say out.i.0sesstime    /* session time */
  1863.     say out.i.0idletime    /* idle time */
  1864.  
  1865.     say out.i.0client
  1866.     say out.i.0conns
  1867.     say out.i.0opens
  1868.     say out.i.0users
  1869.     say out.i.0guest?
  1870.     say out.i.0encrypt?
  1871.  
  1872.     /* List all connections in this session */
  1873.     do j=1 to out.i.0
  1874.      say out.i.j.0netname
  1875.      say out.i.j.0conntype
  1876.      say out.i.j.0conntime
  1877.      say out.i.j.0connopens
  1878.      say out.i.j.0connusers
  1879.     end
  1880.   end
  1881. Exit
  1882.  
  1883.  
  1884. ΓòÉΓòÉΓòÉ 19. NetShare ΓòÉΓòÉΓòÉ
  1885.  
  1886. NetShare function simulates NET SHARE command. 
  1887.  
  1888. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  1889.  
  1890.  
  1891. ΓòÉΓòÉΓòÉ 19.1. NetShare with Query verb ΓòÉΓòÉΓòÉ
  1892.  
  1893. Syntax: 
  1894.  
  1895.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1896.           Γöé                                                                      Γöé
  1897.           Γöé                         ΓöîΓöÇ\\locSrvΓöÇΓöÉ   ΓöîΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÉ                   Γöé
  1898.           Γöé ΓöÇNetShare('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  1899.           Γöé                         ΓööΓöÇΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇnetnameΓöÇΓöñ   ΓööΓöÇdetailΓöÇΓöÿ      Γöé
  1900.           Γöé                                        ΓööΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÿ                   Γöé
  1901.           Γöé                                                                      Γöé
  1902.           Γöé detail = 1                                                           Γöé
  1903.           Γöé                                                                      Γöé
  1904.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1905.  
  1906. Operation: 
  1907.      This function gets information on a shared resource netname of a server 
  1908.      xSrv. If xSrv is omitted, it is a local server. 
  1909.  
  1910.      If netname is omitted or an asterisk(*) is specified, the function gets 
  1911.      information on all the shared resources of the server. 
  1912.  
  1913.      The information is set in compound variables with the stem stem. 
  1914.  
  1915.      If detail is 1, then information on the users who have connection with the 
  1916.      shared resource is also set in the stem variables. 
  1917.  
  1918. Variables to be set: 
  1919.  
  1920.           stem.0                   Number of indexes for stem
  1921.            (i=1 to stem.0 for variables below)
  1922.           stem.i.0NETNAME          Netname of a shared resource
  1923.           stem.i.0TYPE             Resource type.  (*2)
  1924.           stem.i.0REMARK           Remark
  1925.           stem.i.0PATH             Path
  1926.           stem.i.0MAXUSES          Max concurrent connections (*3)
  1927.           stem.i.0CONNS            Number of current connections
  1928.  
  1929.           stem.i.0            (*1) Number of indexes for stem.i.
  1930.            (j=1 to stem.i.0 for variables below)
  1931.           stem.i.j.0UID       (*1) An user id with connection to netname
  1932.           stem.i.j.0COMPUTER  (*1) Computer name of the user
  1933.           stem.i.j.0NETNAME   (*1) Netname of a shared resource
  1934.           stem.i.j.0CONNTYPE  (*1) Connection type
  1935.           stem.i.j.0CONNTIME  (*1) Connection time (in sec)
  1936.           stem.i.j.0CONNOPENS (*1) Number of open files on the connection
  1937.           stem.i.j.0CONNUSERS (*1) Number of users on the connection (= 0 or 1)
  1938.  
  1939.           Note: 
  1940.      (*1)       These variables are only set when detail is set to 1. As for 
  1941.                 these variables, refer to LsConnection function. 
  1942.      (*2)       Value is 'DISK', 'PRINT', 'COMM', or 'IPC'. 
  1943.      (*3)       If is is an asterisk(*), it indicates 'No Limit'. 
  1944.  
  1945. Returned string: 
  1946.      rc 
  1947.  
  1948. Required Privilege: 
  1949.      ADMIN 
  1950.  
  1951. Examples: 
  1952.      Here are examples. 
  1953.  
  1954.  
  1955. ΓòÉΓòÉΓòÉ <hidden> Examples for NetShare with Query verb ΓòÉΓòÉΓòÉ
  1956.  
  1957. In the examples below, we assume that: 
  1958.  
  1959.   1. DC LS40DCSRV has shared resource \\LS40DCSRV\IBMPC. 
  1960.   2. Server LS40SRV has shared resource \\LS40SRV\OS2TOOLS. 
  1961.   3. The caller's machine and user id is \\LS40REQ and MYADM, respectively. 
  1962.   4. The caller has logged on to LSDCSRV. 
  1963.  
  1964. Note:   Example of returned value is enclosed in left and right parentheses in 
  1965. a comment area for a variable. 
  1966.  
  1967. Example 1:  List information on all the shared resources of the DC of logon 
  1968. domain. 
  1969.  
  1970. /* Example 1 */
  1971. retc = NetShare('Q','out')
  1972. if retc = 0 then
  1973.   do i=1 to out.0
  1974.     say out.i.0NetName  /* ('IBMPC')    */
  1975.     say out.i.0type     /* ('DISK')     */
  1976.     say out.i.0remark   /* ('Forums on IBMPC disk') */
  1977.     say out.i.0path     /* ('F:\IBMPC') */
  1978.     say out.i.0MaxUses  /* ('*')        */
  1979.     say out.i.0Conns    /* ('1')        */
  1980.   end
  1981. Exit
  1982.  
  1983. Example 2:  List information on all the shared resources of server LS40SRV. 
  1984.  
  1985. /* Example 2 */
  1986. retc = NetShare('Q','out','\\ls40srv')
  1987. if retc = 0 then
  1988.   do i=1 to out.0
  1989.     say out.i.0NetName  /* ('OS2TOOLS') */
  1990.     say out.i.0type     /* ('DISK')     */
  1991.     say out.i.0remark   /* ('Repository of OS2TOOLS disk') */
  1992.     say out.i.0path     /* ('G:\TOOLS\OS2TOOLS') */
  1993.     say out.i.0MaxUses  /* ('*')        */
  1994.     say out.i.0Conns    /* ('2')        */
  1995.   end
  1996. Exit
  1997.  
  1998. Example 3:  List information on shared resource \ls40srv\os2tools and those who 
  1999. have connection with it. 
  2000.  
  2001. /* Example 3 */
  2002. retc = NetShare('Q','out','\\ls40srv','\os2tools',1)
  2003. if retc = 0 then
  2004.   do i=1 to out.0
  2005.     say out.i.0NetName  /*  'OS2TOOLS'  */
  2006.     say out.i.0type     /*  'DISK'      */
  2007.     say out.i.0remark   /*  'Repository of OS2TOOLS disk'  */
  2008.     say out.i.0path     /*  'G:\TOOLS\OS2TOOLS'  */
  2009.     say out.i.0MaxUses  /*  '*'         */
  2010.     say out.i.0Conns    /* ('2')        */
  2011.     do j=1 to out.i.0
  2012.        say out.i.j.0uid      /* user id */
  2013.        say out.i.j.0computer /* machine */
  2014.     end
  2015.   end
  2016. Exit
  2017.  
  2018.  
  2019. ΓòÉΓòÉΓòÉ 20. NetUse ΓòÉΓòÉΓòÉ
  2020.  
  2021. NetUse function simulates NET USE command and supports for two verbs: 
  2022.  
  2023.     Query 
  2024.     Connect(or Add) 
  2025.     Disconnect 
  2026.  
  2027.  
  2028. ΓòÉΓòÉΓòÉ 20.1. NetUse with Query verb ΓòÉΓòÉΓòÉ
  2029.  
  2030. Syntax: 
  2031.  
  2032.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2033.           Γöé                                                  Γöé
  2034.           Γöé                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ         Γöé
  2035.           Γöé ΓöÇNetUse('Q',ΓöÇΓöÇstemΓöÇΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇ)ΓöÇΓöÇ  Γöé
  2036.           Γöé                         Γö£ΓöÇΓöÇΓöÇDevOrUNCΓöÇΓöÇΓöÇΓöñ         Γöé
  2037.           Γöé                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ         Γöé
  2038.           Γöé                                                  Γöé
  2039.           Γöé DevOrUNC:                                        Γöé
  2040.           Γöé            Γö£ΓöÇΓö¼ΓöÇΓöÇdeviceΓöÇΓöÇΓö¼ΓöÇΓöñ                      Γöé
  2041.           Γöé              ΓööΓöÇΓöÇΓöÇUNCΓöÇΓöÇΓöÇΓöÇΓöÿ                        Γöé
  2042.           Γöé                                                  Γöé
  2043.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2044.  
  2045. Operation: 
  2046.      This function gets information on an explicit connection of the local 
  2047.      machine to a shared resource by device or the one on an implicit 
  2048.      connection by UNC. 
  2049.  
  2050.      Note:   An an explicit connection is established by such a command like: 
  2051.  
  2052.      NET USE X: OS2TOOLS 
  2053.  
  2054.      An an implicit connection is established by such a command like: 
  2055.  
  2056.      DIR \\LS40SRV\OS2TOOLS\*.*. 
  2057.  
  2058.      If DevOrUNC is omitted, or an asterisk(*) is specified, the function gets 
  2059.      information on all the connections of the local machine to shared 
  2060.      resources. 
  2061.  
  2062.      The connection information is set in compound variables with the stem 
  2063.      stem. 
  2064.  
  2065. Variables to be set: 
  2066.  
  2067.           stem.0            Number of indexes for stem
  2068.            (i=1 to stem.0 for variables below)
  2069.           stem.i.0LOCAL     Device that established a connection. (*1)
  2070.           stem.i.0REMOTE    Shared resource name in UNC format.
  2071.           stem.i.0STATUS    Connection status. (*2)
  2072.           stem.i.0RESTYPE   Resource type. (*3)
  2073.           stem.i.0OPENCNT   Number of open files and/or other resources.
  2074.           stem.i.0USECNT    Number of explicit and implicit connections.
  2075.  
  2076.           Note: 
  2077.      (*1)       Value is null string when the connection is established 
  2078.                 implicitly. 
  2079.      (*2)       Value is 'OK', 'DISC', 'RECONN', 'CONN', 'ERROR', or 'PAUSED'. 
  2080.                 (Some of them are different from those returned by NET USE 
  2081.                 command.) 
  2082.      (*3)       Value is 'DISK', 'PRINT', 'COMM', or 'IPC'. 
  2083.  
  2084. Returned string: 
  2085.      rc 
  2086.  
  2087. Required Privilege: 
  2088.      GUEST, USER, or ADMIN 
  2089.  
  2090. Examples: 
  2091.      Here are examples. 
  2092.  
  2093.  
  2094. ΓòÉΓòÉΓòÉ <hidden> Examples for NetUse with Query verb ΓòÉΓòÉΓòÉ
  2095.  
  2096. In the examples below, example of returned value is enclosed in left and right 
  2097. parentheses in a comment area for a variable. 
  2098.  
  2099. Example 1:  List information on an implicit connection with \\LS40SRV\OS2TOOLS. 
  2100.  
  2101. /* Example 1 */
  2102. retc = NetUse('Q','out','\\ls40srv\os2tools')
  2103. if retc = 0 then
  2104.   do i=1 to out.0       /* out.0 = 1     */
  2105.     say out.i.0local    /* (Null string) */
  2106.     say out.i.0remote   /* \\LS40SRV\OS2TOOLS */
  2107.     say out.i.0status   /* ('OK') */
  2108.     say out.i.0ResType  /* 'DISK' */
  2109.     say out.i.0opencnt
  2110.     say out.i.0usecnt
  2111.   end
  2112. Exit
  2113.  
  2114. Example 2:  List connection information of a redirected device LPT1:. 
  2115.  
  2116. /* Example 2 */
  2117. retc = NetUse('Q','out','LPT1:')
  2118. if retc = 0 then
  2119.   do i=1 to out.0
  2120.     say out.i.0local    /* ('LPT1:')   */
  2121.     say out.i.0remote   /* ('\\LS40SRV\4216') */
  2122.     say out.i.0status   /* ('OK')   */
  2123.     say out.i.0ResType  /* ('PRINT') */
  2124.     say out.i.0opencnt
  2125.     say out.i.0usecnt
  2126.   end
  2127. Exit
  2128.  
  2129. Example 3:  List information on all the connections with a local machine. 
  2130.  
  2131. /* Example 3 */
  2132. retc = NetUse('Q','out')
  2133. if retc = 0 then
  2134.   do i=1 to out.0
  2135.     say out.i.0local    /* ('X:')   */
  2136.     say out.i.0remote   /* ('\\LS40SRV\OS2TOOLS') */
  2137.     say out.i.0status   /* ('OK')   */
  2138.     say out.i.0ResType  /* ('DISK') */
  2139.     say out.i.0opencnt
  2140.     say out.i.0usecnt
  2141.   end
  2142. Exit
  2143.  
  2144.  
  2145. ΓòÉΓòÉΓòÉ 20.2. NetUse with Connect(or Add) verb ΓòÉΓòÉΓòÉ
  2146.  
  2147. Syntax: 
  2148.  
  2149.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2150.           Γöé                                                                   Γöé
  2151.           Γöé                                    (2)                            Γöé
  2152.           Γöé ΓöÇNetUse('C',ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓö¼ΓöÇaliasΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  2153.           Γöé           (1)  Γö£ΓöÇdeviceΓöÇΓöñ   Γöé        ΓööΓöÇdomΓöÇΓöÿΓöé   ΓööΓöÇpasswordΓöÇΓöÿ      Γöé
  2154.           Γöé                ΓööΓöÇanydrvΓöÇΓöÿ   ΓööΓöÇΓöÇΓöÇUNCΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                     Γöé
  2155.           Γöé                                                                   Γöé
  2156.           Γöé                                                                   Γöé
  2157.           Γöé  anydrv:                                                          Γöé
  2158.           Γöé           Γö£ΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ                  Γöé
  2159.           Γöé               (3)ΓööΓöÇdrvΓöÇΓöÿ(3)ΓööΓöÇsignΓöÇΓöÿ(2)ΓööΓöÇvarΓöÇΓöÿ                     Γöé
  2160.           Γöé                                                                   Γöé
  2161.           Γöé  sign:  '+' or '-'                                                Γöé
  2162.           Γöé                                                                   Γöé
  2163.           Γöé  Note: (1) 'A' can be specified instead of 'C'.                   Γöé
  2164.           Γöé        (2) there should be one or more spaces between two words.  Γöé
  2165.           Γöé        (3) there should be no space.                              Γöé
  2166.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2167.  
  2168. Operation: 
  2169.      This function connects a local device device to shared resource alias or 
  2170.      UNC.  alias is an alias defined in a logon domain or in dom if it is 
  2171.      specified. 
  2172.  
  2173.      If device is not explicitly specified but anydrv is specified, the 
  2174.      function searches for the first free local drive from a drive drv in 
  2175.      ascending or descending order to connect with disk resource. The order is 
  2176.      given by sign. 
  2177.  
  2178.      If drv is omitted, the default is 'D:' for ascending search and 'Z:' for 
  2179.      descending search. Note that drv is inclusive for the search. 
  2180.  
  2181.      The first available drive is set in a REXX variable var if it is 
  2182.      specified. 
  2183.  
  2184.      If device or anydrv is not given, an implicit connection is established. 
  2185.  
  2186.      If password is omitted, logon password is used. If it is specified and it 
  2187.      is one or more blanks, no password is used. 
  2188.  
  2189. Variables to be set: 
  2190.      REXX variable var is set if it is specified. 
  2191.  
  2192. Returned string: 
  2193.      rc 
  2194.  
  2195. Required Privilege: 
  2196.      GUEST, USER, or ADMIN 
  2197.  
  2198. Examples: 
  2199.      Here are examples. 
  2200.  
  2201.  
  2202. ΓòÉΓòÉΓòÉ <hidden> Examples for NetUse with Connect verb ΓòÉΓòÉΓòÉ
  2203.  
  2204. Example 1:  Connect j: drive to \\LS40SRV\OS2TOOLS. 
  2205.  
  2206. /* Example 1 */
  2207. retc = NetUse('C','j:','\\ls40srv\os2tools')
  2208. if retc \=0 then say 'Failed.'
  2209.  
  2210. Exit
  2211.  
  2212. Example 2:  Connect the last free drive before Z: to an alias CMVC that is 
  2213. defined in another domain TOOLDOM. 
  2214.  
  2215. /* Example 2 */
  2216. retc = NetUse('C','*z- drv','CMVC TOOLDOM')
  2217. if retc =0 then say 'Drive' drv 'was connected.'
  2218.  
  2219. Exit
  2220.  
  2221.  
  2222. ΓòÉΓòÉΓòÉ 20.3. NetUse with Disconnect verb ΓòÉΓòÉΓòÉ
  2223.  
  2224. Syntax: 
  2225.  
  2226.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2227.           Γöé                                                              Γöé
  2228.           Γöé                           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ   ΓöîΓöÇΓöÇΓöÇ1ΓöÇΓöÇΓöÇΓöÉ       Γöé
  2229.           Γöé ΓöÇNetUse('D',ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ)ΓöÇ  Γöé
  2230.           Γöé                ΓööΓöÇstemΓöÇΓöÿ   Γö£ΓöÇΓöÇΓöÇDevOrUNCΓöÇΓöÇΓöÇΓöñ   ΓööΓöÇforceΓöÇΓöÿ       Γöé
  2231.           Γöé                           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                   Γöé
  2232.           Γöé                                                              Γöé
  2233.           Γöé DevOrUNC:                                                    Γöé
  2234.           Γöé            Γö£ΓöÇΓö¼ΓöÇΓöÇdeviceΓöÇΓöÇΓö¼ΓöÇΓöñ                                  Γöé
  2235.           Γöé              ΓööΓöÇΓöÇΓöÇUNCΓöÇΓöÇΓöÇΓöÇΓöÿ                                    Γöé
  2236.           Γöé                                                              Γöé
  2237.           Γöé force = 1, 2                                                 Γöé
  2238.           Γöé                                                              Γöé
  2239.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2240.  
  2241. Operation: 
  2242.      This function disconnects from a resource that has been connected by by 
  2243.      local device device or UNC. 
  2244.  
  2245.      If DevOrUNC is omitted, or an asterisk(*) is specified, the function 
  2246.      disconnects from all the resources. To indicate whether each resource is 
  2247.      disconnected successfully or not, stem.i.0RC variable is set if stem is 
  2248.      specified for i-th resource. 
  2249.  
  2250.      force specifies a way to disconnect. If force is 1, it disconnects 
  2251.      resource when a file, a directory, or a drive for the resource is not 
  2252.      open. If force is 2, it is forced to be disconnected. 
  2253.  
  2254.      Information on resource(s) before disconnection is set in compound 
  2255.      variables with the stem stem if it is specified. 
  2256.  
  2257. Variables to be set: 
  2258.  
  2259.           stem.0            Number of resources to be disconnected
  2260.                             (i=1 to stem.0)
  2261.           stem.i.0RC        Return code for disconnection of this resource.
  2262.           (others are same as in 'Query' verb.)
  2263.  
  2264. Returned string: 
  2265.      rc 
  2266.  
  2267. Required Privilege: 
  2268.      GUEST, USER, or ADMIN 
  2269.  
  2270. Examples: 
  2271.      Here are examples. 
  2272.  
  2273.  
  2274. ΓòÉΓòÉΓòÉ <hidden> Examples for NetUse with Disconnect verb ΓòÉΓòÉΓòÉ
  2275.  
  2276. In the examples below, example of returned value is enclosed in left and right 
  2277. parentheses in a comment area for a variable. 
  2278.  
  2279. Example 1:  Terminate an implicit connection with \\LS40SRV\OS2TOOLS. 
  2280.  
  2281. /* Example 1 */
  2282. retc = NetUse('D',,'\\ls40srv\os2tools')   /* no stem */
  2283. if retc \= 0 then
  2284.    say 'Failed to disconnect with error code:' retc
  2285. Exit
  2286.  
  2287. Example 2:  Disconnect all the resources without care for open resource. 
  2288.  
  2289. /* Example 2 */
  2290. retc = NetUse('D','out','*',1)
  2291. if retc = 0 then
  2292.   do i=1 to out.0
  2293.     say out.i.0RC       /* ('0' for success) */
  2294.  
  2295.     say out.i.0local    /* ('LPT1:')   */
  2296.     say out.i.0remote   /* ('\\LS40SRV\4216') */
  2297.     say out.i.0status   /* ('OK')   */
  2298.     say out.i.0ResType  /* ('PRINT') */
  2299.     say out.i.0opencnt
  2300.     say out.i.0usecnt
  2301.   end
  2302. Exit
  2303.  
  2304.  
  2305. ΓòÉΓòÉΓòÉ 21. NetUser ΓòÉΓòÉΓòÉ
  2306.  
  2307. NetUser function simulates NET USER command. 
  2308.  
  2309. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  2310.  
  2311.  
  2312. ΓòÉΓòÉΓòÉ 21.1. NetUser with Query verb ΓòÉΓòÉΓòÉ
  2313.  
  2314. Syntax: 
  2315.  
  2316.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2317.           Γöé                                                              Γöé
  2318.           Γöé                        Γöî\\locReqΓöÇΓöÉ   ΓöîΓöÇΓöÇ*ΓöÇΓöÇΓöÉ                 Γöé
  2319.           Γöé ΓöÇNetUser('Q',ΓöÇstemΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇ Γöé
  2320.           Γöé                        ΓööΓöÇΓöÇxSrvΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇuidΓöÇΓöñ   ΓöödetailΓöÿ      Γöé
  2321.           Γöé                                      Γö£ΓöÇΓöÇ.ΓöÇΓöÇΓöñ                 Γöé
  2322.           Γöé                                      ΓööΓöÇΓöÇ*ΓöÇΓöÇΓöÿ                 Γöé
  2323.           Γöé                                                              Γöé
  2324.           Γöé detail = 1 or 2                                              Γöé
  2325.           Γöé                                                              Γöé
  2326.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2327.  
  2328. Operation: 
  2329.      This function gets information on an user id uid that is maintained in an 
  2330.      User Account Database of a server xSrv. If xSrv is omitted, it is a local 
  2331.      machine. Note that the local machine may be a Requester or Peer machine. 
  2332.      In this case the information is retrieved from a local User Account 
  2333.      Database. 
  2334.  
  2335.      If uid is an asterisk(*) or is not specified, then information on all the 
  2336.      user accounts on the database is retrieved. 
  2337.  
  2338.      Information on user(s) is set in compound variables with the stem stem. 
  2339.  
  2340.      Detail information is obtained when detail is set to 1. In this case the 
  2341.      caller should have ADMIN privilege. If uid is a dot(.), the caller who 
  2342.      does not have ADMIN privilege can specify detail of 1 successfully. 
  2343.  
  2344. Variables to be set: 
  2345.  
  2346.           stem.0                      Number of indexes for stem
  2347.            (i=1 to stem.0 for variables below)
  2348.           stem.i.0UID                 User ID (User name)
  2349.           stem.i.0REMARK              Comment
  2350.           stem.i.0USERCOMMENT         User Comment
  2351.           stem.i.0FULLNAME            Full name
  2352.  
  2353.           stem.i.0PARMS        (*1)   Parameters
  2354.           stem.i.0HOMEDIR      (*1)   Home directory
  2355.           stem.i.0REQUESTERS   (*1)   Requesters where logon is allowed (*4)
  2356.           stem.i.0LOGONSRV     (*1)   Preferred Logon Server (*5)
  2357.           stem.i.0PWAGE        (*1)   Time after password is last set. (in sec)
  2358.           stem.i.0PWSETDATE    (*1)   Date when password is last set. (*6)
  2359.           stem.i.0PWEXPDATE    (*1)   Date when password is expired.  (*4,6)
  2360.           stem.i.0PWCHGDATE    (*1)   Date when password can be changed. (*4,6)
  2361.           stem.i.0LASTLOGON    (*1)   Date when an user logged on last. (*6,7)
  2362.           stem.i.0LASTLOGOFF   (*1)   Date when an user logged on last. (*6,7)
  2363.           stem.i.0COUNTRYCODE  (*1)   Country code
  2364.           stem.i.0CODEPAGE     (*1)   Code page
  2365.           stem.i.0LOGONCNT     (*1)   Logon count  (*7)
  2366.           stem.i.0BADPWCNT     (*1)   Bad password count (*7)
  2367.           stem.i.0MAXSTORAGE   (*1)   Maximum disk space (*4)
  2368.           stem.i.0PRIV         (*1)   Privilege level
  2369.           stem.i.0PRIVPRT?     (*1)   Operator privilege - PRINT    (*8)
  2370.           stem.i.0PRIVCOM?     (*1)   Operator privilege - COMM     (*8)
  2371.           stem.i.0PRIVSRV?     (*1)   Operator privilege - SERVER   (*8)
  2372.           stem.i.0PRIVACC?     (*1)   Operator privilege - ACCOUNTS (*8)
  2373.           stem.i.0LOGONALWAYS? (*1)   Can the user logon always ?   (*9)
  2374.           stem.i.0LOGONHOURS.0 (*1)   (='7')
  2375.           stem.i.0LOGONHOURS.t (*1)   Hour flags in hex style to indicate
  2376.                                       allowed hours of a day when the user
  2377.                                       can logon on a domain.        (*9)
  2378.           stem.i.0SCRIPTPATH   (*1,2) Logon script
  2379.           stem.i.0ACCOUNTEXP   (*1,2) Date when Account expires (*4,6)
  2380.  
  2381.           stem.i.0PWREQ?       (*1,2) Password required?
  2382.           stem.i.0PWCHG?       (*1,2) Password is changeable?
  2383.           stem.i.0ACCOUNTACT?  (*1,2) Account is active?
  2384.           stem.i.0ACCOUNTDEL?  (*1,2) Account can be deleted?
  2385.  
  2386.           stem.i.0GRP.0          (*3) Number of groups    (*10)
  2387.           stem.i.0GRP.j          (*3) Group that the user belongs to.
  2388.  
  2389.           stem.i.0APP.0          (*3) Number of Network Applications. (*10)
  2390.           stem.i.0APP.k          (*3) Application assigned to the user.
  2391.           stem.i.0APP.k.0TYPE    (*3) Application type ('OS/2' or 'DOS')
  2392.           stem.i.0APP.k.0PUBLIC? (*3) Public Application?
  2393.  
  2394.           stem.i.0LA.0           (*3) Number of Logon assignments  (*10)
  2395.           stem.i.0LA.m           (*3) Alias name
  2396.           stem.i.0LA.m.0TYPE     (*3) Alias type
  2397.           stem.i.0LA.m.0LOCAL    (*3) Local device name
  2398.  
  2399.           Note: 
  2400.      (*1)       These variables are set when detail is set to 1 or 2 and the 
  2401.                 caller has an ADMIN privilege. If uid is a dit(.), the ADMIN 
  2402.                 privilege is not required. 
  2403.      (*2)       These variables are not set if a dot(.) is specified for uid. 
  2404.      (*3)       These variables are set when detail is set to 2 and the caller 
  2405.                 has an ADMIN privilege. 
  2406.      (*4)       An asterisk(*) will be returned if there is no restriction. 
  2407.      (*5)       Double back slashes(\\) precedes a server name. If there is no 
  2408.                 restriction, '\\*' is returned. 
  2409.      (*6)       Date format is YYYY MM/DD hh:mm:ss. 
  2410.      (*7)       If it is unknown, an question mark(?) is returned. 
  2411.      (*8)       The value is either '0' or '1'. 
  2412.      (*9)       t is 1 for Sunday, 2 for Monday, and so on. Value of 
  2413.                 stem.i.0LOGONHOURS.t is a string of 6 hexadecimal characters 
  2414.                 where 24 bits are assigned to time ranges of the day t. Least 
  2415.                 significant bit of the 24 bits is 00:00 thru 00:59, the next is 
  2416.                 01:00 thru 01:59, and so on. Bit of '1' indicates that the user 
  2417.                 can logon for the time range. 
  2418.  
  2419.                 For example, stem.0.0LogonHours.1='000000' show the user 
  2420.                 cannnot logon on Sunday. stem.0.0LogonHours.2='0FFF00' show the 
  2421.                 user can logon on from 08:00 until 20:00 on Monday. 
  2422.  
  2423.                 stem.i.0LogonAlways? is set to '1' if there is no restriction 
  2424.                 on the time when the user can logon. Otherwise, it is '0'. 
  2425.      (*10)      One of following conditions should be met so that these values 
  2426.                 are correctly set. 
  2427.                     the caller has an ADMIN privilege, 
  2428.                     the caller has an Account Operator privilege, or 
  2429.                     the caller queries information on his/her own. 
  2430.  
  2431.                 If an error is raised from NET API internally to set these 
  2432.                 variables, the error code is negated and set to the variables. 
  2433.                 For example, if stem.i.0GRP.0 is "-5", it means "Access 
  2434.                 Denied". 
  2435.  
  2436. Returned string: 
  2437.      rc 
  2438.  
  2439. Required Privilege: 
  2440.      GUEST, USER, or ADMIN 
  2441.  
  2442. Examples: 
  2443.      Here are examples. 
  2444.  
  2445.  
  2446. ΓòÉΓòÉΓòÉ <hidden> Examples for NetUser with Query verb ΓòÉΓòÉΓòÉ
  2447.  
  2448. Example 1:  List all th user ids defined in a logon domain. 
  2449.  
  2450. /* Example 1 */
  2451. /* The caller's privilege may be USER or GUEST.*/
  2452. retc = NetUser('Q','out','.')
  2453. if retc = 0 then
  2454.   do i=1 to out.0
  2455.     say out.i.0uid          /* user  id */
  2456.     say out.i.0Remark       /* comment  */
  2457.     say out.i.0UserComment  /* user comment */
  2458.     say out.i.0Fullname     /* full name    */
  2459.   end
  2460. Exit
  2461.  
  2462. Example 2:  List detail information on my own in a domain LS40DOM. 
  2463.  
  2464. /* Example 2 */
  2465. /* The caller's privilege may be USER or GUEST.*/
  2466. retc = NetUser('Q','out','ls40dom','.',2)
  2467. if retc = 0 then
  2468.   do i=1 to out.0           /* out.0 = 1 */
  2469.     say out.i.0uid          /* user  id */
  2470.     say out.i.0Remark       /* comment  */
  2471.     say out.i.0UserComment  /* user comment */
  2472.     say out.i.0Fullname     /* full name    */
  2473.  
  2474.     say out.i.0Parms
  2475.     say out.i.0HomeDir
  2476.     say out.i.0Requesters
  2477.     say out.i.0LogonSrv
  2478.     say out.i.0PwAge
  2479.     say out.i.0LastLogon
  2480.     say out.i.0LastLogoff
  2481.     say out.i.0CountryCode
  2482.     say out.i.0CodePage
  2483.     say out.i.0LogonCnt
  2484.     say out.i.0BadPwCnt
  2485.     say out.i.0MaxStorage
  2486.     say out.i.0Priv
  2487.     say out.i.0PrivPrt?
  2488.     say out.i.0PrivCom?
  2489.     say out.i.0PrivSrv?
  2490.     say out.i.0PrivAcc?
  2491.     say out.i.0PwSetDate
  2492.     say out.i.0PwExpDate
  2493.     say out.i.0PwChgDate
  2494.     if out.i.0LogonAlways?=0 then /* show detail */
  2495.       do t=1 to out.i.0LogonHours.0
  2496.         say out.i.0LogonHours.t
  2497.       end
  2498.  /* say out.i.0AccountExp  (This variable is not set.) */
  2499.  /* say out.i.0ScriptPath  (This variable is not set.) */
  2500.  /* say out.i.0PwReq?      (This variable is not set.) */
  2501.  /* say out.i.0PwChg?      (This variable is not set.) */
  2502.  /* say out.i.0AccountAct? (This variable is not set.) */
  2503.  /* say out.i.0AccountDel? (This variable is not set.) */
  2504.  
  2505.     do j=1 to out.i.0grp.0
  2506.       say out.i.0grp.j
  2507.     end
  2508.     do j=1 to out.i.0App.0
  2509.       say out.i.0App.j
  2510.     end
  2511.     do j=1 to out.i.0LA.0
  2512.       say out.i.0LA.j
  2513.     end
  2514.   end
  2515. Exit
  2516.  
  2517. In examples below, it is assumed that the caller has ADMIN privilege. 
  2518.  
  2519. Example 3:  List all the user ids defined in a server \\LS40SRV. 
  2520.  
  2521. /* Example 3 */
  2522. retc = NetUser('Q','out','\\LS40SRV','*',1)
  2523. if retc = 0 then
  2524.   do i=1 to out.0
  2525.     say out.i.0uid          /* user  id */
  2526.     say out.i.0Remark       /* comment  */
  2527.     say out.i.0UserComment  /* user comment */
  2528.     say out.i.0Fullname     /* full name    */
  2529.  
  2530.     say out.i.0Parms
  2531.     say out.i.0HomeDir
  2532.     say out.i.0Requesters
  2533.     say out.i.0LogonSrv
  2534.     say out.i.0PwAge
  2535.     say out.i.0LastLogon
  2536.     say out.i.0LastLogoff
  2537.     say out.i.0CountryCode
  2538.     say out.i.0CodePage
  2539.     say out.i.0LogonCnt
  2540.     say out.i.0BadPwCnt
  2541.     say out.i.0MaxStorage
  2542.     say out.i.0Priv
  2543.     say out.i.0PrivPrt?
  2544.     say out.i.0PrivCom?
  2545.     say out.i.0PrivSrv?
  2546.     say out.i.0PrivAcc?
  2547.     say out.i.0PwSetDate
  2548.     say out.i.0PwExpDate
  2549.     say out.i.0PwChgDate
  2550.     say out.i.0AccountExp
  2551.     say out.i.0ScriptPath
  2552.  
  2553.     say out.i.0PwReq?
  2554.     say out.i.0PwChg?
  2555.     say out.i.0AccountAct?
  2556.     say out.i.0AccountDel?
  2557.   end
  2558. Exit
  2559.  
  2560.  
  2561. ΓòÉΓòÉΓòÉ 22. NetView ΓòÉΓòÉΓòÉ
  2562.  
  2563. NetView function simulates NET VIEW command. 
  2564.  
  2565. Note:   The current version of NetUtil.DLL only supports for 'Query' verb. 
  2566.  
  2567.  
  2568. ΓòÉΓòÉΓòÉ 22.1. NetView with Query verb ΓòÉΓòÉΓòÉ
  2569.  
  2570. Syntax: 
  2571.  
  2572.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2573.           Γöé                                                         Γöé
  2574.           Γöé                          ΓöîΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÉ                     Γöé
  2575.           Γöé ΓöÇNetView('Q',ΓöÇΓöÇstemΓöÇΓöÇ,ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇ Γöé
  2576.           Γöé                          Γö£ΓöÇΓöÇxSrvΓöÇΓöÇΓöñ   ΓööΓöÇdetailΓöÇΓöÿ        Γöé
  2577.           Γöé                          ΓööΓöÇΓöÇΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÿ                     Γöé
  2578.           Γöé                                                         Γöé
  2579.           Γöé detail = 1                                              Γöé
  2580.           Γöé                                                         Γöé
  2581.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2582.  
  2583. Operation: 
  2584.      This function gets information on the server xSrv. If xSrv is omitted or 
  2585.      an asterisk(*) is specified, it gets information on all the servers in the 
  2586.      domain(s) that the caller's machine monitors. 
  2587.  
  2588.      Note:   In general, a requester machine monitors a default domain, logon 
  2589.              domain, and domains that are specified by OTHDOMAINS line in 
  2590.              IBMLAN.INI or by /OTHDOMAINS parameter on NET START REQUESTER 
  2591.              command. 
  2592.  
  2593.      The information is set in compound variables with the stem stem. 
  2594.  
  2595.      If detail of 1 is specified, then information on shared resources of the 
  2596.      server(s) is also retrieved. 
  2597.  
  2598. Variables to be set: 
  2599.  
  2600.           stem.0                 Number of indexes for stem
  2601.            (i=1 to stem.0 for variables below)
  2602.           stem.i.0SERVER         Server name
  2603.           stem.i.0REMARK         Comment
  2604.           stem.i.0VERMAJOR       Major version of LAN Server on the server
  2605.           stem.i.0VERMINOR       Minor version of LAN Server on the server
  2606.           stem.i.0PEER?          Peer server flag ("1" or "0")
  2607.           stem.i.0HEXTYPE        Server type in HEX representation (*2)
  2608.           stem.i.0TYPELIST       A list of server types. (*2)
  2609.  
  2610.           stem.i.0          (*1) Number of shared resources of the server.
  2611.            (j=1 to stem.i.0 for variables below)
  2612.           stem.i.j.0NETNAME (*1) Netname of a shared resource
  2613.           stem.i.j.0TYPE    (*1) Resource type.  (*3)
  2614.           stem.i.j.0REMARK  (*1) Remark
  2615.           stem.i.j.0LOCAL   (*1) Local device which the resource is attached to.
  2616.  
  2617.           Note: 
  2618.      (*1)       These variables are only set when detail is set to 1. 
  2619.      (*2)       For detail on values, see LsServer with Query verb. 
  2620.      (*3)       If is is an asterisk(*), it indicates 'No Limit'. 
  2621.  
  2622. Returned string: 
  2623.      rc 
  2624.  
  2625. Required Privilege: 
  2626.      GUEST, USER, or ADMIN 
  2627.  
  2628. Examples: 
  2629.      Here are examples. 
  2630.  
  2631.  
  2632. ΓòÉΓòÉΓòÉ <hidden> Examples for NetView with Query verb ΓòÉΓòÉΓòÉ
  2633.  
  2634. In the examples below, example of returned value is enclosed in left and right 
  2635. parentheses in a comment area for a variable. 
  2636.  
  2637. Example 1:  List all the active servers that the local machine monitors. 
  2638.  
  2639. /* Example 1 */
  2640. retc = NetView('Q','out')
  2641. if retc = 0 then
  2642.   do i=1 to out.0
  2643.     say out.i.0server    /* server name: (\\LS40DCSRV) */
  2644.     say out.i.0remark    /* comments   */
  2645.     say out.i.0VerMajor  /* major version: ('4') */
  2646.     say out.i.0VerMinor  /* major version: ('0') */
  2647.     say out.i.0peer?     /* peer server? : ('0') */
  2648.     say out.i.0TypeList  /* Types: ('REQUESTER SERVER DC') */
  2649.   end
  2650. Exit
  2651.  
  2652. Example 2:  Get information on the server LS40SRV and lists all the shared 
  2653. resources of the server. 
  2654.  
  2655. /* Example 2 */
  2656. retc = NetView('Q','out','\\ls40srv',1)
  2657. if retc = 0 then
  2658.   do i=1 to out.0
  2659.     say out.i.0server    /* server name: (\\LS40DCSRV) */
  2660.     say out.i.0remark    /* comments   */
  2661.     say out.i.0VerMajor  /* major version: ('4') */
  2662.     say out.i.0VerMinor  /* major version: ('0') */
  2663.     say out.i.0peer?     /* peer server? : ('0') */
  2664.     say out.i.0TypeList  /* Types: ('REQUESTER SERVER DC') */
  2665.  
  2666.     do j=1 to out.i.0
  2667.       say out.i.j.0NetName  /* ('IBMPC')    */
  2668.       say out.i.j.0type     /* ('DISK')     */
  2669.       say out.i.j.0remark   /* ('Forums on IBMPC disk') */
  2670.     end
  2671.   end
  2672. Exit
  2673.  
  2674.  
  2675. ΓòÉΓòÉΓòÉ 23. Return codes from NetUtil functions. ΓòÉΓòÉΓòÉ
  2676.  
  2677. Here is a table of return code(rc) returned from NetUtil functions. 
  2678.  
  2679.   1. rc = 0  Successful completion 
  2680.  
  2681.   2. rc < 0  Syntax error or invalid parameter 
  2682.  
  2683.      -1       No verb specified. 
  2684.      -2       Invalid verb specified. 
  2685.      -3       Parameter is missing. 
  2686.      -4       Parameter is invalid. 
  2687.      -5       REXX variable name is invalid. 
  2688.      -6       Failed to set REXX variables. 
  2689.      -8       No free local drive available. 
  2690.  
  2691.   3. rc > 0  Error code returned from NET API or OS/2 system. 
  2692.  
  2693.      As for rc of pisitive nnnn, see documents of IBM OS/2 LAN Server or you 
  2694.      can see on-line help by either: 
  2695.  
  2696.            HELP NETnnnn
  2697.                or
  2698.            HELP SYSnnnn
  2699.  
  2700.