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