home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / lsrxut.zip / LSRXUTIL.INF (.txt) < prev   
OS/2 Help File  |  1996-04-17  |  228KB  |  16,174 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Version Notice ΓòÉΓòÉΓòÉ
  3.  
  4. Third Edition (April 1996) 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions; therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication. IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for copies of this publication and for technical information about IBM 
  27. products should be made to your IBM Authorized Dealer or your IBM Marketing 
  28. Representative. 
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ 2. Notices ΓòÉΓòÉΓòÉ
  32.  
  33. References in this publication to IBM products, programs, or services do not 
  34. imply that IBM intends to make these available in all countries in which IBM 
  35. operates. Any reference to an IBM product, program, or service is not intended 
  36. to state or imply that only IBM's product, program, or service may be used. Any 
  37. functionally equivalent product, program, or service that does not infringe any 
  38. of IBM's intellectual property rights or other legally projectable rights may 
  39. be used instead of the IBM product, program, or service. Evaluation and 
  40. verification of operation in conjunction with other products, programs, or 
  41. services, except those expressly designated by IBM, are the user's 
  42. responsibility. 
  43.  
  44. IBM may have patents or pending patent applications covering subject matter in 
  45. this document. The furnishing of this document does not give you any rights to 
  46. these patents. You can inquire, in writing, to IBM Director of Licensing, IBM 
  47. Corporation, 500 Columbus Avenue, Thornwood, NY 10594, USA. 
  48.  
  49. Asia-Pacific users can inquire, in writing, to Intellectual Property and 
  50. Licensing, IBM World Trade Asia Corporation, 2-31, Roppongi 3-chome, Minato-ku, 
  51. Tokyo 106, Japan. 
  52.  
  53. The following terms, denoted by an asterisk (*) in this book, are trademarks of 
  54. the IBM Corporation in the United States, or other countries, or both: 
  55.  
  56.  
  57.  IBM                                 FFST/2
  58.  
  59.  First Failure Support Technology/2  OS/2
  60.  
  61.  Presentation Manager                LAN Server
  62.  
  63.  
  64. ΓòÉΓòÉΓòÉ 3. About This Book ΓòÉΓòÉΓòÉ
  65.  
  66. This is the documentation of the IBM OS/2 LAN Server* REXX Utility DLL file. 
  67. The REXX interface to the LAN Server API functions was created for the LAN 
  68. Server administrators, to assist them in the daily operation of the LAN Server. 
  69.  
  70. During the writing of the book "Automating IBM OS/2 LAN Server Administration", 
  71. IBM Form number GG24-4442, we discovered the need for additional functions. 
  72.  
  73. The base version of the DLL (LS30UT.DLL) was therefore extended and renamed to 
  74. LSRXUT.DLL, which now supports IBM OS/2 Warp Server, as well as versions 3.0 
  75. and 4.0 of the IBM OS/2 LAN Server. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ 3.1. LSRXUT.DLL History ΓòÉΓòÉΓòÉ
  79.  
  80. The major changes in the different versions are: 
  81.  
  82.  Version 1.0.0  Closed March 9th. 1993. All functions are described in 
  83.                 GG24-4043. 
  84.  
  85.  Version 1.0.1  Added the functions Ls30utVer(), NetEnumerate() and 
  86.                 NetGetInfo(). Added the LS30UTIL.INF file. It is a draft 
  87.                 version. It contains spelling and wording errors. 
  88.  
  89.  Version 1.0.2  Added the functions NetAdd(), NetDelete() and NetSetInfo(). An 
  90.                 additional alert part was added using the IBM FASTService for 
  91.                 OS/2, which of course, must be installed if used. A IBM LAN 
  92.                 Server 3.0 controlling workstation can now together with 
  93.                 FASTService for OS/2 and the addition of Remote Operations from 
  94.                 either Extended Services or CM/2 perform operations under 
  95.                 control of NetView. The NetView control is intended to be 
  96.                 triggered by an alert, which will trigger a NetView CLIST that 
  97.                 performs a RUNCMD against the IBM LAN Server 3.0 controlling 
  98.                 workstation. 
  99.  
  100.  Version 1.0.3  Bug fix in the function SetLogonAsn(). Was incorrectly handling 
  101.                 a NetUserGetLogonAsn() return code resulting in the following 
  102.                 return message 
  103.  
  104.  
  105.                                 SetLogonAsn returned   0 Could not get user Logon assignment
  106.  
  107.                 in functions using SetLogonAsn(). 
  108.  
  109.  Version 1.0.4  Bug fix. Same problem as in 1.0.3, but with application 
  110.                 selectors. 
  111.  
  112.                 Added the functions: 
  113.  
  114.                                 NetGetInfo(NETFINDADDRESS) to list LAN adapter
  115.                                                            address from a NetBIOS name
  116.                                 NetSetInfo(NETEXPIREPASSWORD) to expire a password
  117.  
  118.                 The LS30UT.DLL has been tested successfully with both 
  119.                 VisPro/REXX and Watcom Visual REXX. 
  120.  
  121.  Version 1.0.5  Minor cosmetic corrections in the LS30UTIL.INF documentation 
  122.                 file. Added a more detailed description of the LS30UT.DLL base 
  123.                 functions. 
  124.  
  125.                 Inserted a log entry for every userid successfully added in the 
  126.                 base function InsertAllUsers(). 
  127.  
  128.                 Converted to the IBM C/C++ Tools 2.0 development environment. 
  129.  
  130.                 Added the function: 
  131.  
  132.                                 NetSetInfo(NETHOMEDIR) to assign a home directory
  133.  
  134.  Version 1.0.6  Minor code changes in LS30UT.DLL. Compiled with the IBM C/C++ 
  135.                 Tools Version at 2.01 level. 
  136.  
  137.                 The APAR PJ11200 was created to handle a Trap 000D in 
  138.                 HELPMGR.DLL when doing copy to clipboard, file and print from 
  139.                 the LS30UTIL.INF on some systems. 
  140.  
  141.                 Added the function 
  142.  
  143.                                 NetAdd(NETUSERINITDCDB)
  144.  
  145.                 to add a new userid and force the creation of the 
  146.                 \IBMLAN\DCDB\USERS\userid directory. 
  147.  
  148.  Version 1.0.7  Added the function: 
  149.  
  150.                                 NetSetInfo(NETUSER)
  151.  
  152.                 to supplement existing user account functions because of a 
  153.                 requirement to set the maximum storage parameter from 
  154.                 LS30UT.DLL. Also, the functions: 
  155.  
  156.                                 RxSplCreateDevice()
  157.                                 RxSplCreateQueue()
  158.                                 RxSplDeleteDevice()
  159.                                 RxSplDeleteQueue()
  160.                                 RxSplEnumDevice()
  161.                                 RxSplEnumDriver()
  162.                                 RxSplEnumPort()
  163.                                 RxSplEnumPrinter()
  164.                                 RxSplQueryDevice()
  165.                                 RxSplQueryQueue()
  166.  
  167.                 where added. 
  168.  
  169.  Version 1.0.8  Made a set of modifications in the source code to solve a thunk 
  170.                 problem in the function NetAdd(NETALIAS) which may happen on 
  171.                 some server and requester systems. The function NetAdd(NETAPP) 
  172.                 had a problem with application types, which always was forced 
  173.                 to 'PUBLIC OS/2'. 
  174.  
  175.                 Made the parameter 'auth_flags' available in the function 
  176.                 NetGetInfo(NETUSER). The parameter 'auth_flags' can also be set 
  177.                 in the function NetSetInfo(NETUSER). 
  178.  
  179.                 Also a problem with empty server specifications was discovered. 
  180.                 This should be corrected in this version of the DLL. Added the 
  181.                 following functions: 
  182.  
  183.                                 RxSplControlDevice()
  184.                                 RxSplDeleteJob()
  185.                                 RxSplEnumJob()
  186.                                 RxSplHoldJob()
  187.                                 RxSplHoldQueue()
  188.                                 RxSplPurgeQueue()
  189.                                 RxSplQueryJob()
  190.                                 RxSplReleaseJob()
  191.                                 RxSplReleaseQueue()
  192.                                 RxSplSetJob()
  193.  
  194.  Version 1.0.9  Missed the 'A' attribute for Access Control profiles. This has 
  195.                 been added. Added a comment in the INF file regarding the use 
  196.                 of LS30UT.DLL in multiple processes. See Using LSRXUT.DLL in 
  197.                 multible processes. 
  198.  
  199.  Version 1.0.10 A problem with many spooler printer devices was corrected. The 
  200.                 functions NetEnumerate(NETFILE) and NetEnumerate(NETSESSION) 
  201.                 was expanded on request and will return additional information. 
  202.  
  203.                 The function NetDelete(NETFILECLOSE) was added. 
  204.  
  205.                 Using the NetAdd(NETUSE) functions acts differently on the IBM 
  206.                 LAN Server 3.0 versions IP07000, IP07001, IP07005 and IP07045. 
  207.                 To ensure the function works as intended, the resource to be 
  208.                 used must be shared at server startup. The command line NET USE 
  209.                 makes use of another undocumented API to enable the use of a 
  210.                 server resource which is shared at request. 
  211.  
  212.  Version 1.0.11 Added user account flags into the NetSetInfo(NETUSER) function. 
  213.                 If a user account is setup to have no password, the password 
  214.                 required functions in LS30UT.DLL require a dummy password. 
  215.  
  216.                 The NetSetInfo(NETUSER) is enabled for password setting for an 
  217.                 administrator. 
  218.  
  219.                 The NetSetInfo(NETGROUP) was added to set group comment. 
  220.  
  221.                 The NetEnumerate(NETUSE, NETCONNECTION, NETFILE) functions can 
  222.                 now use the returned stem variable.0 as a counter for the 
  223.                 number of items returned. 
  224.  
  225.                 A problem with NetSetInfo(NETALIAS, 'path') was discovered and 
  226.                 corrected. 
  227.  
  228.  Version 1.0.12 Added control on allocated memory. 
  229.  
  230.  Version 1.0.13 Interim version 
  231.  
  232.  Version 1.0.14 A TRAP D encountered. This is solved. 
  233.  
  234.                 Removed FASTService support. It does not work correctly in all 
  235.                 REXX environments. 
  236.  
  237.  Version 1.0.15 Interim version 
  238.  
  239.  Version 1.0.18 Many Interim versions, each solving problems reported 
  240.  
  241.  Version 2.0.0  Added support for IBM LAN Server 4.0 into the DLL. The DLL was 
  242.                 renamed and the following functions where renamed: 
  243.  
  244.                                 LS30UT.DLL           LSRXUT.DLL
  245.                                 -----------------    -----------------
  246.                                 LoadLs30utFuncs()    LoadLsRxutFuncs()
  247.                                 LsRx30Ver()          LsRxutVer()
  248.                                 DropLs30utFuncs()    DropLsRxutFuncs()
  249.  
  250.                 The following list is a incomplete list of additional functions 
  251.                 added or functions modified: 
  252.  
  253.                                 NetAdd(NETMESSAGENAME)        New function
  254.                                 NetAdd(NETUSER2)              New function
  255.                                 NetDelete(NETAPPSEL)          New function
  256.                                 NetDelete(NETLOGONASN)        New function
  257.                                 NetDelete(NETMESSAGENAME)     New function
  258.                                 NetEnumerate(NETAPP)          Added a type parameter for the enumeration
  259.                                 NetGetInfo(NETMESSAGELOGFILE) New function
  260.                                 NetMisc(NETACCESSAPPLY)       New function. This is only for LS40
  261.                                 NetMisc(NETACCESSCHECK)       New function
  262.                                 NetMisc(NETMESSAGEBUFFERSEND) New function
  263.                                 NetMisc(NETMESSAGEFILESEND)   New function
  264.                                 NetMisc(NETMESSAGENAMEFWD)    New function
  265.                                 NetMisc(NETMESSAGENAMEUNFWD)  New function
  266.                                 NetMisc(NETREMOTECOPY)        New function
  267.                                 NetMisc(NETREMOTEMOVE)        New function
  268.                                 NetMisc(NETREMOTETOD)         New function
  269.                                 NetMisc(NETSERVERADMINCMD)    New function
  270.                                 NetMisc(NETUSERDCDBINIT)      New function
  271.                                 NetMisc(NETUSERVALIDATE2)     New function
  272.  
  273.                                 NetSetInfo(NETALIAS) Can now change the server location of the
  274.                                                      resource. This is only for LS40
  275.  
  276.                                 NetSetInfo(NETGROUPUSERS)     New function
  277.                                 NetSetInfo(NETMESSAGELOGFILE) New function
  278.                                 NetSetInfo(NETUSER)           Added more options
  279.                                 NetSetInfo(NETUSERGROUPS)     New function
  280.                                 NetSetInfo(NETUSERMODALS)     New function
  281.                                 NetSetInfo(NETSERVERMODALS)   New function
  282.  
  283.                                 Added NetDASD support for the 4.0 version of the DLL
  284.  
  285.                 The control variables returning the value '-none-' has been 
  286.                 changed for many of the functions. Please check with the 
  287.                 function documentation if you have procedures based on the old 
  288.                 version of the DLL. The source code was partially cleaned up to 
  289.                 reduce the DLL size. 
  290.  
  291.  Version 2.0.1  Password upper-cased when user account created.  RxSplEnumQueue 
  292.                 returns incorrect value. 
  293.  
  294.  Version 2.0.2  Fixed trap in NetServerModals. 
  295.  
  296.  Version 2.0.3  Fixed trap in NetGetInfo:NetAppSel. 
  297.  
  298.  Version 2.0.4  NetSetInfo:NetUser now allows null homedir. 
  299.  
  300.  
  301. ΓòÉΓòÉΓòÉ 3.2. The Files ΓòÉΓòÉΓòÉ
  302.  
  303. The IBM OS/2 LAN Server Utility DLL package contains the following files: 
  304.  
  305.    1. The LSRXUTIL.INF file 
  306.  
  307.       If you experience TRAP D messages in HELPMGR.DLL while doing copy to 
  308.       Clipboard, file or printing, you need to obtain the APAR PJ11200 for 
  309.       OS/2. 
  310.  
  311.    2. Two versions of the LSRXUT.DLL: 
  312.  
  313.         a) LSRXUT4.DLL 
  314.  
  315.            for Warp Server and Warp Connect clients, as well as LAN Server 4.0 
  316.            based systems.  It can be used to call Warp Server, Warp Connect, 
  317.            LAN Server 3.0, and LAN Server 4.0 systems. 
  318.  
  319.         b) LSRXUT3.DLL 
  320.  
  321.            for LAN Server 3.0 based systems 
  322.  
  323.  
  324. ΓòÉΓòÉΓòÉ 3.3. References ΓòÉΓòÉΓòÉ
  325.  
  326. The following documentation contains additional description of the parameters 
  327. and values used and provided in the LSRXUT.DLL: 
  328.  
  329.      IBM LAN Server Family Programming Reference 
  330.  
  331.      IBM LAN Server 4.0 Application Programming Reference 
  332.  
  333.      IBM LAN Server 3.0 Application Programming Reference 
  334.  
  335.      IBM LAN Server 2.0 Application Programming Reference, but not for alias 
  336.       and application related calls 
  337.  
  338.      Automating IBM OS/2 LAN Server Administration, IBM Form number GG24-4442 
  339.  
  340.       This book also contains the source code of the LSRXUT.DLL 
  341.  
  342.  
  343. ΓòÉΓòÉΓòÉ 4. How to use ΓòÉΓòÉΓòÉ
  344.  
  345. To use LSRXUT.DLL functions, OS/2 2.0 (or higher) and IBM LAN Server 3.0 (or 
  346. higher) must be installed. 
  347.  
  348. Before you start, rename either the file LSRXUT3.DLL or LSRXUT4.DLL to 
  349. LSRXUT.DLL. 
  350.  
  351. The LSRXUT.DLL must be copied to any subdirectory that is included in the 
  352. CONFIG.SYS LIBPATH= parameter. 
  353.  
  354. To validate the correct installation of the LSRXUT.DLL the following REXX 
  355. procedure can be used: 
  356.  
  357. /************************************************/
  358. Say 'Testing LSRXUT.DLL access'
  359.  
  360. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  361. call LoadLsRxutFuncs
  362.  
  363. Say 'LoadLsRxutFuncs is complete.'
  364.  
  365. version = LsRxutVer()
  366. say 'Version is ' version
  367.  
  368. call DropLsRxutFuncs
  369.  
  370. exit 0
  371.  
  372. An example output of the test function would be like the following: 
  373.  
  374. Testing LSRXUT.DLL access
  375. LoadLsRxutFuncs is complete.
  376. Version is  2.00.00
  377.  
  378.  
  379. ΓòÉΓòÉΓòÉ 5. LSRXUT.DLL Load and Drop ΓòÉΓòÉΓòÉ
  380.  
  381. To activate the functions of the LSRXUT.DLL a REXX call must be made to make 
  382. REXX aware of the existence of the LSRXUT.DLL functions. 
  383.  
  384. A similar REXX call must be made to unload (drop) the function in the 
  385. LSRXUT.DLL. 
  386.  
  387. To provide this, two functions are implemented. They are: 
  388.  
  389.      LoadLsRxutFuncs() 
  390.  
  391.      DropLsRxutFuncs() 
  392.  
  393.  
  394. ΓòÉΓòÉΓòÉ 5.1. DropLsRxutFuncs() ΓòÉΓòÉΓòÉ
  395.  
  396. This function drop all functions in LSRXUT.DLL 
  397.  
  398. Syntax 
  399.  
  400. call DropLsRxutFuncs
  401.  
  402. Parameters 
  403.  
  404. none
  405.  
  406. Note 
  407.  
  408. The call to the function DropLsRxutFuncs can be initiated after any use of the 
  409. LSRXUT.DLL functions. 
  410.  
  411. Example 
  412.  
  413. /************************************************/
  414. Say 'Testing LSRXUT.DLL access'
  415.  
  416. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  417. call LoadLsRxutFuncs
  418.  
  419. Say 'LoadLsRxutFuncs is complete.'
  420.  
  421. version = LsRxutVer()
  422. say 'Version is ' version
  423.  
  424. call DropLsRxutFuncs
  425.  
  426. exit 0
  427.  
  428. Example output 
  429.  
  430. Testing LSRXUT.DLL access
  431. LoadLsRxutFuncs is complete.
  432. Version is  2.00.00
  433.  
  434.  
  435. ΓòÉΓòÉΓòÉ 5.2. LoadLsRxutFuncs() ΓòÉΓòÉΓòÉ
  436.  
  437. This function registers all functions in LSRXUT.DLL. 
  438.  
  439. Syntax 
  440.  
  441. call LoadLsRxutFuncs
  442.  
  443. Parameters 
  444.  
  445. none
  446.  
  447. Note 
  448.  
  449. The call to LoadLsRxutFuncs must be combined with the RxFuncAdd function. The 
  450. correct sequence is: 
  451.  
  452. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  453. call LoadLsRxutFuncs
  454.  
  455. Example 
  456.  
  457. /************************************************/
  458. Say 'Testing LSRXUT.DLL access'
  459.  
  460. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  461. call LoadLsRxutFuncs
  462.  
  463. Say 'LoadLsRxutFuncs is complete.'
  464.  
  465. version = LsRxutVer()
  466. say 'Version is ' version
  467.  
  468. call DropLsRxutFuncs
  469.  
  470. exit 0
  471.  
  472. Example output 
  473.  
  474. Testing LSRXUT.DLL access
  475. LoadLsRxutFuncs is complete.
  476. Version is  2.00.00
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 6. Using LSRXUT.DLL in Multiple Processes ΓòÉΓòÉΓòÉ
  480.  
  481. When using the 'DropLsRxutFuncs' function, other processes using the LSRXUT.DLL 
  482. are no more able to use the functions provided by LSRXUT.DLL before another set 
  483. of of the functions are executed: 
  484.  
  485. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  486. call LoadLsRxutFuncs
  487.  
  488. If you are experiencing strange results, please be sure that you are not using 
  489. the DropLsRxutFuncs function while other REXX cmd files are still being 
  490. executed. 
  491.  
  492. In multiple processing scenarios register the LSRXUT.DLL functions once. You 
  493. can even execute the loading of LSRXUT.DLL from any starting procedure on your 
  494. system, and then use the functions from any other REXX procedure file 
  495. afterwords. 
  496.  
  497. Use the 'RxFuncQuery()' to validate the presence of the LSRXUT.DLL funcions 
  498. once in the start of your procedures. If the function you intend to use is 
  499. absent, register all LSRXUT.DLL functions only once. 
  500.  
  501. For example: 
  502.  
  503. /* Part of REXX proecedure to Control a printer device */
  504. if RxFuncQuery('RxSplControlDevice') <> 0 then do
  505.  call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  506.  call LoadLsRxutFuncs
  507. end
  508.  
  509. In the above example we want to check whether the 'RxSplControlDevice()' 
  510. function is registered. If not, we register all LSRXUT.DLL functions by using 
  511. the two function calls in the 'if-then' block. 
  512.  
  513. We use the same technique in WatCom Visual REXX or VisPro/REXX to register the 
  514. LSRXUT.DLL functions only once if they are not present. We prefer never to use 
  515. the 'DropLsRxutFuncs' function. If you have memory constrants on the system you 
  516. are running, you can use the 'DropLsRxutFuncs' function to release memory. 
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ 7. The Base Functions ΓòÉΓòÉΓòÉ
  520.  
  521. The LSRXUT.DLL contains a set of work related functions that where written 
  522. during a redbook residency in Austin Texas. These functions are still included, 
  523. but avoid using them. They do for most cases not handle the presence of 
  524. multible domains correctly. The base functions are: 
  525.  
  526.  GetDCName()            Get the domain controller name 
  527.  
  528.  CopyDirAcls()          Copy directory access control profiles specified in the 
  529.                         source location to the destination location. The source 
  530.                         directory will be created if it does not exist. Local 
  531.                         support only 
  532.  
  533.  DumpAllUsers()         Dump information about all userids to a binary file 
  534.  
  535.  DumpUser()             Dump information about a specified userid to a binary 
  536.                         file 
  537.  
  538.  InsertAllUsers()       From a dump file re-establish all userid definitions. A 
  539.                         new password must be supplied for each userid 
  540.  
  541.  QueryDirAliasPath()    Query the path of a directory alias 
  542.  
  543.  MoveDirAlias()         Redefine a directory alias and specify a new directory 
  544.                         path 
  545.  
  546.  SetLogonAsn()          Set logon assignments for a userid 
  547.  
  548.  GetLogonAsn()          Get logon assignments for a userid 
  549.  
  550.  NetEnum()              Enumerate some of the LAN Server provided information 
  551.  
  552.  GetLogonAsnAcp()       Get logon assignments access control profiles 
  553.  
  554.  
  555. ΓòÉΓòÉΓòÉ 7.1. GetDCName() ΓòÉΓòÉΓòÉ
  556.  
  557. This function retrieves the Domain Controller Computer name. To function 
  558. correctly, the administrator must be logged on to one domain only and not have 
  559. any value specified in the othdomains = parameter in IBMLAN.INI. 
  560.  
  561. It is recommended to use the function  NetEnumerate(NETSERVER)  as a 
  562. replacement. 
  563.  
  564. Syntax 
  565.  
  566.  
  567. parse value GetDCName() with MyRc dcName
  568.  
  569. Parameters 
  570.  
  571. The parameters returned are: 
  572.  
  573.  MyRc              The return code from the operation 
  574.  
  575.  dcName            The Domain Controller Computer name 
  576.  
  577.  Note 
  578.  
  579.  The function is only capable of returning one computer name. 
  580.  
  581.  Example 
  582.  
  583.  
  584.   /* Get the DC computer name */
  585.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  586.   call LoadLsRxutFuncs
  587.  
  588.   parse value GetDCName() with MyRc dcName
  589.  
  590.   if MyRc <> '0' then do
  591.    say 'Could not obtain Domain Controller name'
  592.    exit 9
  593.   end
  594.  
  595.   if dcName = '' then do
  596.    say 'Could not obtain Domain Controller name'
  597.    exit 9
  598.   end
  599.  
  600.   say 'Domain Controller Name is :' dcName
  601.  
  602.   call DropLsRxutFuncs
  603.   call RxFuncDrop 'LoadLsRxutFuncs'
  604.  
  605.   exit 0
  606.  
  607.  Example Output 
  608.  
  609.  
  610.   Domain Controller Name is : \\ILIDC
  611.  
  612.  
  613. ΓòÉΓòÉΓòÉ 7.2. CopyDirAcls() ΓòÉΓòÉΓòÉ
  614.  
  615. This function copies Directory Access Control Profiles specified in the source 
  616. location to the destination location. 
  617.  
  618. The source directory will be created if it does not exist. 
  619.  
  620. Syntax 
  621.  
  622.  
  623. MyRc = CopyDirAcls(srcDir, destDir)
  624.  
  625. Parameters 
  626.  
  627. The parameters specified are: 
  628.  
  629.  srcDir            The path to the source directory, which must exist 
  630.  
  631.  destDir           The destination directory 
  632.  
  633.  Note 
  634.  
  635.  The function requires that the source directory path exists. 
  636.  
  637.  Example 
  638.  
  639.  
  640.   /* Copy ACLs from source to destination */
  641.  
  642.   parse arg srcDir destdir
  643.  
  644.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  645.   call LoadLsRxutFuncs
  646.  
  647.   say 'Source:' srcDir
  648.   say 'Destination:' destDir
  649.  
  650.   MyRc = CopyDirAcls( srcDir, destDir )
  651.   say 'Returncode from CopyDirAcls(srcDir, destDir):' MyRc
  652.  
  653.   call DropLsRxutFuncs
  654.   call RxFuncDrop 'LoadLsRxutFuncs'
  655.  
  656.   exit 0
  657.  
  658.  Example Output 
  659.  
  660.  
  661.   Source: D:\APPS\BOOKS
  662.   Destination: F:\APPS\BOOKS
  663.   Returncode from CopyDirAcls(srcDir, destDir): 0
  664.  
  665.  
  666. ΓòÉΓòÉΓòÉ 7.3. DumpAllUsers() ΓòÉΓòÉΓòÉ
  667.  
  668. This function copies all Userid definitions to a binary file. If the file is a 
  669. valid "userid binary file" (a file created by the functions provided in 
  670. LSRXUT.DLL), additional users can be appended to the file. 
  671.  
  672. Syntax 
  673.  
  674.  
  675. MyRc = DumpAllUsers(dcName, dumpFile)
  676.  
  677. Parameters 
  678.  
  679. The parameters specified are: 
  680.  
  681.  dcName            The computer name of the domain controller 
  682.  
  683.  dumpFile          The file name of the resulting binary file containing userid 
  684.                    definitions 
  685.  
  686.  Note 
  687.  
  688.  The function copies userid definitions only into a binary file. The resulting 
  689.  binary file is intended to be used together with the InserAllUsers() function. 
  690.  
  691.  Example 
  692.  
  693.  
  694.   /* Dump userid definitions to a binary file for safekeeping */
  695.  
  696.   parse upper arg dumpFile
  697.  
  698.   if dumpFile = '' then
  699.    dumpFile = 'C:\USERDEFS.BIN'
  700.  
  701.   dcName = '\\ILIDC'
  702.  
  703.   /* Get access to LSRXUT.DLL functions */
  704.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  705.   call LoadLsRxutFuncs
  706.  
  707.   McRc = DumpAllUsers(dcName, dumpFile)
  708.   say 'DumpAllUsers() returned:' MyRc
  709.  
  710.   call DropLsRxutFuncs
  711.   call RxFuncDrop 'LoadLsRxutFuncs'
  712.  
  713.   exit 0
  714.  
  715.  Example Output 
  716.  
  717.  
  718.   DumpAllUsers() returned:  0
  719.  
  720.  
  721. ΓòÉΓòÉΓòÉ 7.4. DumpUser() ΓòÉΓòÉΓòÉ
  722.  
  723. Dump a userid specified to a binary file. If the file is a valid "userid binary 
  724. file" (a file created by the functions provided in LSRXUT.DLL), additional 
  725. users can be appended to the file. 
  726.  
  727. This function copies a Userid definition to a binary file. The function is 
  728. similar to the function DumpAllUsers(). 
  729.  
  730. Syntax 
  731.  
  732.  
  733. MyRc = DumpUser(dcName, dumpFile, userId)
  734.  
  735. Parameters 
  736.  
  737. The parameters specified are: 
  738.  
  739.  dcName            The computer name of the domain controller 
  740.  
  741.  dumpFile          The file name of the resulting binary file containing userid 
  742.                    definitions 
  743.  
  744.  userId            The userid definition to dump into the binary file 
  745.  
  746.  Note 
  747.  
  748.  The function copies userid definitions only into a binary file. The resulting 
  749.  binary file is intended to be used together with the InserAllUsers() function. 
  750.  
  751.  Example 
  752.  
  753.  
  754.   /* Dump a userid definition to a binary file for safekeeping */
  755.  
  756.   parse upper arg dumpFile
  757.  
  758.   if dumpFile = '' then
  759.    dumpFile = 'C:\USERDEFS.BIN'
  760.  
  761.   dcName = '\\ILIDC'
  762.   userId = 'WS2221'
  763.  
  764.   /* Get access to LSRXUT.DLL functions */
  765.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  766.   call LoadLsRxutFuncs
  767.  
  768.   MyRc = DumpUser(dcName, dumpFile, userId)
  769.   say 'DumpUser() returned:' MyRc
  770.  
  771.   call DropLsRxutFuncs
  772.   call RxFuncDrop 'LoadLsRxutFuncs'
  773.  
  774.   exit 0
  775.  
  776.  Example Output 
  777.  
  778.  
  779.   DumpUser() returned:  0
  780.  
  781.  
  782. ΓòÉΓòÉΓòÉ 7.5. InsertAllUsers() ΓòÉΓòÉΓòÉ
  783.  
  784. From a binary userid dump file re-establish all userid definitions. A new 
  785. password must be supplied. 
  786.  
  787. If one or more additional server ids are included in the dump file, but 
  788. currently not defined, the resyncronisation of servers must be performed. 
  789.  
  790. The input binary userid dump file is created by the functions DumpAllUsers() or 
  791. DumpUser(). 
  792.  
  793. Syntax 
  794.  
  795.  
  796. MyRc = InsertAllUsers(dcName, dumpfile, logfile, newpassword)
  797.  
  798. Parameters 
  799.  
  800. The parameters specified are: 
  801.  
  802.  dcName            The computer name of the domain controller 
  803.  
  804.  dumpFile          The file name of the resulting binary file containing userid 
  805.                    definitions 
  806.  
  807.  logfile           A file containing log information 
  808.  
  809.  newpassword       A new password must be supplied. 
  810.  
  811.  Note 
  812.  
  813.  The function copies userid definitions from a binary file back to the domain. 
  814.  Use the log file created by this function to verify the success of the 
  815.  operation. 
  816.  
  817.  Example 
  818.  
  819.  
  820.   /* Insert userid defintions from a binary dump file */
  821.  
  822.   dcName   = '\\ILIDC'
  823.   dumpfile = 'C:\USERDEFS.BIN'
  824.   logfile  = 'C:\USERDEFS.LOG'
  825.   newpassword = 'NEWPW'
  826.  
  827.   /* Get access to LSRXUT.DLL functions */
  828.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  829.   call LoadLsRxutFuncs
  830.  
  831.   MyRc = InsertAllUsers(dcName, dumpfile, logfile, newpassword)
  832.   say 'InsertAllUsers() returned:' MyRc
  833.  
  834.   call DropLsRxutFuncs
  835.   call RxFuncDrop 'LoadLsRxutFuncs'
  836.  
  837.   exit 0
  838.  
  839.  Example Output 
  840.  
  841.  
  842.   InsertAllUsers() returned:'  0
  843.  
  844.  The log file contains for the insertion of the userids WS222B and WS222C. 
  845.  
  846.  
  847.   Userid WS222B successfully added.
  848.   Userid WS222C already exists. No modification performed.
  849.   End of binary userid dump file reached
  850.  
  851.  
  852. ΓòÉΓòÉΓòÉ 7.6. QueryDirAliasPath() ΓòÉΓòÉΓòÉ
  853.  
  854. This function returns the path of a directory alias. The function is a limited 
  855. subset of  NetGetInfo(NETALIAS)  which should be used instead. 
  856.  
  857. Syntax 
  858.  
  859.  
  860. parse value QueryDirAliasPath(dcName, aliasName) with MyRc aliasPath
  861.  
  862. Parameters 
  863.  
  864. The parameters specified are: 
  865.  
  866.  dcName            The computer name of the domain controller, which contains 
  867.                    the alias definitions 
  868.  
  869.  aliasName         The directory alias name 
  870.  
  871.  aliasPath         The directory path returned if MyRc return code is 0. 
  872.  
  873.  Note 
  874.  
  875.  The function works only on directory alias definitions and the server name 
  876.  specified must be the domain controller computer name. 
  877.  
  878.  Example 
  879.  
  880.  
  881.   /* Retrieve the directory path for a alias. */
  882.  
  883.   dcName   = '\\ILIDC'
  884.   aliasName = 'BOOKS'
  885.  
  886.   /* Get access to LSRXUT.DLL functions */
  887.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  888.   call LoadLsRxutFuncs
  889.  
  890.   parse value QueryDirAliasPath(dcName, aliasName) with MyRc aliasPath
  891.   if MyRc = 0 then do
  892.    say 'Alias' aliasName 'has the path'
  893.    say aliasPath
  894.   end
  895.   else do
  896.    say 'QueryDirAliasPath(dcName, aliasName) returned errorcode' MyRc
  897.   end
  898.  
  899.   call DropLsRxutFuncs
  900.   call RxFuncDrop 'LoadLsRxutFuncs'
  901.  
  902.   exit 0
  903.  
  904.  Example Output 
  905.  
  906.  
  907.   Alias  BOOKS  has the path
  908.   D:\APPS\BOOKS
  909.  
  910.  
  911. ΓòÉΓòÉΓòÉ 7.7. MoveDirAlias() ΓòÉΓòÉΓòÉ
  912.  
  913. This function changes the directory definition of a directory alias. It does 
  914. not move files and access control profiles. 
  915.  
  916. Syntax 
  917.  
  918.  
  919. MyRc = MoveDirAlias(dcName, aliasName, serverName, newAliasDir)
  920.  
  921. Parameters 
  922.  
  923. The parameters specified are: 
  924.  
  925.  dcName            The computer name of the domain controller, which contains 
  926.                    the alias definition 
  927.  
  928.  aliasName         The directory alias name 
  929.  
  930.  serverName        The server name on which the new directory is located 
  931.  
  932.  netAliasDir       The new alias directory path 
  933.  
  934.  Note 
  935.  
  936.  The function works only on directory alias definitions. The new directory must 
  937.  exist. 
  938.  
  939.  Example 
  940.  
  941.  
  942.   /* Change the directory path for an alias. */
  943.  
  944.   dcName      = '\\ILIDC'
  945.   aliasName   = 'ALLFILES'
  946.   serverName  = '\\ILIDC'
  947.   newAliasDir = 'D:\SHARED\FILES'
  948.  
  949.   /* Get access to LSRXUT.DLL functions */
  950.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  951.   call LoadLsRxutFuncs
  952.  
  953.   MyRc = MoveDirAlias(dcName, aliasName, serverName, newAliasDir)
  954.   if MyRc \= 0 then do
  955.    say 'MoveDirAlias returned with error code' MyRc
  956.   end
  957.   else do
  958.    say 'Changed alias directory definition successfully'
  959.   end
  960.  
  961.   call DropLsRxutFuncs
  962.   call RxFuncDrop 'LoadLsRxutFuncs'
  963.  
  964.   exit 0
  965.  
  966.  Example Output 
  967.  
  968.  
  969.   Changed alias directory definition successfully
  970.  
  971.  
  972. ΓòÉΓòÉΓòÉ 7.8. SetLogonAsn() ΓòÉΓòÉΓòÉ
  973.  
  974. This function sets logon assignment for a userid. 
  975.  
  976. To function correctly, the administrator must be logged on to one domain only 
  977. and not have any value specified in the othdomains = parameter in IBMLAN.INI. 
  978.  
  979. It is recommended to use the functions described in  NetAdd(NETAPPSEL)  and 
  980. NetAdd(NETLOGONASN)  as a replacement. 
  981.  
  982. Syntax 
  983.  
  984.  
  985. MyRc = SetLogonAsn(userid, asnType, device, alias)
  986.  
  987. Parameters 
  988.  
  989. The parameters specified are: 
  990.  
  991.  userid            The userid 
  992.  
  993.  asnType           The assignment type. The accepted values are: 
  994.  
  995.                                       asnType What
  996.                                       ------- ----
  997.                                        'A='   Public application assignment
  998.                                        'D='   Device assignment, such as G:, COM5, LPT3 or none
  999.  
  1000.                    For a device assignment type a parameter value of '' can be 
  1001.                    specified 
  1002.  
  1003.  device            The device specification. This value can either be a drive, 
  1004.                    a com port or a printer port. An empty value can also be 
  1005.                    specified. 
  1006.  
  1007.                    This parameter value is ignored for Public application 
  1008.                    assignments 
  1009.  
  1010.  alias             The alias name for devices otherwise the name of the public 
  1011.                    application 
  1012.  
  1013.  Note 
  1014.  
  1015.  The function works only on a single domain. The function will fail if the 
  1016.  administrator has a value specified in the othdomains = parameter in 
  1017.  IBMLAN.INI or logged on to another domain. 
  1018.  
  1019.  Example 
  1020.  
  1021.  
  1022.   /* Add device and application logon assignments */
  1023.  
  1024.   userid      = 'WS222B'
  1025.   device      = 'X:'
  1026.   alias       = 'ALLFILES'
  1027.  
  1028.   /* Get access to LSRXUT.DLL functions */
  1029.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1030.   call LoadLsRxutFuncs
  1031.  
  1032.   MyRc = SetLogonAsn(userid, 'D=', device, alias)
  1033.   if MyRc <> '0' then do
  1034.    say 'SetLogonAsn() returned ' MyRc
  1035.   end
  1036.   else do
  1037.    say 'Successfully performed Logon Assignment'
  1038.   end
  1039.  
  1040.   applName = 'BOOKMST'
  1041.  
  1042.   MyRc = SetLogonAsn(userid, 'A=', '', applname)
  1043.   if MyRc <> '0' then do
  1044.    say 'SetLogonAsn() returned ' MyRc
  1045.   end
  1046.   else do
  1047.    say 'Successfully performed Public Application Assignment'
  1048.   end
  1049.  
  1050.   call DropLsRxutFuncs
  1051.   call RxFuncDrop 'LoadLsRxutFuncs'
  1052.  
  1053.   exit 0
  1054.  
  1055.  Example Output 
  1056.  
  1057.  
  1058.   Successfully performed Logon Assignment
  1059.   Successfully performed Public Application Assignment
  1060.  
  1061.  
  1062. ΓòÉΓòÉΓòÉ 7.9. GetLogonAsn() ΓòÉΓòÉΓòÉ
  1063.  
  1064. This function returns the logon assignments for a userid. 
  1065.  
  1066. To function correctly, the administrator must be logged on one domain only and 
  1067. not have any value specified in the othdomains = parameter in IBMLAN.INI. 
  1068.  
  1069. It is recommended to use the functions described in  NetGetInfo(NETAPPSEL)  and 
  1070. NetGetInfo(NETLOGONASN)  as a replacement. 
  1071.  
  1072. Syntax 
  1073.  
  1074.  
  1075. MyRc = GetLogonAsn(userid, 'asnList')
  1076.  
  1077. Parameters 
  1078.  
  1079. The parameters specified and returned are: 
  1080.  
  1081.  userid            The userid 
  1082.  
  1083.  asnList.0         The number of logon assignment found. It has a value of 
  1084.                    '-none-' if no assignments are found 
  1085.  
  1086.  asnList.i         The returned assignment list. i has a value from 1 to 
  1087.                    asnList.0 The returned values are divided into two classes. 
  1088.                    For a device: 
  1089.  
  1090.                                       type  device  alias
  1091.  
  1092.                                       For example:
  1093.  
  1094.                                       D= X: ALLFILES
  1095.  
  1096.                    For an public application the following values are returned: 
  1097.  
  1098.                                       type applicationName
  1099.  
  1100.                                       For example:
  1101.  
  1102.                                       A= BOOKMST
  1103.  
  1104.  Note 
  1105.  
  1106.  The function works only on a single domain. The function will fail if the 
  1107.  administrator has a value specified in the othdomains = parameter in 
  1108.  IBMLAN.INI. 
  1109.  
  1110.  Example 
  1111.  
  1112.  
  1113.   /* List device and application assignment for a userid */
  1114.  
  1115.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1116.   call LoadLsRxutFuncs
  1117.  
  1118.   userId = 'WS222B'
  1119.  
  1120.   MyRc = GetLogonAsn(userId, 'asnList')
  1121.  
  1122.   if MyRc = '0' then do
  1123.    say 'userid=' userId
  1124.    if asnList <> '-none-' then do
  1125.     do i=1 to asnList.0
  1126.      say asnList.i
  1127.     end
  1128.    end
  1129.   end
  1130.  
  1131.   call DropLsRxutFuncs
  1132.   call RxFuncDrop 'LoadLsRxutFuncs'
  1133.  
  1134.   exit 0
  1135.  
  1136.  Example Output 
  1137.  
  1138.  
  1139.   A= BOOKMST
  1140.   D=            X  ALLFILES
  1141.  
  1142.  
  1143. ΓòÉΓòÉΓòÉ 7.10. NetEnum() ΓòÉΓòÉΓòÉ
  1144.  
  1145. The functions provided are replaced with the NetEnumerate() function. 
  1146.  
  1147.  
  1148. ΓòÉΓòÉΓòÉ 7.11. GetLogonAsnAcp() ΓòÉΓòÉΓòÉ
  1149.  
  1150. This function returns the logon assignment access control profiles. 
  1151.  
  1152. To function correctly, the administrator must be logged on one domain only and 
  1153. not have any value specified in the othdomains = parameter in IBMLAN.INI. 
  1154.  
  1155. Syntax 
  1156.  
  1157.  
  1158. MyRc = GetLogonAsnAcp(userid, asnType, acpList)
  1159.  
  1160. Parameters 
  1161.  
  1162. The parameters specified and returned are: 
  1163.  
  1164.  userid            The userid 
  1165.  
  1166.  asnType           The logon assignment type. Use: 
  1167.  
  1168.                                       'D='  for device type logon assignment
  1169.                                       'A='  for public application type assignment
  1170.                                       'ALL' for both device and public application type assignments
  1171.  
  1172.  acpList.0         The number of logon assignments found. It has a value of 
  1173.                    '-none-' if no assignments are found 
  1174.  
  1175.  acpList.i         The returned assignment list. i has a value from 1 to 
  1176.                    acpList.0 The returned values are divided into: 
  1177.  
  1178.                                       type  name  access
  1179.  
  1180.                                       For example:
  1181.  
  1182.                                       D= ALLDILES  RWC
  1183.  
  1184.                    See for example  NetGetInfo(NETACCESS)  for more information 
  1185.                    about the access values. 
  1186.  
  1187.                    The returned values contains a list of all referenced alias 
  1188.                    used by an public application. Multiple entries for one 
  1189.                    public application may therefore occur. 
  1190.  
  1191.  Note 
  1192.  
  1193.  The function works only on a single domain. The function will fail if the 
  1194.  administrator has a value specified in the othdomains = parameter in 
  1195.  IBMLAN.INI. 
  1196.  
  1197.  Example 
  1198.  
  1199.  
  1200.   /* List device and application assignment ACP a userid */
  1201.  
  1202.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1203.   call LoadLsRxutFuncs
  1204.  
  1205.   userId = 'WS222B'
  1206.  
  1207.   MyRc = GetLogonAsnAcp(userId, 'ALL', acpList)
  1208.  
  1209.   if MyRc = '0' then do
  1210.    say 'userid=' userId
  1211.    if acpList <> '-none-' then do
  1212.     do i=1 to acpList.0
  1213.      say acpList.i
  1214.     end
  1215.    end
  1216.   end
  1217.   else do
  1218.    say 'GetLogonAsnAcp() failed with return code' MyRc
  1219.   end
  1220.  
  1221.   call DropLsRxutFuncs
  1222.   call RxFuncDrop 'LoadLsRxutFuncs'
  1223.  
  1224.   exit 0
  1225.  
  1226.  Example Output 
  1227.  
  1228.  
  1229.   userid= WS222B
  1230.   A=        BOOKS             RWCXD
  1231.   A=      BOOKMST No working directory specified
  1232.   D=     ALLFILES                RX
  1233.  
  1234.  
  1235. ΓòÉΓòÉΓòÉ 8. Handling Error Codes ΓòÉΓòÉΓòÉ
  1236.  
  1237. The REXX procedures using the IBM LAN Server utility DLL do return error codes 
  1238. from time to time. The return codes are either documented in the IBM OS/2 
  1239. Programming Tools and Information (Toolkit) or the IBM LAN Server Application 
  1240. Programming Interface documentation. Another and very good way to understand 
  1241. the meaning of the return codes, is the OS/2 help facility. If you for example 
  1242. have a return code 3, what does is say? 
  1243.  
  1244. Try for example the following: 
  1245.  
  1246. HELP NET0003 does not exist
  1247.  
  1248. but 
  1249.  
  1250. HELP SYS0003 does
  1251.  
  1252. Another example. If you have the return code 2138, then information retrieved 
  1253. from the OS/2 help facility is: 
  1254.  
  1255.  
  1256. HELP NET2138 requester not started
  1257.  
  1258. HELP SYS2138 requester not started
  1259.  
  1260.  
  1261. ΓòÉΓòÉΓòÉ 9. NetAdd ΓòÉΓòÉΓòÉ
  1262.  
  1263. The Net Add functions are a family of functions that can be called with a 
  1264. number of parameters. The NetAdd function has minimum two different parameters. 
  1265. The generic syntax is: 
  1266.  
  1267.  
  1268. MyRc = NetAdd(option, 'stemvar', parm1, parm2, parm3)
  1269. MyRc = NetAdd(option, parm1, parm2, parm3)
  1270.  
  1271. The option parameter contains a value to determine what type or option has to 
  1272. be added. An example would be the addition of a user account. 
  1273.  
  1274. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  1275.  
  1276. The MyRc parameter is the return code that will have an value from the NetAdd() 
  1277. function. If the call is successful the character '0' will be returned. 
  1278. Otherwise an error code and descriptive text are inserted by the NetAdd() 
  1279. function. 
  1280.  
  1281. The option parameter values are defined in Option parameter values. 
  1282.  
  1283.  
  1284. ΓòÉΓòÉΓòÉ 9.1. NETACCESS Add ΓòÉΓòÉΓòÉ
  1285.  
  1286. The function creates the auditing entry for a resource and adds 0 or more 
  1287. entries in the access control list for a resource. 
  1288.  
  1289. Syntax 
  1290.  
  1291.  
  1292. MyRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
  1293.  
  1294. Parameters 
  1295.  
  1296. The parameters required are: 
  1297.  
  1298.  'Access'  The REXX variable holding the values. The variable is divided into: 
  1299.  
  1300.                Access.count 
  1301.  
  1302.                 The number of access controls available for the resource. The 
  1303.                 value can be 0 or undefined. In this case access control 
  1304.                 profiles are not created 
  1305.  
  1306.                Access.audit 
  1307.  
  1308.                 The auditing flags. If the variable is undefined a default 
  1309.                 value of No auditing is used. The flags are defined as: 
  1310.  
  1311.                   -  A  Audit all. When this bit is set, all access attempts 
  1312.                      will be audited 
  1313.  
  1314.                   -  O  If O, audit successful file opens 
  1315.  
  1316.                   -  W  If W, audit successful file writes and successful 
  1317.                      directory creates 
  1318.  
  1319.                   -  D  If D, audit successful file deletes or truncates and 
  1320.                      successful directory deletes 
  1321.  
  1322.                   -  P  If P, audit successful file and directory access 
  1323.                      control profile change 
  1324.  
  1325.                   -  o  If o, audit failed file opens 
  1326.  
  1327.                   -  w  If w, audit failed file writes and failed directory 
  1328.                      creates 
  1329.  
  1330.                   -  d  If d, audit failed file deletes or truncates and failed 
  1331.                      directory deletes 
  1332.  
  1333.                   -  p  If d, audit failed file and directory access control 
  1334.                      profile change 
  1335.  
  1336.                   -  N or -none-  No auditing is performed 
  1337.  
  1338.                Access.i.ugname 
  1339.  
  1340.                 The user account or group name. i is a value from 1 to 
  1341.                 Access.count 
  1342.  
  1343.                 Use the group name USERS to create an access control profile 
  1344.                 for all users 
  1345.  
  1346.                Access.i.access 
  1347.  
  1348.                 The access profile. i is specified as above. The access control 
  1349.                 flags are as follows: 
  1350.  
  1351.                   -  N None 
  1352.  
  1353.                   -  R Read 
  1354.  
  1355.                   -  A Attribute 
  1356.  
  1357.                   -  W Write 
  1358.  
  1359.                   -  C Create 
  1360.  
  1361.                   -  X Execute 
  1362.  
  1363.                   -  D Delete 
  1364.  
  1365.                   -  P Permissions 
  1366.  
  1367.                   -  G This is a Group permission. The G parameter is not 
  1368.                      required to be specified 
  1369.  
  1370.  SrvName   The server computer name 
  1371.  
  1372.  resourceName The resource name must be specified in the name format as 
  1373.            described below: 
  1374.  
  1375.                       Resource Type                 Name Format
  1376.                       -------------                 -----------
  1377.                       Drive                         drive:
  1378.                       Path                          \path
  1379.                       Directory                     drive:pathname
  1380.                       File                          drive:pathname
  1381.                       UNC                           \\server\sharename\path
  1382.                       Pipe                          \pipe\pipename
  1383.                       Spooler Queue                 \print\queuename
  1384.                       Serial Device Queue           \comm\chardevqueue
  1385.  
  1386.  Note 
  1387.  
  1388.  The server computer name can be specified as '' for a local server. 
  1389.  
  1390.  Example 
  1391.  
  1392.  
  1393.   /* Create a access control profile for a resource */
  1394.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1395.   call LoadLsRxutFuncs
  1396.  
  1397.   NETACCESS = 10
  1398.   SrvName = '\\ILIDC'
  1399.   resourceName = 'D:\APPS\TEMP'
  1400.   Access.audit = 'A'
  1401.   Access.count = 2
  1402.   Access.1.ugname = 'CSUSERS'
  1403.   Access.1.access = 'RX'
  1404.   Access.2.ugname = 'FMAM'
  1405.   Access.2.access = 'RWCXDP'
  1406.  
  1407.   myRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
  1408.  
  1409.   if myRc <> '0' then do
  1410.    say 'Got error from NetAdd() ' myRc
  1411.    call DropLsRxutFuncs
  1412.    exit 9
  1413.   end
  1414.   else do
  1415.    say
  1416.    say 'Access Control Profile created successfully'
  1417.   end
  1418.  
  1419.   call DropLsRxutFuncs
  1420.   call RxFuncDrop 'LoadLsRxutFuncs'
  1421.  
  1422.   exit 0
  1423.  
  1424.  Example Output 
  1425.  
  1426.  
  1427.   Access Control Profile created successfully
  1428.  
  1429.  
  1430. ΓòÉΓòÉΓòÉ 9.2. NETACCESSADD ΓòÉΓòÉΓòÉ
  1431.  
  1432. The function adds one or more access control profiles to a existing access 
  1433. control list for a resource. 
  1434.  
  1435. Syntax 
  1436.  
  1437.  
  1438. MyRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
  1439.  
  1440. Parameters 
  1441.  
  1442. The parameters required are: 
  1443.  
  1444.  'AddtoACL'  The REXX variable holding the values. The variable is divided 
  1445.              into: 
  1446.  
  1447.                  AddtoACL.count 
  1448.  
  1449.                   The number of access controls available for the resource. The 
  1450.                   value can be 0 or undefined. In this case access control 
  1451.                   profiles are not created 
  1452.  
  1453.                  AddtoACL.i.ugname 
  1454.  
  1455.                   The user account or group name. The variable i has a value 
  1456.                   from 1 to AddtoACL.count 
  1457.  
  1458.                  AddtoACL.i.access 
  1459.  
  1460.                   The access profile. The variable i is specified as above. The 
  1461.                   access control flags are as follows: 
  1462.  
  1463.                     -  N None 
  1464.  
  1465.                     -  A Attribute 
  1466.  
  1467.                     -  R Read 
  1468.  
  1469.                     -  W Write 
  1470.  
  1471.                     -  C Create 
  1472.  
  1473.                     -  X Execute 
  1474.  
  1475.                     -  D Delete 
  1476.  
  1477.                     -  P Permissions 
  1478.  
  1479.                     -  G This is a Group permission. The G parameter is not 
  1480.                        required to be specified 
  1481.  
  1482.  SrvName     The server computer name 
  1483.  
  1484.  resourceName The resource name must be specified in the name format as 
  1485.              described below: 
  1486.  
  1487.                           Resource Type                 Name Format
  1488.                           -------------                 -----------
  1489.                           Drive                         drive:
  1490.                           Path                          \path
  1491.                           Directory                     drive:pathname
  1492.                           File                          drive:pathname
  1493.                           UNC                           \\server\sharename\path
  1494.                           Pipe                          \pipe\pipename
  1495.                           Spooler Queue                 \print\queuename
  1496.                           Serial Device Queue           \comm\chardevqueue
  1497.  
  1498.  Note 
  1499.  
  1500.  The server computer name can be specified as '' for a local server. 
  1501.  
  1502.  Example 
  1503.  
  1504.  
  1505.   /* Add another Access Control Entry to existing Access Profile List */
  1506.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1507.   call LoadLsRxutFuncs
  1508.  
  1509.   NETACCESSADD = 250
  1510.   SrvName = '\\ILIDC'
  1511.   resourceName = 'D:\APPS\TEMP'
  1512.   AddtoACL.count = 1
  1513.   AddtoACL.1.ugname = 'CSUSERS'
  1514.   AddtoACL.1.access = 'RWC'
  1515.  
  1516.   myRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
  1517.  
  1518.   if myRc <> '0' then do
  1519.    say 'Got error from NetAdd() ' myRc
  1520.    call DropLsRxutFuncs
  1521.    exit 9
  1522.   end
  1523.   else do
  1524.    say
  1525.    say "Additional Access Control Profile added successfully"
  1526.   end
  1527.  
  1528.   call DropLsRxutFuncs
  1529.   call RxFuncDrop 'LoadLsRxutFuncs'
  1530.  
  1531.   exit 0
  1532.  
  1533.  Example Output 
  1534.  
  1535.  
  1536.   Additional Access Control Profile added successfully
  1537.  
  1538.  
  1539. ΓòÉΓòÉΓòÉ 9.3. NETALIAS Add ΓòÉΓòÉΓòÉ
  1540.  
  1541. The function creates an alias definition for a resource. 
  1542.  
  1543. Syntax 
  1544.  
  1545.  
  1546. MyRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
  1547.  
  1548. Parameters 
  1549.  
  1550. The parameters required are: 
  1551.  
  1552.  'AliasInfo'  The REXX variable holding the alias information values. The 
  1553.               variable is divided into: 
  1554.  
  1555.                   AliasInfo.name 
  1556.  
  1557.                    The alias name 
  1558.  
  1559.                   AliasInfo.remark 
  1560.  
  1561.                    The alias remark 
  1562.  
  1563.                   AliasInfo.server 
  1564.  
  1565.                    The computer name of the server where the resource described 
  1566.                    by this alias resides. The server computer name can be 
  1567.                    different from the SrvName parameter 
  1568.  
  1569.                   AliasInfo.netname 
  1570.  
  1571.                    The alias name for files aliases, and the queue name for 
  1572.                    printer and serial device aliases. This value is not used by 
  1573.                    the NetAdd() function 
  1574.  
  1575.                   AliasInfo.location 
  1576.  
  1577.                    The alias location. The following values are valid: 
  1578.  
  1579.                                       Location                      Location value
  1580.                                       --------                      --------------
  1581.                                       Within the domain             'Within Domain'
  1582.                                                                     'INTERNAL'
  1583.  
  1584.                                       External, for DOS             'External, for DOS'
  1585.                                                                     'EXTERNAL_DOS'
  1586.  
  1587.                                       External, for OS/2            'External, for OS/2'
  1588.                                                                     'EXTERNAL_OS2'
  1589.  
  1590.                                       External, for DOS and OS/2    'External, for DOS and OS/2'
  1591.                                                                     'EXTERNAL_BOTH'
  1592.  
  1593.                    The default value is 'Within Domain' 
  1594.  
  1595.                   AliasInfo.mode 
  1596.  
  1597.                    When the alias is shared. The following values are valid: 
  1598.  
  1599.                                       Sharing mode                  Mode value
  1600.                                       ------------                  ----------
  1601.                                       At server startup             'At server startup'
  1602.                                                                     'STARTUP'
  1603.  
  1604.                                       By administrator              'By administrator'
  1605.                                                                     'BYADMIN'
  1606.  
  1607.                                       At Requester use              'At Requester use'
  1608.                                                                     'DYNAMIC'
  1609.  
  1610.                    The default value is 'At Requester use' 
  1611.  
  1612.                   AliasInfo.maxuses 
  1613.  
  1614.                    The maximum number of users who can have redirection to the 
  1615.                    resource identified by this alias. The default value is 
  1616.                    65535 
  1617.  
  1618.                   AliasInfo.type 
  1619.  
  1620.                    The alias type. The following values are valid: 
  1621.  
  1622.                                       Type                          Type value
  1623.                                       ----                          ----------
  1624.                                       Files alias                   'Files'
  1625.  
  1626.                                       Printer alias                 'Printer'
  1627.  
  1628.                                       Serial alias                  'Serial'
  1629.  
  1630.                   AliasInfo.queue 
  1631.  
  1632.                    The queue name for serial or printer alias only 
  1633.  
  1634.                   AliasInfo.path 
  1635.  
  1636.                    The path for files alias only 
  1637.  
  1638.                   AliasInfo.priority 
  1639.  
  1640.                    The serial device priority. The value can be from 1 to 9. 1 
  1641.                    is the highest priority. The value of 9 will be used as 
  1642.                    default if no value is specified 
  1643.  
  1644.                   AliasInfo.device_pool 
  1645.  
  1646.                    The serial device pool. LPT1 to LPT9 and COM1 to COM9 can be 
  1647.                    used. If specified the entries are separated by a space. For 
  1648.                    example 'COM1 COM4' 
  1649.  
  1650.  SrvName      The server computer name of the domain controller 
  1651.  
  1652.  Note 
  1653.  
  1654.  The server computer name can be specified as '' for a local domain controller. 
  1655.  
  1656.  Example 
  1657.  
  1658.  
  1659.   /* Add a alias */
  1660.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1661.   call LoadLsRxutFuncs
  1662.  
  1663.   NETALIAS           = 20
  1664.   SrvName            = '\\ILIDC'
  1665.   AliasInfo.name     = 'THEBOOK'
  1666.   AliasInfo.remark   = 'Temporary alias'
  1667.   AliasInfo.server   = '\\ILIDC'
  1668.   AliasInfo.location = 'Within Domain'
  1669.   AliasInfo.mode     = 'At Requester use'
  1670.   AliasInfo.type     = 'Files'
  1671.   AliasInfo.path     = 'D:\APPS\TEMP'
  1672.  
  1673.   myRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
  1674.  
  1675.   if myRc <> '0' then do
  1676.    say 'Got error from NetAdd() ' myRc
  1677.    call DropLsRxutFuncs
  1678.    exit 9
  1679.   end
  1680.   else do
  1681.    say 'Alias added successfully'
  1682.    say
  1683.   end
  1684.  
  1685.   call DropLsRxutFuncs
  1686.   call RxFuncDrop 'LoadLsRxutFuncs'
  1687.  
  1688.   exit 0
  1689.  
  1690.  Example Output 
  1691.  
  1692.  
  1693.   Alias added successfully
  1694.  
  1695.  
  1696. ΓòÉΓòÉΓòÉ 9.4. NETAPP Add ΓòÉΓòÉΓòÉ
  1697.  
  1698. The function creates a public or private application. 
  1699.  
  1700. Syntax 
  1701.  
  1702.  
  1703. MyRc = NetAdd(NETAPP, 'AppInfo', SrvName)
  1704. MyRc = NetAdd(NETAPP, 'AppInfo', SrvName, UserId)
  1705.  
  1706. Parameters 
  1707.  
  1708. The parameters required are: 
  1709.  
  1710.  'AppInfo'  The REXX variable holding the application information. The variable 
  1711.             is divided into: 
  1712.  
  1713.                 AppInfo.name 
  1714.  
  1715.                  The application name 
  1716.  
  1717.                 AppInfo.remark 
  1718.  
  1719.                  The application remark or description. A remark must be 
  1720.                  provided 
  1721.  
  1722.                 AppInfo.command 
  1723.  
  1724.                  The command that starts the application 
  1725.  
  1726.                 AppInfo.command_parms 
  1727.  
  1728.                  The application start parameters if required 
  1729.  
  1730.                 AppInfo.app_alias_or_drv 
  1731.  
  1732.                  The alias or drive where the application resides. It specifies 
  1733.                  a drive letter, followed by a colon (:), if the application 
  1734.                  resides on the user's local machine or it specifies an 
  1735.                  existing alias if the application resides on a server 
  1736.  
  1737.                 AppInfo.app_drive 
  1738.  
  1739.                  Applies to DOS public applications only. It is used to specify 
  1740.                  the drive that is current when the application runs. Valid 
  1741.                  letters are A through X. A value of * indicates that the 
  1742.                  system should choose a drive letter 
  1743.  
  1744.                 AppInfo.app_path_to_dir 
  1745.  
  1746.                  The remaining path to the application 
  1747.  
  1748.                 AppInfo.wrkdir_alias_or_drv 
  1749.  
  1750.                  Specifies the directory that is made current when the 
  1751.                  application runs. If the working directory is on the local 
  1752.                  machine, it specifies the drive, where the directory is 
  1753.                  located. If the working directory is remote, it specifies an 
  1754.                  existing alias where the directory is located 
  1755.  
  1756.                 AppInfo.wrkdir_drive 
  1757.  
  1758.                  Specifies the drive that the working directory is to be 
  1759.                  assigned to when the application is started. For OS/2 
  1760.                  applications, this can be any letter D through Z. For DOS 
  1761.                  applications, this can be any letter A through X. A value of * 
  1762.                  indicates that the system should choose a drive when the 
  1763.                  application is started. 
  1764.  
  1765.                 AppInfo.wrkdir_path_to_dir 
  1766.  
  1767.                  The remaining path to the working directory 
  1768.  
  1769.                 AppInfo.prompt 
  1770.  
  1771.                  Prompt for parameters. The following values can be used: 
  1772.  
  1773.                                   Prompt for parameters            Value
  1774.                                   ---------------------            -----
  1775.                                   Yes                              'Prompt user for parameters'
  1776.                                                                    'Yes'
  1777.  
  1778.                                   No                               'Do not prompt user for parameters'
  1779.                                                                    'No'
  1780.  
  1781.                  The default value is 'No'. 
  1782.  
  1783.                 AppInfo.interface 
  1784.  
  1785.                  The interface type. The values can be: 
  1786.  
  1787.                                   Interface type                   Value
  1788.                                   --------------                   -----
  1789.                                   Presentation Manager             'Presentation Manager'
  1790.                                                                    'PM'
  1791.  
  1792.                                   OS/2 Fullscreen                  'Fullscreen'
  1793.                                                                    'FS'
  1794.  
  1795.                                   OS/2 Windowed                    'Windowed'
  1796.                                                                    'WIN'
  1797.  
  1798.                  The default value is 'Presentation Manager'. 
  1799.  
  1800.                 AppInfo.type 
  1801.  
  1802.                  The application type. The following values are used: 
  1803.  
  1804.                                   Application type                 Value
  1805.                                   ----------------                 -----
  1806.                                   Public DOS                       'Public DOS application'
  1807.                                                                    'PUBLIC_DOS'
  1808.  
  1809.                                   Public OS/2                      'Public OS/2 application'
  1810.                                                                    'PUBLIC_OS2'
  1811.  
  1812.                                   Private OS/2                     'Private OS/2 application'
  1813.                                                                    'PRIVATE_OS2'
  1814.  
  1815.                  The default value is 'Public OS/2 application'. 
  1816.  
  1817.                 AppInfo.res_count 
  1818.  
  1819.                  The number of application resource list entries that follows. 
  1820.                  A value of zero indicates that the application does not 
  1821.                  require any redirected devices when it runs. 
  1822.  
  1823.                 AppInfo.i.arl_alias 
  1824.  
  1825.                  The alias for the resource required by the application. The 
  1826.                  variable i must have a value from 1 to AppInfo.res_count 
  1827.  
  1828.                 AppInfo.i.arl_device 
  1829.  
  1830.                  The device assigned to the resource specified. 
  1831.  
  1832.                  If AppInfo.i.arl_alias specifies a files alias, 
  1833.                  AppInfo.i.arl_device must be a drive letter followed by a 
  1834.                  colon (:). Valid drive letters for OS/2 applications are D: 
  1835.                  through Z:. Valid drive letters for DOS applications are A: 
  1836.                  through X:. 
  1837.  
  1838.                  If AppInfo.i.arl_alias specifies a print alias, valid values 
  1839.                  are LPT1 through LPT9. 
  1840.  
  1841.                  If AppInfo.i.arl_alias specifies a serial device alias, valid 
  1842.                  values for AppInfo.i.arl_device are LPT1 through LPT9 and COM1 
  1843.                  through COM9. 
  1844.  
  1845.                  Additionally, each application resource list entry must have a 
  1846.                  unique value for its AppInfo.i.arl_device field. For example, 
  1847.                  if AppInfo.i.arl_alias specifies a files alias, the drive 
  1848.                  letter specified in the AppInfo.i.arl_device field must be 
  1849.                  different from AppInfo.app_drive, AppInfo.wrkdir_drive, and 
  1850.                  any other AppInfo.i.arl_device fields for files aliases. 
  1851.  
  1852.                  The variable i must have a value from 1 to AppInfo.res_count 
  1853.  
  1854.  SrvName    The server computer name of the domain controller 
  1855.  
  1856.  Application The application name 
  1857.  
  1858.  UserId     The name of the userid. The name of the userid must be specified 
  1859.             for private applications 
  1860.  
  1861.  Note 
  1862.  
  1863.  The server computer name can be specified as '' for a local domain controller. 
  1864.  
  1865.  Example 
  1866.  
  1867.  
  1868.   /* Add a public application */
  1869.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1870.   call LoadLsRxutFuncs
  1871.  
  1872.   NETAPP  = 30
  1873.   SrvName = '\\ILIDC'
  1874.  
  1875.   AppInfo.name                = 'BOOKREAD'
  1876.   AppInfo.remark              = 'Shared Bookmanager Read/2'
  1877.   AppInfo.command             = 'BOOKMGR.EXE'
  1878.   AppInfo.command_parms       = ''
  1879.   AppInfo.app_alias_or_drv    = 'BOOKMGR' /* Bookmanager programs alias */
  1880.                                           /* AppInfo.app_drive not used */
  1881.   AppInfo.app_path_to_dir     = '\'
  1882.   AppInfo.wrkdir_alias_or_drv = 'BOOKMGR'
  1883.   AppInfo.wrkdir_drive        = 'R'       /* Make R: the working dir    */
  1884.   AppInfo.wrkdir_path_to_dir  = '\'       /* Remaining path             */
  1885.   AppInfo.prompt              = 'Do not prompt user for parameters'
  1886.   AppInfo.interface           = 'Presentation Manager'
  1887.   AppInfo.type                = 'Public OS/2 application'
  1888.  
  1889.   /* The additional resources */
  1890.   AppInfo.res_count    = 3
  1891.   AppInfo.1.arl_alias  = 'SHAREDLL'
  1892.   AppInfo.1.arl_device = 'Y:'
  1893.   AppInfo.2.arl_alias  = 'THEBOOK'
  1894.   AppInfo.2.arl_device = 'Q:'
  1895.   AppInfo.3.arl_alias  = 'PRINTIT'
  1896.   AppInfo.3.arl_device = 'LPT4'
  1897.  
  1898.   myRc = NetAdd(NETAPP, 'AppInfo', SrvName)
  1899.  
  1900.   if myRc <> '0' then do
  1901.    say 'Got error from NetAdd() ' myRc
  1902.    call DropLsRxutFuncs
  1903.    exit 9
  1904.   end
  1905.   else do
  1906.    say 'Application added successfully'
  1907.    say
  1908.   end
  1909.  
  1910.   call DropLsRxutFuncs
  1911.   call RxFuncDrop 'LoadLsRxutFuncs'
  1912.  
  1913.   exit 0
  1914.  
  1915.  Example Output 
  1916.  
  1917.  
  1918.   Application added successfully
  1919.  
  1920.  
  1921. ΓòÉΓòÉΓòÉ 9.5. NETAPPSEL Add ΓòÉΓòÉΓòÉ
  1922.  
  1923. The function adds an application to the specified userid application list. 
  1924.  
  1925. Syntax 
  1926.  
  1927.  
  1928. MyRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
  1929.  
  1930. Parameters 
  1931.  
  1932. The parameters required are: 
  1933.  
  1934.  DcName           The Domain Controller computer name 
  1935.  
  1936.  ApplicationName  The name of the application 
  1937.  
  1938.  UserId           The userid 
  1939.  
  1940.  AppType          Application type. The following application types are 
  1941.                   supported: 
  1942.  
  1943.                                     Application type             Value
  1944.                                     ----------------             -----
  1945.                                     Public DOS application       'Public DOS application'
  1946.                                                                  'DOS_PUBLIC'
  1947.  
  1948.                                     Public OS/2 application      'Public OS/2 application'
  1949.                                                                  'OS2_PUBLIC'
  1950.  
  1951.                                     Private OS/2 application     'Private OS/2 application'
  1952.                                                                  'OS2_PRIVATE'
  1953.  
  1954.                   The default value is 'Public OS/2 application'. 
  1955.  
  1956.  Note 
  1957.  
  1958.  The domain controller computer name can be specified as '' for a local domain 
  1959.  controller. 
  1960.  
  1961.  If the application already is in the list, the application will not be added. 
  1962.  
  1963.  Example 
  1964.  
  1965.  
  1966.   /* Add a application to userid application list */
  1967.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1968.   call LoadLsRxutFuncs
  1969.  
  1970.   NETAPPSEL       = 32
  1971.   DcName          = '\\ILIDC'
  1972.   ApplicationName = 'BOOKREAD'
  1973.   UserId          = 'WS2221'
  1974.   AppType         = 'Public OS/2 application'
  1975.  
  1976.   myRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
  1977.  
  1978.   if myRc <> '0' then do
  1979.    say 'Got error from NetAdd() ' myRc
  1980.    call DropLsRxutFuncs
  1981.    exit 9
  1982.   end
  1983.   else do
  1984.    say
  1985.    say "Application added successfully to user application list"
  1986.   end
  1987.  
  1988.   call DropLsRxutFuncs
  1989.   call RxFuncDrop 'LoadLsRxutFuncs'
  1990.  
  1991.   exit 0
  1992.  
  1993.  Example Output 
  1994.  
  1995.  
  1996.   Application added successfully to user application list
  1997.  
  1998.  
  1999. ΓòÉΓòÉΓòÉ 9.6. NETDASD Add (LS40) ΓòÉΓòÉΓòÉ
  2000.  
  2001. The function invokes the directory limit function, placing a limit on the 
  2002. amount of disk space that can be used within a directory tree. Before this 
  2003. function can be invoked, directory limits must be enabled on the 386-HPFS 
  2004. drive. (See the NetMisc(NETDASDCONTROL) function) 
  2005.  
  2006. Syntax 
  2007.  
  2008.  
  2009. MyRc = NetAdd(NETDASD, 'DASDInfo', SrvName)
  2010.  
  2011. Parameters 
  2012.  
  2013. The parameters required and returned are: 
  2014.  
  2015.  'DASDInfo'  The directory limits information variable, which is divided into: 
  2016.  
  2017.                  DASDInfo.resource_name 
  2018.  
  2019.                   The name of the directory to add directory limit on. The 
  2020.                   parameter is the directory name, beginning with the drive 
  2021.                   letter and ending without the backslash (\). The path 
  2022.                   specified can be on a redirected drive. In this case, the 
  2023.                   SrvName parameter must be '' 
  2024.  
  2025.                  DASDInfo.max 
  2026.  
  2027.                   The amount of disk space allotted to this directory by 
  2028.                   directory limits. Specified in KB, this field can be set from 
  2029.                   1 to 67108863. Note however, that subsequent access to the 
  2030.                   directory specified is functionally limited to the smaller of 
  2031.                   the following: 
  2032.  
  2033.                     1. Any directory limits restrictions on any parent 
  2034.                        directory 
  2035.  
  2036.                     2. The total free space on the drive 
  2037.  
  2038.                  DASDInfo.flag 
  2039.  
  2040.                   A flag controlling the operations when a directory limit 
  2041.                   added The following values are valid: 
  2042.  
  2043.                                     Value Meaning
  2044.                                     ----- -------
  2045.                                      0    Compares a newly specified limit to the amount
  2046.                                           of disk space already taken by the directory.
  2047.                                           If the directory tree size exceeds the new limit,
  2048.                                           NERR_MaxValidationFailed (2304) is returned
  2049.  
  2050.                                      1    Sets the new limit regardless of the present
  2051.                                           size of the directory tree
  2052.  
  2053.                   The default is 0 
  2054.  
  2055.                  DASDInfo.thresh 
  2056.  
  2057.                   The initial alert threshold as a percentage of the total 
  2058.                   directory limit space allotted, with values ranging from 0 to 
  2059.                   99. Zero specifies that no threshold alert is to be 
  2060.                   generated, and 99 specifies that an alert is generated when 
  2061.                   99% of the allotted directory limit for this directory has 
  2062.                   been reached. Note that a minimum of 1KB of disk space must 
  2063.                   be allotted to a threshold; the value obtained by multiplying 
  2064.                   the DASDInfo.thresh decimal-point value (where 5% is equal to 
  2065.                   0.05) by DASDInfo.max must be at least 1KB. 
  2066.  
  2067.                   This threshold setting generates only 1 alert when this 
  2068.                   boundary is crossed. Subsequent alerts (generated 
  2069.                   incrementally after this threshold has been reached but 
  2070.                   before the entire limit is reached) are specified according 
  2071.                   to the DASDInfo.delta parameter 
  2072.  
  2073.                   The default value is 0 
  2074.  
  2075.                  DASDInfo.delta 
  2076.  
  2077.                   The increment in which alerts are to be generated after the 
  2078.                   DASDInfo.thresh threshold has been crossed, but before all of 
  2079.                   the allotted disk space has been used. This parameter also is 
  2080.                   specified as a percentage of the total allotted directory 
  2081.                   limit space and can range from 0 upward, as long as its value 
  2082.                   is less than 99 - DASDInfo.thresh. 
  2083.  
  2084.                   Note that a minimum of 1KB of disk space must be allotted to 
  2085.                   an increment; the value obtained by multiplying the 
  2086.                   DASDInfo.delta decimal-point value (where 5% is equal to 
  2087.                   0.05) by DASDInfo.max must be at least 1KB 
  2088.  
  2089.  SrvName     The computer name of the server to perform the directory limit add 
  2090.              operation on 
  2091.  
  2092.  Note 
  2093.  
  2094.  The server computer name can be specified as '' for a local server. 
  2095.  
  2096.  Example 
  2097.  
  2098.  
  2099.   /* Add DASD directory limits on server */
  2100.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2101.   call LoadLsRxutFuncs
  2102.  
  2103.   NETDASD                = 750
  2104.   DASDInfo.resource_name = 'D:\APPS\DATA'
  2105.   DASDInfo.max           = 512
  2106.   DASDInfo.flag          = 0
  2107.   DASDInfo.thresh        = 90
  2108.   DASDInfo.delta         = 5
  2109.   SrvName                = '\\DOMAIN_CONTRLR'
  2110.  
  2111.   myRc = NetAdd(NETDASD, 'DASDInfo', SrvName)
  2112.  
  2113.   if myRc <> '0' then do
  2114.    say 'Got error from NetAdd() ' myRc
  2115.    exitRc = 9
  2116.   end
  2117.   else do
  2118.    say 'Directory limit successfully added'
  2119.    exitRc = 0
  2120.   end
  2121.  
  2122.   call DropLsRxutFuncs
  2123.   call RxFuncDrop 'LoadLsRxutFuncs'
  2124.  
  2125.   exit exitRc
  2126.  
  2127.  Example Output 
  2128.  
  2129.  
  2130.   Directory limit successfully added
  2131.  
  2132.  
  2133. ΓòÉΓòÉΓòÉ 9.7. NETGROUP Add ΓòÉΓòÉΓòÉ
  2134.  
  2135. The function creates a group. 
  2136.  
  2137. Syntax 
  2138.  
  2139.  
  2140. MyRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
  2141.  
  2142. Parameters 
  2143.  
  2144. The parameters required are: 
  2145.  
  2146.  'groupInfo'       The REXX variable holding the group information. The 
  2147.                    variable is divided into 
  2148.  
  2149.                        groupInfo.name 
  2150.  
  2151.                         The group name 
  2152.  
  2153.                        groupInfo.comment 
  2154.  
  2155.                         The group comment or description. A default comment 
  2156.                         will be provided if groupInfo.comment does not hold a 
  2157.                         value. 
  2158.  
  2159.  SrvName           The server computer name of the domain controller 
  2160.  
  2161.  Note 
  2162.  
  2163.  The server computer name can be specified as '' for a local domain controller. 
  2164.  
  2165.  Example 
  2166.  
  2167.  
  2168.   /* Create a new group with a comment */
  2169.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2170.   call LoadLsRxutFuncs
  2171.  
  2172.   NETGROUP = 70
  2173.   SrvName  = '\\ILIDC'
  2174.   groupInfo.name = 'CSUSERS'
  2175.   groupInfo.comment = 'The Client/Server users group'
  2176.  
  2177.   myRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
  2178.  
  2179.   if myRc <> '0' then do
  2180.    say 'Got error from NetAdd() ' myRc
  2181.    call DropLsRxutFuncs
  2182.    exit 9
  2183.   end
  2184.   else do
  2185.    say
  2186.    say "Group created successfully"
  2187.   end
  2188.  
  2189.   call DropLsRxutFuncs
  2190.   call RxFuncDrop 'LoadLsRxutFuncs'
  2191.  
  2192.   exit 0
  2193.  
  2194.  Example Output 
  2195.  
  2196.  
  2197.   Group created successfully
  2198.  
  2199.  
  2200. ΓòÉΓòÉΓòÉ 9.8. NETGROUPUSERS Add ΓòÉΓòÉΓòÉ
  2201.  
  2202. The function adds a user account to a group. 
  2203.  
  2204. Syntax 
  2205.  
  2206.  
  2207. MyRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
  2208.  
  2209. Parameters 
  2210.  
  2211. The parameters required are: 
  2212.  
  2213.  SrvName           The server computer name of the domain controller 
  2214.  
  2215.  GroupName         The group name 
  2216.  
  2217.  UserId            The name of the userid to add 
  2218.  
  2219.  Note 
  2220.  
  2221.  The server computer name can be specified as '' for a local domain controller. 
  2222.  
  2223.  Example 
  2224.  
  2225.  
  2226.   /* Add a userid to a group */
  2227.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2228.   call LoadLsRxutFuncs
  2229.  
  2230.   NETGROUPUSERS = 340
  2231.   SrvName       = '\\ILIDC'
  2232.   GroupName     = 'CS2USERS'
  2233.   UserId        = 'WS2332'
  2234.  
  2235.   myRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
  2236.  
  2237.   if myRc <> '0' then do
  2238.    say 'Got error from NetAdd() ' myRc
  2239.    call DropLsRxutFuncs
  2240.    exit 9
  2241.   end
  2242.   else do
  2243.    say
  2244.    say "Userid added to Group successfully"
  2245.   end
  2246.  
  2247.   call DropLsRxutFuncs
  2248.   call RxFuncDrop 'LoadLsRxutFuncs'
  2249.  
  2250.   exit 0
  2251.  
  2252.  Example Output 
  2253.  
  2254.  
  2255.   Userid added to Group successfully
  2256.  
  2257.  
  2258. ΓòÉΓòÉΓòÉ 9.9. NETLOGONASN Add ΓòÉΓòÉΓòÉ
  2259.  
  2260. The function adds a logon assignment for a userid. 
  2261.  
  2262. Syntax 
  2263.  
  2264.  
  2265. MyRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
  2266.  
  2267. Parameters 
  2268.  
  2269. The parameters required are: 
  2270.  
  2271.  DcName      The domain controller computer name 
  2272.  
  2273.  aliasName   The name of the alias to be assigned 
  2274.  
  2275.  LocalName   The device that will be assigned to the resource specified by 
  2276.              aliasName when the user logs on. Valid drive letters are A through 
  2277.              Z. The drive letter can be followed by a colon (:), but a colon is 
  2278.              not required. A value of * indicates that the system will choose 
  2279.              the first available drive. Valid print devices are LPT1 through 
  2280.              LPT9. Valid serial devices are LPT1 through LPT9 and COM1 through 
  2281.              COM9. Print and serial devices should not be followed by a colon 
  2282.              (that is, COM1: is considered to be an invalid serial device). If 
  2283.              the device field is left blank, the connection is to be 
  2284.              deviceless. 
  2285.  
  2286.  UserId      The name of the userid 
  2287.  
  2288.  Note 
  2289.  
  2290.  The domain controller computer name can be specified as '' for a local domain 
  2291.  controller. 
  2292.  
  2293.  If the logon assignment already is in the list, the additional assignment will 
  2294.  not be added. 
  2295.  
  2296.  Example 
  2297.  
  2298.  
  2299.   /* Add a logon assignment for a userid */
  2300.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2301.   call LoadLsRxutFuncs
  2302.  
  2303.   NETLOGONASN = 52
  2304.   DcName      = '\\ILIDC'
  2305.   aliasName   = 'BOOKS'
  2306.   LocalName   = 'W'
  2307.   UserId      = 'WS2221'
  2308.  
  2309.   myRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
  2310.  
  2311.   if myRc <> '0' then do
  2312.    say 'Got error from NetAdd() ' myRc
  2313.    call DropLsRxutFuncs
  2314.    exit 9
  2315.   end
  2316.   else do
  2317.    say
  2318.    say "Logon assignment added successfully"
  2319.   end
  2320.  
  2321.   call DropLsRxutFuncs
  2322.   call RxFuncDrop 'LoadLsRxutFuncs'
  2323.  
  2324.   exit 0
  2325.  
  2326.  Example Output 
  2327.  
  2328.  
  2329.   Logon assignment added successfully
  2330.  
  2331.  
  2332. ΓòÉΓòÉΓòÉ 9.10. NETMESSAGENAME Add ΓòÉΓòÉΓòÉ
  2333.  
  2334. The function registers a name in the message name table. 
  2335.  
  2336. Syntax 
  2337.  
  2338.  
  2339. MyRc = NetAdd(NETMESSAGENAME, msgName, fwdAction, SrvName)
  2340.  
  2341. Parameters 
  2342.  
  2343. The parameters required are: 
  2344.  
  2345.  msgName           The message name to add into the name table 
  2346.  
  2347.  fwdAction         The action to take if name already is forwarded. If the 
  2348.                    value is not 0, the name is added to the message name table; 
  2349.                    if the value is 0, and the name has been forwarded already, 
  2350.                    an error is returned 
  2351.  
  2352.                    The default value is 0 
  2353.  
  2354.  SrvName           The server computer name 
  2355.  
  2356.  Note 
  2357.  
  2358.  The server computer name can be specified as '' for a local server or 
  2359.  workstation. 
  2360.  
  2361.  Example 
  2362.  
  2363.  
  2364.   /* Add a message name */
  2365.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2366.   call LoadLsRxutFuncs
  2367.  
  2368.   NETMESSAGENAME = 80
  2369.   msgName        = 'MSGNAME'
  2370.   fwdAction      = 0
  2371.   SrvName        = '\\ANYSRV01'
  2372.  
  2373.   myRc = NetAdd(NETMESSAGENAME, msgName, fwdAction, SrvName)
  2374.  
  2375.   if myRc <> '0' then do
  2376.    say 'Got error from NetAdd() ' myRc
  2377.    exitRc = 9
  2378.   end
  2379.   else do
  2380.    say 'Message name entry added successfully'
  2381.   end
  2382.  
  2383.   call DropLsRxutFuncs
  2384.   call RxFuncDrop 'LoadLsRxutFuncs'
  2385.  
  2386.   exit exitRc
  2387.  
  2388.  Example Output 
  2389.  
  2390.  
  2391.   Message name entry added successfully
  2392.  
  2393.  
  2394. ΓòÉΓòÉΓòÉ 9.11. NETSHARE Add ΓòÉΓòÉΓòÉ
  2395.  
  2396. The function adds a server share using either a alias or a shareInfo structure. 
  2397.  
  2398. Syntax 
  2399.  
  2400.  
  2401. MyRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
  2402. MyRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
  2403.  
  2404. Parameters 
  2405.  
  2406. The parameters required are: 
  2407.  
  2408.  'shareInfo'  The REXX variable holding the share information. The variable is 
  2409.               divided into: 
  2410.  
  2411.                   shareInfo.netname 
  2412.  
  2413.                    The netname of a resource. It is recommended that the 
  2414.                    shareInfo.netname and the shareInfo.path be the same for a 
  2415.                    Spooler Queue; otherwise, the result is unpredictable 
  2416.  
  2417.                   shareInfo.type 
  2418.  
  2419.                    The share type. The following values are used: 
  2420.  
  2421.                                       Share type                       Value
  2422.                                       ----------                       -----
  2423.                                       Disk drive                       'Disk Drive'
  2424.                                                                        'DISKTREE'
  2425.  
  2426.                                       Spooler queue                    'Spooler Queue'
  2427.                                                                        'PRINTQ'
  2428.  
  2429.                                       Serial device                    'Serial Device'
  2430.                                                                        'DEVICE'
  2431.  
  2432.                                       Interprocess Communications      'Interprocess communication (IPC)'
  2433.                                                                        'IPC'
  2434.  
  2435.                   shareInfo.remark 
  2436.  
  2437.                    The share remark 
  2438.  
  2439.                   shareInfo.max_uses 
  2440.  
  2441.                    The maximum number of concurrent connections that the shared 
  2442.                    resource can accommodate. The default value is 65535 
  2443.  
  2444.                   shareInfo.path 
  2445.  
  2446.                    The string containing the local path name of the shared 
  2447.                    resource. For disks, shareInfo.path is the path being 
  2448.                    shared. For spooler queues, shareInfo.path is the name of 
  2449.                    the spooler queue being shared. For serial device queues, 
  2450.                    shareInfo.path is a string of one or more communication 
  2451.                    device names separated by spaces (for example, COM1 COM2 
  2452.                    COM6). 
  2453.  
  2454.                    It is recommended that the shareInfo.netname and the 
  2455.                    shareInfo.path be the same for a Spooler Queue; otherwise, 
  2456.                    the result is unpredictable 
  2457.  
  2458.  SrvName      The computer name of the server that has the resource to be 
  2459.               shared 
  2460.  
  2461.  The second form of the function call is divided into: 
  2462.  
  2463.  DcName            The domain controller computer name, which holds the alias 
  2464.                    information 
  2465.  
  2466.  aliasName         The alias name 
  2467.  
  2468.  NetName           The share network name. For a spooler queue the Queue name 
  2469.                    will be identical with the netname. It the value is empty, 
  2470.                    the default Alias netname will be used. 
  2471.  
  2472.                    It is recommended to use the same netname as the alias name 
  2473.  
  2474.  Note 
  2475.  
  2476.  The server and DcName computer names can be specified as '' for a local 
  2477.  server. 
  2478.  
  2479.  Example using shareInfo structure 
  2480.  
  2481.  
  2482.   /* Net share add using a net share info structure */
  2483.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2484.   call LoadLsRxutFuncs
  2485.  
  2486.   NETSHARE   = 190
  2487.   SrvName    = '\\ILIDC'
  2488.  
  2489.   shareInfo.netname  = 'TEMP'
  2490.   shareInfo.type     = 'Disk Drive'
  2491.   shareInfo.remark   = 'Temporary files share'
  2492.   shareInfo.max_uses = 10
  2493.   shareInfo.path     = 'D:\TEMP\FILES'
  2494.  
  2495.   myRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
  2496.  
  2497.   if myRc <> '0' then do
  2498.    say 'Got error from NetAdd() ' myRc
  2499.    call DropLsRxutFuncs
  2500.    exit 9
  2501.   end
  2502.   else do
  2503.    say
  2504.    say "Resource shared successfully"
  2505.   end
  2506.  
  2507.   call DropLsRxutFuncs
  2508.   call RxFuncDrop 'LoadLsRxutFuncs'
  2509.  
  2510.   exit 0
  2511.  
  2512.  Example Output 
  2513.  
  2514.  
  2515.   Resource shared successfully
  2516.  
  2517.  Example using an alias 
  2518.  
  2519.  
  2520.   /* Net share add using an alias */
  2521.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2522.   call LoadLsRxutFuncs
  2523.  
  2524.   NETSHARE   = 190
  2525.   DcName     = '\\ILIDC'
  2526.   aliasName  = 'THEBOOK'
  2527.   NetName    = 'THEBOOK'
  2528.  
  2529.   myRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
  2530.  
  2531.   if myRc <> '0' then do
  2532.    say 'Got error from NetAdd() ' myRc
  2533.    call DropLsRxutFuncs
  2534.    exit 9
  2535.   end
  2536.   else do
  2537.    say
  2538.    say "Resource shared successfully"
  2539.   end
  2540.  
  2541.   call DropLsRxutFuncs
  2542.   call RxFuncDrop 'LoadLsRxutFuncs'
  2543.  
  2544.   exit 0
  2545.  
  2546.  Example Output 
  2547.  
  2548.  
  2549.   Resource shared successfully
  2550.  
  2551.  
  2552. ΓòÉΓòÉΓòÉ 9.12. NETUSE Add ΓòÉΓòÉΓòÉ
  2553.  
  2554. The function adds a use to a resource using either a UNC name or an alias. 
  2555.  
  2556. Syntax 
  2557.  
  2558.  
  2559. MyRc = NetAdd(NETUSE, 'useInfo', ComputerName)
  2560. MyRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
  2561.  
  2562. Parameters 
  2563.  
  2564. The parameters required are: 
  2565.  
  2566.  'useInfo'  The REXX variable holding the use information. The variable is 
  2567.             divided into: 
  2568.  
  2569.                 useInfo.local 
  2570.  
  2571.                  The local device name being redirected to the shared resource. 
  2572.                  The variable can either be a device name connection or a UNC 
  2573.                  connection. The following format can be used: 
  2574.  
  2575.                                   Connection type                  Format
  2576.                                   ---------------                  ------
  2577.                                   Device Name                      D: to Z:
  2578.                                                                    LPT1: to LPT9:
  2579.                                                                    COM1: to COM9:
  2580.  
  2581.                                   UNC                              ''
  2582.  
  2583.                  For UNC connections the remote parameter will be used to 
  2584.                  specify the resource to be used 
  2585.  
  2586.                 useInfo.remote 
  2587.  
  2588.                  The UNC name of the remote resource being accessed. 
  2589.  
  2590.                  The following UNC syntax must be used: 
  2591.  
  2592.                                   \\servername\sharename
  2593.  
  2594.                  The sharename is identical to the netname 
  2595.  
  2596.                 useInfo.password 
  2597.  
  2598.                  This password if required. A value of 'N/A' or '' will be used 
  2599.                  as no password required. If the variable does not exist the 
  2600.                  default default value is no password required 
  2601.  
  2602.                 useInfo.asg_type 
  2603.  
  2604.                  The resource type. The following values must be used: 
  2605.  
  2606.                                   Device type                      Value
  2607.                                   -----------                      ------
  2608.                                   Disk Device                      'Disk device'
  2609.                                                                    'DISKDEV'
  2610.  
  2611.                                   Spooled device                   'Spooled printer'
  2612.                                                                    'SPOOLDEV'
  2613.  
  2614.                                   Serial device                    'Serial device'
  2615.                                                                    'CHARDEV'
  2616.  
  2617.                                   Interprocess communication (IPC) 'Interprocess communication (IPC)'
  2618.                                                                    'IPC'
  2619.  
  2620.                                   UNC where local is ''            'UNC'
  2621.  
  2622.  ComputerName The name of the computer that performs the net use operation. For 
  2623.             a local workstation the value can be ''. 
  2624.  
  2625.  The second form requires that the resource specified by the alias already is 
  2626.  shared, otherwise a return code 67 will be returned. The second form of the 
  2627.  function call is divided into: 
  2628.  
  2629.  DcName            The domain controller computer name, which holds the alias 
  2630.                    information 
  2631.  
  2632.  aliasName         The alias name 
  2633.  
  2634.  LocalName         The local device name being redirected to the shared 
  2635.                    resource. The variable can either be a device name 
  2636.                    connection or a UNC connection. The following format can be 
  2637.                    used: 
  2638.  
  2639.                                       Connection type                  Format
  2640.                                       ---------------                  ------
  2641.                                       Device Name                      D: to Z:
  2642.                                                                        LPT1: to LPT9:
  2643.                                                                        COM1: to COM9:
  2644.  
  2645.                                       UNC                              ''
  2646.  
  2647.                    For UNC connections the remote resource name will be created 
  2648.                    from the alias 
  2649.  
  2650.  ComputerName      The name of the computer that performs the net use 
  2651.                    operation. For a local workstation the value can be ''. 
  2652.  
  2653.  Note 
  2654.  
  2655.  The ComputerName and DcName can be specified as '' for a local server 
  2656.  
  2657.  A example using the useInfo structure 
  2658.  
  2659.  
  2660.   /* Net use add using a net use info structure */
  2661.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2662.   call LoadLsRxutFuncs
  2663.  
  2664.   NETUSE       = 270
  2665.   ComputerName = '\\ILIDC'
  2666.  
  2667.   useInfo.local    = 'W:'
  2668.   useInfo.remote   = '\\ILIDC\BOOKS'
  2669.   useInfo.password = ''
  2670.   useInfo.asg_type = 'Disk device'
  2671.  
  2672.   myRc = NetAdd(NETUSE, 'useInfo', ComputerName)
  2673.  
  2674.   if myRc <> '0' then do
  2675.    say 'Got error from NetAdd() ' myRc
  2676.    call DropLsRxutFuncs
  2677.    exit 9
  2678.   end
  2679.   else do
  2680.    say
  2681.    say "Successfully using resource"
  2682.   end
  2683.  
  2684.   call DropLsRxutFuncs
  2685.   call RxFuncDrop 'LoadLsRxutFuncs'
  2686.  
  2687.   exit 0
  2688.  
  2689.  Example Output 
  2690.  
  2691.  
  2692.   Successfully using resource
  2693.  
  2694.  A example using an alias as parameter 
  2695.  
  2696.  
  2697.   /* Net use add using an alias */
  2698.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2699.   call LoadLsRxutFuncs
  2700.  
  2701.   NETUSE       = 270
  2702.   DcName       = '\\ILIDC'
  2703.   aliasName    = 'BOOKMGR'
  2704.   LocalName    = 'X:'
  2705.   ComputerName = '\\ILIDC'
  2706.  
  2707.   myRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
  2708.  
  2709.   if myRc <> '0' then do
  2710.    say 'Got error from NetAdd() ' myRc
  2711.    call DropLsRxutFuncs
  2712.    exit 9
  2713.   end
  2714.   else do
  2715.    say
  2716.    say "Successfully using resource"
  2717.   end
  2718.  
  2719.   call DropLsRxutFuncs
  2720.   call RxFuncDrop 'LoadLsRxutFuncs'
  2721.  
  2722.   exit 0
  2723.  
  2724.  Example Output 
  2725.  
  2726.  
  2727.   Successfully using resource
  2728.  
  2729.  
  2730. ΓòÉΓòÉΓòÉ 9.13. NETUSER Add ΓòÉΓòÉΓòÉ
  2731.  
  2732. The function adds a user account. 
  2733.  
  2734. Syntax 
  2735.  
  2736.  
  2737. MyRc = NetAdd(NETUSER, 'userInfo', SrvName)
  2738.  
  2739. Parameters 
  2740.  
  2741. The parameters required are: 
  2742.  
  2743.  'userInfo'  The REXX variable holding the user account information. The 
  2744.              variable is divided into: 
  2745.  
  2746.                  userInfo.name 
  2747.  
  2748.                   The userid account name 
  2749.  
  2750.                  userInfo.password 
  2751.  
  2752.                   The userid account password 
  2753.  
  2754.                  userInfo.priv 
  2755.  
  2756.                   The userid account privilege level. The following values can 
  2757.                   be used: 
  2758.  
  2759.                                     Account type                     Value
  2760.                                     ------------                     -----
  2761.                                     Guest                            'Guest'
  2762.  
  2763.                                     User                             'User'
  2764.  
  2765.                                     Administrator                    'Admin'
  2766.  
  2767.                  userInfo.home_dir 
  2768.  
  2769.                   The path to the userid home directory, if any. The following 
  2770.                   rules apply: 
  2771.  
  2772.                   This string can take one of two forms. The first form defines 
  2773.                   the drive of the user that will be assigned to the home 
  2774.                   directory. It can have as many as 260 bytes. 
  2775.  
  2776.  
  2777.                                     x:\machineID\y$\pathname
  2778.  
  2779.                   where x is the drive letter to be assigned, machineID is the 
  2780.                   name of the server that holds the home directory, y is the 
  2781.                   driver letter on the server where the home directory exists, 
  2782.                   and pathname is the remaining path to the directory. 
  2783.  
  2784.                   The second form defines a first available drive specification 
  2785.                   for the name directory: 
  2786.  
  2787.  
  2788.                                     \\machineID\y$\pathname
  2789.  
  2790.                   where machineID, y, and pathname are defined as in the 
  2791.                   preceding example. To define a home directory at the root of 
  2792.                   a server's drive, omit \pathname from either of the forms 
  2793.                   previously mentioned. 
  2794.  
  2795.                   It is important to ensure that this field follows the correct 
  2796.                   format or users may not get their home directory at logon 
  2797.                   time. An access control profile must also be created, giving 
  2798.                   users access to the home directory. 
  2799.  
  2800.                  userInfo.comment 
  2801.  
  2802.                   The user account comment 
  2803.  
  2804.  SrvName     The server computer name of the domain controller 
  2805.  
  2806.  Note 
  2807.  
  2808.  The server computer name can be specified as '' for a local domain controller. 
  2809.  
  2810.  Example 
  2811.  
  2812.  
  2813.   /* Add a userid */
  2814.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2815.   call LoadLsRxutFuncs
  2816.  
  2817.   NETUSER = 280
  2818.   SrvName = '\\ILIDC'
  2819.  
  2820.   userInfo.name        = 'WS2221'
  2821.   userInfo.password    = 'PASSWORD'
  2822.   userInfo.priv        = 'User'
  2823.   userInfo.home_dir    = ''
  2824.   userInfo.comment     = 'WS2221 user in location N91-3161'
  2825.  
  2826.   myRc = NetAdd(NETUSER, 'userInfo', SrvName)
  2827.  
  2828.   if myRc <> '0' then do
  2829.    say 'Got error from NetAdd() ' myRc
  2830.    call DropLsRxutFuncs
  2831.    exit 9
  2832.   end
  2833.   else do
  2834.    say
  2835.    say "User created successfully"
  2836.   end
  2837.  
  2838.   call DropLsRxutFuncs
  2839.   call RxFuncDrop 'LoadLsRxutFuncs'
  2840.  
  2841.   exit 0
  2842.  
  2843.  Example Output 
  2844.  
  2845.  
  2846.   User created successfully
  2847.  
  2848.  
  2849. ΓòÉΓòÉΓòÉ 9.14. NETUSER2 Add ΓòÉΓòÉΓòÉ
  2850.  
  2851. The function creates a user account entry with more parameters available for 
  2852. setting during creation. 
  2853.  
  2854. Syntax 
  2855.  
  2856.  
  2857. MyRc = NetAdd(NETUSER2, 'userInfo', SrvName)
  2858.  
  2859. Parameters 
  2860.  
  2861. The parameters required are: 
  2862.  
  2863.  'userInfo'  The REXX variable holding the user account information. The 
  2864.              variable is divided into: 
  2865.  
  2866.                  userInfo.name 
  2867.  
  2868.                   The userid account name 
  2869.  
  2870.                  userInfo.password 
  2871.  
  2872.                   The userid account password 
  2873.  
  2874.                  userInfo.priv 
  2875.  
  2876.                   The userid account privilege level. The following values can 
  2877.                   be used: 
  2878.  
  2879.                                     Account type                     Value
  2880.                                     ------------                     -----
  2881.                                     Guest                            'Guest'
  2882.  
  2883.                                     User                             'User'
  2884.  
  2885.                                     Administrator                    'Administrator'
  2886.  
  2887.                  userInfo.home_dir 
  2888.  
  2889.                   The path to the userid home directory, if any. The following 
  2890.                   rules apply: 
  2891.  
  2892.                   This string can take one of two forms. The first form defines 
  2893.                   the drive of the user that will be assigned to the home 
  2894.                   directory. It can have as many as 260 bytes. 
  2895.  
  2896.  
  2897.                                     x:\machineID\y$\pathname
  2898.  
  2899.                   where x is the drive letter to be assigned, machineID is the 
  2900.                   name of the server that holds the home directory, y is the 
  2901.                   driver letter on the server where the home directory exists, 
  2902.                   and pathname is the remaining path to the directory. 
  2903.  
  2904.                   The second form defines a first available drive specification 
  2905.                   for the name directory: 
  2906.  
  2907.  
  2908.                                     \\machineID\y$\pathname
  2909.  
  2910.                   where machineID, y, and pathname are defined as in the 
  2911.                   preceding example. To define a home directory at the root of 
  2912.                   a server's drive, omit \pathname from either of the forms 
  2913.                   previously mentioned. 
  2914.  
  2915.                   It is important to ensure that this field follows the correct 
  2916.                   format or users may not get their home directory at logon 
  2917.                   time. An access control profile must also be created, giving 
  2918.                   users access to the home directory. 
  2919.  
  2920.                  userInfo.comment 
  2921.  
  2922.                   The user account comment 
  2923.  
  2924.                  userInfo.flags 
  2925.  
  2926.                   The flags parameter determines whether a logon script is to 
  2927.                   be run and whether the user account is enabled. The following 
  2928.                   values must be used: 
  2929.  
  2930.                                     Value   Meaning
  2931.                                     -----   -------
  2932.                                       1    Must be 1. Logon script enabled
  2933.                                       2    If 1, user account disabled
  2934.                                       4    If 1, user account cannot be deleted
  2935.                                       8    If 1, home directory required
  2936.                                      32    If 1, password not required
  2937.                                      64    If 1, user cannot change password
  2938.  
  2939.                   You can combine flags by adding the values 
  2940.  
  2941.                  userInfo.auth_flags 
  2942.  
  2943.                   The authorization flags parameter grants operator privileges 
  2944.                   (accounts, print, comm, server) to the userid. The following 
  2945.                   values can be used: 
  2946.  
  2947.                                     Value   Meaning
  2948.                                     -----   -------
  2949.                                      1      Print operator privilege is enabled
  2950.                                      2      Comm operator privilege is enabled
  2951.                                      4      Server operator privilege is enabled
  2952.                                      8      Accounts operator privilege is enabled
  2953.  
  2954.                   You can combine operator privileges by adding the values 
  2955.  
  2956.                  userInfo.full_name 
  2957.  
  2958.                   The full name of the user account 
  2959.  
  2960.                  userInfo.usr_comment 
  2961.  
  2962.                   A string that is a user settable field 
  2963.  
  2964.                  userInfo.script_path 
  2965.  
  2966.                   The name of the logon script together with the path 
  2967.                   specification relative to the NETLOGON SCRIPT parameter 
  2968.  
  2969.                  userInfo.max_storage 
  2970.  
  2971.                   The maximum storage allotted for the home directory. The 
  2972.                   units are kilobytes (KB). An entry of 0xFFFFFFFF or (-1) 
  2973.                   means unlimited storage. The default is -1. 
  2974.  
  2975.                   You can also specify "No Limit" 
  2976.  
  2977.                  userInfo.logon_server 
  2978.  
  2979.                   An string that contains the name of the preferred server that 
  2980.                   validates user logon requests for this userid. The server 
  2981.                   computer name should be preceded by a double backslash (\\) 
  2982.                   and should be the name of a domain controller or backup 
  2983.                   server on the domain. A server computer name of an asterisk 
  2984.                   (\\*) indicates that the logon request can be handled by any 
  2985.                   domain controller or backup on the domain, this is the 
  2986.                   default setting 
  2987.  
  2988.  SrvName     The server computer name of the domain controller 
  2989.  
  2990.  Note 
  2991.  
  2992.  The server computer name can be specified as '' for a local domain controller. 
  2993.  
  2994.  Example 
  2995.  
  2996.  
  2997.   /* Add a userid using extended call */
  2998.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2999.   call LoadLsRxutFuncs
  3000.  
  3001.   NETUSER2 = 282
  3002.   SrvName  = '\\DOMAIN_CONTRLR'
  3003.  
  3004.   userInfo.name        = 'WS2222'
  3005.   userInfo.password    = 'PASSWORD'
  3006.   userInfo.priv        = 'User'
  3007.   userInfo.home_dir    = ''
  3008.   userInfo.comment     = 'WS2221 user on new domain controller'
  3009.   userInfo.flags       = 1
  3010.   userInfo.auth_flags  = 3
  3011.   userInfo.full_name   = 'Peter The Great'
  3012.   userInfo.usr_comment = 'Your Comment'
  3013.   userInfo.script_path = 'HELLO.CMD'
  3014.   userInfo.max_storage = 1000
  3015.   userInfo.logon_server= '\\*'
  3016.  
  3017.   myRc = NetAdd(NETUSER2, 'userInfo', SrvName)
  3018.  
  3019.   if myRc <> '0' then do
  3020.    say 'Got error from NetAdd() ' myRc
  3021.    exitRc = 9
  3022.   end
  3023.   else do
  3024.    say 'Userid defined successfully'
  3025.    say
  3026.    exitRc = 0
  3027.   end
  3028.  
  3029.   call DropLsRxutFuncs
  3030.   call RxFuncDrop 'LoadLsRxutFuncs'
  3031.  
  3032.   exit exitRc
  3033.  
  3034.  Example Output 
  3035.  
  3036.  
  3037.   Userid defined successfully
  3038.  
  3039.  
  3040. ΓòÉΓòÉΓòÉ 9.15. NETUSERINITDCDB Add ΓòÉΓòÉΓòÉ
  3041.  
  3042. The function creates a new userid entry and forces the creation of the 
  3043. \IBMLAN\DCDB\USERS\userid directory on the Domain Controller. The function is 
  3044. otherwise identical to NetAdd(NETUSER). 
  3045.  
  3046. Syntax 
  3047.  
  3048.  
  3049. MyRc = NetAdd(NETUSERINITDCDB, 'userInfo', SrvName)
  3050.  
  3051. Example 
  3052.  
  3053.  
  3054. /* Add a userid and make DCDBInit request */
  3055. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3056. call LoadLsRxutFuncs
  3057.  
  3058. NETUSERINITDCDB = 290
  3059. SrvName = '\\ILIDC'
  3060.  
  3061. userInfo.name     = 'WST1'
  3062. userInfo.password = 'PASSWORD'
  3063. userInfo.priv     = 'User'
  3064. userInfo.home_dir = ''
  3065. userInfo.comment  = 'Workstation with DCDB directory'
  3066.  
  3067. myRc = NetAdd(NETUSERINITDCDB, 'userInfo', SrvName)
  3068.  
  3069. if myRc <> '0' then do
  3070.  say 'Got error from NetAdd() ' myRc
  3071.  call DropLsRxutFuncs
  3072.  exit 9
  3073. end
  3074. else do
  3075.  say
  3076.  say 'Userid successfully added'
  3077. end
  3078.  
  3079. call DropLsRxutFuncs
  3080. call RxFuncDrop 'LoadLsRxutFuncs'
  3081.  
  3082. exit 0
  3083.  
  3084. Example Output 
  3085.  
  3086.  
  3087. Userid successfully added
  3088.  
  3089.  
  3090. ΓòÉΓòÉΓòÉ 10. NetDelete ΓòÉΓòÉΓòÉ
  3091.  
  3092. The Net delete functions are a family of functions that can be called with a 
  3093. number of parameters. The use of the NetDelete has a minimum of two different 
  3094. parameters. The generic syntax is: 
  3095.  
  3096.  
  3097. MyRc = NetDelete(option, parm1, parm2, parm3)
  3098.  
  3099. The option parameter contains a value to determine what type or option has to 
  3100. be deleted. An example would be the deletion of a user account. 
  3101.  
  3102. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  3103.  
  3104. The MyRc parameter is the return code that will have an value from the 
  3105. NetDelete() function. If the call is successful the character '0' will be 
  3106. returned. Otherwise an error code and descriptive text are inserted by 
  3107. NetDelete() function. 
  3108.  
  3109. The option parameter values are defined in Option parameter values. 
  3110.  
  3111.  
  3112. ΓòÉΓòÉΓòÉ 10.1. NETACCESS Delete ΓòÉΓòÉΓòÉ
  3113.  
  3114. The function deletes all access permission records for a particular shared 
  3115. resource. 
  3116.  
  3117. Syntax 
  3118.  
  3119.  
  3120. MyRc = NetDelete(NETACCESS, SrvName, Path)
  3121.  
  3122. Parameters 
  3123.  
  3124. The parameters specified are: 
  3125.  
  3126.  SrvName   The server computer name 
  3127.  
  3128.  Path      The path. This variable must have a value. See below: 
  3129.  
  3130.                       Resource Type                 Basepath Format
  3131.                       -------------                 ---------------
  3132.                       Drive                         drive:
  3133.                       Path                          \path
  3134.                       Directory                     drive:pathname
  3135.                       File                          drive:pathname
  3136.                       UNC                           \\server\sharename\path
  3137.                       Pipe                          \pipe\pipename
  3138.                       Spooler Queue                 \print\queuename
  3139.                       Serial Device Queue           \comm\chardevqueue
  3140.  
  3141.  Note 
  3142.  
  3143.  The server computer name can be specified as '' for a local server. 
  3144.  
  3145.  Example 
  3146.  
  3147.  
  3148.   /* Delete access control profile */
  3149.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3150.   call LoadLsRxutFuncs
  3151.  
  3152.   NETACCESS = 10
  3153.   SrvName = '\\ILIDC'
  3154.   Path = 'D:\TEMP'
  3155.  
  3156.   myRc = NetDelete(NETACCESS, SrvName, Path)
  3157.  
  3158.   if myRc <> '0' then do
  3159.    say 'Got error from NetDelete() ' myRc
  3160.    call DropLsRxutFuncs
  3161.    exit 9
  3162.   end
  3163.   else do
  3164.    say 'Access Control Profile deleted'
  3165.    say
  3166.   end
  3167.  
  3168.   call DropLsRxutFuncs
  3169.   call RxFuncDrop 'LoadLsRxutFuncs'
  3170.  
  3171.   exit 0
  3172.  
  3173.  Example Output 
  3174.  
  3175.  
  3176.   Access Control Profile deleted
  3177.  
  3178.  
  3179. ΓòÉΓòÉΓòÉ 10.2. NETACCESSDEL ΓòÉΓòÉΓòÉ
  3180.  
  3181. The function deletes one access permission record for a particular existing 
  3182. access control profile. 
  3183.  
  3184. Syntax 
  3185.  
  3186.  
  3187. MyRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
  3188.  
  3189. Parameters 
  3190.  
  3191. The parameters specified are: 
  3192.  
  3193.  SrvName           The server computer name 
  3194.  
  3195.  resourceName      The name of the resource. This variable must have a value. 
  3196.                    See below for accepted values: 
  3197.  
  3198.                                       Resource Type                 Basepath Format
  3199.                                       -------------                 ---------------
  3200.                                       Drive                         drive:
  3201.                                       Path                          \path
  3202.                                       Directory                     drive:pathname
  3203.                                       File                          drive:pathname
  3204.                                       UNC                           \\server\sharename\path
  3205.                                       Pipe                          \pipe\pipename
  3206.                                       Spooler Queue                 \print\queuename
  3207.                                       Serial Device Queue           \comm\chardevqueue
  3208.  
  3209.  ugName            The user or group name 
  3210.  
  3211.  Note 
  3212.  
  3213.  The server computer name can be specified as '' for a local server. 
  3214.  
  3215.  Example 
  3216.  
  3217.  
  3218.   /* Delete access control profile entry */
  3219.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3220.   call LoadLsRxutFuncs
  3221.  
  3222.   NETACCESSDEL = 240
  3223.   SrvName      = '\\ILIDC'
  3224.   resourceName = 'D:\APPS\TEMP'
  3225.   ugName       = 'CSUSERS'
  3226.  
  3227.   myRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
  3228.  
  3229.   if myRc <> '0' then do
  3230.    say 'Got error from NetDelete() ' myRc
  3231.    call DropLsRxutFuncs
  3232.    exit 9
  3233.   end
  3234.   else do
  3235.    say 'Access Control Profile Entry deleted successfully'
  3236.    say
  3237.   end
  3238.  
  3239.   call DropLsRxutFuncs
  3240.   call RxFuncDrop 'LoadLsRxutFuncs'
  3241.  
  3242.   exit 0
  3243.  
  3244.  Example Output 
  3245.  
  3246.  
  3247.   Access Control Profile Entry deleted successfully
  3248.  
  3249.  
  3250. ΓòÉΓòÉΓòÉ 10.3. NETALIAS Delete ΓòÉΓòÉΓòÉ
  3251.  
  3252. The function deletes an alias definition. 
  3253.  
  3254. Syntax 
  3255.  
  3256.  
  3257. MyRc = NetDelete(NETALIAS, SrvName, AliasName)
  3258.  
  3259. Parameters 
  3260.  
  3261. The parameters specified are: 
  3262.  
  3263.  SrvName           The server computer name 
  3264.  
  3265.  AliasName         The alias name 
  3266.  
  3267.  Note 
  3268.  
  3269.  The server computer name can be specified as '' for a local server. 
  3270.  
  3271.  Example 
  3272.  
  3273.  
  3274.   /* Delete alias definition */
  3275.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3276.   call LoadLsRxutFuncs
  3277.  
  3278.   NETALIAS = 20
  3279.   SrvName  = '\\ILIDC'
  3280.   AliasName = 'THEALIAS'
  3281.  
  3282.   myRc = NetDelete(NETALIAS, SrvName, AliasName)
  3283.  
  3284.   if myRc <> '0' then do
  3285.    say 'Got error from NetDelete() ' myRc
  3286.    call DropLsRxutFuncs
  3287.    exit 9
  3288.   end
  3289.   else do
  3290.    say 'Alias deleted successfully'
  3291.    say
  3292.   end
  3293.  
  3294.   call DropLsRxutFuncs
  3295.   call RxFuncDrop 'LoadLsRxutFuncs'
  3296.  
  3297.   exit 0
  3298.  
  3299.  Example Output 
  3300.  
  3301.  
  3302.   Alias deleted successfully
  3303.  
  3304.  
  3305. ΓòÉΓòÉΓòÉ 10.4. NETAPP Delete ΓòÉΓòÉΓòÉ
  3306.  
  3307. The function deletes a public or private application definition. 
  3308.  
  3309. Syntax 
  3310.  
  3311.  
  3312. MyRc = NetDelete(NETAPP, SrvName, PublicApp)
  3313. MyRc = NetDelete(NETAPP, SrvName, PrivateApp, UserId)
  3314.  
  3315. Parameters 
  3316.  
  3317. The parameters specified are: 
  3318.  
  3319.  SrvName           The server computer name 
  3320.  
  3321.  PublicApp         Use the NetDelete() function with 3 arguments to delete a 
  3322.                    public application 
  3323.  
  3324.  PrivateApp        This is the name of a private application. It must be used 
  3325.                    together with a userid 
  3326.  
  3327.  UserId            The userid 
  3328.  
  3329.  Note 
  3330.  
  3331.  The server computer name can be specified as '' for a local server. 
  3332.  
  3333.  Example 
  3334.  
  3335.  
  3336.   /* Delete a public application definition */
  3337.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3338.   call LoadLsRxutFuncs
  3339.  
  3340.   NETAPP  = 30
  3341.   SrvName = '\\ILIDC'
  3342.   PublicApp = 'MSAPP'
  3343.  
  3344.   myRc = NetDelete(NETAPP, SrvName, PublicApp)
  3345.  
  3346.   if myRc <> '0' then do
  3347.    say 'Got error from NetDelete() ' myRc
  3348.    call DropLsRxutFuncs
  3349.    exit 9
  3350.   end
  3351.   else do
  3352.    say 'Public application deleted successfully'
  3353.    say
  3354.   end
  3355.  
  3356.   call DropLsRxutFuncs
  3357.   call RxFuncDrop 'LoadLsRxutFuncs'
  3358.  
  3359.   exit 0
  3360.  
  3361.  Example Output 
  3362.  
  3363.  
  3364.   Public application deleted successfully
  3365.  
  3366.  
  3367. ΓòÉΓòÉΓòÉ 10.5. NETAPPSEL Delete ΓòÉΓòÉΓòÉ
  3368.  
  3369. The function removes an application from the specified userid application 
  3370. selector list. 
  3371.  
  3372. Syntax 
  3373.  
  3374.  
  3375. MyRc = NetDelete(NETAPPSEL, SrvName, UserId)
  3376. MyRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
  3377.  
  3378. Parameters 
  3379.  
  3380. The parameters specified are: 
  3381.  
  3382.  SrvName           The server computer name 
  3383.  
  3384.  UserId            The userid to be deleted 
  3385.  
  3386.  ApplicationName   The application name to remove from the application 
  3387.                    selection list. Using the function call without an 
  3388.                    application name removes all applications from the specified 
  3389.                    userid application selector list 
  3390.  
  3391.  Note 
  3392.  
  3393.  The server computer name can be specified as '' for a local server. 
  3394.  
  3395.  Example 
  3396.  
  3397.  
  3398.   /* Delete a application from user dekstop */
  3399.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3400.   call LoadLsRxutFuncs
  3401.  
  3402.   NETAPPSEL = 32
  3403.   SrvName = '\\ILIDC'
  3404.   UserId = 'WS12345'
  3405.   ApplicationName = 'LIVA'
  3406.  
  3407.   myRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
  3408.  
  3409.   if myRc <> '0' then do
  3410.    say 'Got error from NetDelete() ' myRc
  3411.    call DropLsRxutFuncs
  3412.    exit 9
  3413.   end
  3414.   else do
  3415.    say 'Application removed from desktop successfully'
  3416.    say
  3417.   end
  3418.  
  3419.   call DropLsRxutFuncs
  3420.   call RxFuncDrop 'LoadLsRxutFuncs'
  3421.  
  3422.   exit 0
  3423.  
  3424.  Example Output 
  3425.  
  3426.  
  3427.   Application removed from desktop successfully
  3428.  
  3429.  
  3430. ΓòÉΓòÉΓòÉ 10.6. NETDASD Delete (LS40) ΓòÉΓòÉΓòÉ
  3431.  
  3432. The function deletes a directory limit from a specified directory. Before this 
  3433. function can be invoked, directory limits must be enabled on the 386-HPFS 
  3434. drive. (See the NetMisc(NETDASDCONTROL) function) 
  3435.  
  3436. Syntax 
  3437.  
  3438.  
  3439. MyRc = NetDelete(NETDASD, SrvName, DirPath)
  3440.  
  3441. Parameters 
  3442.  
  3443. The parameters specified are: 
  3444.  
  3445.  SrvName       The server computer name 
  3446.  
  3447.  DirPath       The path specification for the directory limit to delete 
  3448.  
  3449.  Note 
  3450.  
  3451.  The server computer name can be specified as '' for a local server. 
  3452.  
  3453.  Example 
  3454.  
  3455.  
  3456.   /* Delete a DASD directory limit on server */
  3457.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3458.   call LoadLsRxutFuncs
  3459.  
  3460.   NETDASD = 750
  3461.   DirPath = 'D:\APPS\DATA'
  3462.   SrvName = '\\DOMAIN_CONTRLR'
  3463.  
  3464.   myRc = NetDelete(NETDASD, DirPath, SrvName)
  3465.  
  3466.   if myRc <> '0' then do
  3467.    say 'Got error from NetDelete() ' myRc
  3468.    exitRc = 9
  3469.   end
  3470.   else do
  3471.    say 'Directory limit successfully deleted'
  3472.    exitRc = 0
  3473.   end
  3474.  
  3475.   call DropLsRxutFuncs
  3476.   call RxFuncDrop 'LoadLsRxutFuncs'
  3477.  
  3478.   exit exitRc
  3479.  
  3480.   exit 0
  3481.  
  3482.  Example Output 
  3483.  
  3484.  
  3485.   Directory limit successfully deleted
  3486.  
  3487.  
  3488. ΓòÉΓòÉΓòÉ 10.7. NETFILECLOSE Close a fileid ΓòÉΓòÉΓòÉ
  3489.  
  3490. The function performs a close on an opened file. 
  3491.  
  3492. Syntax 
  3493.  
  3494.  
  3495. MyRc = NetDelete(NETFILECLOSE, SrvName, FileId)
  3496.  
  3497. Parameters 
  3498.  
  3499. The parameters specified are: 
  3500.  
  3501.  SrvName           The server computer name on which the file is opened 
  3502.  
  3503.  FileId            The numeric file identifier of the file to be closed 
  3504.  
  3505.  Note 
  3506.  
  3507.  The server computer name can be specified as '' for a local server. 
  3508.  
  3509.  Example 
  3510.  
  3511.  
  3512.   /* Close an opened file on a server */
  3513.   if RxFuncQuery('NetDelete') <> 0 then do
  3514.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3515.    call LoadLsRxutFuncs
  3516.   end
  3517.  
  3518.   NETFILECLOSE = 220
  3519.   SrvName      = '\\ILIDC'
  3520.   FileId       = 3
  3521.  
  3522.   myRc = NetDelete(NETFILECLOSE, SrvName, FileId)
  3523.  
  3524.   if myRc <> '0' then do
  3525.    say 'Got error from NetDelete() ' myRc
  3526.    exit 9
  3527.   end
  3528.   else do
  3529.    say 'File closed successfully'
  3530.    say
  3531.   end
  3532.  
  3533.   exit 0
  3534.  
  3535.  Example Output 
  3536.  
  3537.  
  3538.   File closed successfully
  3539.  
  3540.  
  3541. ΓòÉΓòÉΓòÉ 10.8. NETGROUP Delete ΓòÉΓòÉΓòÉ
  3542.  
  3543. The function deletes a group definition. 
  3544.  
  3545. Syntax 
  3546.  
  3547.  
  3548. MyRc = NetDelete(NETGROUP, SrvName, GroupName)
  3549.  
  3550. Parameters 
  3551.  
  3552. The parameters specified are: 
  3553.  
  3554.  SrvName           The server computer name 
  3555.  
  3556.  GroupName         The name of the group definition to delete 
  3557.  
  3558.  Note 
  3559.  
  3560.  The server computer name can be specified as '' for a local server. 
  3561.  
  3562.  Example 
  3563.  
  3564.  
  3565.   /* Delete a group definition */
  3566.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3567.   call LoadLsRxutFuncs
  3568.  
  3569.   NETGROUP = 70
  3570.   SrvName  = '\\ILIDC'
  3571.   GroupName = 'TMPGROUP'
  3572.  
  3573.   myRc = NetDelete(NETGROUP, SrvName, GroupName)
  3574.  
  3575.   if myRc <> '0' then do
  3576.    say 'Got error from NetDelete() ' myRc
  3577.    call DropLsRxutFuncs
  3578.    exit 9
  3579.   end
  3580.   else do
  3581.    say 'Group definition deleted successfully'
  3582.    say
  3583.   end
  3584.  
  3585.   call DropLsRxutFuncs
  3586.   call RxFuncDrop 'LoadLsRxutFuncs'
  3587.  
  3588.   exit 0
  3589.  
  3590.  Example Output 
  3591.  
  3592.  
  3593.   Group definition deleted successfully
  3594.  
  3595.  
  3596. ΓòÉΓòÉΓòÉ 10.9. NETGROUPUSERS Delete ΓòÉΓòÉΓòÉ
  3597.  
  3598. The function deletes a userid from a group definition. 
  3599.  
  3600. Syntax 
  3601.  
  3602.  
  3603. MyRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
  3604.  
  3605. Parameters 
  3606.  
  3607. The parameters specified are: 
  3608.  
  3609.  SrvName           The server computer name 
  3610.  
  3611.  GroupName         The name of the group 
  3612.  
  3613.  UserId            The userid to delete from a group 
  3614.  
  3615.  Note 
  3616.  
  3617.  The server computer name can be specified as '' for a local server. 
  3618.  
  3619.  Example 
  3620.  
  3621.  
  3622.   /* Delete a group definition */
  3623.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3624.   call LoadLsRxutFuncs
  3625.  
  3626.   NETGROUPUSERS = 340
  3627.   SrvName       = '\\ILIDC'
  3628.   GroupName     = 'THEGROUP'
  3629.   UserId        = 'WS1000'
  3630.  
  3631.   myRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
  3632.  
  3633.   if myRc <> '0' then do
  3634.    say 'Got error from NetDelete() ' myRc
  3635.    call DropLsRxutFuncs
  3636.    exit 9
  3637.   end
  3638.   else do
  3639.    say 'Userid deleted from group successfully'
  3640.    say
  3641.   end
  3642.  
  3643.   call DropLsRxutFuncs
  3644.   call RxFuncDrop 'LoadLsRxutFuncs'
  3645.  
  3646.   exit 0
  3647.  
  3648.  Example Output 
  3649.  
  3650.  
  3651.   Userid deleted from group successfully
  3652.  
  3653.  
  3654. ΓòÉΓòÉΓòÉ 10.10. NETLOGONASN Delete ΓòÉΓòÉΓòÉ
  3655.  
  3656. The function removes all or one resource from a userid logon assignment list. 
  3657.  
  3658. Syntax 
  3659.  
  3660.  
  3661. MyRc = NetDelete(NETLOGONASN, SrvName, UserId)
  3662. MyRc = NetDelete(NETLOGONASN, SrvName, UserId, AliasName)
  3663.  
  3664. Parameters 
  3665.  
  3666. The parameters specified are: 
  3667.  
  3668.  SrvName           The server computer name 
  3669.  
  3670.  UserId            The userid to be deleted 
  3671.  
  3672.  AliasName         The alias name which will be removed from the logon 
  3673.                    assignment list 
  3674.  
  3675.                    Use the function call with 3 parameters to delete all logon 
  3676.                    assignments for a userid. Use the function call with 4 
  3677.                    parameters to delete a logon assignment for a known alias 
  3678.  
  3679.  Note 
  3680.  
  3681.  The server computer name can be specified as '' for a local server. 
  3682.  
  3683.  Example 
  3684.  
  3685.  
  3686.   /* Delete a logon assignment for a user */
  3687.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3688.   call LoadLsRxutFuncs
  3689.  
  3690.   NETLOGONASN = 52
  3691.   SrvName = '\\ILIDC'
  3692.   UserId = 'WS12345'
  3693.   Alias = 'BOOKS'
  3694.  
  3695.   myRc = NetDelete(NETLOGONASN, SrvName, UserId, Alias)
  3696.  
  3697.   if myRc <> '0' then do
  3698.    say 'Got error from NetDelete() ' myRc
  3699.    call DropLsRxutFuncs
  3700.    exit 9
  3701.   end
  3702.   else do
  3703.    say 'Logon Assignment removed successfully'
  3704.    say
  3705.   end
  3706.  
  3707.   call DropLsRxutFuncs
  3708.   call RxFuncDrop 'LoadLsRxutFuncs'
  3709.  
  3710.   exit 0
  3711.  
  3712.  Example Output 
  3713.  
  3714.  
  3715.   Logon Assignment removed successfully
  3716.  
  3717.  
  3718. ΓòÉΓòÉΓòÉ 10.11. NETMESSAGENAME Delete ΓòÉΓòÉΓòÉ
  3719.  
  3720. The function deletes a name in the message name table. 
  3721.  
  3722. Syntax 
  3723.  
  3724.  
  3725. MyRc = NetDelete(NETMESSAGENAME, msgName, fwdAction, SrvName)
  3726.  
  3727. Parameters 
  3728.  
  3729. The parameters required are: 
  3730.  
  3731.  msgName           The message name to delete from the name table 
  3732.  
  3733.  fwdAction         The action to take if the messages for name are forwarded to 
  3734.                    another name. If the value is nonzero, the forwarded name is 
  3735.                    deleted. If the value is 0, the name is not deleted. 
  3736.  
  3737.                    The default value is 0 
  3738.  
  3739.  SrvName           The server computer name 
  3740.  
  3741.  Note 
  3742.  
  3743.  The server computer name can be specified as '' for a local server. 
  3744.  
  3745.  Example 
  3746.  
  3747.  
  3748.   /* Delete a name from the message name table */
  3749.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3750.   call LoadLsRxutFuncs
  3751.  
  3752.   NETMESSAGENAME = 80
  3753.   msgName        = 'MSGNAME'
  3754.   fwdAction      = 0
  3755.   SrvName        = '\\ANYSRV01'
  3756.  
  3757.   myRc = NetDelete(NETMESSAGENAME, msgName, fwdAction, SrvName)
  3758.  
  3759.   if myRc <> '0' then do
  3760.    say 'Got error from NetAdd() ' myRc
  3761.    exitRc = 9
  3762.   end
  3763.   else do
  3764.    say 'Message name entry deleted successfully'
  3765.   end
  3766.  
  3767.   call DropLsRxutFuncs
  3768.   call RxFuncDrop 'LoadLsRxutFuncs'
  3769.  
  3770.   exit exitRc
  3771.  
  3772.  Example Output 
  3773.  
  3774.  
  3775.   Message name entry deleted successfully
  3776.  
  3777.  
  3778. ΓòÉΓòÉΓòÉ 10.12. NETPRINTJOB Delete ΓòÉΓòÉΓòÉ
  3779.  
  3780. The function deletes a print job from a printer queue. 
  3781.  
  3782. Syntax 
  3783.  
  3784.  
  3785. MyRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
  3786.  
  3787. Parameters 
  3788.  
  3789. The parameters specified are: 
  3790.  
  3791.  SrvName           The server computer name 
  3792.  
  3793.  QueueName         The name of the printer queue 
  3794.  
  3795.  JobId             The job identification number 
  3796.  
  3797.  Note 
  3798.  
  3799.  The server computer name can be specified as '' for a local server. 
  3800.  
  3801.  Example 
  3802.  
  3803.  
  3804.   /* Delete a print job */
  3805.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3806.   call LoadLsRxutFuncs
  3807.  
  3808.   NETPRINTJOB = 110
  3809.   SrvName     = '\\ILIDC'
  3810.   QueueName   = 'IBM4019L'
  3811.   JobId = 6
  3812.  
  3813.   myRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
  3814.  
  3815.   if myRc <> '0' then do
  3816.    say 'Got error from NetDelete() ' myRc
  3817.    call DropLsRxutFuncs
  3818.    exit 9
  3819.   end
  3820.   else do
  3821.    say 'Print job deleted successfully'
  3822.    say
  3823.   end
  3824.  
  3825.   call DropLsRxutFuncs
  3826.   call RxFuncDrop 'LoadLsRxutFuncs'
  3827.  
  3828.   exit 0
  3829.  
  3830.  Example Output 
  3831.  
  3832.  
  3833.   Print job deleted successfully
  3834.  
  3835.  
  3836. ΓòÉΓòÉΓòÉ 10.13. NETSESSION Delete ΓòÉΓòÉΓòÉ
  3837.  
  3838. The function ends a session between a requester and a server. 
  3839.  
  3840. Syntax 
  3841.  
  3842.  
  3843. MyRc = NetDelete(NETSESSION, SrvName, RequesterName)
  3844.  
  3845. Parameters 
  3846.  
  3847. The parameters specified are: 
  3848.  
  3849.  SrvName           The server computer name 
  3850.  
  3851.  RequesterName     The computer name of the requester that established the 
  3852.                    session being discontinued 
  3853.  
  3854.  Note 
  3855.  
  3856.  The server computer name can be specified as '' for a local server. 
  3857.  
  3858.  Example 
  3859.  
  3860.  
  3861.   /* Stop a session between a server and a requester */
  3862.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3863.   call LoadLsRxutFuncs
  3864.  
  3865.   NETSESSION = 180
  3866.   SrvName    = '\\ILIDC'
  3867.   RequesterName = '\\TEST19'
  3868.  
  3869.   myRc = NetDelete(NETSESSION, SrvName, RequesterName)
  3870.  
  3871.   if myRc <> '0' then do
  3872.    say 'Got error from NetDelete() ' myRc
  3873.    call DropLsRxutFuncs
  3874.    exit 9
  3875.   end
  3876.   else do
  3877.    say 'Session stopped successfully'
  3878.    say
  3879.   end
  3880.  
  3881.   call DropLsRxutFuncs
  3882.   call RxFuncDrop 'LoadLsRxutFuncs'
  3883.  
  3884.   exit 0
  3885.  
  3886.  Example Output 
  3887.  
  3888.  
  3889.   Session stopped successfully
  3890.  
  3891.  
  3892. ΓòÉΓòÉΓòÉ 10.14. NETSHARE Delete ΓòÉΓòÉΓòÉ
  3893.  
  3894. The function deletes a network name from the list of shared resources of a 
  3895. server. 
  3896.  
  3897. Syntax 
  3898.  
  3899.  
  3900. MyRc = NetDelete(NETSHARE, SrvName, NetName)
  3901.  
  3902. Parameters 
  3903.  
  3904. The parameters specified are: 
  3905.  
  3906.  SrvName           The server computer name 
  3907.  
  3908.  NetName           The network name of the shared resource 
  3909.  
  3910.  Note 
  3911.  
  3912.  The server computer name can be specified as '' for a local server. 
  3913.  
  3914.  Example 
  3915.  
  3916.  
  3917.   /* Stop sharing a shared resource */
  3918.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3919.   call LoadLsRxutFuncs
  3920.  
  3921.   NETSHARE = 190
  3922.   SrvName = '\\ILIDC'
  3923.   NetName = 'BOOKS'
  3924.  
  3925.   myRc = NetDelete(NETSHARE, SrvName, NetName)
  3926.  
  3927.   if myRc <> '0' then do
  3928.    say 'Got error from NetDelete() ' myRc
  3929.    call DropLsRxutFuncs
  3930.    exit 9
  3931.   end
  3932.   else do
  3933.    say 'Share stopped successfully'
  3934.    say
  3935.   end
  3936.  
  3937.   call DropLsRxutFuncs
  3938.   call RxFuncDrop 'LoadLsRxutFuncs'
  3939.  
  3940.   exit 0
  3941.  
  3942.  Example Output 
  3943.  
  3944.  
  3945.   Share stopped successfully
  3946.  
  3947.  
  3948. ΓòÉΓòÉΓòÉ 10.15. NETUSE Delete ΓòÉΓòÉΓòÉ
  3949.  
  3950. The function ends a connection between a local or UNC device name and a shared 
  3951. resource. 
  3952.  
  3953. Syntax 
  3954.  
  3955.  
  3956. MyRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
  3957.  
  3958. Parameters 
  3959.  
  3960. The parameters specified are: 
  3961.  
  3962.  SrvName      The server computer name 
  3963.  
  3964.  DeviceName   The device name that contains the following information: 
  3965.  
  3966.                   If the connection is a device name connection, the name 
  3967.                    specified must be the name of the local device 
  3968.  
  3969.                   If the connection is a UNC connection (either implicit or 
  3970.                    explicit), the name must be the UNC name 
  3971.  
  3972.  Force        Is one of three values specifying the type of disconnection. The 
  3973.               following force values are available: 
  3974.  
  3975.               0            USE_NOFORCE 
  3976.  
  3977.                            Maintains the connection in a dormant state, 
  3978.                            decrementing the usecount. A dormant session can 
  3979.                            quickly be activated as soon as reconnection is 
  3980.                            needed, improving system performance 
  3981.  
  3982.               1            USE_FORCE 
  3983.  
  3984.                            Connection is removed only if no file, directory, or 
  3985.                            drive is opened. The usecount is decremented for a 
  3986.                            local device name connection and forced to 0 for a 
  3987.                            UNC connection 
  3988.  
  3989.               2            USE_LOTS_OF_FORCE 
  3990.  
  3991.                            All files, directories, and drives open on the 
  3992.                            connection are forced closed 
  3993.  
  3994.  Note 
  3995.  
  3996.  The server computer name can be specified as '' for a local server. 
  3997.  
  3998.  Example 
  3999.  
  4000.  
  4001.   /* Stop using a UNC name */
  4002.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4003.   call LoadLsRxutFuncs
  4004.  
  4005.   NETUSE = 270
  4006.   SrvName = '\\ILIDC'
  4007.   DeviceName = '\\ILIDC\BOOKS'
  4008.   Force = 1
  4009.  
  4010.   myRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
  4011.  
  4012.   if myRc <> '0' then do
  4013.    say 'Got error from NetDelete() ' myRc
  4014.    call DropLsRxutFuncs
  4015.    exit 9
  4016.   end
  4017.   else do
  4018.    say 'Net Use stopped successfully'
  4019.    say
  4020.   end
  4021.  
  4022.   call DropLsRxutFuncs
  4023.   call RxFuncDrop 'LoadLsRxutFuncs'
  4024.  
  4025.   exit 0
  4026.  
  4027.  Example Output 
  4028.  
  4029.  
  4030.   Net Use stopped successfully
  4031.  
  4032.  
  4033. ΓòÉΓòÉΓòÉ 10.16. NETUSER Delete ΓòÉΓòÉΓòÉ
  4034.  
  4035. The function removes an user account from the user account subsystem database 
  4036. (UAS), ending all access to the resources in the system. 
  4037.  
  4038. Syntax 
  4039.  
  4040.  
  4041. MyRc = NetDelete(NETUSER, SrvName, UserId)
  4042.  
  4043. Parameters 
  4044.  
  4045. The parameters specified are: 
  4046.  
  4047.  SrvName           The server computer name 
  4048.  
  4049.  UserId            The userid to be deleted 
  4050.  
  4051.  Note 
  4052.  
  4053.  The server computer name can be specified as '' for a local server. 
  4054.  
  4055.  Example 
  4056.  
  4057.  
  4058.   /* Delete a userid */
  4059.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4060.   call LoadLsRxutFuncs
  4061.  
  4062.   NETUSER = 280
  4063.   SrvName = '\\ILIDC'
  4064.   UserId = 'WS1000'
  4065.  
  4066.   myRc = NetDelete(NETUSER, SrvName, UserId)
  4067.  
  4068.   if myRc <> '0' then do
  4069.    say 'Got error from NetDelete() ' myRc
  4070.    call DropLsRxutFuncs
  4071.    exit 9
  4072.   end
  4073.   else do
  4074.    say 'Userid deleted successfully'
  4075.    say
  4076.   end
  4077.  
  4078.   call DropLsRxutFuncs
  4079.   call RxFuncDrop 'LoadLsRxutFuncs'
  4080.  
  4081.   exit 0
  4082.  
  4083.  Example Output 
  4084.  
  4085.  
  4086.   Userid deleted successfully
  4087.  
  4088.  
  4089. ΓòÉΓòÉΓòÉ 11. NetEnumerate ΓòÉΓòÉΓòÉ
  4090.  
  4091. The Net enumerate functions are a family of functions that can be called with a 
  4092. number of parameters. The NetEnumerate function has two to five different 
  4093. parameters. The generic syntax is: 
  4094.  
  4095.  
  4096. MyRc = NetEnumerate(option, 'StemVar', parm1, parm2, parm3)
  4097.  
  4098. The option parameter contains a value to determine what type or option has to 
  4099. be enumerated. An example would be the enumeration of user accounts. 
  4100.  
  4101. The StemVar parameter is specified in quotes. It will actually contain the 
  4102. resulting information from the enumeration. 
  4103.  
  4104. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  4105.  
  4106. The MyRc parameter is the return code that will have an value from the 
  4107. NetEnumerate() function. If the call is successful the character '0' will be 
  4108. returned. Otherwise an error code and descriptive text are inserted by 
  4109. NetEnumerate() function. 
  4110.  
  4111. The option parameter values are defined in Option parameter values. 
  4112.  
  4113.  
  4114. ΓòÉΓòÉΓòÉ 11.1. NETACCESS Enumerate ΓòÉΓòÉΓòÉ
  4115.  
  4116. The function enumerates resource names having a access permission record (ACP, 
  4117. Access Control Profile). The number of returned entries will be either complete 
  4118. or incomplete. 
  4119.  
  4120. Syntax 
  4121.  
  4122.  
  4123. MyRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
  4124.  
  4125. Parameters 
  4126.  
  4127. The parameters specified are: 
  4128.  
  4129.  'resourcesAcp'  The REXX variable receiving the result. The variable is 
  4130.                  divided into: 
  4131.  
  4132.                      resourcesAcp.extend 
  4133.  
  4134.                       This variable indicates if the list provided is either 
  4135.                       'Complete' or 'Incomplete'. A incomplete list of 
  4136.                       resources having a access control profile can be extended 
  4137.                       by calling the NetEnumerate with different base path 
  4138.                       values 
  4139.  
  4140.                      resourcesAcp.0 
  4141.  
  4142.                       The number of resources having a access control profile. 
  4143.                       If no access control profiles where found, the value is 0 
  4144.                       and the resourcesAcp.1 is equal to '-none-' 
  4145.  
  4146.                      resourcesAcp.i 
  4147.  
  4148.                       The resources having a access control profile. The 
  4149.                       variable i has a value from 1 to resourcesAcp.0. The 
  4150.                       resources listed are relative to the basepath specified 
  4151.  
  4152.  SrvName         The server computer name 
  4153.  
  4154.  Basepath        This variable can either be '' or have a path value. See 
  4155.                  below: 
  4156.  
  4157.                                   Resource Type                 Basepath Format
  4158.                                   -------------                 ---------------
  4159.                                   Directory                     drive:pathname
  4160.                                   File                          drive:pathname
  4161.                                   Pipe                          \pipe\pipename
  4162.                                   Spooler Queue                 \print\queuename
  4163.                                   Serial Device Queue           \comm\chardevqueue
  4164.  
  4165.  Note 
  4166.  
  4167.  The server computer name can be specified as '' for a local server. 
  4168.  
  4169.  Example 
  4170.  
  4171.  
  4172.   /* List resources having a access control profile */
  4173.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4174.   call LoadLsRxutFuncs
  4175.  
  4176.   NETACCESS = 10
  4177.   SrvName   = '\\DOMAIN_CONTRLR'
  4178.   BasePath  = 'C:\IBMLAN'
  4179.   /* BasePath = '' */
  4180.  
  4181.   myRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
  4182.  
  4183.   if myRc <> '0' then do
  4184.    say 'Got error from NetEnumerate() ' myRc
  4185.    call DropLsRxutFuncs
  4186.    exit 9
  4187.   end
  4188.  
  4189.   if resourcesAcp.0 = 0 then do
  4190.    say '-none-'
  4191.    call DropLsRxutFuncs
  4192.    exit 0
  4193.   end
  4194.  
  4195.   say 'The list provided is: ' resourcesAcp.extend
  4196.   say 'Number of resources having a access control profile: ' resourcesAcp.0
  4197.   say
  4198.   say 'The base path is: ' BasePath
  4199.   say 'Resources listed are relative to the base path'
  4200.   say
  4201.  
  4202.   do i=1 to resourcesAcp.0
  4203.    say resourcesAcp.i
  4204.   end
  4205.  
  4206.   call DropLsRxutFuncs
  4207.   call RxFuncDrop 'LoadLsRxutFuncs'
  4208.  
  4209.   exit 0
  4210.  
  4211.  Example Output 
  4212.  
  4213.  
  4214.   The list provided is:  Complete
  4215.   Number of resources having an access control profile:  19
  4216.  
  4217.   The base path is:  C:\IBMLAN
  4218.   Resources listed are relative to the base path
  4219.  
  4220.   \DOSLAN\DOS
  4221.   \DOSLAN\NET
  4222.   \DCDB
  4223.   \DCDB\DATA
  4224.   \DCDB\USERS\FMAM
  4225.   \BOOK
  4226.   \DCDB\APPS
  4227.   \DCDB\USERS\USERID\BATCH
  4228.   \DCDB\USERS\LINDBERG\BATCH
  4229.   \DCDB\USERS\FMAM\BATCH
  4230.   \DCDB\FILES
  4231.   \DCDB\LISTS
  4232.   \DCDB\IMAGES
  4233.   \DCDB\USERS\USERID
  4234.   \DCDB\DEVICES
  4235.   \NETPROG
  4236.   \REPL\IMPORT\SCRIPTS
  4237.   \DCDB\USERS\LINDBERG
  4238.   \DCDB\PRINTERS
  4239.  
  4240.  
  4241. ΓòÉΓòÉΓòÉ 11.2. NETALIAS Enumerate ΓòÉΓòÉΓòÉ
  4242.  
  4243. The function enumerates alias names of a given type. 
  4244.  
  4245. Syntax 
  4246.  
  4247.  
  4248. MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
  4249. MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName, AliasType)
  4250.  
  4251. Parameters 
  4252.  
  4253. The parameters specified are: 
  4254.  
  4255.  'aliasNames'      The REXX variable receiving the result. The variable is 
  4256.                    divided into: 
  4257.  
  4258.                        aliasNames.0 
  4259.  
  4260.                         The number of alias names returned 
  4261.  
  4262.                        aliasNames.i 
  4263.  
  4264.                         The alias name number i, where the variable i has a 
  4265.                         value from 1 to aliasNames.0. 
  4266.  
  4267.  SrvName           The server computer name 
  4268.  
  4269.  AliasType         The AliasType can be specified as indicated below: 
  4270.  
  4271.                                       ALIAS_TYPE_FILE     = 1
  4272.                                       ALIAS_TYPE_PRINTER  = 2
  4273.                                       ALIAS_TYPE_SERIAL   = 4
  4274.  
  4275.                    If AliasType is specified as '', it is identical as 
  4276.                    enumerate all alias names defined. This is identical as the 
  4277.                    call to NetEnumerate() without specifying a forth parameter 
  4278.  
  4279.  Note 
  4280.  
  4281.  The server computer name can be specified as '' for a local server. 
  4282.  
  4283.  Example 
  4284.  
  4285.  
  4286.   /* List all defined alias names */
  4287.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4288.   call LoadLsRxutFuncs
  4289.  
  4290.   NETALIAS = 20
  4291.   SrvName = '\\DOMAIN_CONTRLR'
  4292.  
  4293.   myRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
  4294.  
  4295.   if myRc <> '0' then do
  4296.    say 'Got error from NetEnumerate() ' myRc
  4297.    call DropLsRxutFuncs
  4298.    exit 9
  4299.   end
  4300.  
  4301.   if aliasNames.0 = 0 then do
  4302.    say '-none-'
  4303.    call DropLsRxutFuncs
  4304.    exit 0
  4305.   end
  4306.  
  4307.   say 'Number of alias names: ' aliasNames.0
  4308.   say
  4309.  
  4310.   do i=1 to aliasNames.0
  4311.    say aliasNames.i
  4312.   end
  4313.  
  4314.   call DropLsRxutFuncs
  4315.   call RxFuncDrop 'LoadLsRxutFuncs'
  4316.  
  4317.   exit 0
  4318.  
  4319.  Example Output 
  4320.  
  4321.  
  4322.   Number of alias names:  3
  4323.  
  4324.   BOOKS
  4325.   MYDEMO
  4326.   SRVCOM
  4327.  
  4328.  
  4329. ΓòÉΓòÉΓòÉ 11.3. NETAPP Enumerate ΓòÉΓòÉΓòÉ
  4330.  
  4331. The function returns the application names of a given type. 
  4332.  
  4333. Syntax 
  4334.  
  4335.  
  4336. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName)
  4337. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
  4338. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId, AppType)
  4339.  
  4340. Parameters 
  4341.  
  4342. The parameters specified are: 
  4343.  
  4344.  'appNames'    The REXX variable receiving the result. The variable is divided 
  4345.                into: 
  4346.  
  4347.                    appNames.0 
  4348.  
  4349.                     The number of application names returned 
  4350.  
  4351.                    appNames.i 
  4352.  
  4353.                     The application name number i, where the variable i has a 
  4354.                     value from 1 to appNames.0. 
  4355.  
  4356.  SrvName       The server computer name of the domain controller 
  4357.  
  4358.  UserId        The Userid is specified for private application. For a list of 
  4359.                all public DOS and OS/2 application use NetEnumerate(NETAPP) 
  4360.                with 3 parameters. 
  4361.  
  4362.  AppType       Use this value together with the five parameter call til 
  4363.                NetEnumerate() to control the application names returned. The 
  4364.                values defined can be added to enumerate a combination of 
  4365.                application types. Use a empty value for the UserId parameter to 
  4366.                enumerate public applications. The following values are used: 
  4367.  
  4368.                               Value   Enumerate
  4369.                               -----   ---------
  4370.                                1      Public DOS applications
  4371.                                2      Public OS/2 applications
  4372.                                4      Private OS/2 applications
  4373.                                8      Private DOS applications
  4374.  
  4375.  MyRc          The return code. You will get the return code 3 if the userid 
  4376.                specified for the private applications does not have the domain 
  4377.                controller database entries available. See also NETUSERINITDCDB 
  4378.  
  4379.  Note 
  4380.  
  4381.  The server computer name can be specified as '' for a local domain controller. 
  4382.  
  4383.  Example 
  4384.  
  4385.  
  4386.   /* List all public applications and private applications for FMAM */
  4387.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4388.   call LoadLsRxutFuncs
  4389.  
  4390.   NETAPP  = 30
  4391.   SrvName = '\\DOMAIN_CONTRLR'
  4392.   UserId  = 'FMAM'
  4393.  
  4394.   /* Get all public application names */
  4395.   myRc = NetEnumerate(NETAPP, 'appNames', SrvName)
  4396.  
  4397.   if myRc <> '0' then do
  4398.    say 'Got error from NetEnumerate() ' myRc
  4399.    call DropLsRxutFuncs
  4400.    exit 9
  4401.   end
  4402.  
  4403.   if appNames.0 = 0 then do
  4404.    say 'No public applications defined'
  4405.   end
  4406.   else do
  4407.    say 'Number of public applications: ' appNames.0
  4408.    say
  4409.  
  4410.    do i=1 to appNames.0
  4411.     say appNames.i
  4412.    end
  4413.  
  4414.    say
  4415.   end
  4416.  
  4417.   /* Get all private application names for UserId */
  4418.   myRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
  4419.  
  4420.   if myRc <> '0' then do
  4421.    say 'Got error from NetEnumerate() ' myRc
  4422.    call DropLsRxutFuncs
  4423.    exit 9
  4424.   end
  4425.  
  4426.   if appNames.0 = 0 then do
  4427.    say 'No private applications defined for ' UserId
  4428.    call DropLsRxutFuncs
  4429.    exit 0
  4430.   end
  4431.  
  4432.   say 'Number of private applications for ' UserId 'is:' appNames.0
  4433.   say
  4434.  
  4435.   do i=1 to appNames.0
  4436.    say appNames.i
  4437.   end
  4438.  
  4439.   call DropLsRxutFuncs
  4440.   call RxFuncDrop 'LoadLsRxutFuncs'
  4441.  
  4442.   exit 0
  4443.  
  4444.  Example Output 
  4445.  
  4446.  
  4447.   Number of public applications:  3
  4448.  
  4449.   ALLAPPS
  4450.   LANMSG
  4451.   THENEW
  4452.  
  4453.   No private applications defined for  FMAM
  4454.  
  4455.  
  4456. ΓòÉΓòÉΓòÉ 11.4. NETBIOS Enumerate ΓòÉΓòÉΓòÉ
  4457.  
  4458. The function returns information on all network device drivers installed on a 
  4459. computer. 
  4460.  
  4461. Syntax 
  4462.  
  4463.  
  4464. MyRc = NetEnumerate(NETBIOS, 'netBiosInfo')
  4465. MyRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
  4466.  
  4467. Parameters 
  4468.  
  4469. The parameters specified are: 
  4470.  
  4471.  'netBiosInfo'     The REXX variable receiving the result. The variable is 
  4472.                    divided into: 
  4473.  
  4474.                        netBiosInfo.0 
  4475.  
  4476.                         The number of netbios device drivers 
  4477.  
  4478.                        netBiosInfo.i 
  4479.  
  4480.                         The netbios device driver name entry i, where the 
  4481.                         variable i has a value from 1 to netBiosInfo.0 
  4482.  
  4483.  SrvName           The requester or server computer name 
  4484.  
  4485.  Note 
  4486.  
  4487.  The server computer name can be specified as '' for a local computer 
  4488.  
  4489.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  4490.  parameters where SrvName is set to ''. 
  4491.  
  4492.  Example 
  4493.  
  4494.  
  4495.   /* List NetBIOS device drivers names */
  4496.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4497.   call LoadLsRxutFuncs
  4498.  
  4499.   NETBIOS = 90
  4500.   SrvName = '\\DOMAIN_CONTRLR'
  4501.  
  4502.   myRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
  4503.  
  4504.   if myRc <> '0' then do
  4505.    say 'Got error from NetEnumerate() ' myRc
  4506.    call DropLsRxutFuncs
  4507.    exit 9
  4508.   end
  4509.  
  4510.   if netBiosInfo.0 = 0 then do
  4511.    say 'No driver information'
  4512.    call DropLsRxutFuncs
  4513.    exit 0
  4514.   end
  4515.  
  4516.   say 'Number of NetBIOS device drivers: ' netBiosInfo.0
  4517.   say
  4518.  
  4519.   do i=1 to netBiosInfo.0
  4520.    say netBiosInfo.i
  4521.   end
  4522.  
  4523.   call DropLsRxutFuncs
  4524.   call RxFuncDrop 'LoadLsRxutFuncs'
  4525.  
  4526.   exit 0
  4527.  
  4528.  Example Output 
  4529.  
  4530.  
  4531.   Number of NetBIOS device drivers:  1
  4532.  
  4533.   NETLB
  4534.  
  4535.  
  4536. ΓòÉΓòÉΓòÉ 11.5. NETCHARDEV Enumerate ΓòÉΓòÉΓòÉ
  4537.  
  4538. The function provides a list of serial devices on a server. 
  4539.  
  4540. Syntax 
  4541.  
  4542.  
  4543. MyRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
  4544.  
  4545. Parameters 
  4546.  
  4547. The parameters specified are: 
  4548.  
  4549.  'charDevInfo'     The REXX variable receiving the result. The variable is 
  4550.                    divided into: 
  4551.  
  4552.                        charDevInfo.0 
  4553.  
  4554.                         The number of serial devices 
  4555.  
  4556.                        charDevInfo.i 
  4557.  
  4558.                         The serial device name entry i, where the variable i 
  4559.                         has a value from 1 to charDevInfo.0 
  4560.  
  4561.  SrvName           The server computer name 
  4562.  
  4563.  Note 
  4564.  
  4565.  The server computer name can be specified as '' for a local server or 
  4566.  computer. 
  4567.  
  4568.  Example 
  4569.  
  4570.  
  4571.   /* List serial device names on a server */
  4572.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4573.   call LoadLsRxutFuncs
  4574.  
  4575.   NETCHARDEV = 130
  4576.   SrvName    = '\\DOMAIN_CONTRLR'
  4577.  
  4578.   myRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
  4579.  
  4580.   if myRc <> '0' then do
  4581.    say 'Got error from NetEnumerate() ' myRc
  4582.    call DropLsRxutFuncs
  4583.    exit 9
  4584.   end
  4585.  
  4586.   if charDevInfo.0 = 0 then do
  4587.    say 'No serial devices defined on server'
  4588.    call DropLsRxutFuncs
  4589.    exit 0
  4590.   end
  4591.  
  4592.   say 'Number of serial device names: ' charDevInfo.0
  4593.   say
  4594.  
  4595.   do i=1 to charDevInfo.0
  4596.    say charDevInfo.i
  4597.   end
  4598.  
  4599.   call DropLsRxutFuncs
  4600.   call RxFuncDrop 'LoadLsRxutFuncs'
  4601.  
  4602.   exit 0
  4603.  
  4604.  Example Output 
  4605.  
  4606.  
  4607.   Number of serial device names:  1
  4608.  
  4609.   COM1
  4610.  
  4611.  
  4612. ΓòÉΓòÉΓòÉ 11.6. NETCHARDEVQ Enumerate ΓòÉΓòÉΓòÉ
  4613.  
  4614. The function provides a list of serial device queues on a server. 
  4615.  
  4616. Syntax 
  4617.  
  4618.  
  4619. MyRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
  4620.  
  4621. Parameters 
  4622.  
  4623. The parameters specified are: 
  4624.  
  4625.  'charDevQInfo'    The REXX variable receiving the result. The variable is 
  4626.                    divided into: 
  4627.  
  4628.                        charDevQInfo.0 
  4629.  
  4630.                         The number of serial device queues 
  4631.  
  4632.                        charDevQInfo.i 
  4633.  
  4634.                         The serial device queue name entry i, where the 
  4635.                         variable i has a value from 1 to charDevQInfo.0 
  4636.  
  4637.  SrvName           The server computer name 
  4638.  
  4639.  Note 
  4640.  
  4641.  The server computer name can be specified as '' for a local server or 
  4642.  computer. 
  4643.  
  4644.  Example 
  4645.  
  4646.  
  4647.   /* List serial device queue names on a server */
  4648.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4649.   call LoadLsRxutFuncs
  4650.  
  4651.   NETCHARDEVQ = 140
  4652.   SrvName     = '\\DOMAIN_CONTRLR'
  4653.  
  4654.   myRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
  4655.  
  4656.   if myRc <> '0' then do
  4657.    say 'Got error from NetEnumerate() ' myRc
  4658.    call DropLsRxutFuncs
  4659.    exit 9
  4660.   end
  4661.  
  4662.   if charDevQInfo.0 = 0 then do
  4663.    say 'No serial device queues defined'
  4664.    call DropLsRxutFuncs
  4665.    exit 0
  4666.   end
  4667.  
  4668.   say 'Number of serial device queue names: ' charDevQInfo.0
  4669.   say
  4670.  
  4671.   do i=1 to charDevQInfo.0
  4672.    say charDevQInfo.i
  4673.   end
  4674.  
  4675.   call DropLsRxutFuncs
  4676.   call RxFuncDrop 'LoadLsRxutFuncs'
  4677.  
  4678.   exit 0
  4679.  
  4680.  Example Output 
  4681.  
  4682.  
  4683.   Number of serial device queue names:  1
  4684.  
  4685.   SRVCOM
  4686.  
  4687.  
  4688. ΓòÉΓòÉΓòÉ 11.7. NETCONNECTION Enumerate ΓòÉΓòÉΓòÉ
  4689.  
  4690. The function returns a list of connections made to a shared resource of a 
  4691. server, or a list of all connections established from a particular computer to 
  4692. a server. This function is identical to NetGetInfo(NETCONNECTION). 
  4693.  
  4694. Syntax 
  4695.  
  4696.  
  4697. MyRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  4698.  
  4699. Parameters 
  4700.  
  4701. The parameters specified are: 
  4702.  
  4703.  'connInfo'  The REXX variable receiving the result. The variable is divided 
  4704.              into: 
  4705.  
  4706.                  connInfo.num_entries 
  4707.  
  4708.                   The number of connection information entries. Each entry is 
  4709.                   obtained by the index i, which has a value from 1 to 
  4710.                   connInfo.num_entries. 
  4711.  
  4712.                   The connInfo.0 has the same value available 
  4713.  
  4714.                  connInfo.i.id 
  4715.  
  4716.                   The connection id 
  4717.  
  4718.                  connInfo.i.type 
  4719.  
  4720.                   The type of connection made from the local device name to the 
  4721.                   shared resource 
  4722.  
  4723.                  connInfo.i.num_opens 
  4724.  
  4725.                   The number of files that are currently open as a result of 
  4726.                   the connection 
  4727.  
  4728.                  connInfo.i.num_users 
  4729.  
  4730.                   The number of users on the connection 
  4731.  
  4732.                  connInfo.i.time 
  4733.  
  4734.                   The number of seconds the connection has been established 
  4735.  
  4736.                  connInfo.i.username 
  4737.  
  4738.                   The name of the user that made the connection 
  4739.  
  4740.                  connInfo.i.netname 
  4741.  
  4742.                   A string indicating either the netname of the shared resource 
  4743.                   of the server or the computer name of the requester, 
  4744.                   depending on which name was specified as the Qualifier 
  4745.                   parameter 
  4746.  
  4747.  SrvName     The server computer name 
  4748.  
  4749.  Qualifier   A string specifying either the netname of the shared resource 
  4750.              whose connections will be listed or the client name of the 
  4751.              requester whose connections to the shared resource will be listed 
  4752.  
  4753.  Note 
  4754.  
  4755.  The server computer name can be specified as '' for a local server. 
  4756.  
  4757.  Example 
  4758.  
  4759.  
  4760.   /* Enumerate connection information */
  4761.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4762.   call LoadLsRxutFuncs
  4763.  
  4764.   NETCONNECTION = 40
  4765.   SrvName       = '\\DOMAIN_CONTRLR'
  4766.   Qualifier     = '\\ITSCWK21'
  4767.  
  4768.   myRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  4769.  
  4770.   if myRc <> '0' then do
  4771.    say 'Got error from NetEnumerate() ' myRc
  4772.    call DropLsRxutFuncs
  4773.    exit 9
  4774.   end
  4775.  
  4776.   if connInfo.0 = 0 then do
  4777.    say 'No connections established'
  4778.    call DropLsRxutFuncs
  4779.    exit 0
  4780.   end
  4781.  
  4782.   if connInfo.num_entries <> 0 then do
  4783.    say "Number of entries: " connInfo.num_entries
  4784.  
  4785.    do i=1 to connInfo.num_entries
  4786.     say
  4787.     say "Connection id:        " connInfo.i.id
  4788.     say "Connection type:      " connInfo.i.type
  4789.     say "Connection num opens: " connInfo.i.num_opens
  4790.     say "Connection num users: " connInfo.i.num_users
  4791.     say "Connection time:      " connInfo.i.time
  4792.     say "Connection user name: " connInfo.i.username
  4793.     say "Connection net name:  " connInfo.i.netname
  4794.    end
  4795.  
  4796.   end
  4797.  
  4798.   call DropLsRxutFuncs
  4799.   call RxFuncDrop 'LoadLsRxutFuncs'
  4800.  
  4801.   exit 0
  4802.  
  4803.  Example Output 
  4804.  
  4805.  
  4806.   Number of entries:  2
  4807.  
  4808.   Connection id:         6145
  4809.   Connection type:       Interprocess Communication Connection
  4810.   Connection num opens:  0
  4811.   Connection num users:  1
  4812.   Connection time:       411
  4813.   Connection user name:  ADMIN04
  4814.   Connection net name:   IPC$
  4815.  
  4816.   Connection id:         59393
  4817.   Connection type:       Disk Connection
  4818.   Connection num opens:  1
  4819.   Connection num users:  1
  4820.   Connection time:       367
  4821.   Connection user name:  ADMIN04
  4822.   Connection net name:   C$
  4823.  
  4824.  
  4825. ΓòÉΓòÉΓòÉ 11.8. NETDASD Enumerate (LS40) ΓòÉΓòÉΓòÉ
  4826.  
  4827. The function returns a list of directories that have had directory limits 
  4828. applied to them. Before this function can be used successfully, directory 
  4829. limits must be enabled on the 386-HPFS drive. (See the NetMisc(NETDASDCONTROL) 
  4830. function) 
  4831.  
  4832. Syntax 
  4833.  
  4834.  
  4835. MyRc = NetEnumerate(NETDASD, 'DASDInfo', SrvName)
  4836.  
  4837. Parameters 
  4838.  
  4839. The parameters required and returned are: 
  4840.  
  4841.  'DASDInfo'  The directory limits information variable, which is divided into: 
  4842.  
  4843.                  DASDInfo.DirPath 
  4844.  
  4845.                   A string containing the directory path to be enumerated The 
  4846.                   string must be directory path, beginning with the drive 
  4847.                   letter, and only ending with a backslash when a root 
  4848.                   directory is specified. 
  4849.  
  4850.                   If DASDInfo.DirPath is set to '', the function returns all 
  4851.                   root directories and subdirectories with directory limits for 
  4852.                   each logical 386-HPFS drive. 
  4853.  
  4854.                   If a redirected drive is specified for DASDInfo.DirPath, the 
  4855.                   SrvName parameter must be '' 
  4856.  
  4857.                  DASDInfo.BufferSize 
  4858.  
  4859.                   This is a internal workbuffer to hold the directory limits. 
  4860.                   It is used to limit the amount of returned directory limits 
  4861.  
  4862.                  DASDInfo.recursive 
  4863.  
  4864.                   A varaible controlling recursive enumeration. The values are: 
  4865.  
  4866.                                     Value Meaning
  4867.                                     ----- -------
  4868.                                       0   Return directory limit for the
  4869.                                           directory specified only
  4870.  
  4871.                                       1   Return all directory limits for
  4872.                                           the directory specified and all
  4873.                                           subdirectories
  4874.  
  4875.                   The default value is 0 
  4876.  
  4877.                  DASDInfo.count 
  4878.  
  4879.                   The number of directory limits returned. The variable i has a 
  4880.                   value from 1 to DASDInfo.count for the following parameters 
  4881.  
  4882.                  DASDInfo.EntriesAvail 
  4883.  
  4884.                   This is a parameter returned to indicate if there where more 
  4885.                   data available with the Buffer Size specified 
  4886.  
  4887.                   If the value is larger then DASDInfo.count then more data 
  4888.                   than BufferSize was available. Otherwise the BufferSize was 
  4889.                   sufficient for to hold all directory limits retrieved 
  4890.  
  4891.                  DASDInfo.i.resource_name 
  4892.  
  4893.                   The relative name of the directory having a directory limit. 
  4894.                   For the base path itself, the value '' is returned. The 
  4895.                   folowing directory entries are all relative to the base path 
  4896.                   (DASDInfo.DirPath) 
  4897.  
  4898.                  DASDInfo.i.max 
  4899.  
  4900.                   The amount of disk space allotted to this directory by 
  4901.                   directory eimits. Specified in KB, this field can be set from 
  4902.                   1 to 67108863. 
  4903.  
  4904.                  DASDInfo.i.use 
  4905.  
  4906.                   The amount (in KB) of disk space already occupied within the 
  4907.                   specified directory resource 
  4908.  
  4909.                  DASDInfo.i.thresh 
  4910.  
  4911.                   The initial alert threshold as a percentage of the total 
  4912.                   directory limit space allotted, with values ranging from 0 to 
  4913.                   99. Zero specifies that no threshold alert is to be 
  4914.                   generated, and 99 specifies that an alert is generated when 
  4915.                   99% of the allotted directory limit for this directory has 
  4916.                   been reached. 
  4917.  
  4918.                  DASDInfo.i.delta 
  4919.  
  4920.                   The increment in which alerts are to be generated after the 
  4921.                   DASDInfo.i.thresh threshold has been crossed, but before all 
  4922.                   of the allotted disk space has been used. 
  4923.  
  4924.  SrvName     The computer name of the server to enumerate the directory limits 
  4925.              on 
  4926.  
  4927.  Note 
  4928.  
  4929.  The server computer name can be specified as '' for a local server. 
  4930.  
  4931.  Example 
  4932.  
  4933.  
  4934.   /* Enumerate DASD directory limit on server */
  4935.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4936.   call LoadLsRxutFuncs
  4937.  
  4938.   NETDASD             = 750
  4939.   DASDInfo.DirPath    = 'D:\APPS\DATA'
  4940.   DASDInfo.recursive  = 1
  4941.   DASDInfo.BufferSize = 4096
  4942.   SrvName             = '\\DOMAIN_CONTRLR'
  4943.  
  4944.   myRc = NetEnumerate(NETDASD, 'DASDInfo', SrvName)
  4945.  
  4946.   if myRc <> '0' then do
  4947.    say 'Got error from NetEnumerate() ' myRc
  4948.    exitRc = 9
  4949.   end
  4950.   else do
  4951.    say 'Directory limit enumeration returned'
  4952.    say 'Number entries available' DASDInfo.EntriesAvail
  4953.    say 'Number entries returned ' DASDInfo.count
  4954.    say 'First dir path          ' DASDInfo.1.resource_name
  4955.    say 'First limit size        ' DASDInfo.1.max
  4956.    say 'First limit usage       ' DASDInfo.1.use
  4957.    say 'Threshold               ' DASDInfo.1.thresh
  4958.    say 'Delta                   ' DASDInfo.1.delta
  4959.  
  4960.    exitRc = 0
  4961.   end
  4962.  
  4963.   call DropLsRxutFuncs
  4964.   call RxFuncDrop 'LoadLsRxutFuncs'
  4965.  
  4966.   exit exitRc
  4967.  
  4968.  Example Output 
  4969.  
  4970.  
  4971.   Directory limit enumeration returned
  4972.   Number entries available   1
  4973.   Number entries returned    1
  4974.   First dir path
  4975.   First limit size           512
  4976.   First limit usage          102
  4977.   Threshold                  90
  4978.   Delta                      5
  4979.  
  4980.  
  4981. ΓòÉΓòÉΓòÉ 11.9. NETFILE Enumerate ΓòÉΓòÉΓòÉ
  4982.  
  4983. The function returns information about some or all open files on a server. 
  4984.  
  4985. Syntax 
  4986.  
  4987.  
  4988. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  4989. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath)
  4990. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
  4991.  
  4992. Parameters 
  4993.  
  4994. The parameters specified are: 
  4995.  
  4996.  'fileInfo'  The REXX variable receiving the result. The variable is divided 
  4997.              into: 
  4998.  
  4999.                  fileInfo.count 
  5000.  
  5001.                   The number of open files. The same value is available in the 
  5002.                   variable fileInfo.0 
  5003.  
  5004.                  fileInfo.i.id 
  5005.  
  5006.                   The file id i, where the variable i has a value from 1 to 
  5007.                   fileInfo.count 
  5008.  
  5009.                  fileInfo.i.permissions 
  5010.  
  5011.                   Indicates the access permissions of the file opening. It is a 
  5012.                   hexedecimal value combined of the following: 
  5013.  
  5014.  
  5015.                                     Hex Value  What
  5016.                                     ---------  ---------------------------------------
  5017.                                       0x1      Permission to read a resource and by default,
  5018.                                                execute the resource.
  5019.  
  5020.                                       0x2      Permission to write to a resource.
  5021.  
  5022.                                       0x4      Permission to create a resource. Data can be
  5023.                                                written when creating the resource.
  5024.  
  5025.                  fileInfo.i.num_locks 
  5026.  
  5027.                   The number of file locks on the file, device, or pipe. 
  5028.  
  5029.                  fileInfo.i.pathname 
  5030.  
  5031.                   The path name i, where the variable i has a value from 1 to 
  5032.                   fileInfo.count 
  5033.  
  5034.                  fileInfo.i.username 
  5035.  
  5036.                   The name of the userid that opened the resource. 
  5037.  
  5038.                  fileInfo.frk 
  5039.  
  5040.                   On server with many open files, the fileInfo.frk parameter 
  5041.                   can be used to get a partial enumeration, process the 
  5042.                   returned information and resume open file enumeration. 
  5043.  
  5044.                   To control this operation the value 'INITRESUME' must be 
  5045.                   specified on the first call and 'RESUME' on the following 
  5046.                   calls until the returned number of open files is 0 
  5047.                   (fileInfo.count) 
  5048.  
  5049.                  fileInfo.frkMoreData 
  5050.  
  5051.                   This variable will be set to 234 (ERROR_MORE_DATA) if there 
  5052.                   is more data available, otherwise the value will be 0 
  5053.  
  5054.                  fileInfo.frkBuffer 
  5055.  
  5056.                   The internal binary work buffer size for the fileInfo.frk 
  5057.                   control parameter. The size should be from 1024 to 65535 
  5058.                   bytes. The default value is 4096 bytes 
  5059.  
  5060.                   This buffer size is used on every call to hold the binary 
  5061.                   data, that will be formatted into the returned REXX variables 
  5062.  
  5063.  SrvName     The server computer name. If the server computer name is '', it is 
  5064.              a call to the local server 
  5065.  
  5066.  BasePath    The base path to the open files. For example is 'C:\' a base path 
  5067.  
  5068.  UserId      A userid to enumerate open files on 
  5069.  
  5070.  Note 
  5071.  
  5072.  The server computer name can be specified as '' for a local server. 
  5073.  
  5074.  There are 3 different calls to NetEnumerate(NETFILE). They are not identical 
  5075.  if one or more specified parameters have the value ''. 
  5076.  
  5077.  An example without the resume key 
  5078.  
  5079.  
  5080.   /* List open files on server */
  5081.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5082.   call LoadLsRxutFuncs
  5083.  
  5084.   NETFILE  = 60
  5085.   SrvName  = '\\DOMAIN_CONTRLR'
  5086.   BasePath = 'C:'
  5087.   UserId   = 'ADMIN04'
  5088.  
  5089.   myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
  5090.  
  5091.   if myRc <> '0' then do
  5092.    say 'Got error from NetEnumerate() ' myRc
  5093.    call DropLsRxutFuncs
  5094.    exit 9
  5095.   end
  5096.  
  5097.   if fileInfo.count = 0 then do
  5098.    say 'No files open on the server'
  5099.    call DropLsRxutFuncs
  5100.    exit 0
  5101.   end
  5102.  
  5103.   say 'Number of open file entries: ' fileInfo.count
  5104.   say
  5105.  
  5106.   do i=1 to fileInfo.count
  5107.    say 'Id            ' fileInfo.i.id
  5108.    say 'Permissions   ' fileInfo.i.permissions
  5109.    say 'Number locks  ' fileInfo.i.num_locks
  5110.    say 'Path Name     ' fileInfo.i.pathname
  5111.    say 'Opening Userid' fileInfo.i.username
  5112.    say
  5113.   end
  5114.  
  5115.   call DropLsRxutFuncs
  5116.   call RxFuncDrop 'LoadLsRxutFuncs'
  5117.  
  5118.   exit 0
  5119.  
  5120.  Example Output 
  5121.  
  5122.  
  5123.   Number of open file entries:  2
  5124.  
  5125.   Id             142218
  5126.   Permissions    1
  5127.   Number locks   0
  5128.   Path Name      C:\OS2\VIEW.EXE
  5129.   Opening Userid ADMIN04
  5130.  
  5131.   Id             142250
  5132.   Permissions    1
  5133.   Number locks   0
  5134.   Path Name      C:\OS2\VIEWDOC.EXE
  5135.   Opening Userid ADMIN04
  5136.  
  5137.  An example with the resume key 
  5138.  
  5139.  
  5140.   /* Net enumerate open files using resume operation */
  5141.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5142.   call LoadLsRxutFuncs
  5143.  
  5144.   NETFILE  = 60
  5145.   SrvName  = '\\KING_BALU'
  5146.   BasePath = ''
  5147.   UserId   = 'ADMIN04'
  5148.   fileInfo.frkBuffer =  512
  5149.  
  5150.   fileInfo.resumekey = 'INITRESUME'
  5151.   myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  5152.  
  5153.   /* Process the file information and test the
  5154.      fileInfo.frkMoreData variable. If 234 then
  5155.      make the following call
  5156.  
  5157.      fileInfo.resumekey = 'RESUME'
  5158.      myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  5159.   */
  5160.  
  5161.   if myRc <> '0' then do
  5162.    say 'Got error from NetEnumerate() ' myRc
  5163.    ExitRc = 9
  5164.   end
  5165.   else do
  5166.    if fileInfo.count = 0 then do
  5167.     say 'No files open on the server specified'
  5168.     ExitRc = 0
  5169.    end
  5170.    else do
  5171.     say 'Number of open file entries: ' fileInfo.count
  5172.     say
  5173.  
  5174.     do i=1 to fileInfo.count
  5175.      say 'Id            ' fileInfo.i.id
  5176.      say 'Permissions   ' fileInfo.i.permissions
  5177.      say 'Number locks  ' fileInfo.i.num_locks
  5178.      say 'Path Name     ' fileInfo.i.pathname
  5179.      say 'Opening Userid' fileInfo.i.username
  5180.      say
  5181.     end
  5182.    end
  5183.   end
  5184.   call DropLsRxutFuncs
  5185.   call RxFuncDrop 'LoadLsRxutFuncs'
  5186.  
  5187.   exit rcCode
  5188.  
  5189.  
  5190. ΓòÉΓòÉΓòÉ 11.10. NETGROUP Enumerate ΓòÉΓòÉΓòÉ
  5191.  
  5192. The function lists all group accounts on the UAS database. 
  5193.  
  5194. Syntax 
  5195.  
  5196.  
  5197. MyRc = NetEnumerate(NETGROUP, 'groupInfo')
  5198. MyRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
  5199.  
  5200. Parameters 
  5201.  
  5202. The parameters specified are: 
  5203.  
  5204.  'groupInfo'       The REXX variable receiving the result. The variable is 
  5205.                    divided into: 
  5206.  
  5207.                        groupInfo.0 
  5208.  
  5209.                         The number of groups 
  5210.  
  5211.                        groupInfo.i 
  5212.  
  5213.                         The group name i, where the variable i has a value from 
  5214.                         1 to groupInfo.0 
  5215.  
  5216.  SrvName           The server computer name 
  5217.  
  5218.  Note 
  5219.  
  5220.  The server computer name can be specified as '' for a local server. 
  5221.  
  5222.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  5223.  parameters where SrvName is set to ''. 
  5224.  
  5225.  Example 
  5226.  
  5227.  
  5228.   /* List group names */
  5229.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5230.   call LoadLsRxutFuncs
  5231.  
  5232.   NETGROUP = 70
  5233.   SrvName  = '\\DOMAIN_CONTRLR'
  5234.  
  5235.   myRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
  5236.  
  5237.   if myRc <> '0' then do
  5238.    say 'Got error from NetEnumerate() ' myRc
  5239.    call DropLsRxutFuncs
  5240.    exit 9
  5241.   end
  5242.  
  5243.   if groupInfo.0 = 0 then do
  5244.    say 'No group names found. You may have a problem.'
  5245.    call DropLsRxutFuncs
  5246.    exit 0
  5247.   end
  5248.  
  5249.   say 'Number of group names: ' groupInfo.0
  5250.   say
  5251.  
  5252.   do i=1 to groupInfo.0
  5253.    say groupInfo.i
  5254.   end
  5255.  
  5256.   call DropLsRxutFuncs
  5257.   call RxFuncDrop 'LoadLsRxutFuncs'
  5258.  
  5259.   exit 0
  5260.  
  5261.  Example Output 
  5262.  
  5263.  
  5264.   Number of group names:  10
  5265.  
  5266.   GROUPID
  5267.   GROUP200
  5268.   GROUP201
  5269.   GROUP202
  5270.   SERVERS
  5271.   ACLGROUP
  5272.   LOCAL
  5273.   USERS
  5274.   ADMINS
  5275.   GUESTS
  5276.  
  5277.  
  5278. ΓòÉΓòÉΓòÉ 11.11. NETLOGON Enumerate ΓòÉΓòÉΓòÉ
  5279.  
  5280. The function enumerates logged on user accounts. 
  5281.  
  5282. Syntax 
  5283.  
  5284.  
  5285. MyRc = NetEnumerate(NETLOGON, 'logonInfo')
  5286. MyRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
  5287.  
  5288. Parameters 
  5289.  
  5290. The parameters specified are: 
  5291.  
  5292.  'logonInfo'       The REXX variable receiving the result. The variable is 
  5293.                    divided into: 
  5294.  
  5295.                        logonInfo.0 
  5296.  
  5297.                         The number of user account names logged on 
  5298.  
  5299.                        logonInfo.i 
  5300.  
  5301.                         The user account name i, where the variable i has a 
  5302.                         value from 1 to logonInfo.0 
  5303.  
  5304.  SrvName           The server computer name. If the server computer name is '', 
  5305.                    this will be identical as a call to NetEnumerate(NETLOGON) 
  5306.                    with only two parameters (local server) 
  5307.  
  5308.  Note 
  5309.  
  5310.  The server computer name can be specified as '' for a local server. 
  5311.  
  5312.  Example 
  5313.  
  5314.  
  5315.   /* List logged on users accounts */
  5316.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5317.   call LoadLsRxutFuncs
  5318.  
  5319.   NETLOGON = 50
  5320.   SrvName  = '\\ITSCSV00'
  5321.  
  5322.   myRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
  5323.  
  5324.   if myRc <> '0' then do
  5325.    say 'Got error from NetEnumerate() ' myRc
  5326.    call DropLsRxutFuncs
  5327.    exit 9
  5328.   end
  5329.  
  5330.   if logonInfo.0 = 0 then do
  5331.    say 'No user accounts logged on'
  5332.    call DropLsRxutFuncs
  5333.    exit 0
  5334.   end
  5335.  
  5336.   say 'Number of user entries: ' logonInfo.0
  5337.   say
  5338.  
  5339.   do i=1 to logonInfo.0
  5340.    say logonInfo.i
  5341.   end
  5342.  
  5343.   call DropLsRxutFuncs
  5344.   call RxFuncDrop 'LoadLsRxutFuncs'
  5345.  
  5346.   exit 0
  5347.  
  5348.  Example Output 
  5349.  
  5350.  
  5351.   Number of user entries:  9
  5352.  
  5353.   BERIT
  5354.   A948R11
  5355.   ITSCAIX1
  5356.   SHIMIZU
  5357.   A948R29
  5358.   N$HUY
  5359.   A948R33
  5360.   JACOBB
  5361.   A948R30
  5362.  
  5363.  
  5364. ΓòÉΓòÉΓòÉ 11.12. NETMESSAGENAME Enumerate ΓòÉΓòÉΓòÉ
  5365.  
  5366. The function lists the name entries in a message name table. 
  5367.  
  5368. Syntax 
  5369.  
  5370.  
  5371. MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo')
  5372. MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
  5373.  
  5374. Parameters 
  5375.  
  5376. The parameters specified are: 
  5377.  
  5378.  'msgNameInfo'     The REXX variable receiving the result. The variable is 
  5379.                    divided into: 
  5380.  
  5381.                        msgNameInfo.0 
  5382.  
  5383.                         The number of message name entries 
  5384.  
  5385.                        msgNameInfo.i 
  5386.  
  5387.                         The message name entry i, where the variable i has a 
  5388.                         value from 1 to msgNameInfo.0 
  5389.  
  5390.  SrvName           The server computer name 
  5391.  
  5392.  Note 
  5393.  
  5394.  The server computer name can be specified as '' for a local server or 
  5395.  requester. 
  5396.  
  5397.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  5398.  parameters where SrvName is set to ''. 
  5399.  
  5400.  Example 
  5401.  
  5402.  
  5403.   /* List message names */
  5404.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5405.   call LoadLsRxutFuncs
  5406.  
  5407.   NETMESSAGENAME = 80
  5408.   SrvName        = '\\DOMAIN_CONTRLR'
  5409.  
  5410.   myRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
  5411.  
  5412.   if myRc <> '0' then do
  5413.    say 'Got error from NetEnumerate() ' myRc
  5414.    call DropLsRxutFuncs
  5415.    exit 9
  5416.   end
  5417.  
  5418.   if msgNameInfo.0 = 0 then do
  5419.    say 'No message name registered'
  5420.    call DropLsRxutFuncs
  5421.    exit 0
  5422.   end
  5423.  
  5424.   say 'Number of message names: ' msgNameInfo.0
  5425.   say
  5426.  
  5427.   do i=1 to msgNameInfo.0
  5428.    say msgNameInfo.i
  5429.   end
  5430.  
  5431.   call DropLsRxutFuncs
  5432.   call RxFuncDrop 'LoadLsRxutFuncs'
  5433.  
  5434.   exit 0
  5435.  
  5436.  Example Output 
  5437.  
  5438.  
  5439.   Number of message names:  1
  5440.  
  5441.   DOMAIN_CONTRLR
  5442.  
  5443.  
  5444. ΓòÉΓòÉΓòÉ 11.13. NETPRINTDEST Enumerate ΓòÉΓòÉΓòÉ
  5445.  
  5446. The function returns a list of print devices. 
  5447.  
  5448. Syntax 
  5449.  
  5450.  
  5451. MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo')
  5452. MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
  5453.  
  5454. Parameters 
  5455.  
  5456. The parameters specified are: 
  5457.  
  5458.  'printDestInfo'   The REXX variable receiving the result. The variable is 
  5459.                    divided into: 
  5460.  
  5461.                        printDestInfo.0 
  5462.  
  5463.                         The number of print devices 
  5464.  
  5465.                        printDestInfo.i 
  5466.  
  5467.                         The print device name entry i, where the variable i has 
  5468.                         a value from 1 to printDestInfo.0 
  5469.  
  5470.  SrvName           The server computer name 
  5471.  
  5472.  Note 
  5473.  
  5474.  The server computer name can be specified as '' for a local server or 
  5475.  computer. 
  5476.  
  5477.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  5478.  parameters where SrvName is set to ''. 
  5479.  
  5480.  Example 
  5481.  
  5482.  
  5483.   /* List print destination names */
  5484.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5485.   call LoadLsRxutFuncs
  5486.  
  5487.   NETPRINTDEST = 100
  5488.   SrvName      = '\\DOMAIN_CONTRLR'
  5489.  
  5490.   myRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
  5491.  
  5492.   if myRc <> '0' then do
  5493.    say 'Got error from NetEnumerate() ' myRc
  5494.    call DropLsRxutFuncs
  5495.    exit 9
  5496.   end
  5497.  
  5498.   if printDestInfo.0 = 0 then do
  5499.    say 'No print destinations available'
  5500.    call DropLsRxutFuncs
  5501.    exit 0
  5502.   end
  5503.  
  5504.   say 'Number of print destination names: ' printDestInfo.0
  5505.   say
  5506.  
  5507.   do i=1 to printDestInfo.0
  5508.    say printDestInfo.i
  5509.   end
  5510.  
  5511.   call DropLsRxutFuncs
  5512.   call RxFuncDrop 'LoadLsRxutFuncs'
  5513.  
  5514.   exit 0
  5515.  
  5516.  Example Output 
  5517.  
  5518.  
  5519.   Number of print destination names:  1
  5520.  
  5521.   LPT1Q
  5522.  
  5523.  
  5524. ΓòÉΓòÉΓòÉ 11.14. NETPRINTDRIVER Enumerate ΓòÉΓòÉΓòÉ
  5525.  
  5526. The function retrieves a list of printer presentation drivers on a server or 
  5527. workstation. 
  5528.  
  5529. Syntax 
  5530.  
  5531.  
  5532. MyRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
  5533.  
  5534. Parameters 
  5535.  
  5536. The parameters specified are: 
  5537.  
  5538.  'prtDriverInfo'   The REXX variable receiving the result. The variable is 
  5539.                    divided into: 
  5540.  
  5541.                        prtDriverInfo.0 
  5542.  
  5543.                         The number of printer presentation drivers 
  5544.  
  5545.                        prtDriverInfo.i 
  5546.  
  5547.                         Printer presentation driver name entry i, where the 
  5548.                         variable i has a value from 1 to prtDriverInfo.0 
  5549.  
  5550.  SrvName           The server computer name 
  5551.  
  5552.  Note 
  5553.  
  5554.  The server computer name can be specified as '' for a local computer. 
  5555.  
  5556.  Example 
  5557.  
  5558.  
  5559.   /* List printer presentation drivers */
  5560.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5561.   call LoadLsRxutFuncs
  5562.  
  5563.   NETPRINTDRIVER = 310
  5564.   SrvName        = ''
  5565.  
  5566.   myRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
  5567.  
  5568.   if myRc <> '0' then do
  5569.    say 'Got error from NetEnumerate() ' myRc
  5570.    call DropLsRxutFuncs
  5571.    exit 9
  5572.   end
  5573.  
  5574.   if prtDriverInfo.0 = 0 then do
  5575.    say 'No print drivers available'
  5576.    call DropLsRxutFuncs
  5577.    exit 0
  5578.   end
  5579.  
  5580.   say 'Number of printer presentation drivers defined: ' prtDriverInfo.0
  5581.   say
  5582.  
  5583.   do i=1 to prtDriverInfo.0
  5584.    say prtDriverInfo.i
  5585.   end
  5586.  
  5587.   call DropLsRxutFuncs
  5588.   call RxFuncDrop 'LoadLsRxutFuncs'
  5589.  
  5590.   exit 0
  5591.  
  5592.  Example Output 
  5593.  
  5594.  
  5595.   Number of printer presentation drivers defined:  2
  5596.  
  5597.   PSCRIPT.IBM 4019 v52_1 (39 Fonts)
  5598.   IBMNULL
  5599.  
  5600.  
  5601. ΓòÉΓòÉΓòÉ 11.15. NETPRINTJOB Enumerate ΓòÉΓòÉΓòÉ
  5602.  
  5603. The function returns a list of print jobs in a print queue. 
  5604.  
  5605. Syntax 
  5606.  
  5607.  
  5608. MyRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
  5609.  
  5610. Parameters 
  5611.  
  5612. The parameters specified are: 
  5613.  
  5614.  'printJobInfo'    The REXX variable receiving the result. The variable is 
  5615.                    divided into: 
  5616.  
  5617.                        printJobInfo.count 
  5618.  
  5619.                         The number of print jobs in the queue 
  5620.  
  5621.                        printJobInfo.i.JobId 
  5622.  
  5623.                         The print job identification entry i, where the 
  5624.                         variable i has a value from 1 to printJobInfo.count 
  5625.  
  5626.                        printJobInfo.i.Priority 
  5627.  
  5628.                         The print job priority entry i, where the variable i 
  5629.                         has a value from 1 to printJobInfo.count 
  5630.  
  5631.                        printJobInfo.i.Position 
  5632.  
  5633.                         The print job position in the queue entry i, where the 
  5634.                         variable i has a value from 1 to printJobInfo.count 
  5635.  
  5636.                        printJobInfo.i.Status 
  5637.  
  5638.                         The print job status in the queue entry i, where the 
  5639.                         variable i has a value from 1 to printJobInfo.count 
  5640.  
  5641.                        printJobInfo.i.Size 
  5642.  
  5643.                         The print job size entry i, where the variable i has a 
  5644.                         value from 1 to printJobInfo.count 
  5645.  
  5646.                        printJobInfo.i.UserName 
  5647.  
  5648.                         The userid entry i, where the variable i has a value 
  5649.                         from 1 to printJobInfo.count 
  5650.  
  5651.                        printJobInfo.i.Document 
  5652.  
  5653.                         The document name entry i, where the variable i has a 
  5654.                         value from 1 to printJobInfo.count 
  5655.  
  5656.                        printJobInfo.i.Comment 
  5657.  
  5658.                         The comment entry i, where the variable i has a value 
  5659.                         from 1 to printJobInfo.count 
  5660.  
  5661.  SrvName           The server computer name 
  5662.  
  5663.  QueueName         The queue name, which must be supplied 
  5664.  
  5665.  Note 
  5666.  
  5667.  The server computer name can be specified as '' for a local server or 
  5668.  computer. 
  5669.  
  5670.  Example 
  5671.  
  5672.  
  5673.   /* List print jobs in a print queue */
  5674.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5675.   call LoadLsRxutFuncs
  5676.  
  5677.   NETPRINTJOB = 110
  5678.   SrvName     = '\\DOMAIN_CONTRLR'
  5679.   QueueName   = 'LPT1Q'
  5680.  
  5681.   myRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
  5682.  
  5683.   if myRc <> '0' then do
  5684.    say 'Got error from NetEnumerate() ' myRc
  5685.    call DropLsRxutFuncs
  5686.    exit 9
  5687.   end
  5688.  
  5689.   if printJobInfo.count = 0 then do
  5690.    say 'No print jobs in printer queue'
  5691.    call DropLsRxutFuncs
  5692.    exit 0
  5693.   end
  5694.  
  5695.   say 'Number of print jobs: ' printJobInfo.count
  5696.  
  5697.   do i=1 to printJobInfo.count
  5698.    say
  5699.    say 'Job Id:        ' printJobInfo.i.JobId
  5700.    say 'Userid:        ' printJobInfo.i.UserName
  5701.    say 'Document name: ' printJobInfo.i.Document
  5702.   end
  5703.  
  5704.   call DropLsRxutFuncs
  5705.   call RxFuncDrop 'LoadLsRxutFuncs'
  5706.  
  5707.   exit 0
  5708.  
  5709.  Example Output 
  5710.  
  5711.  
  5712.   Number of print jobs:  2
  5713.  
  5714.   Job Id:         12
  5715.   Userid:         ADMIN04
  5716.   Document name:  Unknown
  5717.  
  5718.   Job Id:         14
  5719.   Userid:         ADMIN04
  5720.   Document name:  Unknown
  5721.  
  5722.  
  5723. ΓòÉΓòÉΓòÉ 11.16. NETPRINTPORT Enumerate ΓòÉΓòÉΓòÉ
  5724.  
  5725. The function retrieves a list of printer ports on a server or workstation. 
  5726.  
  5727. Syntax 
  5728.  
  5729.  
  5730. MyRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
  5731.  
  5732. Parameters 
  5733.  
  5734. The parameters specified are: 
  5735.  
  5736.  'prtPortInfo'   The REXX variable receiving the result. The variable is 
  5737.                  divided into: 
  5738.  
  5739.                      prtPortInfo.0 
  5740.  
  5741.                       The number of printer ports 
  5742.  
  5743.                      prtPortInfo.i 
  5744.  
  5745.                       Port name entry i, where the variable i has a value from 
  5746.                       1 to prtPortInfo.0 
  5747.  
  5748.  SrvName         The server computer name 
  5749.  
  5750.  Note 
  5751.  
  5752.  The server computer name can be specified as '' for a local computer. 
  5753.  
  5754.  Example 
  5755.  
  5756.  
  5757.   /* List printer ports */
  5758.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5759.   call LoadLsRxutFuncs
  5760.  
  5761.   NETPRINTPORT = 300
  5762.   SrvName      = '\\DOMAIN_CONTRLR'
  5763.  
  5764.   myRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
  5765.  
  5766.   if myRc <> '0' then do
  5767.    say 'Got error from NetEnumerate() ' myRc
  5768.    call DropLsRxutFuncs
  5769.    exit 9
  5770.   end
  5771.  
  5772.   if prtPortInfo.0 = 0 then do
  5773.    say 'No printer ports available'
  5774.    call DropLsRxutFuncs
  5775.    exit 0
  5776.   end
  5777.  
  5778.   say 'Number of printer ports defined: ' prtPortInfo.0
  5779.   say
  5780.  
  5781.   do i=1 to prtPortInfo.0
  5782.    say prtPortInfo.i
  5783.   end
  5784.  
  5785.   call DropLsRxutFuncs
  5786.   call RxFuncDrop 'LoadLsRxutFuncs'
  5787.  
  5788.   exit 0
  5789.  
  5790.  Example Output 
  5791.  
  5792.  
  5793.   Number of printer ports defined:  8
  5794.  
  5795.   FILE
  5796.   COM4
  5797.   COM3
  5798.   COM2
  5799.   COM1
  5800.   LPT3
  5801.   LPT2
  5802.   LPT1
  5803.  
  5804.  
  5805. ΓòÉΓòÉΓòÉ 11.17. NETPRINTQPROC Enumerate ΓòÉΓòÉΓòÉ
  5806.  
  5807. The function retrieves a list of printer queue processors on a server or 
  5808. workstation. 
  5809.  
  5810. Syntax 
  5811.  
  5812.  
  5813. MyRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
  5814.  
  5815. Parameters 
  5816.  
  5817. The parameters specified are: 
  5818.  
  5819.  'prtQProcInfo'    The REXX variable receiving the result. The variable is 
  5820.                    divided into: 
  5821.  
  5822.                        prtQProcInfo.0 
  5823.  
  5824.                         The number of printer queue processors 
  5825.  
  5826.                        prtQProcInfo.i 
  5827.  
  5828.                         Printer queue processor name entry i, where the 
  5829.                         variable i has a value from 1 to prtQProcInfo.0 
  5830.  
  5831.  SrvName           The server computer name 
  5832.  
  5833.  Note 
  5834.  
  5835.  The server computer name can be specified as '' for a local computer. 
  5836.  
  5837.  Example 
  5838.  
  5839.  
  5840.   /* List printer queue processors */
  5841.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5842.   call LoadLsRxutFuncs
  5843.  
  5844.   NETPRINTQPROC = 320
  5845.   SrvName       = '\\DOMAIN_CONTRLR'
  5846.  
  5847.   myRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
  5848.  
  5849.   if myRc <> '0' then do
  5850.    say 'Got error from NetEnumerate() ' myRc
  5851.    call DropLsRxutFuncs
  5852.    exit 9
  5853.   end
  5854.  
  5855.   if prtQProcInfo.0 = 0 then do
  5856.    say 'No printer queue processor defined'
  5857.    call DropLsRxutFuncs
  5858.    exit 0
  5859.   end
  5860.  
  5861.   say 'Number of entries: ' prtQProcInfo.0
  5862.   say
  5863.  
  5864.   do i=1 to prtQProcInfo.0
  5865.    say prtQProcInfo.i
  5866.   end
  5867.  
  5868.   call DropLsRxutFuncs
  5869.   call RxFuncDrop 'LoadLsRxutFuncs'
  5870.  
  5871.   exit 0
  5872.  
  5873.  Example Output 
  5874.  
  5875.  
  5876.   Number of entries:  1
  5877.  
  5878.   PMPRINT
  5879.  
  5880.  
  5881. ΓòÉΓòÉΓòÉ 11.18. NETPRINTQUEUE Enumerate ΓòÉΓòÉΓòÉ
  5882.  
  5883. The function returns a list of print queues. 
  5884.  
  5885. Syntax 
  5886.  
  5887.  
  5888. MyRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
  5889.  
  5890. Parameters 
  5891.  
  5892. The parameters specified are: 
  5893.  
  5894.  'printQInfo'      The REXX variable receiving the result. The variable is 
  5895.                    divided into: 
  5896.  
  5897.                        printQInfo.0 
  5898.  
  5899.                         The number of print queues 
  5900.  
  5901.                        printQInfo.i 
  5902.  
  5903.                         The print queue name entry i, where the variable i has 
  5904.                         a value from 1 to printQInfo.0 
  5905.  
  5906.  SrvName           The server computer name 
  5907.  
  5908.  Note 
  5909.  
  5910.  The server computer name can be specified as '' for a local server or 
  5911.  computer. 
  5912.  
  5913.  Example 
  5914.  
  5915.  
  5916.   /* List print queue names */
  5917.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5918.   call LoadLsRxutFuncs
  5919.  
  5920.   NETPRINTQUEUE = 120
  5921.   SrvName       = '\\DOMAIN_CONTRLR'
  5922.  
  5923.   myRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
  5924.  
  5925.   if myRc <> '0' then do
  5926.    say 'Got error from NetEnumerate() ' myRc
  5927.    call DropLsRxutFuncs
  5928.    exit 9
  5929.   end
  5930.  
  5931.   if printQInfo.0 = 0 then do
  5932.    say 'No printer queues defined'
  5933.    call DropLsRxutFuncs
  5934.    exit 0
  5935.   end
  5936.  
  5937.   say 'Number of printer queue names: ' printQInfo.0
  5938.   say
  5939.  
  5940.   do i=1 to printQInfo.0
  5941.    say printQInfo.i
  5942.   end
  5943.  
  5944.   call DropLsRxutFuncs
  5945.   call RxFuncDrop 'LoadLsRxutFuncs'
  5946.  
  5947.   exit 0
  5948.  
  5949.  Example Output 
  5950.  
  5951.  
  5952.   Number of printer queue names:  6
  5953.  
  5954.   LPT1Q
  5955.   PS203
  5956.   PCL203
  5957.   PS202
  5958.   PCL202
  5959.   IBM4029
  5960.  
  5961.  
  5962. ΓòÉΓòÉΓòÉ 11.19. NETSERVERDISK Enumerate ΓòÉΓòÉΓòÉ
  5963.  
  5964. The function retrieves a list of diskette and disk drives on a server. 
  5965.  
  5966. Syntax 
  5967.  
  5968.  
  5969. MyRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
  5970.  
  5971. Parameters 
  5972.  
  5973. The parameters specified are: 
  5974.  
  5975.  'srvDiskInfo'     The REXX variable receiving the result. The variable is 
  5976.                    divided into: 
  5977.  
  5978.                        srvDiskInfo.0 
  5979.  
  5980.                         The number of disk drives available on the server 
  5981.                         specified 
  5982.  
  5983.                        srvDiskInfo.i 
  5984.  
  5985.                         The disk drive name entry i, where the variable i has a 
  5986.                         value from 1 to srvDiskInfo.0 
  5987.  
  5988.  SrvName           The server computer name 
  5989.  
  5990.  Note 
  5991.  
  5992.  The server computer name can be specified as '' for a local server. 
  5993.  
  5994.  Example 
  5995.  
  5996.  
  5997.   /* List disk drives on a server */
  5998.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5999.   call LoadLsRxutFuncs
  6000.  
  6001.   NETSERVERDISK = 150
  6002.   SrvName       = '\\DOMAIN_CONTRLR'
  6003.  
  6004.   myRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
  6005.  
  6006.   if myRc <> '0' then do
  6007.    say 'Got error from NetEnumerate() ' myRc
  6008.    call DropLsRxutFuncs
  6009.    exit 9
  6010.   end
  6011.  
  6012.   if srvDiskInfo.0 = 0 then do
  6013.    say 'No server disk drives'
  6014.    call DropLsRxutFuncs
  6015.    exit 0
  6016.   end
  6017.  
  6018.   say 'Number of disk drives: ' srvDiskInfo.0
  6019.   say
  6020.  
  6021.   do i=1 to srvDiskInfo.0
  6022.    say srvDiskInfo.i
  6023.   end
  6024.  
  6025.   call DropLsRxutFuncs
  6026.   call RxFuncDrop 'LoadLsRxutFuncs'
  6027.  
  6028.   exit 0
  6029.  
  6030.  Example Output 
  6031.  
  6032.  
  6033.   Number of disk drives:  7
  6034.  
  6035.   A:
  6036.   B:
  6037.   C:
  6038.   D:
  6039.   E:
  6040.   F:
  6041.   G:
  6042.  
  6043.  
  6044. ΓòÉΓòÉΓòÉ 11.20. NETSERVER Enumerate ΓòÉΓòÉΓòÉ
  6045.  
  6046. The function list all servers visible on the network. 
  6047.  
  6048. Syntax 
  6049.  
  6050.  
  6051. MyRc = NetEnumerate(NETSERVER, 'serverList')
  6052. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName)
  6053. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType)
  6054. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
  6055.  
  6056. Parameters 
  6057.  
  6058. The parameters specified are: 
  6059.  
  6060.  'serverList'   The REXX variable receiving the result. The variable is divided 
  6061.                 into: 
  6062.  
  6063.                     serverList.0 
  6064.  
  6065.                      The number of servers found 
  6066.  
  6067.                     serverList.i 
  6068.  
  6069.                      The server computer name entry i, where the variable i has 
  6070.                      a value from 1 to serverList.0 
  6071.  
  6072.  SrvType        The server type values are defined as follows: 
  6073.  
  6074.                                 SV_TYPE_WORKSTATION    =   1   /* Workstation */
  6075.                                 SV_TYPE_SERVER         =   2   /* Server */
  6076.                                 SV_TYPE_SQLSERVER      =   4   /* SQL server */
  6077.                                 SV_TYPE_DOMAIN_CTRL    =   8   /* Domain controller */
  6078.                                 SV_TYPE_DOMAIN_BAKCTRL =  16   /* Backup domain controller */
  6079.                                 SV_TYPE_TIME_SOURCE    =  32   /* Time server */
  6080.                                 SV_TYPE_AFP            =  64   /* Apple File Protocol (AFP) service */
  6081.                                 SV_TYPE_NOVELL         = 128   /* Novell service */
  6082.                                 SV_TYPE_ALL            =  -1   /* All types of servers */
  6083.  
  6084.  SrvName        The server computer name 
  6085.  
  6086.  DomainName     The domain name 
  6087.  
  6088.  Note 
  6089.  
  6090.  The server computer name can be specified as '' for a local server or 
  6091.  workstation. 
  6092.  
  6093.  The default values in the four different call forms are as follows: 
  6094.  
  6095.  2 parms     The function executes on the local computer, list all domain 
  6096.              controllers found in the logon domain and domains found in the 
  6097.              'other Domains' parameter 
  6098.  
  6099.  3 parms     The function executes on the computer specified, list all domain 
  6100.              controllers found in the logon domain and domains found in the 
  6101.              'other Domains' parameter 
  6102.  
  6103.  4 parms     The function executes on the computer specified, list the server 
  6104.              types specified in the logon domain and domains found in the 
  6105.              'other Domains' parameter 
  6106.  
  6107.  5 parms     The function executes on the computer specified, list the server 
  6108.              types specified in the domain specified 
  6109.  
  6110.  Example 
  6111.  
  6112.  
  6113.   /* Get the domain controller computer name */
  6114.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6115.   call LoadLsRxutFuncs
  6116.  
  6117.   NETSERVER = 160
  6118.   SrvName   = '\\DOMAIN_CONTRLR'
  6119.   SrvType   = 8    /* Domain Controller */
  6120.   DomainName = 'ITSO_AUSTIN_442'
  6121.  
  6122.   myRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
  6123.  
  6124.   if myRc <> '0' then do
  6125.    say 'Got error from NetEnumerate() ' myRc
  6126.    call DropLsRxutFuncs
  6127.    exit 9
  6128.   end
  6129.  
  6130.   if serverList.0 = 0 then do
  6131.    say 'Domain controller was not found'
  6132.    call DropLsRxutFuncs
  6133.    exit 0
  6134.   end
  6135.  
  6136.   say 'Number of servers found: ' serverList.0
  6137.   say
  6138.  
  6139.   do i=1 to serverList.0
  6140.    say serverList.i
  6141.   end
  6142.  
  6143.   call DropLsRxutFuncs
  6144.   call RxFuncDrop 'LoadLsRxutFuncs'
  6145.  
  6146.   exit 0
  6147.  
  6148.  Example Output 
  6149.  
  6150.  
  6151.   Number of servers found:  1
  6152.  
  6153.   DOMAIN_CONTRLR
  6154.  
  6155.  
  6156. ΓòÉΓòÉΓòÉ 11.21. NETSERVICE Enumerate ΓòÉΓòÉΓòÉ
  6157.  
  6158. The function retrieves a list of all network services that are started. 
  6159.  
  6160. Syntax 
  6161.  
  6162.  
  6163. MyRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
  6164.  
  6165. Parameters 
  6166.  
  6167. The parameters specified are: 
  6168.  
  6169.  'serviceInfo'     The REXX variable receiving the result. The variable is 
  6170.                    divided into: 
  6171.  
  6172.                        serviceInfo.0 
  6173.  
  6174.                         The number of services started 
  6175.  
  6176.                        serviceInfo.i 
  6177.  
  6178.                         The started service name entry i, where the variable i 
  6179.                         has a value from 1 to serviceInfo.0 
  6180.  
  6181.  SrvName           The server computer name 
  6182.  
  6183.  Note 
  6184.  
  6185.  The server computer name can be specified as '' for a local server. 
  6186.  
  6187.  Example 
  6188.  
  6189.  
  6190.   /* List service names started on computer */
  6191.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6192.   call LoadLsRxutFuncs
  6193.  
  6194.   NETSERVICE = 170
  6195.   SrvName    = '\\DOMAIN_CONTRLR'
  6196.  
  6197.   myRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
  6198.  
  6199.   if myRc <> '0' then do
  6200.    say 'Got error from NetEnumerate() ' myRc
  6201.    call DropLsRxutFuncs
  6202.    exit 9
  6203.   end
  6204.  
  6205.   if serviceInfo.0 = 0 then do
  6206.    say 'No service listed as started'
  6207.    call DropLsRxutFuncs
  6208.    exit 0
  6209.   end
  6210.  
  6211.   say 'Number of services started: ' serviceInfo.0
  6212.   say
  6213.  
  6214.   do i=1 to serviceInfo.0
  6215.    say serviceInfo.i
  6216.   end
  6217.  
  6218.   call DropLsRxutFuncs
  6219.   call RxFuncDrop 'LoadLsRxutFuncs'
  6220.  
  6221.   exit 0
  6222.  
  6223.  Example Output 
  6224.  
  6225.  
  6226.   Number of services started:  8
  6227.  
  6228.   REQUESTER
  6229.   MESSENGER
  6230.   SERVER
  6231.   NETLOGON
  6232.   LSSERVER
  6233.   ALERTER
  6234.   NETRUN
  6235.   TIMESOURCE
  6236.  
  6237.  
  6238. ΓòÉΓòÉΓòÉ 11.22. NETSESSION Enumerate ΓòÉΓòÉΓòÉ
  6239.  
  6240. The function retrieves a list of computer names having a session to a server. 
  6241.  
  6242. Syntax 
  6243.  
  6244.  
  6245. MyRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
  6246.  
  6247. Parameters 
  6248.  
  6249. The parameters specified are: 
  6250.  
  6251.  'sessionInfo'  The REXX variable receiving the result. The variable is divided 
  6252.                 into: 
  6253.  
  6254.                     sessionInfo.0 
  6255.  
  6256.                      The number of sessions 
  6257.  
  6258.                     sessionInfo.i 
  6259.  
  6260.                      The computer name entry i, where the variable i has a 
  6261.                      value from 1 to sessionInfo.0 
  6262.  
  6263.                     sessionInfo.i.username 
  6264.  
  6265.                      The name of the userid who established the session 
  6266.  
  6267.                     sessionInfo.i.num_conns 
  6268.  
  6269.                      The number of connections that have been made during the 
  6270.                      session 
  6271.  
  6272.                     sessionInfo.i.num_opens 
  6273.  
  6274.                      The number of files, devices, and pipes that have been 
  6275.                      opened during the session 
  6276.  
  6277.                     sessionInfo.i.num_users 
  6278.  
  6279.                      The number of sessions that are established between the 
  6280.                      server and the requester 
  6281.  
  6282.                     sessionInfo.i.time 
  6283.  
  6284.                      The number of seconds a session has been active 
  6285.  
  6286.                     sessionInfo.i.idle_time 
  6287.  
  6288.                      The number of seconds a session has been idle 
  6289.  
  6290.                     sessionInfo.i.user_flags 
  6291.  
  6292.                      The manner in which the user established the session. The 
  6293.                      bit mask for user_flags is defined as follows: 
  6294.  
  6295.                                           Value  What
  6296.                                           -----  ----------------------------------------------
  6297.                                            1     Established the session using a GUEST account
  6298.                                            2     Established the session without using password encryption
  6299.  
  6300.                     sessionInfo.i.cltype_name 
  6301.  
  6302.                      The type of client that established the session 
  6303.  
  6304.                                           Type          What
  6305.                                           -----------   ------------------------------------------------
  6306.                                           Down Level    Old clients; for example, LAN Server 1.0 clients
  6307.                                           DLR 2.0       DLR 2.0 clients
  6308.                                           OS/2 LS 1.3   OS/2 LAN Server 1.3 clients
  6309.                                           OS/2 LS 3.0   OS/2 LAN Server 3.0 clients
  6310.                                           OS/2 LS 4.0   OS/2 LAN Server 4.0 clients
  6311.  
  6312.  SrvName        The server computer name 
  6313.  
  6314.  Note 
  6315.  
  6316.  The server computer name can be specified as '' for a local server. 
  6317.  
  6318.  Example 
  6319.  
  6320.  
  6321.   /* List computer names having a session to a server */
  6322.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6323.   call LoadLsRxutFuncs
  6324.  
  6325.   NETSESSION = 180
  6326.   SrvName    = '\\DOMAIN_CONTRLR'
  6327.  
  6328.   myRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
  6329.  
  6330.   if myRc <> '0' then do
  6331.    say 'Got error from NetEnumerate() ' myRc
  6332.    call DropLsRxutFuncs
  6333.    exit 9
  6334.   end
  6335.  
  6336.   if sessionInfo.0 = 0 then do
  6337.    say 'No session established on server'
  6338.    call DropLsRxutFuncs
  6339.    exit 0
  6340.   end
  6341.  
  6342.   say 'Number of computers having a session to server: ' sessionInfo.0
  6343.   say
  6344.  
  6345.   do i=1 to sessionInfo.0
  6346.    say sessionInfo.i
  6347.    say sessionInfo.i.username
  6348.    say sessionInfo.i.num_conns
  6349.    say sessionInfo.i.num_opens
  6350.    say sessionInfo.i.num_users
  6351.    say sessionInfo.i.time
  6352.    say sessionInfo.i.idle_time
  6353.    say sessionInfo.i.user_flags
  6354.    say sessionInfo.i.cltype_name
  6355.    say
  6356.   end
  6357.  
  6358.   call DropLsRxutFuncs
  6359.   call RxFuncDrop 'LoadLsRxutFuncs'
  6360.  
  6361.   exit 0
  6362.  
  6363.  Example Output 
  6364.  
  6365.  
  6366.   Number of computers having a session to server:  1
  6367.  
  6368.   ITSCWK21
  6369.   ADMIN04
  6370.   4
  6371.   2
  6372.   1
  6373.   14956
  6374.   0
  6375.   0
  6376.   OS/2 LS 3.0
  6377.  
  6378.  
  6379. ΓòÉΓòÉΓòÉ 11.23. NETSHARE Enumerate ΓòÉΓòÉΓòÉ
  6380.  
  6381. The function retrieves a list of current shares on a server. 
  6382.  
  6383. Syntax 
  6384.  
  6385.  
  6386. MyRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  6387.  
  6388. Parameters 
  6389.  
  6390. The parameters specified are: 
  6391.  
  6392.  'shareInfo'       The REXX variable receiving the result. The variable is 
  6393.                    divided into: 
  6394.  
  6395.                        shareInfo.0 
  6396.  
  6397.                         The number of netnames shared 
  6398.  
  6399.                        shareInfo.i 
  6400.  
  6401.                         The netname entry i, where the variable i has a value 
  6402.                         from 1 to shareInfo.0 
  6403.  
  6404.  SrvName           The server computer name 
  6405.  
  6406.  Note 
  6407.  
  6408.  The server computer name can be specified as '' for a local server. 
  6409.  
  6410.  Example 
  6411.  
  6412.  
  6413.   /* List shared netnames on a server */
  6414.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6415.   call LoadLsRxutFuncs
  6416.  
  6417.   NETSHARE = 190
  6418.   SrvName  = '\\DOMAIN_CONTRLR'
  6419.  
  6420.   myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  6421.  
  6422.   if myRc <> '0' then do
  6423.    say 'Got error from NetEnumerate() ' myRc
  6424.    call DropLsRxutFuncs
  6425.    exit 9
  6426.   end
  6427.  
  6428.   if shareInfo.1 = 0 then do
  6429.    say 'Server does not share a resource'
  6430.    call DropLsRxutFuncs
  6431.    exit 0
  6432.   end
  6433.  
  6434.   say 'Number of shared netnames: ' shareInfo.0
  6435.   say
  6436.  
  6437.   do i=1 to shareInfo.0
  6438.    say shareInfo.i
  6439.   end
  6440.  
  6441.   call DropLsRxutFuncs
  6442.   call RxFuncDrop 'LoadLsRxutFuncs'
  6443.  
  6444.   exit 0
  6445.  
  6446.  Example Output 
  6447.  
  6448.  
  6449.   Number of shared netnames:  19
  6450.  
  6451.   IPC$
  6452.   ADMIN$
  6453.   A$
  6454.   B$
  6455.   C$
  6456.   D$
  6457.   E$
  6458.   F$
  6459.   G$
  6460.   NETLOGON
  6461.   IBMLAN$
  6462.   BIGTREE
  6463.   EDRIVE
  6464.   MO
  6465.   COM1Q
  6466.   VXREXX
  6467.   TOOLKIT
  6468.   LPT1Q
  6469.   USER300
  6470.  
  6471.  
  6472. ΓòÉΓòÉΓòÉ 11.24. NETUSE Enumerate ΓòÉΓòÉΓòÉ
  6473.  
  6474. The function lists all current connections between the local computer and 
  6475. resources on a remote server. 
  6476.  
  6477. Syntax 
  6478.  
  6479.  
  6480. MyRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
  6481.  
  6482. Parameters 
  6483.  
  6484. The parameters specified are: 
  6485.  
  6486.  'useInfo'     The REXX variable receiving the result. The variable is divided 
  6487.                into: 
  6488.  
  6489.                    useInfo.count 
  6490.  
  6491.                     The number of net uses. The same information is stored in 
  6492.                     the variable useInfo.0 
  6493.  
  6494.                    useInfo.i.local 
  6495.  
  6496.                     The local device entry i, where the variable i has a value 
  6497.                     from 1 to useInfo.count 
  6498.  
  6499.                    useInfo.i.remote 
  6500.  
  6501.                     The UNC name entry i, where the variable i has a value from 
  6502.                     1 to useInfo.count 
  6503.  
  6504.                    useInfo.i.status 
  6505.  
  6506.                     Tthe status of the connection entry i where the variable i 
  6507.                     has a value from 1 to useInfo.count 
  6508.  
  6509.                    useInfo.i.asg_type 
  6510.  
  6511.                     The type of remote resource being accessed entry i, where 
  6512.                     the variable i has a value from 1 to useInfo.count 
  6513.  
  6514.                    useInfo.i.refcount 
  6515.  
  6516.                     The number of files, directories, and other processes that 
  6517.                     are open on the remote resource for entry i 
  6518.  
  6519.                    useInfo.i.usecount 
  6520.  
  6521.                     The number of explicit connections (redirection of a local 
  6522.                     device name) or implicit UNC connections (redirection of a 
  6523.                     null local device name) that are established with the 
  6524.                     resource for entry i 
  6525.  
  6526.  SrvName       The server computer name 
  6527.  
  6528.  Note 
  6529.  
  6530.  The server computer name can be specified as '' for a local server. 
  6531.  
  6532.  Example 
  6533.  
  6534.  
  6535.   /* List net uses */
  6536.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6537.   call LoadLsRxutFuncs
  6538.  
  6539.   NETUSE  = 270
  6540.   SrvName = '' /* On this local computer */
  6541.   /* SrvName  = '\\DOMAIN_CONTRLR' */
  6542.  
  6543.   myRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
  6544.  
  6545.   if myRc <> '0' then do
  6546.    say 'Got error from NetEnumerate() ' myRc
  6547.    call DropLsRxutFuncs
  6548.    exit 9
  6549.   end
  6550.  
  6551.   if useInfo.count = 0 then do
  6552.    say 'No net uses are active'
  6553.    call DropLsRxutFuncs
  6554.    exit 0
  6555.   end
  6556.  
  6557.   say 'Number of net uses: ' useInfo.count
  6558.  
  6559.   do i=1 to useInfo.count
  6560.    say
  6561.    say useInfo.i.local
  6562.    say useInfo.i.remote
  6563.   end
  6564.  
  6565.   call DropLsRxutFuncs
  6566.   call RxFuncDrop 'LoadLsRxutFuncs'
  6567.  
  6568.   exit 0
  6569.  
  6570.  Example Output 
  6571.  
  6572.  
  6573.   Number of net uses:  3
  6574.  
  6575.   Y:
  6576.   \\DOMAIN_CONTRLR\C$
  6577.  
  6578.   LPT2
  6579.   \\DOMAIN_CONTRLR\LPT1Q
  6580.  
  6581.   UNC connection
  6582.   \\DOMAIN_CONTRLR\IPC$
  6583.  
  6584.  
  6585. ΓòÉΓòÉΓòÉ 11.25. NETUSER Enumerate ΓòÉΓòÉΓòÉ
  6586.  
  6587. The function retrieves a list of defined user accounts on a server. 
  6588.  
  6589. Syntax 
  6590.  
  6591.  
  6592. MyRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
  6593.  
  6594. Parameters 
  6595.  
  6596. The parameters specified are: 
  6597.  
  6598.  'userInfo'        The REXX variable receiving the result. The variable is 
  6599.                    divided into: 
  6600.  
  6601.                        userInfo.0 
  6602.  
  6603.                         The number of users 
  6604.  
  6605.                        userInfo.i 
  6606.  
  6607.                         User name entry i, where the variable i has a value 
  6608.                         from 1 to userInfo.0 
  6609.  
  6610.  SrvName           The server computer name of the domain controller 
  6611.  
  6612.  Note 
  6613.  
  6614.  The server computer name can be specified as '' for a local domain controller. 
  6615.  
  6616.  Example 
  6617.  
  6618.  
  6619.   /* List defined user accounts in the UAS */
  6620.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6621.   call LoadLsRxutFuncs
  6622.  
  6623.   NETUSER = 280
  6624.   SrvName = '\\DOMAIN_CONTRLR'
  6625.  
  6626.   myRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
  6627.  
  6628.   if myRc <> '0' then do
  6629.    say 'Got error from NetEnumerate() ' myRc
  6630.    call DropLsRxutFuncs
  6631.    exit 9
  6632.   end
  6633.  
  6634.   if userInfo.0 = 0 then do
  6635.    say 'No user accounts defined'
  6636.    call DropLsRxutFuncs
  6637.    exit 0
  6638.   end
  6639.  
  6640.   say 'Number of users defined: ' userInfo.0
  6641.   say
  6642.  
  6643.   do i=1 to userInfo.0
  6644.    say userInfo.i
  6645.   end
  6646.  
  6647.   call DropLsRxutFuncs
  6648.   call RxFuncDrop 'LoadLsRxutFuncs'
  6649.  
  6650.   exit 0
  6651.  
  6652.  Example Output 
  6653.  
  6654.  
  6655.   Number of users defined:  12
  6656.  
  6657.   GUEST
  6658.   ADDITIONAL_SRV
  6659.   DOMAIN_CONTRLR
  6660.   A948R11
  6661.   USERID
  6662.   ADMIN04
  6663.   A948R9
  6664.   DIESEISTEINSEHRLANGE
  6665.   A948R1
  6666.   USER04
  6667.   ADMIN
  6668.   DOSUSER
  6669.  
  6670.  
  6671. ΓòÉΓòÉΓòÉ 11.26. NETUSERGROUPS Enumerate ΓòÉΓòÉΓòÉ
  6672.  
  6673. The function lists the names of all groups in the user accounts subsystem (UAS) 
  6674. database to which a particular user account belongs. This function is identical 
  6675. to NetGetInfo(NETUSERGROUPS). 
  6676.  
  6677. Syntax 
  6678.  
  6679.  
  6680. MyRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  6681.  
  6682. Parameters 
  6683.  
  6684. The parameters specified are: 
  6685.  
  6686.  'userGroups'  The REXX variable receiving the result. The variable is divided 
  6687.                into: 
  6688.  
  6689.                    userGroups.0 
  6690.  
  6691.                     The number of groups in which the user account has a entry 
  6692.  
  6693.                    userGroups.i 
  6694.  
  6695.                     The actual group names 
  6696.  
  6697.  SrvName       The server computer name 
  6698.  
  6699.  UserId        The userid 
  6700.  
  6701.  Note 
  6702.  
  6703.  The server computer name can be specified as '' for a local server or 
  6704.  computer. 
  6705.  
  6706.  Example 
  6707.  
  6708.  
  6709.   /* Get the groups in which a user account is defined */
  6710.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6711.   call LoadLsRxutFuncs
  6712.  
  6713.   NETUSERGROUPS = 330
  6714.   SrvName       = '\\DOMAIN_CONTRLR'
  6715.   UserId        = 'USERID'
  6716.  
  6717.   myRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  6718.  
  6719.   if myRc <> '0' then do
  6720.    say 'Got error from NetEnumerate() ' myRc
  6721.    call DropLsRxutFuncs
  6722.    exit 9
  6723.   end
  6724.  
  6725.   if userGroups.0 = 0 then do
  6726.    say 'User account belongs to no group'
  6727.    call DropLsRxutFuncs
  6728.    exit 0
  6729.   end
  6730.  
  6731.   say 'Number of entries: ' userGroups.0
  6732.   say
  6733.  
  6734.   do i=1 to userGroups.0
  6735.    say 'Group Name: ' userGroups.i
  6736.   end
  6737.  
  6738.   call DropLsRxutFuncs
  6739.   call RxFuncDrop 'LoadLsRxutFuncs'
  6740.  
  6741.   exit 0
  6742.  
  6743.  Example Output 
  6744.  
  6745.  
  6746.   Number of entries:  1
  6747.  
  6748.   Group Name:  ADMINS
  6749.  
  6750.  
  6751. ΓòÉΓòÉΓòÉ 12. NetGetInfo ΓòÉΓòÉΓòÉ
  6752.  
  6753. The Net Get Information functions are a family of functions that can be called 
  6754. with a number of parameters. The use of the NetGetInfo has two to five 
  6755. different parameters. The generic syntax is: 
  6756.  
  6757.  
  6758. MyRc = NetGetInfo(option, 'StemVar', parm1, parm2, parm3)
  6759.  
  6760. The option parameter contains a value to determine the type or option 
  6761. information is obtained from. An example would be the information of a user 
  6762. account. 
  6763.  
  6764. The StemVar parameter is specified in quotes. It will contain the resulting 
  6765. information from the NetGetInfo function. 
  6766.  
  6767. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  6768.  
  6769. The MyRc parameter is the return code that will have an value from the 
  6770. NetGetInfo() function. If the call is successful the character '0' will be 
  6771. returned. Otherwise an error code and descriptive text are inserted by 
  6772. NetGetInfo() function. 
  6773.  
  6774. The option parameter values are defined in Option parameter values. 
  6775.  
  6776.  
  6777. ΓòÉΓòÉΓòÉ 12.1. NETACCESS GetInfo ΓòÉΓòÉΓòÉ
  6778.  
  6779. NETACCESS GetInfo function retrieves information about the access control 
  6780. profile for a resource. The resource can either be a directory, a file, a pipe, 
  6781. a spooler queue or a serial device queue. 
  6782.  
  6783. Syntax 
  6784.  
  6785.  
  6786. MyRc = NetGetInfo(NETACCESS, 'Access', ServerName, ResourceName)
  6787.  
  6788. Parameters 
  6789.  
  6790. The parameters specified are: 
  6791.  
  6792.  'Access'  The REXX variable receiving the result. The variable is divided 
  6793.            into: 
  6794.  
  6795.                Access.count 
  6796.  
  6797.                 The number of access controls profiles available for the 
  6798.                 resource 
  6799.  
  6800.                Access.audit 
  6801.  
  6802.                 The auditing flags. The flags are defined as: 
  6803.  
  6804.                   -  A  Audit all. When this bit is set, all access attempts 
  6805.                      will be audited. 
  6806.  
  6807.                   -  O  If O, audit successful file opens. 
  6808.  
  6809.                   -  W  If W, audit successful file writes and successful 
  6810.                      directory creates. 
  6811.  
  6812.                   -  D  If D, audit successful file deletes or truncates and 
  6813.                      successful directory deletes. 
  6814.  
  6815.                   -  P  If P, audit successful file and directory access 
  6816.                      control profile change. 
  6817.  
  6818.                   -  o  If o, audit failed file opens. 
  6819.  
  6820.                   -  w  If w, audit failed file writes and failed directory 
  6821.                      creates. 
  6822.  
  6823.                   -  d  If d, audit failed file deletes or truncates and failed 
  6824.                      directory deletes. 
  6825.  
  6826.                   -  p  If d, audit failed file and directory access control 
  6827.                      profile change. 
  6828.  
  6829.                   -  -none- or N  Do not perform any auditing 
  6830.  
  6831.                Access.i.ugname 
  6832.  
  6833.                 The user account or group name. The variable i has a value from 
  6834.                 1 to Access.count 
  6835.  
  6836.                Access.i.access 
  6837.  
  6838.                 The access profile. The variable i is specified as above. The 
  6839.                 access control flags are as follows: 
  6840.  
  6841.                   -  N None 
  6842.  
  6843.                   -  A Attribute 
  6844.  
  6845.                   -  R Read 
  6846.  
  6847.                   -  W Write 
  6848.  
  6849.                   -  C Create 
  6850.  
  6851.                   -  X Execute 
  6852.  
  6853.                   -  D Delete 
  6854.  
  6855.                   -  P Permissions 
  6856.  
  6857.                   -  G This is a Group permission 
  6858.  
  6859.  ServerName The server computer name 
  6860.  
  6861.  Resource Name The name of the resource 
  6862.  
  6863.  Note 
  6864.  
  6865.  The serverName parameter can be specified as '' for a local server. 
  6866.  
  6867.  Example 
  6868.  
  6869.   /* Add a access control profile for a resource */
  6870.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6871.   call LoadLsRxutFuncs
  6872.  
  6873.   NETACCESS = 10
  6874.   SrvName    = '\\FSC30DCR'
  6875.   ResourceName = 'D:\APPS\NETPROG'
  6876.  
  6877.   myRc = NetGetInfo(NETACCESS, 'Access', SrvName, ResourceName)
  6878.  
  6879.   if myRc <> '0' then do
  6880.    say 'Got error from NetGetInfo() ' myRc
  6881.    call DropLsRxutFuncs
  6882.    exit 9
  6883.   end
  6884.  
  6885.   say
  6886.   say 'Count:   ' Access.count
  6887.   say 'Audit:   ' Access.audit
  6888.  
  6889.   do i=1 to Access.count
  6890.    say
  6891.    say Access.i.ugname
  6892.    say Access.i.access
  6893.   end
  6894.  
  6895.   call DropLsRxutFuncs
  6896.   call RxFuncDrop 'LoadLsRxutFuncs'
  6897.  
  6898.   exit 0
  6899.  
  6900.  Example Output 
  6901.  
  6902.   Count:    2
  6903.   Audit:    owdp
  6904.  
  6905.   USERS
  6906.   RG
  6907.  
  6908.   GUESTS
  6909.   RG
  6910.  
  6911.  
  6912. ΓòÉΓòÉΓòÉ 12.2. NETACCESSUSERPERMS Get Info ΓòÉΓòÉΓòÉ
  6913.  
  6914. The function obtains for a specified userid or group the permission to a 
  6915. resource. The resource can be a file, directory, drive, pipe, queue or logical 
  6916. resource and can be specified remotely by a UNC path. 
  6917.  
  6918. Syntax 
  6919.  
  6920.  
  6921. MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
  6922.  
  6923. Parameters 
  6924.  
  6925. The parameters specified are 
  6926.  
  6927.  'UsrPerms'    The REXX variable receiving the result. The variable is divided 
  6928.                into: 
  6929.  
  6930.                    UsrPerms.perms 
  6931.  
  6932.                     The access control profile available for the resource. The 
  6933.                     access control flags are as follows: 
  6934.  
  6935.                       -  N None 
  6936.  
  6937.                       -  A Attribute 
  6938.  
  6939.                       -  R Read 
  6940.  
  6941.                       -  W Write 
  6942.  
  6943.                       -  C Create 
  6944.  
  6945.                       -  X Execute 
  6946.  
  6947.                       -  D Delete 
  6948.  
  6949.                       -  P Permissions 
  6950.  
  6951.  SrvName       The server computer name 
  6952.  
  6953.  NetResName    The name of the resource 
  6954.  
  6955.  UgName        User account or group name 
  6956.  
  6957.  Note 
  6958.  
  6959.  The server computer name can be specified as '' for a local server. 
  6960.  
  6961.  Example 
  6962.  
  6963.   /* Get access control profile for a resource and a user or group */
  6964.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6965.   call LoadLsRxutFuncs
  6966.  
  6967.   NETACCESSUSERPERMS = 12
  6968.   SrvName            = '\\FSC30DCR'
  6969.   NetResName         = 'C:\IBMLAN\NETPROG'
  6970.   UgName             = 'USERS'
  6971.  
  6972.   MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
  6973.  
  6974.   if myRc <> '0' then do
  6975.    say 'Got error from NetGetInfo() ' myRc
  6976.    call DropLsRxutFuncs
  6977.    exit 9
  6978.   end
  6979.  
  6980.   say
  6981.   say 'Access Perms: ' UsrPerms.perms
  6982.  
  6983.   call DropLsRxutFuncs
  6984.   call RxFuncDrop 'LoadLsRxutFuncs'
  6985.  
  6986.   exit 0
  6987.  
  6988.  Example Output 
  6989.  
  6990.  
  6991.   Access Perms:  R
  6992.  
  6993.  
  6994. ΓòÉΓòÉΓòÉ 12.3. NETALIAS Get Info ΓòÉΓòÉΓòÉ
  6995.  
  6996. The function retrieves information about the specified alias. 
  6997.  
  6998. Syntax 
  6999.  
  7000.  
  7001. MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
  7002.  
  7003. Parameters 
  7004.  
  7005. The parameters specified are: 
  7006.  
  7007.  'AliasInfo'  The REXX variable receiving the result. The variable is divided 
  7008.               into: 
  7009.  
  7010.                   AliasInfo.name 
  7011.  
  7012.                    The alias name 
  7013.  
  7014.                   AliasInfo.remark 
  7015.  
  7016.                    The alias remark 
  7017.  
  7018.                   AliasInfo.server 
  7019.  
  7020.                    The computer name of the server where the resource described 
  7021.                    by this alias resides 
  7022.  
  7023.                   AliasInfo.netname 
  7024.  
  7025.                    The alias name for files aliases, and the queue name for 
  7026.                    printer and serial device aliases 
  7027.  
  7028.                   AliasInfo.location 
  7029.  
  7030.                    The alias location 
  7031.  
  7032.                   AliasInfo.mode 
  7033.  
  7034.                    When the alias is shared 
  7035.  
  7036.                   AliasInfo.maxuses 
  7037.  
  7038.                    The maximum number of users who can have redirection to the 
  7039.                    resource identified by this alias 
  7040.  
  7041.                   AliasInfo.type 
  7042.  
  7043.                    The alias type 
  7044.  
  7045.                   AliasInfo.queue 
  7046.  
  7047.                    The queue name for serial or printer alias only 
  7048.  
  7049.                   AliasInfo.path 
  7050.  
  7051.                    The path for files alias only 
  7052.  
  7053.                   AliasInfo.priority 
  7054.  
  7055.                    The serial device priority 
  7056.  
  7057.                   AliasInfo.device_pool 
  7058.  
  7059.                    The serial device pool 
  7060.  
  7061.  SrvName      The server computer name 
  7062.  
  7063.  Alias        The alias name 
  7064.  
  7065.  Note 
  7066.  
  7067.  The server computer name can be specified as '' for a local server. 
  7068.  
  7069.  Example 
  7070.  
  7071.   /* Get alias information */
  7072.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7073.   call LoadLsRxutFuncs
  7074.  
  7075.   NETALIAS = 20
  7076.   SrvName  = '\\FSC30DCR'
  7077.   Alias    = 'FORALL'
  7078.  
  7079.   MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
  7080.  
  7081.   if myRc <> '0' then do
  7082.    say 'Got error from NetGetInfo() ' myRc
  7083.    call DropLsRxutFuncs
  7084.    exit 9
  7085.   end
  7086.  
  7087.   say
  7088.   say 'Alias Name:        ' aliasInfo.name
  7089.   say 'Alias Remark:      ' aliasInfo.remark
  7090.   say 'Alias Server:      ' aliasInfo.server
  7091.   say 'Alias NetName:     ' aliasInfo.netname
  7092.   say 'Alias Location:    ' aliasInfo.location
  7093.   say 'Alias Mode:        ' aliasInfo.mode
  7094.   say 'Alias Max uses:    ' aliasInfo.maxuses
  7095.   say 'Alias Type:        ' aliasInfo.type
  7096.   say 'Alias Queue:       ' aliasInfo.queue
  7097.   say 'Alias path:        ' aliasInfo.path
  7098.   say 'Alias priority:    ' aliasInfo.priority
  7099.   say 'Alias device pool: ' aliasInfo.device_pool
  7100.  
  7101.   call DropLsRxutFuncs
  7102.   call RxFuncDrop 'LoadLsRxutFuncs'
  7103.  
  7104.   exit 0
  7105.  
  7106.  Example Output 
  7107.  
  7108.  
  7109.   Alias Name:         FORALL
  7110.   Alias Remark:       For all users
  7111.   Alias Server:       \\FSC30DCR
  7112.   Alias NetName:      FORALL
  7113.   Alias Location:     Within Domain
  7114.   Alias Mode:         At Requester use
  7115.   Alias Max uses:     45
  7116.   Alias Type:         Files
  7117.   Alias Queue:        Unknown
  7118.   Alias path:         D:\APPS\BOOKS
  7119.   Alias priority:     Unknown
  7120.   Alias device pool:  Unknown
  7121.  
  7122.  
  7123. ΓòÉΓòÉΓòÉ 12.4. NETAPP Get Info ΓòÉΓòÉΓòÉ
  7124.  
  7125. The function retrieves information about an application. 
  7126.  
  7127. Syntax 
  7128.  
  7129.  
  7130. MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
  7131. MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application, UserId)
  7132.  
  7133. Parameters 
  7134.  
  7135. The function call can be either with four or five parameters. 
  7136.  
  7137. The parameters specified are: 
  7138.  
  7139.  'AppInfo'   The REXX variable receiving the result. The variable is divided 
  7140.              into: 
  7141.  
  7142.                  AppInfo.name 
  7143.  
  7144.                   The application name 
  7145.  
  7146.                  AppInfo.remark 
  7147.  
  7148.                   The application remark 
  7149.  
  7150.                  AppInfo.command 
  7151.  
  7152.                   The command that starts the application 
  7153.  
  7154.                  AppInfo.command_parms 
  7155.  
  7156.                   The application start parameters 
  7157.  
  7158.                  AppInfo.app_alias_or_drv 
  7159.  
  7160.                   The alias or drive where the application resides. It 
  7161.                   specifies a drive letter, followed by a colon (:), if the 
  7162.                   application resides on the user's local machine or it 
  7163.                   specifies an existing alias if the application resides on a 
  7164.                   server 
  7165.  
  7166.                  AppInfo.app_drive 
  7167.  
  7168.                   Applies to DOS public applications only. It is used to 
  7169.                   specify the drive that is current when the application runs. 
  7170.                   A value of * indicates that the system should choose a drive 
  7171.                   letter 
  7172.  
  7173.                  AppInfo.app_path_to_dir 
  7174.  
  7175.                   The remaining path to the application 
  7176.  
  7177.                  AppInfo.wrkdir_alias_or_drv 
  7178.  
  7179.                   Specifies the directory that is made current when the 
  7180.                   application runs. If the working directory is on the local 
  7181.                   machine, it specifies the drive, where the directory is 
  7182.                   located. If the working directory is remote, it specifies an 
  7183.                   existing alias where the directory is located 
  7184.  
  7185.                  AppInfo.wrkdir_drive 
  7186.  
  7187.                   Specifies the drive that the working directory is to be 
  7188.                   assigned to when the application is started. A value of * 
  7189.                   indicates that the system should choose a drive when the 
  7190.                   application is started 
  7191.  
  7192.                  AppInfo.wrkdir_path_to_dir 
  7193.  
  7194.                   The remaining path to the working directory 
  7195.  
  7196.                  AppInfo.prompt 
  7197.  
  7198.                   Prompt for parameters 
  7199.  
  7200.                  AppInfo.interface 
  7201.  
  7202.                   The interface type 
  7203.  
  7204.                  AppInfo.type 
  7205.  
  7206.                   The application type 
  7207.  
  7208.                  AppInfo.res_count 
  7209.  
  7210.                   The number of application resource list that follows. A value 
  7211.                   of zero indicates that the application does not require any 
  7212.                   redirected devices when it runs 
  7213.  
  7214.                  AppInfo.i.arl_alias 
  7215.  
  7216.                   The alias for the resource required by the application. The 
  7217.                   variable i has a value from 1 to AppInfo.res_count 
  7218.  
  7219.                  AppInfo.i.arl_device 
  7220.  
  7221.                   The device assigned to the resource specified. The variable i 
  7222.                   has a value from 1 to AppInfo.res_count 
  7223.  
  7224.  SrvName     The server computer name 
  7225.  
  7226.  Application The application name 
  7227.  
  7228.  UserId      The userid. The userid must be specified for private applications 
  7229.  
  7230.  Note 
  7231.  
  7232.  The server computer name can be specified as '' for a local server. 
  7233.  
  7234.  Using UserId = '' is identical to calling NetGetInfo(NETAPP) without the 
  7235.  UserId parameter. 
  7236.  
  7237.  Example 
  7238.  
  7239.  
  7240.   /* Get application information */
  7241.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7242.   call LoadLsRxutFuncs
  7243.  
  7244.   NETAPP      = 30
  7245.   SrvName     = '\\ILIDC'
  7246.   Application = 'THENEW'
  7247.  
  7248.   MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
  7249.  
  7250.   if myRc <> '0' then do
  7251.    say 'Got error from NetGetInfo() ' myRc
  7252.    call DropLsRxutFuncs
  7253.    exit 9
  7254.   end
  7255.  
  7256.   say 'App Name:                ' AppInfo.name
  7257.   say 'App Remark:              ' AppInfo.remark
  7258.   say 'App Command:             ' AppInfo.command
  7259.   say 'App Command parms:       ' AppInfo.command_parms
  7260.   say 'App alias or drive:      ' AppInfo.app_alias_or_drv
  7261.   say 'App drive:               ' AppInfo.app_drive
  7262.   say 'App path to dir:         ' AppInfo.app_path_to_dir
  7263.   say 'App wrkdir alias or drv: ' AppInfo.wrkdir_alias_or_drv
  7264.   say 'App wrkdir drive:        ' AppInfo.wrkdir_drive
  7265.   say 'App wrkdir path to dir:  ' AppInfo.wrkdir_path_to_dir
  7266.   say 'App prompt:              ' AppInfo.prompt
  7267.   say 'App interface type:      ' AppInfo.interface
  7268.   say 'App type:                ' AppInfo.apptype
  7269.   say 'App resource count:      ' AppInfo.res_count
  7270.  
  7271.   if AppInfo.res_count <> 0 then do
  7272.  
  7273.    do i=1 to AppInfo.res_count
  7274.     say
  7275.     say "Alias: " AppInfo.i.arl_alias
  7276.     say "Device:" AppInfo.i.arl_device
  7277.    end
  7278.  
  7279.   end
  7280.  
  7281.   call DropLsRxutFuncs
  7282.   call RxFuncDrop 'LoadLsRxutFuncs'
  7283.  
  7284.   exit 0
  7285.  
  7286.  Example Output 
  7287.  
  7288.  
  7289.   App Name:                 THENEW
  7290.   App Remark:               The New application
  7291.   App Command:              myapp.exe
  7292.   App Command parms:
  7293.   App alias or drive:       C:
  7294.   App drive:                N/A
  7295.   App path to dir:          \
  7296.   App wrkdir alias or drv:  D:
  7297.   App wrkdir drive:         Local
  7298.   App wrkdir path to dir:   \
  7299.   App prompt:               Prompt user for parameters
  7300.   App interface type:       Presentation Manager
  7301.   App type:                 Public OS/2 application
  7302.   App resource count:       2
  7303.  
  7304.   Alias:  BOOKS
  7305.   Device: *
  7306.  
  7307.   Alias:  MYDEMO
  7308.   Device: U
  7309.  
  7310.  
  7311. ΓòÉΓòÉΓòÉ 12.5. NETAPPSEL Get Info ΓòÉΓòÉΓòÉ
  7312.  
  7313. The function retrieves information about all types of applications contained in 
  7314. the specified userid desktop application folders. 
  7315.  
  7316. Syntax 
  7317.  
  7318.  
  7319. MyRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
  7320.  
  7321. Parameters 
  7322.  
  7323. The parameters specified are: 
  7324.  
  7325.  'appSelInfo'      The REXX variable receiving the result. The variable is 
  7326.                    divided into: 
  7327.  
  7328.                        appSelInfo.count 
  7329.  
  7330.                         The count of application selector entries returned 
  7331.  
  7332.                        appSelInfo.i.appname 
  7333.  
  7334.                         The application name. The variable i has a value 1 to 
  7335.                         appSelInfo.count 
  7336.  
  7337.                        appSelInfo.i.apptype  The application type. The 
  7338.                         variable i, see above 
  7339.  
  7340.  SrvName           The server computer name of the domain controller 
  7341.  
  7342.  UserId            The name of the userid 
  7343.  
  7344.  Note 
  7345.  
  7346.  The server computer name can be specified as '' for a local domain controller. 
  7347.  
  7348.  Example 
  7349.  
  7350.  
  7351.   /* Get application selector information */
  7352.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7353.   call LoadLsRxutFuncs
  7354.  
  7355.   NETAPPSEL = 32
  7356.   SrvName   = '\\ILIDC'
  7357.   UserId    = 'FMAM'
  7358.  
  7359.   myRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
  7360.  
  7361.   if myRc <> '0' then do
  7362.    say 'Got error from NetGetInfo() ' myRc
  7363.    call DropLsRxutFuncs
  7364.    exit 9
  7365.   end
  7366.  
  7367.   if appSelInfo.count <> 0 then do
  7368.    say 'Number of entries: ' appSelInfo.count
  7369.  
  7370.    do i=1 to appSelInfo.count
  7371.     say
  7372.     say 'Application entry: ' i
  7373.     say 'Application Name:  ' appSelInfo.i.appname
  7374.     say 'Application type:  ' appSelInfo.i.apptype
  7375.    end
  7376.  
  7377.   end
  7378.  
  7379.   call DropLsRxutFuncs
  7380.   call RxFuncDrop 'LoadLsRxutFuncs'
  7381.  
  7382.   exit 0
  7383.  
  7384.  Example Output 
  7385.  
  7386.  
  7387.   Number of entries:  2
  7388.  
  7389.   Application entry:  1
  7390.   Application Name:   ALLAPPS
  7391.   Application type:   Public OS/2 application
  7392.  
  7393.   Application entry:  2
  7394.   Application Name:   THENEW
  7395.   Application type:   Public OS/2 application
  7396.  
  7397.  
  7398. ΓòÉΓòÉΓòÉ 12.6. NETBIOS Get Info ΓòÉΓòÉΓòÉ
  7399.  
  7400. The function returns information about a particular network device driver 
  7401. installed on a computer. 
  7402.  
  7403. Syntax 
  7404.  
  7405.  
  7406. MyRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
  7407.  
  7408. Parameters 
  7409.  
  7410. The parameters specified are: 
  7411.  
  7412.  'netBiosInfo'  The REXX variable receiving the result. The variable is divided 
  7413.                 into: 
  7414.  
  7415.                     netBiosInfo.name 
  7416.  
  7417.                      The name of the network. For example 'NET1' or 'NETLB' 
  7418.  
  7419.                     netBiosInfo.driver_name 
  7420.  
  7421.                      The network device driver name that the LAN Server 
  7422.                      software uses 
  7423.  
  7424.                     netBiosInfo.lana_num 
  7425.  
  7426.                      The LAN adapter number 
  7427.  
  7428.                     netBiosInfo.driver_type 
  7429.  
  7430.                      The device driver protocol type 
  7431.  
  7432.                     netBiosInfo.net_status 
  7433.  
  7434.                      The status of the device driver 
  7435.  
  7436.                     netBiosInfo.net_bandwidth 
  7437.  
  7438.                      The number of bytes per second that the network hardware 
  7439.                      accommodates 
  7440.  
  7441.                     netBiosInfo.max_sess 
  7442.  
  7443.                      The maximum number of concurrent sessions that the device 
  7444.                      driver can establish 
  7445.  
  7446.                     netBiosInfo.max_ncbs 
  7447.  
  7448.                      The maximum number of NCBs that can be outstanding at any 
  7449.                      time 
  7450.  
  7451.                     netBiosInfo.max_names 
  7452.  
  7453.                      The maximum number of network names that a network 
  7454.                      (netBiosInfo.name) can establish 
  7455.  
  7456.  SrvName        The server computer name 
  7457.  
  7458.  NetName        The network name 
  7459.  
  7460.  Note 
  7461.  
  7462.  The server computer name can be specified as '' for a local server or 
  7463.  computer. 
  7464.  
  7465.  Example 
  7466.  
  7467.  
  7468.   /* Get NetBios information for NET1 */
  7469.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7470.   call LoadLsRxutFuncs
  7471.  
  7472.   NETBIOS = 90
  7473.   SrvName = '\\FSC30DCR'
  7474.   NetName = 'NET1'
  7475.  
  7476.   myRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
  7477.  
  7478.   if myRc <> '0' then do
  7479.    say 'Got error from NetGetInfo() ' myRc
  7480.    call DropLsRxutFuncs
  7481.    exit 9
  7482.   end
  7483.  
  7484.   say
  7485.   say "Netbios net_name:     " netBiosInfo.net_name
  7486.   say "Netbios driver_name:  " netBiosInfo.driver_name
  7487.   say "Netbios lana num:     " netBiosInfo.lana_num
  7488.   say "Netbios driver_type:  " netBiosInfo.driver_type
  7489.   say "Netbios net status:   " netBiosInfo.net_status
  7490.   say "Netbios net bandwidth:" netBiosInfo.net_bandwidth
  7491.   say "Netbios max sessions: " netBiosInfo.max_sess
  7492.   say "Netbios max ncbs:     " netBiosInfo.max_ncbs
  7493.   say "Netbios max names:    " netBiosInfo.max_names
  7494.  
  7495.   call DropLsRxutFuncs
  7496.   call RxFuncDrop 'LoadLsRxutFuncs'
  7497.  
  7498.   exit 0
  7499.  
  7500.  Example Output 
  7501.  
  7502.  
  7503.   Netbios net_name:      NET1
  7504.   Netbios driver_name:   NETBEUI$
  7505.   Netbios lana num:      0
  7506.   Netbios driver_type:   Network Control Block Protocol
  7507.   Netbios net status:    The network software is started.
  7508.   Netbios net bandwidth: 524288
  7509.   Netbios max sessions:  32
  7510.   Netbios max ncbs:      50
  7511.   Netbios max names:     14
  7512.  
  7513.  
  7514. ΓòÉΓòÉΓòÉ 12.7. NETCHARDEV Get Info ΓòÉΓòÉΓòÉ
  7515.  
  7516. The function retrieves information about a particular serial device in a shared 
  7517. serial device queue on a server. 
  7518.  
  7519. Syntax 
  7520.  
  7521.  
  7522. MyRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
  7523.  
  7524. Parameters 
  7525.  
  7526. The parameters specified are: 
  7527.  
  7528.  'charDevInfo'  The REXX variable receiving the result. The variable is divided 
  7529.                 into: 
  7530.  
  7531.                     charDevInfo.dev 
  7532.  
  7533.                      The device name 
  7534.  
  7535.                     charDevInfo.status 
  7536.  
  7537.                      The status of the device 
  7538.  
  7539.                     charDevInfo.username 
  7540.  
  7541.                      The current user name of the device 
  7542.  
  7543.                     charDevInfo.time 
  7544.  
  7545.                      The number of seconds the current application has been 
  7546.                      connected to the serial device 
  7547.  
  7548.  SrvName        The server computer name 
  7549.  
  7550.  DeviceName     The name of the device 
  7551.  
  7552.  Note 
  7553.  
  7554.  The server computer name can be specified as '' for a local server or 
  7555.  computer. 
  7556.  
  7557.  Example 
  7558.  
  7559.  
  7560.   /* Get the serial device information */
  7561.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7562.   call LoadLsRxutFuncs
  7563.  
  7564.   NETCHARDEV = 130
  7565.   SrvName    = '\\ILIDC'
  7566.   DeviceName = 'COM1'
  7567.  
  7568.   myRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
  7569.  
  7570.   if myRc <> '0' then do
  7571.    say 'Got error from NetGetInfo() ' myRc
  7572.    call DropLsRxutFuncs
  7573.    exit 9
  7574.   end
  7575.  
  7576.   say
  7577.   say 'The device name:   ' charDevInfo.dev
  7578.   say 'Device status:     ' charDevInfo.status
  7579.   say 'Current user name: ' charDevInfo.username
  7580.   say 'Time in use:       ' charDevInfo.time
  7581.  
  7582.   call DropLsRxutFuncs
  7583.   call RxFuncDrop 'LoadLsRxutFuncs'
  7584.  
  7585.   exit 0
  7586.  
  7587.  Example Output 
  7588.  
  7589.  
  7590.   The device name:    COM1
  7591.   Device status:      Idle
  7592.   Current user name:  -none-
  7593.   Time in use:        0
  7594.  
  7595.  
  7596. ΓòÉΓòÉΓòÉ 12.8. NETCHARDEVQ Get Info ΓòÉΓòÉΓòÉ
  7597.  
  7598. The function retrieves information about a particular serial device queue on a 
  7599. server. 
  7600.  
  7601. Syntax 
  7602.  
  7603.  
  7604. MyRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
  7605.  
  7606. Parameters 
  7607.  
  7608. The parameters specified are: 
  7609.  
  7610.  'charQInfo'   The REXX variable receiving the result. The variable is divided 
  7611.                into: 
  7612.  
  7613.                    charQInfo.dev 
  7614.  
  7615.                     The name of the serial device queue for which information 
  7616.                     is returned 
  7617.  
  7618.                    charQInfo.priority 
  7619.  
  7620.                     The queue priority 
  7621.  
  7622.                    charQInfo.devs 
  7623.  
  7624.                     The names of the local devices in the pool 
  7625.  
  7626.                    charQInfo.numusers 
  7627.  
  7628.                     The number of users waiting in the device queue 
  7629.  
  7630.                    charQInfo.numahead 
  7631.  
  7632.                     The number of users ahead of the UserId specified in the 
  7633.                     call the NetGetInfo(CHARDEVQ) 
  7634.  
  7635.  SrvName       The server computer name 
  7636.  
  7637.  QueueName     The name of the queue. This name is identical to the netname 
  7638.  
  7639.  UserId        The name of the userid 
  7640.  
  7641.  Note 
  7642.  
  7643.  The server computer name can be specified as '' for a local server. 
  7644.  
  7645.  Example 
  7646.  
  7647.  
  7648.   /* Get queue information for a serial device */
  7649.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7650.   call LoadLsRxutFuncs
  7651.  
  7652.   NETCHARDEVQ = 140
  7653.   SrvName     = '\\ILIDC'
  7654.   QueueName   = 'SRVCOM'
  7655.   UserId      = 'LINDBERG'
  7656.  
  7657.   myRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
  7658.  
  7659.   if myRc <> '0' then do
  7660.    say 'Got error from NetGetInfo() ' myRc
  7661.    call DropLsRxutFuncs
  7662.    exit 9
  7663.   end
  7664.  
  7665.   say
  7666.   say 'Device name:           ' charQInfo.dev
  7667.   say 'Queue Priority:        ' charQInfo.priority
  7668.   say 'Queue server devices:  ' charQInfo.devs
  7669.   say 'Numbers users waiting: ' charQInfo.numusers
  7670.   say 'Number users ahead of ' UserId ':' charQInfo.numahead
  7671.  
  7672.   call DropLsRxutFuncs
  7673.   call RxFuncDrop 'LoadLsRxutFuncs'
  7674.  
  7675.   exit 0
  7676.  
  7677.  Example Output 
  7678.  
  7679.  
  7680.   Device name:            SRVCOM
  7681.   Queue Priority:         3
  7682.   Queue server devices:   COM1
  7683.   Numbers users waiting:  0
  7684.   Number users ahead of  LINDBERG : Userid has no requests in the queue
  7685.  
  7686.  
  7687. ΓòÉΓòÉΓòÉ 12.9. NETCONNECTION Get Info ΓòÉΓòÉΓòÉ
  7688.  
  7689. The function returns a list of connections made to a shared resource of a 
  7690. server, or a list of all connections established from a particular computer to 
  7691. a server. This function is identical identical to NetEnumerate(NETCONNECTION). 
  7692.  
  7693. Syntax 
  7694.  
  7695.  
  7696. MyRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  7697.  
  7698. Parameters 
  7699.  
  7700. The parameters specified are: 
  7701.  
  7702.  'connInfo'    The REXX variable receiving the result. The variable is divided 
  7703.                into: 
  7704.  
  7705.                    connInfo.num_entries 
  7706.  
  7707.                     The number of connection information entries. Each entry is 
  7708.                     obtained by the index i, which has a value from 1 to 
  7709.                     connInfo.num_entries 
  7710.  
  7711.                    connInfo.i.id 
  7712.  
  7713.                     The connection id 
  7714.  
  7715.                    connInfo.i.type 
  7716.  
  7717.                     The type of connection made from the local device name to 
  7718.                     the shared resource 
  7719.  
  7720.                    connInfo.i.num_opens 
  7721.  
  7722.                     The number of files that are currently open as a result of 
  7723.                     the connection 
  7724.  
  7725.                    connInfo.i.num_users 
  7726.  
  7727.                     The number of users on the connection 
  7728.  
  7729.                    connInfo.i.time 
  7730.  
  7731.                     The number of seconds the connection has been established 
  7732.  
  7733.                    connInfo.i.username 
  7734.  
  7735.                     The name of the user that made the connection 
  7736.  
  7737.                    connInfo.i.netname 
  7738.  
  7739.                     A string indicating either the netname of the shared 
  7740.                     resource of the server or the computer name of the 
  7741.                     requester, depending on which name was specified as the 
  7742.                     Qualifier parameter 
  7743.  
  7744.  SrvName       The server computer name 
  7745.  
  7746.  Qualifier     A string specifying either the netname of the shared resource 
  7747.                whose connections will be listed or the client name of the 
  7748.                requester whose connections to the shared resource will be 
  7749.                listed 
  7750.  
  7751.  Note 
  7752.  
  7753.  The server computer name can be specified as '' for a local server. 
  7754.  
  7755.  Example 
  7756.  
  7757.  
  7758.   /* Get connection information */
  7759.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7760.   call LoadLsRxutFuncs
  7761.  
  7762.   NETCONNECTION = 40
  7763.   SrvName       = '\\DOMAIN_CONTRLR'
  7764.   Qualifier     = '\\ITSCWK21'
  7765.  
  7766.   myRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  7767.  
  7768.   if myRc <> '0' then do
  7769.    say 'Got error from NetGetInfo() ' myRc
  7770.    call DropLsRxutFuncs
  7771.    exit 9
  7772.   end
  7773.  
  7774.   if connInfo.0 = 0 then do
  7775.    say 'No connections established'
  7776.    call DropLsRxutFuncs
  7777.    exit 0
  7778.   end
  7779.  
  7780.   if connInfo.num_entries <> 0 then do
  7781.    say "Number of entries: " connInfo.num_entries
  7782.  
  7783.    do i=1 to connInfo.num_entries
  7784.     say
  7785.     say "Connection id:        " connInfo.i.id
  7786.     say "Connection type:      " connInfo.i.type
  7787.     say "Connection num opens: " connInfo.i.num_opens
  7788.     say "Connection num users: " connInfo.i.num_users
  7789.     say "Connection time:      " connInfo.i.time
  7790.     say "Connection user name: " connInfo.i.username
  7791.     say "Connection net name:  " connInfo.i.netname
  7792.    end
  7793.  
  7794.   end
  7795.  
  7796.   call DropLsRxutFuncs
  7797.   call RxFuncDrop 'LoadLsRxutFuncs'
  7798.  
  7799.   exit 0
  7800.  
  7801.  Example Output 
  7802.  
  7803.  
  7804.   Number of entries:  2
  7805.  
  7806.   Connection id:         6145
  7807.   Connection type:       Interprocess Communication Connection
  7808.   Connection num opens:  0
  7809.   Connection num users:  1
  7810.   Connection time:       411
  7811.   Connection user name:  ADMIN04
  7812.   Connection net name:   IPC$
  7813.  
  7814.   Connection id:         59393
  7815.   Connection type:       Disk Connection
  7816.   Connection num opens:  1
  7817.   Connection num users:  1
  7818.   Connection time:       367
  7819.   Connection user name:  ADMIN04
  7820.   Connection net name:   C$
  7821.  
  7822.  
  7823. ΓòÉΓòÉΓòÉ 12.10. NETDASD Get Info (LS40) ΓòÉΓòÉΓòÉ
  7824.  
  7825. The function retrieves directory limits information for a particular directory 
  7826. resource. Before this function can be used successfully, directory limits must 
  7827. be enabled on the 386-HPFS drive. (See the NetMisc(NETDASDCONTROL) function) 
  7828.  
  7829. Syntax 
  7830.  
  7831.  
  7832. MyRc = NetGetInfo(NETDASD, 'DASDInfo', SrvName)
  7833.  
  7834. Parameters 
  7835.  
  7836. The parameters required and returned are: 
  7837.  
  7838.  'DASDInfo'  The directory limits information variable, which is divided into: 
  7839.  
  7840.                  DASDInfo.DirPath 
  7841.  
  7842.                   A string containing the directory path. The string must be 
  7843.                   directory path, beginning with the drive letter, and only 
  7844.                   ending with a backslash when a root directory is specified. 
  7845.  
  7846.                   If a redirected drive is specified for DASDInfo.DirPath, the 
  7847.                   SrvName parameter must be '' 
  7848.  
  7849.                  DASDInfo.resource_name 
  7850.  
  7851.                   The name of the directory having a directory limit. 
  7852.  
  7853.                  DASDInfo.max 
  7854.  
  7855.                   The amount of disk space allotted to this directory by 
  7856.                   directory limits. Specified in KB, this field can be set from 
  7857.                   1 to 67108863. 
  7858.  
  7859.                  DASDInfo.use 
  7860.  
  7861.                   The amount (in KB) of disk space already occupied within the 
  7862.                   specified directory resource 
  7863.  
  7864.                  DASDInfo.thresh 
  7865.  
  7866.                   The initial alert threshold as a percentage of the total 
  7867.                   directory limit space allotted, with values ranging from 0 to 
  7868.                   99. Zero specifies that no threshold alert is to be 
  7869.                   generated, and 99 specifies that an alert is generated when 
  7870.                   99% of the allotted directory limit for this directory has 
  7871.                   been reached. 
  7872.  
  7873.                  DASDInfo.delta 
  7874.  
  7875.                   The increment in which alerts are to be generated after the 
  7876.                   DASDInfo.thresh threshold has been crossed, but before all of 
  7877.                   the allotted disk space has been used. 
  7878.  
  7879.  SrvName     The computer name of the server to enumerate the directory limits 
  7880.              on 
  7881.  
  7882.  Note 
  7883.  
  7884.  The server computer name can be specified as '' for a local server. 
  7885.  
  7886.  Example 
  7887.  
  7888.  
  7889.   /* DASD directory limit get information */
  7890.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7891.   call LoadLsRxutFuncs
  7892.  
  7893.   NETDASD             = 750
  7894.   DASDInfo.DirPath    = 'D:\APPS\DATA'
  7895.   SrvName             = '\\DOMAIN_CONTRLR'
  7896.  
  7897.   myRc = NetGetInfo(NETDASD, 'DASDInfo', SrvName)
  7898.  
  7899.   if myRc <> '0' then do
  7900.    say 'Got error from NetGetInfo() ' myRc
  7901.    exitRc = 9
  7902.   end
  7903.   else do
  7904.    say 'Directory path   ' DASDInfo.resource_name
  7905.    say 'Directory limit  ' DASDInfo.max
  7906.    say 'Current Usage    ' DASDInfo.use
  7907.    say 'Threshold        ' DASDInfo.thresh
  7908.    say 'Delta            ' DASDInfo.delta
  7909.  
  7910.    exitRc = 0
  7911.   end
  7912.  
  7913.   call DropLsRxutFuncs
  7914.   call RxFuncDrop 'LoadLsRxutFuncs'
  7915.  
  7916.   exit exitRc
  7917.  
  7918.  Example Output 
  7919.  
  7920.  
  7921.   Directory path     D:\APPS\DATA
  7922.   Directory limit    512
  7923.   Current Usage      102
  7924.   Threshold          90
  7925.   Delta              5
  7926.  
  7927.  
  7928. ΓòÉΓòÉΓòÉ 12.11. NETLOGON Get Info ΓòÉΓòÉΓòÉ
  7929.  
  7930. Retrieves information about logged-on users. 
  7931.  
  7932. Syntax 
  7933.  
  7934.  
  7935. MyRc = NetGetInfo(NETLOGON, 'logonInfo')
  7936. MyRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
  7937.  
  7938. Parameters 
  7939.  
  7940. The NetGetInfo(NETLOGON) function has two different forms. The first form with 
  7941. no SrvName parameter is identical to the second form with the SrvName parameter 
  7942. value set to ''. 
  7943.  
  7944. The parameters specified are: 
  7945.  
  7946.  'logonInfo'       The REXX variable receiving the result. The variable is 
  7947.                    divided into: 
  7948.  
  7949.                        logonInfo.num_entries 
  7950.  
  7951.                         The number of logon information entries. Each entry is 
  7952.                         obtained by the index i, which has a value from 1 to 
  7953.                         logonInfo.num_entries 
  7954.  
  7955.                        logonInfo.i.eff_name 
  7956.  
  7957.                         The name of the account to which the user was logged on 
  7958.  
  7959.                        logonInfo.i.computer 
  7960.  
  7961.                         The computer name 
  7962.  
  7963.                        logonInfo.i.full_name 
  7964.  
  7965.                         The fullname value specified in the user account 
  7966.  
  7967.                        logonInfo.i.usrcomment 
  7968.  
  7969.                         The user settable value for user comments 
  7970.  
  7971.                        logonInfo.i.logon_time 
  7972.  
  7973.                         The time and date when the user logged on 
  7974.  
  7975.  SrvName           The server computer name 
  7976.  
  7977.  Note 
  7978.  
  7979.  The server computer name can be specified as '' for a local server. 
  7980.  
  7981.  Example 
  7982.  
  7983.  
  7984.   /* Get information on logged on users on this server */
  7985.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7986.   call LoadLsRxutFuncs
  7987.  
  7988.   NETLOGON = 50
  7989.   SrvName  = '\\FSCDC'
  7990.  
  7991.   myRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
  7992.  
  7993.   if myRc <> '0' then do
  7994.    say 'Got error from NetGetInfo() ' myRc
  7995.    call DropLsRxutFuncs
  7996.    exit 9
  7997.   end
  7998.  
  7999.   if logonInfo.num_entries <> 0 then do
  8000.    say "Number of entries: " logonInfo.num_entries
  8001.  
  8002.    do i=1 to logonInfo.num_entries
  8003.     say
  8004.     say "Logon eff_name:     " logonInfo.i.eff_name
  8005.     say "Logon computer:     " logonInfo.i.computer
  8006.     say "Logon full name:    " logonInfo.i.full_name
  8007.     say "Logon user comment: " logonInfo.i.usrcomment
  8008.     say "Logon time:         " logonInfo.i.logon_time
  8009.    end
  8010.  
  8011.   end
  8012.  
  8013.   call DropLsRxutFuncs
  8014.   call RxFuncDrop 'LoadLsRxutFuncs'
  8015.  
  8016.   exit 0
  8017.  
  8018.  Example Output 
  8019.  
  8020.  
  8021.   Number of entries:  1
  8022.  
  8023.   Logon eff_name:      LINDBERG
  8024.   Logon computer:      FSC30DCR
  8025.   Logon full name:     Ingolf Lindberg, OS/2 Competency Center
  8026.   Logon user comment:  Ingolf Lindberg in N91-3161
  8027.   Logon time:          Tue May  4 07:44:26 1993
  8028.  
  8029.  
  8030. ΓòÉΓòÉΓòÉ 12.12. NETFILE Get Info ΓòÉΓòÉΓòÉ
  8031.  
  8032. The function retrieves information about a particular opened file on a server. 
  8033.  
  8034. Syntax 
  8035.  
  8036.  
  8037. MyRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
  8038.  
  8039. Parameters 
  8040.  
  8041. The parameters specified are: 
  8042.  
  8043.  'fileInfo'    The REXX variable receiving the result. The variable is divided 
  8044.                into: 
  8045.  
  8046.                    fileInfo.id 
  8047.  
  8048.                     The file identifier 
  8049.  
  8050.                    fileInfo.permissions 
  8051.  
  8052.                     The access permissions of the opening application. 
  8053.  
  8054.                    fileInfo.num_locks 
  8055.  
  8056.                     The number of file locks on the file, device, or pipe 
  8057.  
  8058.                    fileInfo.pathname 
  8059.  
  8060.                     The path name of the opened resource 
  8061.  
  8062.                    fileInfo.username 
  8063.  
  8064.                     The name of the userid that first opened the file 
  8065.  
  8066.  SrvName       The server computer name 
  8067.  
  8068.  fileId        The file identifier. This value must be supplied 
  8069.  
  8070.  Note 
  8071.  
  8072.  The server computer name can be specified as '' for a local server. 
  8073.  
  8074.  Example 
  8075.  
  8076.  
  8077.   /* Get opened file information */
  8078.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8079.   call LoadLsRxutFuncs
  8080.  
  8081.   NETFILE = 60
  8082.   SrvName = '\\FSCDC'
  8083.   fileId  = 167273
  8084.  
  8085.   myRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
  8086.  
  8087.   if myRc <> '0' then do
  8088.    say 'Got error from NetGetInfo() ' myRc
  8089.    call DropLsRxutFuncs
  8090.    exit 9
  8091.   end
  8092.  
  8093.   say
  8094.   say "File id:           " fileInfo.id
  8095.   say "File permissions:  " fileInfo.permissions
  8096.   say "File number locks: " fileInfo.num_locks
  8097.   say "File path:         " fileInfo.pathname
  8098.   say "File user name:    " fileInfo.username
  8099.  
  8100.   call DropLsRxutFuncs
  8101.   call RxFuncDrop 'LoadLsRxutFuncs'
  8102.  
  8103.   exit 0
  8104.  
  8105.  Example Output 
  8106.  
  8107.  
  8108.   File id:            167273
  8109.   File permissions:   R
  8110.   File number locks:  0
  8111.   File path:          D:\BOOKS\GG243783.BOO
  8112.   File user name:     FSCADMIN
  8113.  
  8114.  
  8115. ΓòÉΓòÉΓòÉ 12.13. NETFINDADDRESS ΓòÉΓòÉΓòÉ
  8116.  
  8117. The function performs a "NCB.FIND.NAME" and finds one or more LAN addresses 
  8118. from a specified NetBIOS name. 
  8119.  
  8120. Syntax 
  8121.  
  8122.  
  8123. MyRc = NetGetInfo(NETFINDADDRESS, addressList, NetbiosName, type2Find)
  8124.  
  8125. Parameters 
  8126.  
  8127. The parameters specified are: 
  8128.  
  8129.  addressList    The REXX variable receiving the result. The variable is divided 
  8130.                 into: 
  8131.  
  8132.                     addressList.count 
  8133.  
  8134.                      The count of LAN addresses found 
  8135.  
  8136.                     addressList.i.address 
  8137.  
  8138.                      The adapter address of the adapter having the searched 
  8139.                      NetBIOS name registered. The variable i has a value from 1 
  8140.                      to addressList.count 
  8141.  
  8142.                     addressList.i.route The routing information from the 
  8143.                      machine issuing the call to the adapter found. The 
  8144.                      variable i has a value from 1 to addressList.count 
  8145.  
  8146.  NetBiosName    The NetBIOS name to find 
  8147.  
  8148.  type2Find      The type of the NetBIOS name to find. OS/2 LAN Requester and 
  8149.                 OS/2 LAN Server encodes the NetBIOS names used in different 
  8150.                 formats. The following name type vaules can be used: 
  8151.  
  8152.  
  8153.                                 Value What to find
  8154.                                 ----- ------------
  8155.                                 0     A NetBIOS name
  8156.                                 1     A LAN Server/Requester 3.0 Message name or Userid
  8157.                                 2     A LAN Server/Requester 3.0 Computer name
  8158.                                 3     LAN Server/Requester 3.0 domain group name
  8159.  
  8160.  
  8161.  Notes 
  8162.  
  8163.  The information obtained is formatted for Token-Ring networks. 
  8164.  
  8165.  If the return code has a value, it is either a return code from a call to the 
  8166.  NetBIOS submit interface or a NetBIOS Network Control Block return code. 
  8167.  
  8168.  There is no guarantee that all nodes will respond within the NetBIOS interface 
  8169.  timeout values specified on the executing workstation. 
  8170.  
  8171.  Example 
  8172.  
  8173.  
  8174.   /* Get adapter addresses of current connected workstations */
  8175.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8176.   call LoadLsRxutFuncs
  8177.  
  8178.   NETFINDADDRESS = 410
  8179.   NetbiosName    = 'FSC'
  8180.   type2Find      = 3
  8181.  
  8182.   myRc = NetGetInfo(NETFINDADDRESS, addressList, NetbiosName, type2Find)
  8183.  
  8184.   if myRc <> '0' then do
  8185.    say 'Got error from NetGetInfo() ' myRc
  8186.    call DropLsRxutFuncs
  8187.    exit 9
  8188.   end
  8189.  
  8190.   say
  8191.   say 'Count:   ' addressList.count
  8192.  
  8193.   do i=1 to addressList.count
  8194.    say addressList.i.address
  8195.    say addressList.i.route
  8196.    say
  8197.   end
  8198.  
  8199.   call DropLsRxutFuncs
  8200.   call RxFuncDrop 'LoadLsRxutFuncs'
  8201.  
  8202.   exit 0
  8203.  
  8204.  Example Output 
  8205.  
  8206.   Count:  2
  8207.   10005AF78491
  8208.   -none-
  8209.  
  8210.   4000100C1240
  8211.   S504 B1 S50B B1 S501
  8212.  
  8213.  
  8214. ΓòÉΓòÉΓòÉ 12.14. NETGROUP Get Info ΓòÉΓòÉΓòÉ
  8215.  
  8216. The function retrieves group related information. 
  8217.  
  8218. Syntax 
  8219.  
  8220.  
  8221. MyRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
  8222.  
  8223. Parameters 
  8224.  
  8225. The parameters specified are: 
  8226.  
  8227.  'groupInfo'       The REXX variable receiving the result. The variable is 
  8228.                    divided into: 
  8229.  
  8230.                        groupInfo.name 
  8231.  
  8232.                         The group name 
  8233.  
  8234.                        groupInfo.comment 
  8235.  
  8236.                         The group comment 
  8237.  
  8238.  SrvName           The server computer name 
  8239.  
  8240.  GroupName         The name of the group. This value must be supplied 
  8241.  
  8242.  Note 
  8243.  
  8244.  The server computer name can be specified as '' for a local server. 
  8245.  
  8246.  Example 
  8247.  
  8248.  
  8249.   /* Get group comment */
  8250.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8251.   call LoadLsRxutFuncs
  8252.  
  8253.   NETGROUP  = 70
  8254.   SrvName   = '\\ILIDC'
  8255.   GroupName = 'CSUSERS'
  8256.  
  8257.   myRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
  8258.  
  8259.   if myRc <> '0' then do
  8260.    say 'Got error from NetGetInfo() ' myRc
  8261.    call DropLsRxutFuncs
  8262.    exit 9
  8263.   end
  8264.  
  8265.   say
  8266.   say "Group Name:    " groupInfo.name
  8267.   say "Group Comment: " groupInfo.comment
  8268.  
  8269.   call DropLsRxutFuncs
  8270.   call RxFuncDrop 'LoadLsRxutFuncs'
  8271.  
  8272.   exit 0
  8273.  
  8274.  Example Output 
  8275.  
  8276.  
  8277.   Group Name:     CSUSERS
  8278.   Group Comment:  The Client/Server users group
  8279.  
  8280.  
  8281. ΓòÉΓòÉΓòÉ 12.15. NETGROUPUSERS Get Info ΓòÉΓòÉΓòÉ
  8282.  
  8283. The function returns a list of members of a particular group. 
  8284.  
  8285. Syntax 
  8286.  
  8287.  
  8288. MyRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  8289.  
  8290. Parameters 
  8291.  
  8292. The parameters specified are: 
  8293.  
  8294.  'groupInfo'       The REXX variable receiving the result. The variable is 
  8295.                    divided into: 
  8296.  
  8297.                        groupInfo.0 
  8298.  
  8299.                         Counts the number of user accounts defined in the group 
  8300.  
  8301.                        groupInfo.i 
  8302.  
  8303.                         The user account number i defined in the group. The 
  8304.                         variable i has a value from 1 to groupInfo.0 
  8305.  
  8306.  SrvName           The computer name of the domain controller 
  8307.  
  8308.  GroupName         The group name. The group name must be supplied 
  8309.  
  8310.  Note 
  8311.  
  8312.  The server computer name can be specified as '' for a local domain controller. 
  8313.  
  8314.  Example 
  8315.  
  8316.  
  8317.   /* Get group users */
  8318.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8319.   call LoadLsRxutFuncs
  8320.  
  8321.   NETGROUPUSERS = 340
  8322.   SrvName       = '\\ILIDC'
  8323.   GroupName     = 'CSUSERS'
  8324.  
  8325.   myRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  8326.  
  8327.   if myRc <> '0' then do
  8328.    say 'Got error from NetGetInfo() ' myRc
  8329.    call DropLsRxutFuncs
  8330.    exit 9
  8331.   end
  8332.  
  8333.   say
  8334.  
  8335.   do i=1 to groupInfo.0
  8336.     say "UserId:        " groupInfo.i
  8337.   end
  8338.  
  8339.   call DropLsRxutFuncs
  8340.   call RxFuncDrop 'LoadLsRxutFuncs'
  8341.  
  8342.   exit 0
  8343.  
  8344.  Example Output 
  8345.  
  8346.  
  8347.   UserId:         LINDBERG
  8348.   UserId:         BRUGERID
  8349.   UserId:         USERID
  8350.  
  8351.  
  8352. ΓòÉΓòÉΓòÉ 12.16. NETLOGONASN Get Info ΓòÉΓòÉΓòÉ
  8353.  
  8354. The function retrieves information about logon assignments for a specified 
  8355. userid. 
  8356.  
  8357. Syntax 
  8358.  
  8359.  
  8360. MyRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
  8361.  
  8362. Parameters 
  8363.  
  8364. The parameters specified are: 
  8365.  
  8366.  'logonAsnInfo'    The REXX variable receiving the result. The variable is 
  8367.                    divided into: 
  8368.  
  8369.                        logonAsnInfo.count 
  8370.  
  8371.                         The count of logon assignments. If this value is equal 
  8372.                         or large than 1 then the following values are assigned: 
  8373.  
  8374.                        logonAsnInfo.i.alias 
  8375.  
  8376.                         The alias name assigned. The variable i has a value 
  8377.                         from 1 to logonAsnInfo.count 
  8378.  
  8379.                        logonAsnInfo.i.type 
  8380.  
  8381.                         The alias type. The variable i has a value from 1 to 
  8382.                         logonAsnInfo.count 
  8383.  
  8384.                        logonAsnInfo.i.device 
  8385.  
  8386.                         The local device. The variable i has a value from 1 to 
  8387.                         logonAsnInfo.count 
  8388.  
  8389.  SrvName           The server computer name of the domain controller 
  8390.  
  8391.  UserId            The userid 
  8392.  
  8393.  Note 
  8394.  
  8395.  The server computer name can be specified as '' for a local domain controller. 
  8396.  
  8397.  Example 
  8398.  
  8399.  
  8400.   /* Get the user logon assignments information */
  8401.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8402.   call LoadLsRxutFuncs
  8403.  
  8404.   NETLOGONASN = 52
  8405.   SrvName     = '\\ILIDC'
  8406.   UserId      = 'FMAM'
  8407.  
  8408.   myRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
  8409.  
  8410.   if myRc <> '0' then do
  8411.    say 'Got error from NetGetInfo() ' myRc
  8412.    call DropLsRxutFuncs
  8413.    exit 9
  8414.   end
  8415.  
  8416.   if logonAsnInfo.count = 0 then do
  8417.    say 'No logon assignments'
  8418.    call DropLsRxutFuncs
  8419.    exit 0
  8420.   end
  8421.  
  8422.   say 'The number of logon assignments are: ' logonAsnInfo.count
  8423.  
  8424.   do i=1 to logonAsnInfo.count
  8425.    say
  8426.    say 'The Alias assigned: ' logonAsnInfo.i.alias
  8427.    say 'Alias type:         ' logonAsnInfo.i.type
  8428.    say 'Device assigned:    ' logonAsnInfo.i.device
  8429.   end
  8430.  
  8431.   call DropLsRxutFuncs
  8432.   call RxFuncDrop 'LoadLsRxutFuncs'
  8433.  
  8434.   exit 0
  8435.  
  8436.  Example Output 
  8437.  
  8438.  
  8439.   The number of logon assignments are:  3
  8440.  
  8441.   The Alias assigned:  BOOKS
  8442.   Alias type:          Files alias
  8443.   Device assigned:     O
  8444.  
  8445.   The Alias assigned:  MYDEMO
  8446.   Alias type:          Files alias
  8447.   Device assigned:     P
  8448.  
  8449.   The Alias assigned:  SRVCOM
  8450.   Alias type:          Serial device alias
  8451.   Device assigned:     COM3
  8452.  
  8453.  
  8454. ΓòÉΓòÉΓòÉ 12.17. NETMESSAGENAME Get Info ΓòÉΓòÉΓòÉ
  8455.  
  8456. The function retrieves information about a userid entry in the message name 
  8457. table. 
  8458.  
  8459. Syntax 
  8460.  
  8461.  
  8462. MyRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
  8463.  
  8464. Parameters 
  8465.  
  8466. The parameters specified are: 
  8467.  
  8468.  'msgNameInfo'     The REXX variable receiving the result. The variable is 
  8469.                    divided into: 
  8470.  
  8471.                        msgNameInfo.name 
  8472.  
  8473.                         The messaging name 
  8474.  
  8475.                        msgNameInfo.forward_flag 
  8476.  
  8477.                         The value specifies whether messages will be sent to a 
  8478.                         user or application on the local computer, or forwarded 
  8479.                         to a user or application on a remote computer 
  8480.  
  8481.                        msgNameInfo.forward 
  8482.  
  8483.                         The value will specify the user name to which the 
  8484.                         message will be sent, if messages are to be forwarded 
  8485.  
  8486.  SrvName           The server or requester computer name 
  8487.  
  8488.  MsgName           The message name 
  8489.  
  8490.  Note 
  8491.  
  8492.  The server or requester computer name can be specified as '' for a local 
  8493.  server or computer. 
  8494.  
  8495.  Example 
  8496.  
  8497.  
  8498.   /* Get message name information */
  8499.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8500.   call LoadLsRxutFuncs
  8501.  
  8502.   NETMESSAGENAME = 80
  8503.   SrvName = '\\ILIDC'
  8504.   MsgName = 'LINDBERG'
  8505.  
  8506.   myRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
  8507.  
  8508.   if myRc <> '0' then do
  8509.    say 'Got error from NetGetInfo() ' myRc
  8510.    call DropLsRxutFuncs
  8511.    exit 9
  8512.   end
  8513.  
  8514.   say
  8515.   say "Message Name: " msgNameInfo.name
  8516.   say "Forward flag: " msgNameInfo.forward_flag
  8517.   say "Forward to:   " msgNameInfo.forward
  8518.  
  8519.   call DropLsRxutFuncs
  8520.   call RxFuncDrop 'LoadLsRxutFuncs'
  8521.  
  8522.   exit 0
  8523.  
  8524.  Example Output 
  8525.  
  8526.  
  8527.   Message Name:  LINDBERG
  8528.   Forward flag:  Not forwarded
  8529.   Forward to:    N/A
  8530.  
  8531.  
  8532. ΓòÉΓòÉΓòÉ 12.18. NETMESSAGELOGFILE Get Info ΓòÉΓòÉΓòÉ
  8533.  
  8534. The function retrieves the name of the message log file and the current logging 
  8535. status (on or off). 
  8536.  
  8537. Syntax 
  8538.  
  8539.  
  8540. MyRc = NetGetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  8541.  
  8542. Parameters 
  8543.  
  8544. The parameters specified are: 
  8545.  
  8546.  'msgLogFileInfo'  The REXX variable receiving the result. The variable is 
  8547.                    divided into: 
  8548.  
  8549.                        msgLogFileInfo.filename 
  8550.  
  8551.                         A string containing the complete path and file name, 
  8552.                         beginning with the drive letter of the message log file 
  8553.  
  8554.                        msgLogFileInfo.logswitch 
  8555.  
  8556.                         A integer specifying whether logging is enabled. If 0, 
  8557.                         message logging is disabled; otherwise, message logging 
  8558.                         is enabled 
  8559.  
  8560.  SrvName           The server computer name 
  8561.  
  8562.  Note 
  8563.  
  8564.  The server computer name can be specified as '' for a local server or 
  8565.  computer. 
  8566.  
  8567.  Example 
  8568.  
  8569.  
  8570.   /* Get the message log file and logging state */
  8571.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8572.   call LoadLsRxutFuncs
  8573.  
  8574.   NETMESSAGELOGFILE = 550
  8575.   SrvName           = '\\ANYSRV01'
  8576.  
  8577.   myRc = NetGetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  8578.  
  8579.   if myRc <> '0' then do
  8580.    say 'Got error from NetGetInfo() ' myRc
  8581.    exitRc = 9
  8582.   end
  8583.   else do
  8584.    say 'Message log file information'
  8585.    say
  8586.    say 'State ' msgLogFileInfo.logswitch
  8587.    say 'File  ' msgLogFileInfo.filename
  8588.   end
  8589.  
  8590.   call DropLsRxutFuncs
  8591.   call RxFuncDrop 'LoadLsRxutFuncs'
  8592.  
  8593.   exit exitRc
  8594.  
  8595.  Example Output 
  8596.  
  8597.  
  8598.   State  0
  8599.   File   C:\IBMLAN\LOGS\MESSAGES.LOG
  8600.  
  8601.  
  8602. ΓòÉΓòÉΓòÉ 12.19. NETPRINTDEST Get Info ΓòÉΓòÉΓòÉ
  8603.  
  8604. The function returns information about a particular printer destination. 
  8605.  
  8606. Syntax 
  8607.  
  8608.  
  8609. MyRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
  8610.  
  8611. Parameters 
  8612.  
  8613. The parameters specified are: 
  8614.  
  8615.  'prtDestInfo'     The REXX variable receiving the result. The variable is 
  8616.                    divided into: 
  8617.  
  8618.                        prtDestInfo.PrinterName 
  8619.  
  8620.                         The printer device name 
  8621.  
  8622.                        prtDestInfo.UserName 
  8623.  
  8624.                         The user that submitted the current job, if a job is 
  8625.                         printing. If a local job is printing the value 'Local 
  8626.                         User' is used. If no jobs are printing the value of 
  8627.                         '-none-' is used 
  8628.  
  8629.                        prtDestInfo.LogAddr 
  8630.  
  8631.                         The printer logical address (LPT1 for example) 
  8632.  
  8633.                        prtDestInfo.JobId 
  8634.  
  8635.                         The current printing job id. If the returned value is 
  8636.                         0, no jobs are printing 
  8637.  
  8638.                        prtDestInfo.Status 
  8639.  
  8640.                         The printer device status 
  8641.  
  8642.                        prtDestInfo.StatusComment 
  8643.  
  8644.                         Print device comment while printing 
  8645.  
  8646.                        prtDestInfo.Comment 
  8647.  
  8648.                         Print device description 
  8649.  
  8650.                        prtDestInfo.Drivers 
  8651.  
  8652.                         Print driver supported by this device 
  8653.  
  8654.                        prtDestInfo.time 
  8655.  
  8656.                         Time (in minutes) current print job has been printing 
  8657.  
  8658.                        prtDestInfo.TimeOut 
  8659.  
  8660.                         Print device Time Out (in seconds) 
  8661.  
  8662.  SrvName           The server computer name 
  8663.  
  8664.  DevName           The printer device name 
  8665.  
  8666.  Note 
  8667.  
  8668.  The server computer name can be specified as '' for a local server or 
  8669.  computer. 
  8670.  
  8671.  Example 
  8672.  
  8673.  
  8674.   /* Get Print destination information */
  8675.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8676.   call LoadLsRxutFuncs
  8677.  
  8678.   NETPRINTDEST = 100
  8679.   SrvName = '\\FSC30DCR'
  8680.   DevName = 'IBM40191'
  8681.  
  8682.   myRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
  8683.  
  8684.   if myRc <> '0' then do
  8685.    say 'Got error from NetGetInfo() ' myRc
  8686.    call DropLsRxutFuncs
  8687.    exit 9
  8688.   end
  8689.  
  8690.   say
  8691.   say 'Printer device name:       ' prtDestInfo.PrinterName
  8692.   say 'Current user job printing: ' prtDestInfo.UserName
  8693.   say 'Printer logical address:   ' prtDestInfo.LogAddr
  8694.   say 'Current job id printing:   ' prtDestInfo.JobId
  8695.   say 'Print device status:       ' prtDestInfo.Status
  8696.   say 'Job Comment:               ' prtDestInfo.StatusComment
  8697.   say 'Device describtion:        ' prtDestInfo.Comment
  8698.   say 'Supported drivers:         ' prtDestInfo.Drivers
  8699.   say 'Time current job printing: ' prtDestInfo.time
  8700.   say 'Print device timeout:      ' prtDestInfo.TimeOut
  8701.  
  8702.   call DropLsRxutFuncs
  8703.   call RxFuncDrop 'LoadLsRxutFuncs'
  8704.  
  8705.   exit 0
  8706.  
  8707.  Example Output 
  8708.  
  8709.  
  8710.   Printer device name:        IBM40191
  8711.   Current user job printing:  -none-
  8712.   Printer logical address:    LPT3
  8713.   Current job id printing:    0
  8714.   Print device status:        Processing
  8715.   Job Comment:                -none-
  8716.   Device describtion:         IBM 4019 LaserPrinter
  8717.   Supported drivers:          IBM4019.IBM 4019 LaserPrinter
  8718.   Time current job printing:  -none-
  8719.   Print device timeout:       45
  8720.  
  8721.  
  8722. ΓòÉΓòÉΓòÉ 12.20. NETPRINTJOB Get Info ΓòÉΓòÉΓòÉ
  8723.  
  8724. The function returns information about a print job. 
  8725.  
  8726. Syntax 
  8727.  
  8728.  
  8729. MyRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
  8730.  
  8731. Parameters 
  8732.  
  8733. The parameters specified are: 
  8734.  
  8735.  'prtJobInfo'  The REXX variable receiving the result. The variable is divided 
  8736.                into: 
  8737.  
  8738.                    prtJobInfo.JobId 
  8739.  
  8740.                     The print job identifier 
  8741.  
  8742.                    prtJobInfo.Priority 
  8743.  
  8744.                     The print job priority 
  8745.  
  8746.                    prtJobInfo.UserName 
  8747.  
  8748.                     The userid of the job submitting the job 
  8749.  
  8750.                    prtJobInfo.Position 
  8751.  
  8752.                     The job position in the print queue 
  8753.  
  8754.                    prtJobInfo.Status 
  8755.  
  8756.                     The status of the print job 
  8757.  
  8758.                    prtJobInfo.Submitted 
  8759.  
  8760.                     The time when the job was submitted 
  8761.  
  8762.                    prtJobInfo.Size 
  8763.  
  8764.                     The print job size 
  8765.  
  8766.                    prtJobInfo.Comment 
  8767.  
  8768.                     The print job comment 
  8769.  
  8770.                    prtJobInfo.Document 
  8771.  
  8772.                     The document name 
  8773.  
  8774.                    prtJobInfo.NotifyName 
  8775.  
  8776.                     Messaging alias for print alert 
  8777.  
  8778.                    prtJobInfo.DataType 
  8779.  
  8780.                     The data type of the submitted file 
  8781.  
  8782.                    prtJobInfo.Parms 
  8783.  
  8784.                     The parameters related to the print job 
  8785.  
  8786.                    prtJobInfo.StatusComment 
  8787.  
  8788.                     The status comment 
  8789.  
  8790.                    prtJobInfo.Queue 
  8791.  
  8792.                     The queue name 
  8793.  
  8794.                    prtJobInfo.QProcName 
  8795.  
  8796.                     The queue processor name 
  8797.  
  8798.                    prtJobInfo.QProcParms 
  8799.  
  8800.                     The queue processor parameters 
  8801.  
  8802.                    prtJobInfo.PrinterName 
  8803.  
  8804.                     The printer name 
  8805.  
  8806.                    prtJobInfo.Version 
  8807.  
  8808.                     The printer driver version 
  8809.  
  8810.                    prtJobInfo.DeviceName 
  8811.  
  8812.                     The device name 
  8813.  
  8814.  SrvName       The server computer name 
  8815.  
  8816.  QueueName     The Queue name 
  8817.  
  8818.  PrtJobId      The Printer Job Id 
  8819.  
  8820.  Note 
  8821.  
  8822.  The server computer name can be specified as '' for a local server or 
  8823.  computer. 
  8824.  
  8825.  Example 
  8826.  
  8827.  
  8828.   /* Get Print job information */
  8829.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8830.   call LoadLsRxutFuncs
  8831.  
  8832.   NETPRINTJOB = 110
  8833.   SrvName     = '\\FSC30DCR'
  8834.   QueueName   = 'IBM4019L'
  8835.   PrtJobId    = 5
  8836.  
  8837.   myRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
  8838.  
  8839.   if myRc <> '0' then do
  8840.    say 'Got error from NetGetInfo() ' myRc
  8841.    call DropLsRxutFuncs
  8842.    exit 9
  8843.   end
  8844.  
  8845.   say
  8846.   say 'Job id:                     ' prtJobInfo.JobId
  8847.   say 'Job priority:               ' prtJobInfo.Priority
  8848.   say 'Userid who submitted job:   ' prtJobInfo.UserName
  8849.   say 'Job position in Queue:      ' prtJobInfo.Position
  8850.   say 'Job status:                 ' prtJobInfo.Status
  8851.   say 'Submitted at:               ' prtJobInfo.Submitted
  8852.   say 'Job size:                   ' prtJobInfo.Size
  8853.   say 'Job comment:                ' prtJobInfo.Comment
  8854.   say 'Document name:              ' prtJobInfo.Document
  8855.   say 'Notify:                     ' prtJobInfo.NotifyName
  8856.   say 'Data type:                  ' prtJobInfo.DataType
  8857.   say 'Job parameters:             ' prtJobInfo.Parms
  8858.   say 'Job status comment:         ' prtJobInfo.StatusComment
  8859.   say 'Queue name:                 ' prtJobInfo.Queue
  8860.   say 'Queue processor:            ' prtJobInfo.QProcName
  8861.   say 'Queue processor parameters: ' prtJobInfo.QProcParms
  8862.   say 'The printer name:           ' prtJobInfo.PrinterName
  8863.   say 'Printer Driver version:     ' prtJobInfo.Version
  8864.   say 'Device Name:                ' prtJobInfo.DeviceName
  8865.  
  8866.   call DropLsRxutFuncs
  8867.   call RxFuncDrop 'LoadLsRxutFuncs'
  8868.  
  8869.   exit 0
  8870.  
  8871.  Example Output 
  8872.  
  8873.  
  8874.   Job id:                      5
  8875.   Job priority:                50
  8876.   Userid who submitted job:
  8877.   Job position in Queue:       Next
  8878.   Job status:                  Queued
  8879.   Submitted at:                Wed May  5 19:45:06 1993
  8880.  
  8881.   Job size:                    109320
  8882.   Job comment:                 System
  8883.   Document name:               LS30BAS2.C
  8884.   Notify:
  8885.   Data type:                   PM_Q_RAW
  8886.   Job parameters:
  8887.   Job status comment:
  8888.   Queue name:                  IBM4019L
  8889.   Queue processor:             PMPRINT
  8890.   Queue processor parameters:  CDP=850
  8891.   The printer name:
  8892.   Printer Driver version:      777
  8893.   Device Name:                 IBM 4019 LaserPrinter
  8894.  
  8895.  
  8896. ΓòÉΓòÉΓòÉ 12.21. NETPRINTQUEUE Get Info ΓòÉΓòÉΓòÉ
  8897.  
  8898. The function returns information about a print queue. 
  8899.  
  8900. Syntax 
  8901.  
  8902.  
  8903. MyRc = NetGetInfo(NETPRINTQUEUE, 'prtQInfo', SrvName, QueueName)
  8904.  
  8905. Parameters 
  8906.  
  8907. The parameters specified are 
  8908.  
  8909.  'prtQInfo'    The REXX variable receiving the result. The variable is divided 
  8910.                into: 
  8911.  
  8912.                    prtQInfo.Priority 
  8913.  
  8914.                     The queue priority 
  8915.  
  8916.                    prtQInfo.StartTime 
  8917.  
  8918.                     The queue start time 
  8919.  
  8920.                    prtQInfo.UntilTime 
  8921.  
  8922.                     The queue until time 
  8923.  
  8924.                    prtQInfo.Type 
  8925.  
  8926.                     The queue type. A hexadecimal value, which is not 
  8927.                     interpreted 
  8928.  
  8929.                    prtQInfo.SepFile 
  8930.  
  8931.                     The queue separator file if any 
  8932.  
  8933.                    prtQInfo.PrProc 
  8934.  
  8935.                     The queue default queue processor 
  8936.  
  8937.                    prtQInfo.Parms 
  8938.  
  8939.                     The queue parameters 
  8940.  
  8941.                    prtQInfo.Comment 
  8942.  
  8943.                     The queue comment or description 
  8944.  
  8945.                    prtQInfo.Status 
  8946.  
  8947.                     The queue status. A hexadecimal value, which is not 
  8948.                     interpreted 
  8949.  
  8950.                    prtQInfo.Jobs 
  8951.  
  8952.                     The number of jobs in the queue 
  8953.  
  8954.                    prtQInfo.Printers 
  8955.  
  8956.                     The print device connected to the queue 
  8957.  
  8958.                    prtQInfo.DriverName 
  8959.  
  8960.                     The default print driver 
  8961.  
  8962.                    prtQInfo.RemoteComputerName 
  8963.  
  8964.                     The remote computer name 
  8965.  
  8966.                    prtQInfo.RemoteQueueName 
  8967.  
  8968.                     The remote queue name 
  8969.  
  8970.                    prtQInfo.Version 
  8971.  
  8972.                     The printer driver version 
  8973.  
  8974.                    prtQInfo.DeviceName 
  8975.  
  8976.                     The device name 
  8977.  
  8978.  SrvName       The server computer name 
  8979.  
  8980.  QueueName     The Queue name 
  8981.  
  8982.  Note 
  8983.  
  8984.  The server computer name can be specified as '' for a local server or 
  8985.  computer. 
  8986.  
  8987.  Example 
  8988.  
  8989.  
  8990.   /* Get Print queue information */
  8991.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8992.   call LoadLsRxutFuncs
  8993.  
  8994.   NETPRINTQUEUE = 120
  8995.   SrvName       = '\\FSC30DCR'
  8996.   QueueName     = 'IBM4019L'
  8997.  
  8998.   myRc = NetGetInfo(NETPRINTQUEUE, 'prtQInfo', SrvName, QueueName)
  8999.  
  9000.   if myRc <> '0' then do
  9001.    say 'Got error from NetGetInfo() ' myRc
  9002.    call DropLsRxutFuncs
  9003.    exit 9
  9004.   end
  9005.  
  9006.   say
  9007.   say 'Queue Priority:            ' prtQInfo.Priority
  9008.   say 'Queue start time:          ' prtQInfo.StartTime
  9009.   say 'Queue until time:          ' prtQInfo.UntilTime
  9010.   say 'Queue type:                ' prtQInfo.Type
  9011.   say 'Separator File:            ' prtQInfo.SepFile
  9012.   say 'Default Queue processor:   ' prtQInfo.PrProc
  9013.   say 'Queue parameters:          ' prtQInfo.Parms
  9014.   say 'Queue description:         ' prtQInfo.Comment
  9015.   say 'Queue status:              ' prtQInfo.Status
  9016.   say 'Number of jobs in queue:   ' prtQInfo.Jobs
  9017.   say 'Printer connected:         ' prtQInfo.Printers
  9018.   say 'Default printer driver:    ' prtQInfo.DriverName
  9019.   say 'Computer Name at location: ' prtQInfo.RemoteComputerName
  9020.   say 'Queue name at location:    ' prtQInfo.RemoteQueueName
  9021.   say 'Printer Driver version:    ' prtQInfo.Version
  9022.   say 'Device Name:               ' prtQInfo.DeviceName
  9023.  
  9024.   call DropLsRxutFuncs
  9025.   call RxFuncDrop 'LoadLsRxutFuncs'
  9026.  
  9027.   exit 0
  9028.  
  9029.  Example Output 
  9030.  
  9031.  
  9032.   Queue Priority:             5
  9033.   Queue start time:           No Restriction
  9034.   Queue until time:           No Restriction
  9035.   Queue type:                 0002
  9036.   Separator File:
  9037.   Default Queue processor:    PMPRINT
  9038.   Queue parameters:
  9039.   Queue description:          IBM 4019 LaserPrinter
  9040.   Queue status:               0001
  9041.   Number of jobs in queue:    0
  9042.   Printer connected:          IBM40191
  9043.   Default printer driver:     IBM4019.IBM 4019 LaserPrinter
  9044.   Computer Name at location:
  9045.   Queue name at location:
  9046.   Printer Driver version:     777
  9047.   Device Name:                IBM 4019 LaserPrinter
  9048.  
  9049.  
  9050. ΓòÉΓòÉΓòÉ 12.22. NETSERVER Get Info ΓòÉΓòÉΓòÉ
  9051.  
  9052. The function retrieves information about a particular server. 
  9053.  
  9054. Syntax 
  9055.  
  9056.  
  9057. MyRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
  9058.  
  9059. Parameters 
  9060.  
  9061. The parameters specified are: 
  9062.  
  9063.  'serverInfo'  The REXX variable receiving the result. The variable is divided 
  9064.                into: 
  9065.  
  9066.                    serverInfo.name 
  9067.  
  9068.                     The server computer name 
  9069.  
  9070.                    serverInfo.version_major 
  9071.  
  9072.                     The major version number (Version) 
  9073.  
  9074.                    serverInfo.version_minor 
  9075.  
  9076.                     The minor version number (Release) 
  9077.  
  9078.                    serverInfo.type 
  9079.  
  9080.                     The server type. This information is a hexadecimal value 
  9081.                     and is not interpreted 
  9082.  
  9083.                    serverInfo.comment 
  9084.  
  9085.                     The server comment 
  9086.  
  9087.                    serverInfo.ulist_mtime 
  9088.  
  9089.                     The last time the users list was modified 
  9090.  
  9091.                    serverInfo.glist_mtime 
  9092.  
  9093.                     The last time the group list was modified 
  9094.  
  9095.                    serverInfo.alist_mtime 
  9096.  
  9097.                     The last time the access control list was modified 
  9098.  
  9099.                    serverInfo.users 
  9100.  
  9101.                     The maximum of users on the server 
  9102.  
  9103.                    serverInfo.disc 
  9104.  
  9105.                     The auto-disconnet value 
  9106.  
  9107.                    serverInfo.alerts 
  9108.  
  9109.                     The server alerts receiver table. The table can be empty 
  9110.  
  9111.                    serverInfo.security 
  9112.  
  9113.                     The security type of the server 
  9114.  
  9115.                    serverInfo.auditing 
  9116.  
  9117.                     The auditing setting 
  9118.  
  9119.                    serverInfo.numadmin 
  9120.  
  9121.                     The maximum allowed number of administrators 
  9122.  
  9123.                    serverInfo.lanmask 
  9124.  
  9125.                     The order in which the network device drivers are served. 
  9126.                     The value is uninterpreted 
  9127.  
  9128.                    serverInfo.hidden 
  9129.  
  9130.                     The server hidden attribute setting 
  9131.  
  9132.                    serverInfo.announce 
  9133.  
  9134.                     The network announce delta (in seconds), which determines 
  9135.                     how often the server will be announced to other computers 
  9136.                     on the network 
  9137.  
  9138.                    serverInfo.anndelta 
  9139.  
  9140.                     The random announce rate (in milliseconds) 
  9141.  
  9142.                    serverInfo.guestacct 
  9143.  
  9144.                     The guest account name 
  9145.  
  9146.                    serverInfo.userpath 
  9147.  
  9148.                     The path name to user directories 
  9149.  
  9150.                    serverInfo.chdevs 
  9151.  
  9152.                     The number of serial devices that can be shared on the 
  9153.                     server 
  9154.  
  9155.                    serverInfo.chdevq 
  9156.  
  9157.                     The number of serial device queues that can coexist on the 
  9158.                     server 
  9159.  
  9160.                    serverInfo.chdevjobs 
  9161.  
  9162.                     The number of serial device jobs that can be pending on a 
  9163.                     server 
  9164.  
  9165.                    serverInfo.connections 
  9166.  
  9167.                     The maximum number of connections to netnames that are 
  9168.                     allowed 
  9169.  
  9170.                    serverInfo.shares 
  9171.  
  9172.                     The maximum number of netnames a server can accommodate 
  9173.  
  9174.                    serverInfo.openfiles 
  9175.  
  9176.                     The number of files  (file handles to for example files or 
  9177.                     pipes) that can be opened at once 
  9178.  
  9179.                    serverInfo.sessopens 
  9180.  
  9181.                     The number of files that can be opened in one session 
  9182.  
  9183.                    serverInfo.sessvcs 
  9184.  
  9185.                     The maximum number of virtual circuits per client 
  9186.  
  9187.                    serverInfo.sessreqs 
  9188.  
  9189.                     The number of simultaneous requests that a client can make 
  9190.                     on any virtual circuit 
  9191.  
  9192.                    serverInfo.opensearch 
  9193.  
  9194.                     The number of searches that can be opened at once 
  9195.  
  9196.                    serverInfo.activelocks 
  9197.  
  9198.                     The number of file locks that can be active 
  9199.  
  9200.                    serverInfo.numreqbuf 
  9201.  
  9202.                     The number of server buffers that are provided 
  9203.  
  9204.                    serverInfo.sizreqbuf 
  9205.  
  9206.                     The size (in bytes) of each server buffer 
  9207.  
  9208.                    serverInfo.numbigbuf 
  9209.  
  9210.                     Number of 64KB server buffers that are provided 
  9211.  
  9212.                    serverInfo.numfiletasks 
  9213.  
  9214.                     Number of processes that can access the operating system at 
  9215.                     one time 
  9216.  
  9217.                    serverInfo.alertsched 
  9218.  
  9219.                     The alert interval for notifying an administrator of a 
  9220.                     network event 
  9221.  
  9222.                    serverInfo.erroralert 
  9223.  
  9224.                     The number of entries that can be written to the error log 
  9225.                     file during a interval before notifying an administrator 
  9226.  
  9227.                    serverInfo.logonalert 
  9228.  
  9229.                     The number of failed logon attempts to allow a user before 
  9230.                     notifying an administrator 
  9231.  
  9232.                    serverInfo.accessalert 
  9233.  
  9234.                     The number of failed file accesses to allow before issuing 
  9235.                     an administrative alert 
  9236.  
  9237.                    serverInfo.diskalert 
  9238.  
  9239.                     The number of kilobytes of free disk space, at which, an 
  9240.                     administrator must be notified that the free space is low 
  9241.  
  9242.                    serverInfo.netioalert 
  9243.  
  9244.                     The Network I/O error ratio in one tenth of a percent to 
  9245.                     allow before the administrator is notified 
  9246.  
  9247.                    serverInfo.maxauditsz 
  9248.  
  9249.                     Maximum audit file size 
  9250.  
  9251.                    serverInfo.srvheuristics 
  9252.  
  9253.                     The server heuristics settings 
  9254.  
  9255.                    serverInfo.auditedevents 
  9256.  
  9257.                     The audit events setting. This value is unformatted and is 
  9258.                     presented hexadecimal 
  9259.  
  9260.                    serverInfo.autoprofile 
  9261.  
  9262.                     The server auto profile setting 
  9263.  
  9264.                    serverInfo.autopath 
  9265.  
  9266.                     The server autoprofile location 
  9267.  
  9268.  SrvName       The server computer name 
  9269.  
  9270.  Note 
  9271.  
  9272.  The server computer name can be specified as '' for a local server. 
  9273.  
  9274.  Example 
  9275.  
  9276.  
  9277.   /* Get server information */
  9278.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9279.   call LoadLsRxutFuncs
  9280.  
  9281.   NETSERVER = 160
  9282.   SrvName   = '\\ILIDC'
  9283.  
  9284.   myRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
  9285.  
  9286.   if myRc <> '0' then do
  9287.    say 'Got error from NetGetInfo() ' myRc
  9288.    call DropLsRxutFuncs
  9289.    exit 9
  9290.   end
  9291.  
  9292.   say
  9293.   say 'Server name:                         ' serverInfo.name
  9294.   say 'Major version (Version):             ' serverInfo.version_major
  9295.   say 'Minor version (Release):             ' serverInfo.version_minor
  9296.   say 'Server type:                         ' serverInfo.type
  9297.   say 'Comment:                             ' serverInfo.comment
  9298.   say 'Users list last changed:             ' serverInfo.ulist_mtime
  9299.   say 'Group list last changed:             ' serverInfo.glist_mtime
  9300.   say 'Access Control list last changed:    ' serverInfo.alist_mtime
  9301.   say 'Maximum number of users:             ' serverInfo.users
  9302.   say 'Auto-disconnect value:               ' serverInfo.disc
  9303.   say 'Send server alerts to:               ' serverInfo.alerts
  9304.   say 'Server security type:                ' serverInfo.security
  9305.   say 'Auditing setting:                    ' serverInfo.auditing
  9306.   say 'Maximum number administrators:       ' serverInfo.numadmin
  9307.   say 'LAN mask setting:                    ' serverInfo.lanmask
  9308.   say 'Server hidden attribute setting:     ' serverInfo.hidden
  9309.   say 'Server network announce:             ' serverInfo.announce
  9310.   say 'Random announce rate delta:          ' serverInfo.anndelta
  9311.   say 'Guest account name:                  ' serverInfo.guestacct
  9312.   say 'Path to user directories:            ' serverInfo.userpath
  9313.   say 'Maximum shared serial devices:       ' serverInfo.chdevs
  9314.   say 'Maximum serial device queues:        ' serverInfo.chdevq
  9315.   say 'Maximum pending serial jobs:         ' serverInfo.chdevjobs
  9316.   say 'Maximum connections:                 ' serverInfo.connections
  9317.   say 'Maximum shares:                      ' serverInfo.shares
  9318.   say 'Maximum open file handles:           ' serverInfo.openfiles
  9319.   say 'Maximum session opens:               ' serverInfo.sessopens
  9320.   say 'Per Client maximum virtual circuits: ' serverInfo.sessvcs
  9321.   say 'Maximum requests:                    ' serverInfo.sessreqs
  9322.   say 'Maximum searches:                    ' serverInfo.opensearch
  9323.   say 'Maximum locks:                       ' serverInfo.activelocks
  9324.   say 'Number requester buffers:            ' serverInfo.numreqbuf
  9325.   say 'Requester buffer size:               ' serverInfo.sizreqbuf
  9326.   say 'Number big buffers:                  ' serverInfo.numbigbuf
  9327.   say 'Number file tasks:                   ' serverInfo.numfiletasks
  9328.   say 'alertsched value:                    ' serverInfo.alertsched
  9329.   say 'erroralert value:                    ' serverInfo.erroralert
  9330.   say 'logonalert value:                    ' serverInfo.logonalert
  9331.   say 'accessalert value:                   ' serverInfo.accessalert
  9332.   say 'diskalert value:                     ' serverInfo.diskalert
  9333.   say 'Maximum auditing log file size:      ' serverInfo.maxauditsz
  9334.   say 'srvheuristics:                       ' serverInfo.srvheuristics
  9335.   say 'Audit events flags:                  ' serverInfo.auditedevents
  9336.   say 'Server auto profile setting:         ' serverInfo.autoprofile
  9337.   say 'Server autoprofile location:         ' serverInfo.autopath
  9338.  
  9339.   call DropLsRxutFuncs
  9340.   call RxFuncDrop 'LoadLsRxutFuncs'
  9341.  
  9342.   exit 0
  9343.  
  9344.  Example Output 
  9345.  
  9346.  
  9347.   Server name:                          ILIDC
  9348.   Major version (Version):              3
  9349.   Minor version (Release):              0
  9350.   Server type:                          0000002B
  9351.   Comment:                              ILI netvork group Domain Controller
  9352.   Users list last changed:              Never modified or unknown
  9353.   Group list last changed:              Never modified or unknown
  9354.   Access Control list last changed:     Wed May  5 18:30:24 1993
  9355.  
  9356.   Maximum number of users:              32
  9357.   Auto-disconnect value:                120
  9358.   Send server alerts to:                -none-
  9359.   Server security type:                 User-level
  9360.   Auditing setting:                     Disabled
  9361.   Maximum number administrators:        65535
  9362.   LAN mask setting:                     1
  9363.   Server hidden attribute setting:      Visible
  9364.   Server network announce:              60
  9365.   Random announce rate delta:           3000
  9366.   Guest account name:                   GUEST
  9367.   Path to user directories:             -none-
  9368.   Maximum shared serial devices:        2
  9369.   Maximum serial device queues:         2
  9370.   Maximum pending serial jobs:          6
  9371.   Maximum connections:                  128
  9372.   Maximum shares:                       24
  9373.   Maximum open file handles:            250
  9374.   Maximum session opens:                80
  9375.   Per Client maximum virtual circuits:  1
  9376.   Maximum requests:                     50
  9377.   Maximum searches:                     50
  9378.   Maximum locks:                        64
  9379.   Number requester buffers:             36
  9380.   Requester buffer size:                4096
  9381.   Number big buffers:                   12
  9382.   Number file tasks:                    1
  9383.   alertsched value:                     5
  9384.   erroralert value:                     5
  9385.   logonalert value:                     5
  9386.   accessalert value:                    5
  9387.   diskalert value:                      5000
  9388.   Maximum auditing log file size:       100
  9389.   srvheuristics:                        11110141111311001331
  9390.   Audit events flags:                   0
  9391.   Server auto profile setting:          Unknown
  9392.   Server autoprofile location:          SRVAUTO.PRO
  9393.  
  9394.  
  9395. ΓòÉΓòÉΓòÉ 12.23. NETSERVERMODALS Get Info ΓòÉΓòÉΓòÉ
  9396.  
  9397. The function gets server modals related information. 
  9398.  
  9399. Syntax 
  9400.  
  9401.  
  9402. MyRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
  9403.  
  9404. Parameters 
  9405.  
  9406. The parameters specified are: 
  9407.  
  9408.  'serverModalsInfo' The REXX variable receiving the result. The variable is 
  9409.                    divided into: 
  9410.  
  9411.                        serModalsInfo.role 
  9412.  
  9413.                         The server role. The following will be returned: 
  9414.  
  9415.                                                 String returned
  9416.                                                 ---------------
  9417.                                                 Standalone server
  9418.                                                 Member server in the domain
  9419.                                                 Backup server in the domain
  9420.                                                 Primary server in the domain
  9421.  
  9422.                        serModalsInfo.primary 
  9423.  
  9424.                         The name of the primary domain controller to which the 
  9425.                         server belongs 
  9426.  
  9427.  SrvName           The server computer name. 
  9428.  
  9429.  Note 
  9430.  
  9431.  The server computer name can be specified as '' for a local server. 
  9432.  
  9433.  Example 
  9434.  
  9435.  
  9436.   /* Get server modals information */
  9437.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9438.   call LoadLsRxutFuncs
  9439.  
  9440.   NETSERVERMODALS = 370
  9441.   SrvName         = '\\ILIDC'
  9442.  
  9443.   myRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
  9444.  
  9445.   if myRc <> '0' then do
  9446.    say 'Got error from NetGetInfo() ' myRc
  9447.    call DropLsRxutFuncs
  9448.    exit 9
  9449.   end
  9450.  
  9451.   say
  9452.   say 'Server role:            ' serverModalsInfo.role
  9453.   say 'Domain Controller name: ' serverModalsInfo.primary
  9454.  
  9455.   call DropLsRxutFuncs
  9456.   call RxFuncDrop 'LoadLsRxutFuncs'
  9457.  
  9458.   exit 0
  9459.  
  9460.  Example Output 
  9461.  
  9462.  
  9463.   Server role:             Primary server in the domain
  9464.   Domain Controller name:  ILIDC
  9465.  
  9466.  
  9467. ΓòÉΓòÉΓòÉ 12.24. NETSERVICE Get Info ΓòÉΓòÉΓòÉ
  9468.  
  9469. The function retrieves information about a particular network service that is 
  9470. started. 
  9471.  
  9472. Syntax 
  9473.  
  9474.  
  9475. MyRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
  9476.  
  9477. Parameters 
  9478.  
  9479. The parameters specified are: 
  9480.  
  9481.  'serviceInfo'  The REXX variable receiving the result. The variable is divided 
  9482.                 into: 
  9483.  
  9484.                     serviceInfo.name 
  9485.  
  9486.                      The service name 
  9487.  
  9488.                     serviceInfo.status 
  9489.  
  9490.                      The service status. This is a uninterpreted hexadecimal 
  9491.                      value 
  9492.  
  9493.                     serviceInfo.code 
  9494.  
  9495.                      The error codes when a service stops or fails to start 
  9496.                      properly.  The values are a primary and secondary code 
  9497.  
  9498.                     serviceInfo.pid 
  9499.  
  9500.                      The service process id 
  9501.  
  9502.                     serviceInfo.text 
  9503.  
  9504.                      The service text 
  9505.  
  9506.  SrvName        The server computer name 
  9507.  
  9508.  ServiceName    The service name 
  9509.  
  9510.  Note 
  9511.  
  9512.  The server computer name can be specified as '' for a local server. 
  9513.  
  9514.  Example 
  9515.  
  9516.  
  9517.   /* Get service information */
  9518.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9519.   call LoadLsRxutFuncs
  9520.  
  9521.   NETSERVICE  = 170
  9522.   SrvName     = '\\FSC30DCR'
  9523.   ServiceName = 'ALERTER'
  9524.  
  9525.   myRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
  9526.  
  9527.   if myRc <> '0' then do
  9528.    say 'Got error from NetGetInfo() ' myRc
  9529.    call DropLsRxutFuncs
  9530.    exit 9
  9531.   end
  9532.  
  9533.   say
  9534.   say 'The service name: ' serviceInfo.name
  9535.   say 'Service status:   ' serviceInfo.status
  9536.   say 'Service code:     ' serviceInfo.code
  9537.   say 'Process id:       ' serviceInfo.pid
  9538.   say 'Service text:     ' serviceInfo.text
  9539.  
  9540.   call DropLsRxutFuncs
  9541.   call RxFuncDrop 'LoadLsRxutFuncs'
  9542.  
  9543.   exit 0
  9544.  
  9545.  Example Output 
  9546.  
  9547.  
  9548.   The service name:  ALERTER
  9549.   Service status:    13
  9550.   Service code:      0
  9551.   Process id:        67
  9552.   Service text:      -none-
  9553.  
  9554.  
  9555. ΓòÉΓòÉΓòÉ 12.25. NETSESSION Get Info ΓòÉΓòÉΓòÉ
  9556.  
  9557. The function retrieves information about a particular session. 
  9558.  
  9559. Syntax 
  9560.  
  9561.  
  9562. MyRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
  9563.  
  9564. Parameters 
  9565.  
  9566. The parameters specified are: 
  9567.  
  9568.  'sessionInfo'   The REXX variable receiving the result. The variable is 
  9569.                  divided into: 
  9570.  
  9571.                      sessionInfo.cname 
  9572.  
  9573.                       The computer name 
  9574.  
  9575.                      sessionInfo.username 
  9576.  
  9577.                       The user name (Userid) 
  9578.  
  9579.                      sessionInfo.num_conns 
  9580.  
  9581.                       The number of connections that have been made during the 
  9582.                       session 
  9583.  
  9584.                      sessionInfo.num_opens 
  9585.  
  9586.                       The number of opens that have been made during the 
  9587.                       session 
  9588.  
  9589.                      sessionInfo.num_users 
  9590.  
  9591.                       The number of sessions that are established between the 
  9592.                       server and req 
  9593.  
  9594.                      sessionInfo.time 
  9595.  
  9596.                       The number of seconds a session has been active 
  9597.  
  9598.                      sessionInfo.idle_time 
  9599.  
  9600.                       The number of seconds a session has been idle 
  9601.  
  9602.                      sessionInfo.user_flags 
  9603.  
  9604.                       The user flags 
  9605.  
  9606.                      sessionInfo.cltype_name 
  9607.  
  9608.                       Set the name of the client types 
  9609.  
  9610.  SrvName         The server computer name 
  9611.  
  9612.  ComputerName    The computer name 
  9613.  
  9614.  Note 
  9615.  
  9616.  The server computer name can be specified as '' for a local server. 
  9617.  
  9618.  Example 
  9619.  
  9620.  
  9621.   /* Get session information */
  9622.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9623.   call LoadLsRxutFuncs
  9624.  
  9625.   NETSESSION   = 180
  9626.   SrvName      = '\\FSCDC'
  9627.   ComputerName = '\\FSC30DCR'
  9628.  
  9629.   myRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
  9630.  
  9631.   if myRc <> '0' then do
  9632.    say 'Got error from NetGetInfo() ' myRc
  9633.    call DropLsRxutFuncs
  9634.    exit 9
  9635.   end
  9636.  
  9637.   say
  9638.   say 'The computer name:    ' sessionInfo.cname
  9639.   say 'Userid:               ' sessionInfo.username
  9640.   say 'Connections made:     ' sessionInfo.num_conns
  9641.   say 'Number opens:         ' sessionInfo.num_opens
  9642.   say 'Sessions established: ' sessionInfo.num_users
  9643.   say 'Session time:         ' sessionInfo.time
  9644.   say 'Idle time:            ' sessionInfo.idle_time
  9645.   say 'User flags:           ' sessionInfo.user_flags
  9646.   say 'Client type:          ' sessionInfo.cltype_name
  9647.  
  9648.   call DropLsRxutFuncs
  9649.   call RxFuncDrop 'LoadLsRxutFuncs'
  9650.  
  9651.   exit 0
  9652.  
  9653.  Example Output 
  9654.  
  9655.  
  9656.   The computer name:     FSC30DCR
  9657.   Userid:                FSCADMIN
  9658.   Connections made:      3
  9659.   Number opens:          1
  9660.   Sessions established:  1
  9661.   Session time:          176
  9662.   Idle time:             0
  9663.   User flags:            Unknown
  9664.   Client type:           OS/2 LS 1.2
  9665.  
  9666.  
  9667. ΓòÉΓòÉΓòÉ 12.26. NETSHARE Get Info ΓòÉΓòÉΓòÉ
  9668.  
  9669. The function retrieves information about a particular shared resource on a 
  9670. server. 
  9671.  
  9672. Syntax 
  9673.  
  9674.  
  9675. MyRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
  9676.  
  9677. Parameters 
  9678.  
  9679. The parameters specified are: 
  9680.  
  9681.  'shareInfo'       The REXX variable receiving the result. The variable is 
  9682.                    divided into: 
  9683.  
  9684.                        shareInfo.netname 
  9685.  
  9686.                         The network name of the resource 
  9687.  
  9688.                        shareInfo.type 
  9689.  
  9690.                         The share type (For example Serial Device) 
  9691.  
  9692.                        shareInfo.remark 
  9693.  
  9694.                         The share remark 
  9695.  
  9696.                        shareInfo.permissions 
  9697.  
  9698.                         The shareInfo.permissions is used only for DLS and DLR 
  9699.                         applications and ignored for OS/2 applications. The 
  9700.                         meaning of this field depends on which type of resource 
  9701.                         is in query. 
  9702.  
  9703.                         If shareInfo.type is "Disk Drive", this field can be 
  9704.                         any combination of the following permissions, except 
  9705.                         for ACCESS_READ + ACCESS_CREATE. These are defined as 
  9706.                         follows: 
  9707.  
  9708.                                                 Value Meaning
  9709.                                                 ----- -------
  9710.                                                  1    Permission to read data from a resource.
  9711.  
  9712.                                                  2    Permission to write data to a resource.
  9713.  
  9714.                                                  4    Permission to create an instance of the resource
  9715.                                                       (such as a file).  Data can be written to the
  9716.                                                       resource as the resource is created.
  9717.  
  9718.                         If shareInfo.type is "Spooler Queue", the 
  9719.                         shareInfo.permissions parameter specifies the form 
  9720.                         control at the end of a print job. These are defined as 
  9721.                         follows: 
  9722.  
  9723.                                                 Value Meaning
  9724.                                                 ----- -------
  9725.                                                  2    The printer will not be sent a command at the
  9726.                                                       end of any print job to position to the top of
  9727.                                                       the page.
  9728.  
  9729.                                                  4    An attempt is made to determine whether a form
  9730.                                                       feed is needed for a print job.  If the last 64
  9731.                                                       bytes of the file contain no form feed command
  9732.                                                       or follow a form feed command with printable
  9733.                                                       characters, a form feed command is issued to the
  9734.                                                       printer.
  9735.  
  9736.                                                 32    A form feed command is issued to the printer at
  9737.                                                       the end of each print job to position to the top
  9738.                                                       of the next form (default).
  9739.  
  9740.                         Note: 
  9741.  
  9742.                         DLS and DLR does not support sharing of serial devices. 
  9743.                         In some circumstances, however, COM devices, such as 
  9744.                         COM1, can be shared as print devices; for example, if 
  9745.                         operating in synchronous communication mode, such as 
  9746.                         with a serial printer 
  9747.  
  9748.                        shareInfo.max_uses 
  9749.  
  9750.                         The maximum number of concurrent connections that the 
  9751.                         shared resource can accommodate 
  9752.  
  9753.                        shareInfo.current_uses 
  9754.  
  9755.                         The number of connections that are currently made to 
  9756.                         the resource 
  9757.  
  9758.                        shareInfo.path 
  9759.  
  9760.                         The local path name of the shared resource. For disks, 
  9761.                         it is the path being shared. For spooler queues, it is 
  9762.                         the name of the spooler queue being shared. For serial 
  9763.                         device queues, it is a string of one or more 
  9764.                         communication device names separated by spaces (For 
  9765.                         example, COM1 COM2) 
  9766.  
  9767.  SrvName           The server computer name 
  9768.  
  9769.  NetName           The network name 
  9770.  
  9771.  Note 
  9772.  
  9773.  The server computer name can be specified as '' for a local server. 
  9774.  
  9775.  Example 
  9776.  
  9777.  
  9778.   /* Get share information */
  9779.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9780.   call LoadLsRxutFuncs
  9781.  
  9782.   NETSHARE    = 190
  9783.   SrvName     = '\\FSC30DCR'
  9784.   NetworkName = 'FORALL'
  9785.  
  9786.   myRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
  9787.  
  9788.   if myRc <> '0' then do
  9789.    say 'Got error from NetGetInfo() ' myRc
  9790.    call DropLsRxutFuncs
  9791.    exit 9
  9792.   end
  9793.  
  9794.   say
  9795.   say 'Network name:        ' shareInfo.netname
  9796.   say 'Share type:          ' shareInfo.type
  9797.   say 'Comment:             ' shareInfo.remark
  9798.   say 'Maximum uses:        ' shareInfo.max_uses
  9799.   say 'Current uses:        ' shareInfo.current_uses
  9800.   say 'Local resource path: ' shareInfo.path
  9801.  
  9802.   call DropLsRxutFuncs
  9803.   call RxFuncDrop 'LoadLsRxutFuncs'
  9804.  
  9805.   exit 0
  9806.  
  9807.  Example Output 
  9808.  
  9809.  
  9810.   Network name:         FORALL
  9811.   Share type:           Disk Drive
  9812.   Comment:              For all users
  9813.   Maximum uses:         45
  9814.   Current uses:         1
  9815.   Local resource path:  D:\APPS\BOOKS
  9816.  
  9817.  
  9818. ΓòÉΓòÉΓòÉ 12.27. NETSHARECHECK Get Info ΓòÉΓòÉΓòÉ
  9819.  
  9820. The function retrieves information about a particular shared resource on a 
  9821. server. 
  9822.  
  9823. Syntax 
  9824.  
  9825.  
  9826. MyRc = NetGetInfo(NETSHARECHECK, 'checkInfo', SrvName)
  9827.  
  9828. Parameters 
  9829.  
  9830. The parameters specified are: 
  9831.  
  9832.  'checkInfo'       The REXX variable required and receiving the result. The 
  9833.                    variable is divided into: 
  9834.  
  9835.                        shareInfo.devicename 
  9836.  
  9837.                         The device name to query 
  9838.  
  9839.                        shareInfo.type 
  9840.  
  9841.                         The returned share type, if the device is shared 
  9842.  
  9843.  SrvName           The server computer name 
  9844.  
  9845.  Note 
  9846.  
  9847.  The server computer name can be specified as '' for a local server. 
  9848.  
  9849.  Example 
  9850.  
  9851.  
  9852.   /* Net share check */
  9853.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9854.   call LoadLsRxutFuncs
  9855.  
  9856.   NETSHARECHECK        = 210
  9857.   ComputerName         = '\\KING_BALU'
  9858.   checkInfo.devicename = 'Q:'
  9859.  
  9860.   myRc = NetGetInfo(NETSHARECHECK, 'checkInfo', ComputerName)
  9861.  
  9862.   if myRc <> '0' then do
  9863.    say 'Got error from NetGetInfo() ' myRc
  9864.    rcCode = 9
  9865.   end
  9866.   else do
  9867.    say "Share type" checkInfo.type
  9868.    rcCode = 0
  9869.   end
  9870.  
  9871.   call DropLsRxutFuncs
  9872.   call RxFuncDrop 'LoadLsRxutFuncs'
  9873.  
  9874.   exit rcCode
  9875.  
  9876.   exit 0
  9877.  
  9878.  Example Output 
  9879.  
  9880.  
  9881.   Share type  Disk Drive
  9882.  
  9883.  
  9884. ΓòÉΓòÉΓòÉ 12.28. NETSTATISTICS ΓòÉΓòÉΓòÉ
  9885.  
  9886. The function retrieves operating statistics for a service. 
  9887.  
  9888. Syntax 
  9889.  
  9890.  
  9891. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName)
  9892. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType)
  9893. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType, ClearIt)
  9894.  
  9895. Parameters 
  9896.  
  9897. The parameters specified are 
  9898.  
  9899.  'statisticsInfo'  The REXX variable receiving the result. The variable is 
  9900.                    divided into two ways depending of the StatType parameter. 
  9901.                    If StatType = 0 then the requester statistics are provided. 
  9902.                    If StatType = 1 then the server statistics are provided. The 
  9903.                    returned values for requester statistics are: 
  9904.  
  9905.                        statisticsInfo.start 
  9906.  
  9907.                         The time that statistics collection started or the date 
  9908.                         or time that the statistics were last cleared 
  9909.  
  9910.                        statisticsInfo.numNCB_r 
  9911.  
  9912.                         The number of NCBs issued (redirector) 
  9913.  
  9914.                        statisticsInfo.numNCB_s 
  9915.  
  9916.                         The number of NCBs issued (server) 
  9917.  
  9918.                        statisticsInfo.numNCB_a 
  9919.  
  9920.                         The number of NCBs issued (application) 
  9921.  
  9922.                        statisticsInfo.fiNCB_r 
  9923.  
  9924.                         The number of NCBs that failed issue (redirector) 
  9925.  
  9926.                        statisticsInfo.fiNCB_s 
  9927.  
  9928.                         The number of NCBs that failed issue (server) 
  9929.  
  9930.                        statisticsInfo.fiNCB_a 
  9931.  
  9932.                         The number of NCBs that failed issue (application) 
  9933.  
  9934.                        statisticsInfo.fcNCB_r 
  9935.  
  9936.                         The number of NCBs that failed completion (redirector) 
  9937.  
  9938.                        statisticsInfo.fcNCB_s 
  9939.  
  9940.                         The number of NCBs that failed completion (server) 
  9941.  
  9942.                        statisticsInfo.fcNCB_a 
  9943.  
  9944.                         The number of NCBs that failed completion (application) 
  9945.  
  9946.                        statisticsInfo.sesstart 
  9947.  
  9948.                         The number of requester sessions started 
  9949.  
  9950.                        statisticsInfo.sessfailcon 
  9951.  
  9952.                         The number of requester session failures to connect 
  9953.  
  9954.                        statisticsInfo.sessbroke 
  9955.  
  9956.                         The number of failures of requester sessions 
  9957.  
  9958.                        statisticsInfo.uses 
  9959.  
  9960.                         The number of requester uses 
  9961.  
  9962.                        statisticsInfo.usefail 
  9963.  
  9964.                         The number of requester use failures 
  9965.  
  9966.                        statisticsInfo.autorec 
  9967.  
  9968.                         The number of requester autoconnects 
  9969.  
  9970.                        statisticsInfo.bytessent_r 
  9971.  
  9972.                         The number of requester bytes sent to the network. The 
  9973.                         representation will be floating point if the bytes send 
  9974.                         exceeds 0xFFFFFFFF 
  9975.  
  9976.                        statisticsInfo.bytesrcvd_r 
  9977.  
  9978.                         The number of requester bytes received from the 
  9979.                         network. The representation will be floating point if 
  9980.                         the bytes received exceeds 0xFFFFFFFF 
  9981.  
  9982.                        statisticsInfo.bytessent_s 
  9983.  
  9984.                         The number of server bytes sent to the network. The 
  9985.                         representation will be floating point if the bytes send 
  9986.                         exceeds 0xFFFFFFFF 
  9987.  
  9988.                        statisticsInfo.bytesrcvd_s 
  9989.  
  9990.                         The number of server bytes received from the network. 
  9991.                         The representation will be floating point if the bytes 
  9992.                         received exceeds 0xFFFFFFFF 
  9993.  
  9994.                        statisticsInfo.bytessent_a 
  9995.  
  9996.                         The number of application bytes sent to the network. 
  9997.                         The representation will be floating point if the bytes 
  9998.                         send exceeds 0xFFFFFFFF 
  9999.  
  10000.                        statisticsInfo.bytesrcvd_a 
  10001.  
  10002.                         The number of application bytes received from the 
  10003.                         network. The representation will be floating point if 
  10004.                         the bytes received exceeds 0xFFFFFFFF 
  10005.  
  10006.                        statisticsInfo.reqbufneed 
  10007.  
  10008.                         The number of times the requester required a request 
  10009.                         buffer but failed 
  10010.  
  10011.                        statisticsInfo.bigbufneed 
  10012.  
  10013.                         The number of times the requester required a big buffer 
  10014.                         but failed 
  10015.  
  10016.                    The returned values for server statistics are: 
  10017.  
  10018.                        statisticsInfo.start 
  10019.  
  10020.                         The time that statistics collection started or the date 
  10021.                         or time that the statistics were last cleared 
  10022.  
  10023.                        statisticsInfo.fopens 
  10024.  
  10025.                         The number of server file opens.  This includes opens 
  10026.                         of named pipes 
  10027.  
  10028.                        statisticsInfo.devopens 
  10029.  
  10030.                         The number of server device opens 
  10031.  
  10032.                        statisticsInfo.jobsqueued 
  10033.  
  10034.                         The number of server print jobs spooled 
  10035.  
  10036.                        statisticsInfo.sopens 
  10037.  
  10038.                         The number of server session starts 
  10039.  
  10040.                        statisticsInfo.stimedout 
  10041.  
  10042.                         The number of server session autodisconnects 
  10043.  
  10044.                        statisticsInfo.serrorout 
  10045.  
  10046.                         The number of server sessions errored out 
  10047.  
  10048.                        statisticsInfo.pwerrors 
  10049.  
  10050.                         The number of server password violations 
  10051.  
  10052.                        statisticsInfo.permerrors 
  10053.  
  10054.                         The number of server access permission errors 
  10055.  
  10056.                        statisticsInfo.syserrors 
  10057.  
  10058.                         The number of server system errors 
  10059.  
  10060.                        statisticsInfo.bytessent 
  10061.  
  10062.                         The number of server bytes sent to the network. The 
  10063.                         representation will be floating point if the bytes send 
  10064.                         exceeds 0xFFFFFFFF 
  10065.  
  10066.                        statisticsInfo.bytesrcvd 
  10067.  
  10068.                         The number of server bytes received from the network. 
  10069.                         The representation will be floating point if the bytes 
  10070.                         received exceeds 0xFFFFFFFF 
  10071.  
  10072.                        statisticsInfo.avresponse 
  10073.  
  10074.                         The average server response time in milliseconds 
  10075.  
  10076.                        statisticsInfo.reqbufneed 
  10077.  
  10078.                         The number of times the server required a request 
  10079.                         buffer but failed 
  10080.  
  10081.                        statisticsInfo.bigbufneed 
  10082.  
  10083.                         The number of times the server required a big buffer 
  10084.                         but failed 
  10085.  
  10086.  ComputerName      The server computer name 
  10087.  
  10088.  StatType          Using value 0 gives requester statistics. A value 1 gives 
  10089.                    server statistics 
  10090.  
  10091.  ClearIt           Using value 1 clears the statistics, otherwise no clear is 
  10092.                    done. A call to NetGetInfo(NETSTATISTICS) with 4 parameters, 
  10093.                    no clear will be done 
  10094.  
  10095.                    A call to NetGetInfo(NETSTATISTICS) with 3 parameters, no 
  10096.                    clear and a call to retrieve requester information will be 
  10097.                    done 
  10098.  
  10099.  Note 
  10100.  
  10101.  The server computer name can be specified as '' for a local server or 
  10102.  computer. 
  10103.  
  10104.  Example 
  10105.  
  10106.  
  10107.   /* Get statistics information */
  10108.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10109.   call LoadLsRxutFuncs
  10110.  
  10111.   SrvName = '\\FSC30DCR'
  10112.   NETSTATISTICS        = 195
  10113.   REQ_STAT             = 0
  10114.   SRV_STAT             = 1
  10115.  
  10116.   /* Get the requester statistics */
  10117.   myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, REQ_STAT, 10)
  10118.  
  10119.   if myRc <> '0' then do
  10120.    say 'Got error from NetGetInfo() ' myRc
  10121.    call DropLsRxutFuncs
  10122.    exit 9
  10123.   end
  10124.  
  10125.   say
  10126.   say "Statistics req start:       " statisticsInfo.start
  10127.   say "Statistics req numNCB_r:    " statisticsInfo.numNCB_r
  10128.   say "Net Statistics numNCB_s:    " statisticsInfo.numNCB_s
  10129.   say "Net Statistics numNCB_a:    " statisticsInfo.numNCB_a
  10130.   say "Net Statistics fiNCB_r:     " statisticsInfo.fiNCB_r
  10131.   say "Net Statistics fiNCB_s:     " statisticsInfo.fiNCB_s
  10132.   say "Net Statistics fiNCB_a:     " statisticsInfo.fiNCB_a
  10133.   say "Net Statistics fcNCB_r:     " statisticsInfo.fcNCB_r
  10134.   say "Net Statistics fcNCB_s:     " statisticsInfo.fcNCB_s
  10135.   say "Net Statistics fcNCB_a:     " statisticsInfo.fcNCB_a
  10136.   say "Net Statistics sesstart:    " statisticsInfo.sesstart
  10137.   say "Net Statistics sessfailcon: " statisticsInfo.sessfailcon
  10138.   say "Net Statistics sessbroke:   " statisticsInfo.sessbroke
  10139.   say "Net Statistics uses:        " statisticsInfo.uses
  10140.   say "Net Statistics usefail:     " statisticsInfo.usefail
  10141.   say "Net Statistics autorec:     " statisticsInfo.autorec
  10142.   say "Net Statistics bytessent_r: " statisticsInfo.bytessent_r
  10143.   say "Net Statistics bytesrcvd_r: " statisticsInfo.bytesrcvd_r
  10144.   say "Net Statistics bytessent_s: " statisticsInfo.bytessent_s
  10145.   say "Net Statistics bytesrcvd_s: " statisticsInfo.bytesrcvd_s
  10146.   say "Net Statistics bytessent_a: " statisticsInfo.bytessent_a
  10147.   say "Net Statistics bytesrcvd_a: " statisticsInfo.bytesrcvd_a
  10148.   say "Net Statistics reqbufneed:  " statisticsInfo.reqbufneed
  10149.   say "Net Statistics bigbufneed:  " statisticsInfo.bigbufneed
  10150.  
  10151.   /* The server statistics */
  10152.   myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, SRV_STAT, 10)
  10153.  
  10154.   if myRc <> '0' then do
  10155.    say 'Got error from NetGetInfo() ' myRc
  10156.    call DropLsRxutFuncs
  10157.    exit 9
  10158.   end
  10159.  
  10160.   say
  10161.   say "Statistics srv start:      " statisticsInfo.start
  10162.   say "Statistics srv fopens:     " statisticsInfo.fopens
  10163.   say "Statistics srv devopens:   " statisticsInfo.devopens
  10164.   say "Statistics srv jobsqueued: " statisticsInfo.jobsqueued
  10165.   say "Statistics srv sopens:     " statisticsInfo.sopens
  10166.   say "Statistics srv stimedout:  " statisticsInfo.stimedout
  10167.   say "Statistics srv serrorout:  " statisticsInfo.serrorout
  10168.   say "Statistics srv pwerrors:   " statisticsInfo.pwerrors
  10169.   say "Statistics srv permerrors: " statisticsInfo.permerrors
  10170.   say "Statistics srv syserrors:  " statisticsInfo.syserrors
  10171.   say "Statistics srv bytessent:  " statisticsInfo.bytessent
  10172.   say "Statistics srv bytesrcvd:  " statisticsInfo.bytesrcvd
  10173.   say "Statistics srv avresponse: " statisticsInfo.avresponse
  10174.   say "Statistics srv reqbufneed: " statisticsInfo.reqbufneed
  10175.   say "Statistics srv bigbufneed: " statisticsInfo.bigbufneed
  10176.  
  10177.   call DropLsRxutFuncs
  10178.   call RxFuncDrop 'LoadLsRxutFuncs'
  10179.  
  10180.   exit 0
  10181.  
  10182.  Example Output 
  10183.  
  10184.  
  10185.   Statistics req start:        Thu May  6 18:19:15 1993
  10186.  
  10187.   Statistics req numNCB_r:     2213
  10188.   Net Statistics numNCB_s:     31
  10189.   Net Statistics numNCB_a:     1410
  10190.   Net Statistics fiNCB_r:      0
  10191.   Net Statistics fiNCB_s:      0
  10192.   Net Statistics fiNCB_a:      0
  10193.   Net Statistics fcNCB_r:      0
  10194.   Net Statistics fcNCB_s:      0
  10195.   Net Statistics fcNCB_a:      0
  10196.   Net Statistics sesstart:     7
  10197.   Net Statistics sessfailcon:  0
  10198.   Net Statistics sessbroke:    3
  10199.   Net Statistics uses:         23
  10200.   Net Statistics usefail:      0
  10201.   Net Statistics autorec:      0
  10202.   Net Statistics bytessent_r:  2430724
  10203.   Net Statistics bytesrcvd_r:  263720
  10204.   Net Statistics bytessent_s:  320
  10205.   Net Statistics bytesrcvd_s:  1019
  10206.   Net Statistics bytessent_a:  73113
  10207.   Net Statistics bytesrcvd_a:  90194
  10208.   Net Statistics reqbufneed:   0
  10209.   Net Statistics bigbufneed:   0
  10210.  
  10211.   Statistics srv start:       Thu May  6 20:19:21 1993
  10212.  
  10213.   Statistics srv fopens:      0
  10214.   Statistics srv devopens:    0
  10215.   Statistics srv jobsqueued:  0
  10216.   Statistics srv sopens:      2
  10217.   Statistics srv stimedout:   0
  10218.   Statistics srv serrorout:   0
  10219.   Statistics srv pwerrors:    0
  10220.   Statistics srv permerrors:  0
  10221.   Statistics srv syserrors:   0
  10222.   Statistics srv bytessent:   160
  10223.   Statistics srv bytesrcvd:   5121
  10224.   Statistics srv avresponse:  157
  10225.   Statistics srv reqbufneed:  0
  10226.   Statistics srv bigbufneed:  0
  10227.  
  10228.  
  10229. ΓòÉΓòÉΓòÉ 12.29. NETUSE Get Info ΓòÉΓòÉΓòÉ
  10230.  
  10231. The function retrieves information about a connection to a shared resource. 
  10232.  
  10233. Syntax 
  10234.  
  10235.  
  10236. MyRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
  10237.  
  10238. Parameters 
  10239.  
  10240. The parameters specified are: 
  10241.  
  10242.  'useInfo'         The REXX variable receiving the result. The variable is 
  10243.                    divided into: 
  10244.  
  10245.                        useInfo.local 
  10246.  
  10247.                         The local device name being redirected to the shared 
  10248.                         resource 
  10249.  
  10250.                        useInfo.remote 
  10251.  
  10252.                         The UNC name of the remote resource being accessed The 
  10253.                         string has the following form \\servername\netname 
  10254.  
  10255.                        useInfo.password 
  10256.  
  10257.                         This value is not available (N/A) 
  10258.  
  10259.                        useInfo.status 
  10260.  
  10261.                         The status of the connection 
  10262.  
  10263.                        useInfo.asg_type 
  10264.  
  10265.                         The resource type 
  10266.  
  10267.                        useInfo.refcount 
  10268.  
  10269.                         The number of files, directories, and other processes 
  10270.                         that are open on the remote resource 
  10271.  
  10272.                        useInfo.usecount 
  10273.  
  10274.                         The number of uses 
  10275.  
  10276.  SrvName           The server computer name 
  10277.  
  10278.  NetworkName       The network name 
  10279.  
  10280.                        If the connection is a device name connection, then the 
  10281.                         name specified must be the name of the local device 
  10282.  
  10283.                        If the connection is a UNC connection, then the name 
  10284.                         specified must be the UNC name 
  10285.  
  10286.  Note 
  10287.  
  10288.  The server computer name can be specified as '' for a local server or 
  10289.  computer. 
  10290.  
  10291.  Example 
  10292.  
  10293.  
  10294.   /* Get net use information */
  10295.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10296.   call LoadLsRxutFuncs
  10297.  
  10298.   NETUSE      = 270
  10299.   SrvName     = '\\FSC30DCR'
  10300.   NetworkName = 'T:'
  10301.  
  10302.   myRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
  10303.  
  10304.   if myRc <> '0' then do
  10305.    say 'Got error from NetGetInfo() ' myRc
  10306.    call DropLsRxutFuncs
  10307.    exit 9
  10308.   end
  10309.  
  10310.   say
  10311.   say 'Local device name: ' useInfo.local
  10312.   say 'UNC name:          ' useInfo.remote
  10313.   say 'Password:          ' useInfo.password
  10314.   say 'Connection status: ' useInfo.status
  10315.   say 'Resource type:     ' useInfo.asg_type
  10316.   say 'Open count:        ' useInfo.refcount
  10317.   say 'Number uses:       ' useInfo.usecount
  10318.  
  10319.   call DropLsRxutFuncs
  10320.   call RxFuncDrop 'LoadLsRxutFuncs'
  10321.  
  10322.   exit 0
  10323.  
  10324.  Example Output 
  10325.  
  10326.  
  10327.   Local device name:  T:
  10328.   UNC name:           \\FSC30DCR\FORALL
  10329.   Password:           N/A
  10330.   Connection status:  Connection valid
  10331.   Resource type:      Disk device
  10332.   Open count:         1
  10333.   Number uses:        1
  10334.  
  10335.  
  10336. ΓòÉΓòÉΓòÉ 12.30. NETUSER Get Info ΓòÉΓòÉΓòÉ
  10337.  
  10338. The function retrieves information about a particular user account on a server. 
  10339.  
  10340. Syntax 
  10341.  
  10342.  
  10343. MyRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
  10344.  
  10345. Parameters 
  10346.  
  10347. The parameters specified are: 
  10348.  
  10349.  'userInfo'  The REXX variable receiving the result. The variable is divided 
  10350.              into: 
  10351.  
  10352.                  userInfo.name 
  10353.  
  10354.                   The user account name 
  10355.  
  10356.                  userInfo.password_age 
  10357.  
  10358.                   The password age in seconds 
  10359.  
  10360.                  userInfo.priv 
  10361.  
  10362.                   The user account privilege level. The following values are 
  10363.                   returned: 
  10364.  
  10365.                                     Account type                     Value
  10366.                                     ------------                     -----
  10367.                                     Guest                            'Guest'
  10368.                                     User                             'User'
  10369.                                     Administrator                    'Admin'
  10370.  
  10371.                  userInfo.home_dir 
  10372.  
  10373.                   The user home directory, if one is specified 
  10374.  
  10375.                  userInfo.comment 
  10376.  
  10377.                   The user account comment 
  10378.  
  10379.                  userInfo.flags 
  10380.  
  10381.                   User account flags. See below for the numeric values 
  10382.                   returned: 
  10383.  
  10384.                                     Manifest           Value  Meaning
  10385.                                     --------           -----  --------------------------------------
  10386.                                     SCRIPT               1    Must be 1.  Logon script enabled
  10387.                                     ACCOUNTDISABLE       2    If 2, user's account disabled
  10388.                                     DELETE_PROHIBITED    4    If 4, user's account cannot be deleted
  10389.                                     HOMEDIR_REQUIRED     8    If 8, home directory required
  10390.                                     PASSWD_NOTREQD      32    If 32, password not required
  10391.                                     PASSWD_CANT_CHANGE  64    If 64, user cannot change password
  10392.  
  10393.                   Use bitwise and to retrieve the actual settings 
  10394.  
  10395.                  userInfo.script_path 
  10396.  
  10397.                   The name of the logon script together with the path 
  10398.                   specification relative to the NETLOGON SCRIPT parameter 
  10399.  
  10400.                  userInfo.auth_flags 
  10401.  
  10402.                   The operator privileges granted to the user.  These 
  10403.                   privileges include accounts, print, comm, and server.  See 
  10404.                   below for the character values returned: 
  10405.  
  10406.                                     Value  Meaning
  10407.                                     -----  -------------------------------
  10408.                                       P    Print operator privilege is enabled.
  10409.                                       C    Comm operator privilege is enabled.
  10410.                                       S    Server operator privilege is enabled.
  10411.                                       A    Accounts operator privilege is enabled.
  10412.  
  10413.                   A value of PC is equal to print and comm operator privilige 
  10414.  
  10415.                  userInfo.full_name 
  10416.  
  10417.                   The full name of the user 
  10418.  
  10419.                  userInfo.usr_comment 
  10420.  
  10421.                   The account comment which is a user-settable comment 
  10422.  
  10423.                  userInfo.parms 
  10424.  
  10425.                   The user account parameters 
  10426.  
  10427.                  userInfo.workstations 
  10428.  
  10429.                   The workstation restriction for the user 
  10430.  
  10431.                  userInfo.last_logon 
  10432.  
  10433.                   The last logon time 
  10434.  
  10435.                  userInfo.last_logoff 
  10436.  
  10437.                   The last logoff time 
  10438.  
  10439.                  userInfo.acct_expires 
  10440.  
  10441.                   The time the user account expires 
  10442.  
  10443.                  userInfo.max_storage 
  10444.  
  10445.                   The maximum storage allotted for the home directory 
  10446.  
  10447.                  userInfo.unit_per_week 
  10448.  
  10449.                   The number of hours within a week (7 * 24 = 168) 
  10450.  
  10451.                  userInfo.restricted_hours 
  10452.  
  10453.                   Logon restriction on certain hours 
  10454.  
  10455.                  userInfo.i.logon_hours 
  10456.  
  10457.                   The logon hours allowed. 0 means 0 to 0:59, 1 1:00 to 1:59. 
  10458.                   The variable i has a value from 1 to 7, where 1 is Sunday, 2 
  10459.                   Monday etc.. The logon_hours are only valid if 
  10460.                   userInfo.restricted_hours differs from the value '-none-' 
  10461.  
  10462.                  userInfo.bad_pw_count 
  10463.  
  10464.                   The number of attempts to validate a bad password 
  10465.  
  10466.                  userInfo.num_logons 
  10467.  
  10468.                   The number of successful logons 
  10469.  
  10470.                  userInfo.logon_server 
  10471.  
  10472.                   The computer to handle logon requests for a user account 
  10473.  
  10474.                  userInfo.country_code 
  10475.  
  10476.                   The country code for the user 
  10477.  
  10478.                  userInfo.code_page 
  10479.  
  10480.                   The country code page for the user 
  10481.  
  10482.  SrvName     The server compter name of the domain controller 
  10483.  
  10484.  UserId      The name of the userid 
  10485.  
  10486.  Note 
  10487.  
  10488.  The server computer name can be specified as '' for a local domain controller 
  10489.  
  10490.  Example 
  10491.  
  10492.  
  10493.   /* Get the user account information */
  10494.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10495.   call LoadLsRxutFuncs
  10496.  
  10497.   NETUSER = 280
  10498.   SrvName = '\\ILIDC'
  10499.   UserId  = 'FMAM'
  10500.  
  10501.   myRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
  10502.  
  10503.   if myRc <> '0' then do
  10504.    say 'Got error from NetGetInfo() ' myRc
  10505.    call DropLsRxutFuncs
  10506.    exit 9
  10507.   end
  10508.  
  10509.   say
  10510.   say 'The account name:     ' userInfo.name
  10511.   say 'Comment:              ' userInfo.comment
  10512.   say 'User comment:         ' userInfo.usr_comment
  10513.   say 'Full name:            ' userInfo.full_name
  10514.   say 'Account privilege:    ' userInfo.priv
  10515.   say 'Password age:         ' userInfo.password_age
  10516.   say 'Home directory:       ' userInfo.home_dir
  10517.   say 'User parameters:      ' userInfo.parms
  10518.   say 'Last logon:           ' userInfo.last_logon
  10519.   say 'Last logoff:          ' userInfo.last_logoff
  10520.   say 'Bad password count:   ' userInfo.bad_pw_count
  10521.   say 'Number logons:        ' userInfo.num_logons
  10522.   say 'Logon Server:         ' userInfo.logon_server
  10523.   say 'Country Code:         ' userInfo.country_code
  10524.   say 'Code page:            ' userInfo.code_page
  10525.   say 'Workstations allowed: ' userInfo.workstations
  10526.   say 'Auth_flags:           ' userInfo.auth_flags
  10527.   say 'Account Flags:        ' userInfo.flags
  10528.   say 'Max. disk storage:    ' userInfo.max_storage
  10529.   say 'Hours per week:       ' userInfo.units_per_week
  10530.  
  10531.   if userInfo.restricted_hours <> '-none-' then do
  10532.    say
  10533.    say 'Logon hours from Sunday = 1 to Saterday = 7'
  10534.    say
  10535.  
  10536.    do i=1 to 7
  10537.     say 'Day: ' i 'Hours: ' userInfo.i.logon_hours
  10538.    end
  10539.  
  10540.   end
  10541.  
  10542.   call DropLsRxutFuncs
  10543.   call RxFuncDrop 'LoadLsRxutFuncs'
  10544.  
  10545.   exit 0
  10546.  
  10547.  Example Output 
  10548.  
  10549.  
  10550.   The account name:      FMAM
  10551.   Comment:               Section Manager in N91
  10552.   User comment:          -none-
  10553.   Full name:             Section A Manager Mr Fm Am
  10554.   Account privilege:     User
  10555.   Password age:          7445
  10556.   Home directory:        -none-
  10557.   User parameters:       -none-
  10558.   Last logon:            Unknown
  10559.   Last logoff:           Unknown
  10560.   Bad password count:    1
  10561.   Number logons:         Unknown
  10562.   Logon Server:          \\*
  10563.   Country Code:          000
  10564.   Code page:             0
  10565.   Workstations allowed:  No Restriction
  10566.   Auth_flags:            P
  10567.   Account Flags:         S
  10568.   Max. disk storage:     No Limit
  10569.   Hours per week:        168
  10570.  
  10571.   Logon hours from Sunday = 1 to Saterday = 7
  10572.  
  10573.   Day:  1 Hours:
  10574.   Day:  2 Hours:   8 9 10 11 12 13 14 15 16 17
  10575.   Day:  3 Hours:   8 9 10 11 12 13 14 15 16 17
  10576.   Day:  4 Hours:   8 9 10 11 12 13 14 15 16 17
  10577.   Day:  5 Hours:   8 9 10 11 12 13 14 15 16 17
  10578.   Day:  6 Hours:   8 9 10 11 12 13 14 15 16 17
  10579.   Day:  7 Hours:
  10580.  
  10581.  
  10582. ΓòÉΓòÉΓòÉ 12.31. NETUSERGROUPS Get Info ΓòÉΓòÉΓòÉ
  10583.  
  10584. The function lists the names of all groups in the user accounts subsystem (UAS) 
  10585. database to which a particular user account belongs. This function is identical 
  10586. to NetEnumerate(NETUSERGROUPS). 
  10587.  
  10588. Syntax 
  10589.  
  10590.  
  10591. MyRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  10592.  
  10593. Parameters 
  10594.  
  10595. The parameters specified are: 
  10596.  
  10597.  'userGroups'      The REXX variable receiving the result. The variable is 
  10598.                    divided into: 
  10599.  
  10600.                        userGroups.0 
  10601.  
  10602.                         The number of groups in which the user account has a 
  10603.                         entry 
  10604.  
  10605.                        userGroups.i 
  10606.  
  10607.                         The actual group name 
  10608.  
  10609.  SrvName           The server computer name of the domain controller 
  10610.  
  10611.  UserId            The name of the userid 
  10612.  
  10613.  Note 
  10614.  
  10615.  The server computer name can be specified as '' for a local domain controller 
  10616.  
  10617.  Example 
  10618.  
  10619.  
  10620.   /* Get the groups in which a user is defined */
  10621.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10622.   call LoadLsRxutFuncs
  10623.  
  10624.   NETUSERGROUPS = 330
  10625.   SrvName = '\\ILIDC'
  10626.   UserId = 'FMAM'
  10627.  
  10628.   myRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  10629.  
  10630.   if myRc <> '0' then do
  10631.    say 'Got error from NetGetInfo() ' myRc
  10632.    call DropLsRxutFuncs
  10633.    exit 9
  10634.   end
  10635.  
  10636.   if userGroups.0 = 0 then do
  10637.    say 'User account belongs to no group'
  10638.    call DropLsRxutFuncs
  10639.    exit 0
  10640.   end
  10641.  
  10642.   say 'Number of entries: ' userGroups.0
  10643.   say
  10644.  
  10645.   do i=1 to userGroups.0
  10646.    say 'Group Name: ' userGroups.i
  10647.   end
  10648.  
  10649.   call DropLsRxutFuncs
  10650.   call RxFuncDrop 'LoadLsRxutFuncs'
  10651.  
  10652.   exit 0
  10653.  
  10654.  Example Output 
  10655.  
  10656.  
  10657.   Number of entries:  3
  10658.  
  10659.   Group Name:  MANAGERS
  10660.   Group Name:  HR_PRINT
  10661.   Group Name:  USERS
  10662.  
  10663.  
  10664. ΓòÉΓòÉΓòÉ 12.32. NETUSERMODALS Get Info ΓòÉΓòÉΓòÉ
  10665.  
  10666. The function gets global modals related information for all user accounts and 
  10667. groups in the user accounts subsystem (UAS) database. 
  10668.  
  10669. Syntax 
  10670.  
  10671.  
  10672. MyRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
  10673.  
  10674. Parameters 
  10675.  
  10676. The parameters specified are: 
  10677.  
  10678.  'userModalsInfo'  The REXX variable receiving the result. The variable is 
  10679.                    divided into: 
  10680.  
  10681.                        userModalsInfo.min_passwd_len 
  10682.  
  10683.                         The minimum password length 
  10684.  
  10685.                        userModalsInfo.max_passwd_age 
  10686.  
  10687.                         The maximum password age in days 
  10688.  
  10689.                        userModalsInfo.min_passwd_age 
  10690.  
  10691.                         The minimum password age in days 
  10692.  
  10693.                        userModalsInfo.force_logoff 
  10694.  
  10695.                         The length of time (in seconds) after the valid logon 
  10696.                         hours that the user should be forced off the network 
  10697.  
  10698.                        userModalsInfo.password_hist_len 
  10699.  
  10700.                         The length of the password history, that is, the number 
  10701.                         of passwords in the history buffer that are scanned 
  10702.                         versus the new password in a password change attempt 
  10703.  
  10704.  SrvName           The server computer name of the domain controller 
  10705.  
  10706.  Note 
  10707.  
  10708.  The server computer name can be specified as '' for a local domain controller. 
  10709.  
  10710.  Example 
  10711.  
  10712.  
  10713.   /* Get user modals information */
  10714.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10715.   call LoadLsRxutFuncs
  10716.  
  10717.   NETUSERMODALS = 360
  10718.   SrvName       = '\\ILIDC'
  10719.  
  10720.   myRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
  10721.  
  10722.   if myRc <> '0' then do
  10723.    say 'Got error from NetGetInfo() ' myRc
  10724.    call DropLsRxutFuncs
  10725.    exit 9
  10726.   end
  10727.  
  10728.   say
  10729.   say 'Minimum password length: ' userModalsInfo.min_passwd_len
  10730.   say 'Maximum password age:    ' userModalsInfo.max_passwd_age
  10731.   say 'Minimum password age:    ' userModalsInfo.min_passwd_age
  10732.   say 'Forced logoff time:      ' userModalsInfo.force_logoff
  10733.   say 'Password history length: ' userModalsInfo.password_hist_len
  10734.  
  10735.   call DropLsRxutFuncs
  10736.   call RxFuncDrop 'LoadLsRxutFuncs'
  10737.  
  10738.   exit 0
  10739.  
  10740.  Example Output 
  10741.  
  10742.  
  10743.   Minimum password length:  4
  10744.   Maximum password age:     Unlimited
  10745.   Minimum password age:     No delay required
  10746.   Forced logoff time:       Never
  10747.   Password history length:  8
  10748.  
  10749.  
  10750. ΓòÉΓòÉΓòÉ 12.33. NETWKSTA Get Info ΓòÉΓòÉΓòÉ
  10751.  
  10752. The function returns information about the configuration components of the LAN 
  10753. requester component. 
  10754.  
  10755. Syntax 
  10756.  
  10757.  
  10758. MyRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
  10759.  
  10760. Parameters 
  10761.  
  10762. The parameters specified are: 
  10763.  
  10764.  'wkstaInfo'   The REXX variable receiving the result. The variable is divided 
  10765.                into: 
  10766.  
  10767.                    wkstaInfo.root 
  10768.  
  10769.                     A string containing the path to the IBMLAN directory of the 
  10770.                     computer 
  10771.  
  10772.                    wkstaInfo.computername 
  10773.  
  10774.                     The computer name of the requester being queried 
  10775.  
  10776.                    wkstaInfo.username 
  10777.  
  10778.                     A string containing the name of the user who is logged on 
  10779.                     to the requester 
  10780.  
  10781.                    wkstaInfo.langroup 
  10782.  
  10783.                     A string containing the name of the domain to which the 
  10784.                     requester belongs 
  10785.  
  10786.                    wkstaInfo.ver_major 
  10787.  
  10788.                     The major software version (Version) 
  10789.  
  10790.                    wkstaInfo.ver_minor 
  10791.  
  10792.                     The minor software version (Release) 
  10793.  
  10794.                    wkstaInfo.charwait 
  10795.  
  10796.                     The number of seconds the requester waits for a remote 
  10797.                     serial or communication device to become available 
  10798.  
  10799.                    wkstaInfo.chartime 
  10800.  
  10801.                     The number of milliseconds the requester waits to collect 
  10802.                     data to send to a remote serial or communication device 
  10803.  
  10804.                    wkstaInfo.charcount 
  10805.  
  10806.                     The number of bytes of information the requester sends to a 
  10807.                     remote serial or communication device 
  10808.  
  10809.                    wkstaInfo.keepconn 
  10810.  
  10811.                     The number of seconds an inactive connection from the 
  10812.                     requester to a resource of a server is maintained 
  10813.  
  10814.                    wkstaInfo.keepsearch 
  10815.  
  10816.                     The number of seconds an inactive search continues 
  10817.  
  10818.                    wkstaInfo.maxthreads 
  10819.  
  10820.                     The number of threads the requester can dedicate to the 
  10821.                     network 
  10822.  
  10823.                    wkstaInfo.maxcmds 
  10824.  
  10825.                     The number of simultaneous network device driver commands 
  10826.                     that can be sent to the network 
  10827.  
  10828.                    wkstaInfo.numworkbuf 
  10829.  
  10830.                     The number of internal buffers the requester has 
  10831.  
  10832.                    wkstaInfo.sizworkbuf 
  10833.  
  10834.                     The size (in bytes) of each internal buffer 
  10835.  
  10836.                    wkstaInfo.maxwrkcache 
  10837.  
  10838.                     The maximum size (in bytes) of an internal cache buffer 
  10839.  
  10840.                    wkstaInfo.sesstimeout 
  10841.  
  10842.                     The number of seconds before an inactive session between a 
  10843.                     requester and a server is discontinued 
  10844.  
  10845.                    wkstaInfo.sizerror 
  10846.  
  10847.                     The size (in bytes) of an internal error buffer 
  10848.  
  10849.                    wkstaInfo.numalerts 
  10850.  
  10851.                     The maximum number of clients that can receive alert 
  10852.                     messages 
  10853.  
  10854.                    wkstaInfo.numservices 
  10855.  
  10856.                     The number of services that can be started on the requester 
  10857.                     at any time 
  10858.  
  10859.                    wkstaInfo.errlogsz 
  10860.  
  10861.                     The maximum size (in KB) of the error log file of the 
  10862.                     requester 
  10863.  
  10864.                    wkstaInfo.printbuftime 
  10865.  
  10866.                     The number of seconds closing print jobs are closed 
  10867.  
  10868.                    wkstaInfo.numcharbuf 
  10869.  
  10870.                     The number of character pipe buffers and device buffers the 
  10871.                     requester can have 
  10872.  
  10873.                    wkstaInfo.sizcharbuf 
  10874.  
  10875.                     The maximum size (in bytes) of a character pipe buffer and 
  10876.                     device buffer 
  10877.  
  10878.                    wkstaInfo.logon_server 
  10879.  
  10880.                     A string containing the name of the preferred server, which 
  10881.                     validates user logon requests for this userid 
  10882.  
  10883.                    wkstaInfo.wrkheuristics 
  10884.  
  10885.                     A string of flags used to control a requesters operation 
  10886.  
  10887.                    wkstaInfo.mailslots 
  10888.  
  10889.                     Specifies whether mailslots are allowed. If the value is 0, 
  10890.                     mailslots are not supported on this machine, and Netlogon 
  10891.                     service will not start 
  10892.  
  10893.                    wkstaInfo.logon_domain 
  10894.  
  10895.                     Names the domain to which the user is logged on. If no one 
  10896.                     is logged on, it is returned as -none- 
  10897.  
  10898.                    wkstaInfo.oth_domains 
  10899.  
  10900.                     A string listing all domains on which the machine currently 
  10901.                     is listed 
  10902.  
  10903.                    wkstaInfo.numdgrambuf 
  10904.  
  10905.                     The number of buffers allocated for receiving datagrams 
  10906.  
  10907.  SrvName       The server computer name 
  10908.  
  10909.  Note 
  10910.  
  10911.  The server computer name can be specified as '' for a local server or 
  10912.  requester. 
  10913.  
  10914.  Example 
  10915.  
  10916.  
  10917.   /* Get wksta information */
  10918.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10919.   call LoadLsRxutFuncs
  10920.  
  10921.   NETWKSTA = 350
  10922.   SrvName  = '\\ILIDC'
  10923.  
  10924.   myRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
  10925.  
  10926.   if myRc <> '0' then do
  10927.    say 'Got error from NetGetInfo() ' myRc
  10928.    call DropLsRxutFuncs
  10929.    exit 9
  10930.   end
  10931.  
  10932.   say
  10933.   say 'Computer Name:        ' wkstaInfo.computername
  10934.   say 'User Id logged on:    ' wkstaInfo.username
  10935.   say 'LAN Group:            ' wkstaInfo.langroup
  10936.   say 'Major version number: ' wkstaInfo.ver_major
  10937.   say 'Minor version number: ' wkstaInfo.ver_minor
  10938.   say 'Logon domain:         ' wkstaInfo.logon_domain
  10939.   say 'Other domains:        ' wkstaInfo.oth_domains
  10940.  
  10941.   call DropLsRxutFuncs
  10942.   call RxFuncDrop 'LoadLsRxutFuncs'
  10943.  
  10944.   exit 0
  10945.  
  10946.  Example Output 
  10947.  
  10948.  
  10949.   Computer Name:         \\ILIDC
  10950.   User Id logged on:     LINDBERG
  10951.   LAN Group:             ILI
  10952.   Major version number:  3
  10953.   Minor version number:  0
  10954.   Logon domain:          ILI
  10955.   Other domains:         -none-
  10956.  
  10957.  
  10958. ΓòÉΓòÉΓòÉ 13. NetMisc ΓòÉΓòÉΓòÉ
  10959.  
  10960. The NetMisc() function contains a set of functions that are outsite the normal 
  10961. add, delete, enumerate, get and get operations. 
  10962.  
  10963. The Net Misc functions are family of functions that can be called with a number 
  10964. of parameters. The use of the function NetMisc() has a minimum of two different 
  10965. parameters. The generic syntax is: 
  10966.  
  10967.  
  10968. MyRc = NetMisc(option, 'stemvar', parm1, parm2, parm3)
  10969. MyRc = NetMisc(option, parm1, parm2, parm3)
  10970.  
  10971. The option parameter contains a value to determine what type or option has to 
  10972. be handled. 
  10973.  
  10974. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  10975.  
  10976. The MyRc parameter is the return code that will have an value from the 
  10977. NetMisc() function. If the call is successful the character '0' will be 
  10978. returned. Otherwise an error code and descriptive text are inserted by the 
  10979. NetMisc() function. 
  10980.  
  10981. The option parameter values are defined in Option parameter values. 
  10982.  
  10983.  
  10984. ΓòÉΓòÉΓòÉ 13.1. NetMisc(NETACCESSCHECK) ΓòÉΓòÉΓòÉ
  10985.  
  10986. The function verifies that a userid has the proper access permission for a 
  10987. particular resource. 
  10988.  
  10989. A successful call to this function can be issued only from an OS/2 application 
  10990. to the local computer. If you are using a redirected drive as parameter, the 
  10991. return code of the function will be 2222. 
  10992.  
  10993. Syntax 
  10994.  
  10995.  
  10996. MyRc = NetMisc(NETACCESSCHECK, 'aclInfo', UserId, Resource)
  10997.  
  10998. Parameters 
  10999.  
  11000. The parameters required and returned are: 
  11001.  
  11002.  'aclInfo'         The access control profile information variable, which is 
  11003.                    divided into: 
  11004.  
  11005.                        aclInfo.access 
  11006.  
  11007.                         The access rights to query. The access control flags 
  11008.                         are as defined follows: 
  11009.  
  11010.                           -  N None 
  11011.  
  11012.                           -  A Attribute 
  11013.  
  11014.                           -  R Read 
  11015.  
  11016.                           -  W Write 
  11017.  
  11018.                           -  C Create 
  11019.  
  11020.                           -  X Execute 
  11021.  
  11022.                           -  D Delete 
  11023.  
  11024.                           -  P Permissions 
  11025.  
  11026.                           -  G This is a Group permission 
  11027.  
  11028.                        aclInfo.return 
  11029.  
  11030.                         The returned value from the function call. If the value 
  11031.                         is  0, the access is granted as specified, otherwise 
  11032.                         the access will not be granted (return = 5, Access 
  11033.                         Denied) 
  11034.  
  11035.  UserId            The user account name 
  11036.  
  11037.  Resource          The resource specification 
  11038.  
  11039.  Example 
  11040.  
  11041.  
  11042.   /* Check access to a resource for a userid */
  11043.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11044.   call LoadLsRxutFuncs
  11045.  
  11046.   NETACCESSCHECK = 420
  11047.   Resource       = 'C:\IBMLAN\DCDB'
  11048.   UserId         = 'TEST1'
  11049.   aclInfo.access = 'RWC'  /* Not 0 in return */
  11050.  
  11051.   /* aclInfo.access = 'R' Should return 0 */
  11052.  
  11053.   myRc = NetMisc(NETACCESSCHECK, 'aclInfo', UserId, Resource)
  11054.  
  11055.   if myRc <> '0' then do
  11056.    say 'Got error from NetMisc() ' myRc
  11057.    exitRc = 9
  11058.   end
  11059.   else do
  11060.    say 'User access checked successfully'
  11061.    say '0 ok, otherwise bad. Access is'  aclInfo.return
  11062.   end
  11063.  
  11064.   call DropLsRxutFuncs
  11065.   call RxFuncDrop 'LoadLsRxutFuncs'
  11066.  
  11067.   exit exitRc
  11068.  
  11069.  Example Output 
  11070.  
  11071.  
  11072.   User access checked successfully
  11073.   0 ok, otherwise bad. Access is  0
  11074.  
  11075.  
  11076. ΓòÉΓòÉΓòÉ 13.2. NetMisc(NETACCESSAPPLY) (LS40) ΓòÉΓòÉΓòÉ
  11077.  
  11078. The function replicates a defined permission record, applying it to all 
  11079. subdirectories under the directory specified. 
  11080.  
  11081. The function updates the access permission for any file within the directory 
  11082. tree that already has an access permission record. It does not create a record 
  11083. for a file that does not already have one. 
  11084.  
  11085. This function does not replace existing audit trail settings, but it does apply 
  11086. the audit settings of the specified directory to any of its subdirectories that 
  11087. have no audit settings. 
  11088.  
  11089. This function will not apply an access permission record to any of the 
  11090. following OS/2 LAN Server system subdirectories: 
  11091.  
  11092. \IBMLAN
  11093. \IBMLAN\DCDB and its subdirectories
  11094. \IBMLAN\NETPROG and its subdirectories
  11095. \IBMLAN\DOSLAN and its subdirectories
  11096.  
  11097. Syntax 
  11098.  
  11099.  
  11100. MyRc = NetMisc(NETACCESSAPPLY, 'applyInfo', SrvName, DirResource)
  11101.  
  11102. Parameters 
  11103.  
  11104. The parameters required and returned are: 
  11105.  
  11106.  'applyInfo'       The access control profile error information variable, which 
  11107.                    is valid only in case of apply errors 
  11108.  
  11109.                        applyInfo.error_buf 
  11110.  
  11111.                         A string specifying the complete path name of the 
  11112.                         resource that contributed to the failure of the apply 
  11113.                         function 
  11114.  
  11115.                        applyInfo.error_code 
  11116.  
  11117.                         The error code returned when the ACL for resource 
  11118.                         specified in applyInfo.error_buf was changed 
  11119.  
  11120.  SrvName           The computer name of the server where the directory resource 
  11121.                    resides 
  11122.  
  11123.  DirResource       The directory resource specification 
  11124.  
  11125.  Example 
  11126.  
  11127.  
  11128.   /* Apply access control profile to resource */
  11129.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11130.   call LoadLsRxutFuncs
  11131.  
  11132.   NETACCESSAPPLY = 520
  11133.   SrvName        = '\\DOMAIN_CONTRLR'
  11134.   DirResource    = 'C:\TEST'        /* Resource on the server */
  11135.  
  11136.   myRc = NetMisc(NETACCESSAPPLY, 'applyInfo', SrvName, DirResource)
  11137.  
  11138.   if myRc <> '0' then do
  11139.    say 'Got error from NetMisc() ' myRc
  11140.    say 'Error Code from Apply' applyInfo.error_code
  11141.    say 'Apply function failed at'
  11142.    say applyInfo.error_buf
  11143.    exitRc = 9
  11144.   end
  11145.   else do
  11146.    say 'Apply function was successfull'
  11147.   end
  11148.  
  11149.   call DropLsRxutFuncs
  11150.   call RxFuncDrop 'LoadLsRxutFuncs'
  11151.  
  11152.   exit exitRc
  11153.  
  11154.  Example Output 
  11155.  
  11156.  
  11157.   Apply function was successfull
  11158.  
  11159.  
  11160. ΓòÉΓòÉΓòÉ 13.3. NetMisc(NETAUDITLOGCLEAR) ΓòÉΓòÉΓòÉ
  11161.  
  11162. The function clears and optionally saves the audit log file of a computer. 
  11163.  
  11164. Syntax 
  11165.  
  11166.  
  11167. MyRc = NetMisc(NETAUDITLOGCLEAR, SrvName, save2File)
  11168.  
  11169. Parameters 
  11170.  
  11171. The parameters required and returned are: 
  11172.  
  11173.  SrvName     The computer name of the server to perform the operation on. If 
  11174.              the computer is local use '' as the value for the server name 
  11175.  
  11176.  save2File   A string assigning a name for an optional backup file. The calling 
  11177.              application must have write privileges for the path specified by 
  11178.              this parameter. If the path name is relative, it is assumed to be 
  11179.              relative to the IBMLAN\LOGS directory 
  11180.  
  11181.  Example 
  11182.  
  11183.  
  11184.   /* Clear the audit log file and make a backup copy of it */
  11185.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11186.   call LoadLsRxutFuncs
  11187.  
  11188.   NETERRORLOGCLEAR = 580
  11189.   SrvName          = '\\DOMAIN_CONTRLR'
  11190.   save2File        = 'AUDITLOG.001'
  11191.  
  11192.   myRc = NetMisc(NETAUDITLOGCLEAR, SrvName, save2File)
  11193.  
  11194.   if myRc <> '0' then do
  11195.    say 'Got error from NetMisc() ' myRc
  11196.    exitRc = 9
  11197.   end
  11198.   else do
  11199.    say 'The operation completed successfully'
  11200.    exitRc = 0
  11201.   end
  11202.  
  11203.   call DropLsRxutFuncs
  11204.   call RxFuncDrop 'LoadLsRxutFuncs'
  11205.  
  11206.   exit exitRc
  11207.  
  11208.  Example Output 
  11209.  
  11210.  
  11211.   The operation completed successfully
  11212.  
  11213.  
  11214. ΓòÉΓòÉΓòÉ 13.4. NetMisc(NETDASDCHECK) (LS40) ΓòÉΓòÉΓòÉ
  11215.  
  11216. The function returns the amount of disk space available and the amount already 
  11217. taken in a specified directory tree. Before this function can be invoked 
  11218. successfully, directory limits must be enabled on the 386-HPFS drive. (See the 
  11219. NetMisc(NETDASDCONTROL) function) 
  11220.  
  11221. Syntax 
  11222.  
  11223.  
  11224. MyRc = NetMisc(NETDASDCHECK, 'DASDInfo', SrvName)
  11225.  
  11226. Parameters 
  11227.  
  11228. The parameters required and returned are: 
  11229.  
  11230.  'DASDInfo'  The directory limits information variable, which is divided into: 
  11231.  
  11232.                  DASDInfo.DirPath 
  11233.  
  11234.                   The directory path to check. If a redirected drive is 
  11235.                   specified for DASDInfo.DirPath, the server name parameter 
  11236.                   value must be '' 
  11237.  
  11238.                   This parameter must be specified 
  11239.  
  11240.                  DASDInfo.path 
  11241.  
  11242.                   The directory that limits the space available, beginning with 
  11243.                   the drive letter 
  11244.  
  11245.                  DASDInfo.avail 
  11246.  
  11247.                   The available disk space (in KB) remaining in the entire tree 
  11248.                   of the specified directory 
  11249.  
  11250.                  DASDInfo.usage 
  11251.  
  11252.                   The amount of disk space (in KB) already occupied in the 
  11253.                   directory indicated by DASDInfo.path 
  11254.  
  11255.  SrvName     The computer name of the server to perform the check on. If a 
  11256.              redirected drive is specified for DASDInfo.DirPath, the server 
  11257.              name parameter value must be '' 
  11258.  
  11259.  Example 
  11260.  
  11261.  
  11262.   /* Check DASD directory limits on server */
  11263.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11264.   call LoadLsRxutFuncs
  11265.  
  11266.   NETDASDCHECK     = 730
  11267.   DASDInfo.DirPath = 'D:\APPS\DATA'
  11268.   SrvName          = '\\DOMAIN_CONTRLR'
  11269.  
  11270.   myRc = NetMisc(NETDASDCHECK, 'DASDInfo', SrvName)
  11271.  
  11272.   if myRc <> '0' then do
  11273.    say 'Got error from NetMisc() ' myRc
  11274.    exitRc = 9
  11275.   end
  11276.   else do
  11277.    say 'The Directory limits are'
  11278.    say 'Path           ' DASDInfo.path
  11279.    say 'Available Space' DASDInfo.avail
  11280.    say 'In use         ' DASDInfo.usage
  11281.    exitRc = 0
  11282.   end
  11283.  
  11284.   call DropLsRxutFuncs
  11285.   call RxFuncDrop 'LoadLsRxutFuncs'
  11286.  
  11287.   exit exitRc
  11288.  
  11289.  Example Output 
  11290.  
  11291.  
  11292.   The Directory limits are'
  11293.   Path            D:\APPS\DATA
  11294.   Available Space 512
  11295.   In use          201
  11296.  
  11297.  
  11298. ΓòÉΓòÉΓòÉ 13.5. NetMisc(NETDASDCONTROL) (LS40) ΓòÉΓòÉΓòÉ
  11299.  
  11300. The function prepares a 386-HPFS drive for directory limits. Before any other 
  11301. directory limits functions can be used on a drive, that drive must be enabled 
  11302. (only once) for directory limits by using either this function, the NET DASD 
  11303. command, or the OS/2 LAN Server Administration Graphical User Interface. 
  11304.  
  11305. Syntax 
  11306.  
  11307.  
  11308. MyRc = NetMisc(NETDASDCONTROL, 'DASDControl', SrvName)
  11309.  
  11310. Parameters 
  11311.  
  11312. The parameters required and returned are: 
  11313.  
  11314.  'DASDControl'  The directory limits control variable, which is divided into: 
  11315.  
  11316.                     DASDControl.CtlFlag 
  11317.  
  11318.                      The control function to be performed on the 386-HPFS 
  11319.                      drive. Available values for this control flag are: 
  11320.  
  11321.                                           Value Meaning
  11322.                                           ----- -------
  11323.                                            1    Enables directory limits support on the
  11324.                                                 specified drive
  11325.  
  11326.                                            2    Disables directory limits support on the
  11327.                                                 specified drive
  11328.  
  11329.                                            3    Recalculates the space used in all of the
  11330.                                                 directories of the drive specified that have
  11331.                                                 directory limits placed upon them
  11332.  
  11333.                      The default value is 1 (Enable directory limits) 
  11334.  
  11335.                     DASDControl.Drive 
  11336.  
  11337.                      The letter of the drive upon which the DASD control 
  11338.                      function is to operate. This drive must reside on the 
  11339.                      server specified by the SrvName parameter. The default 
  11340.                      drive value is 'C' 
  11341.  
  11342.  SrvName        The computer name of the server to perform the control on. The 
  11343.                 server name specified can be '' for a local server 
  11344.  
  11345.  Remark 
  11346.  
  11347.  If the call is executed on a remote server a timeout code might be returned if 
  11348.  no response is received from the server. This function might take up to 
  11349.  several minutes to complete execution, especially on a large drive. Therefore, 
  11350.  it can return a nonzero return code, while the remote function is still 
  11351.  running. If one of the following error codes is returned by a call to 
  11352.  NetMisc(NETDASDCONTROL), a timeout probably has occurred: 
  11353.  
  11354.   Value Meaning
  11355.   ----- -------
  11356.     64  The network name was deleted
  11357.     67  This network name cannot be found
  11358.    240  The session was canceled
  11359.   2141  The server is not configured for transactions
  11360.  
  11361.  These error codes do not mean necessarily that the NetMisc(NETDASDCONTROL) 
  11362.  function failed. The function might still be running remotely. 
  11363.  
  11364.  You can execute the function on the server in question to avoid this problem. 
  11365.  
  11366.  Example 
  11367.  
  11368.  
  11369.   /* Activate DASD directory limits on server */
  11370.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11371.   call LoadLsRxutFuncs
  11372.  
  11373.   NETDASDCONTROL      = 740
  11374.   DASDControl.CtlFlag = 1
  11375.   DASDControl.Drive   = 'C'
  11376.   SrvName             = '\\DOMAIN_CONTRLR'
  11377.  
  11378.   myRc = NetMisc(NETDASDCONTROL, 'DASDControl', SrvName)
  11379.  
  11380.   if myRc <> '0' then do
  11381.    say 'Got error from NetMisc() ' myRc
  11382.    exitRc = 9
  11383.   end
  11384.   else do
  11385.    say 'DASD Directory Limits enabled successfully'
  11386.    exitRc = 0
  11387.   end
  11388.  
  11389.   call DropLsRxutFuncs
  11390.   call RxFuncDrop 'LoadLsRxutFuncs'
  11391.  
  11392.   exit exitRc
  11393.  
  11394.  Example Output 
  11395.  
  11396.  
  11397.   DASD Directory Limits enabled successfully
  11398.  
  11399.  
  11400. ΓòÉΓòÉΓòÉ 13.6. NetMisc(NETERRORLOGCLEAR) ΓòÉΓòÉΓòÉ
  11401.  
  11402. The function clears and optionally saves the error log file of a computer. 
  11403.  
  11404. Syntax 
  11405.  
  11406.  
  11407. MyRc = NetMisc(NETERRORLOGCLEAR, SrvName, save2File)
  11408.  
  11409. Parameters 
  11410.  
  11411. The parameters required and returned are: 
  11412.  
  11413.  SrvName     The computer name of the server to perform the operation on. If 
  11414.              the computer is local use '' as the value for the server name 
  11415.  
  11416.  save2File   A string assigning a name for an optional backup file. The calling 
  11417.              application must have write privileges for the path specified by 
  11418.              this parameter. If the path name is relative, it is assumed to be 
  11419.              relative to the IBMLAN\LOGS directory 
  11420.  
  11421.  Example 
  11422.  
  11423.  
  11424.   /* Clear the error log file and make a backup copy of it */
  11425.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11426.   call LoadLsRxutFuncs
  11427.  
  11428.   NETERRORLOGCLEAR = 640
  11429.   SrvName          = '\\DOMAIN_CONTRLR'
  11430.   save2File        = 'ERRORLOG.001'
  11431.  
  11432.   myRc = NetMisc(NETERRORLOGCLEAR, SrvName, save2File)
  11433.  
  11434.   if myRc <> '0' then do
  11435.    say 'Got error from NetMisc() ' myRc
  11436.    exitRc = 9
  11437.   end
  11438.   else do
  11439.    say 'The operation completed successfully'
  11440.    exitRc = 0
  11441.   end
  11442.  
  11443.   call DropLsRxutFuncs
  11444.   call RxFuncDrop 'LoadLsRxutFuncs'
  11445.  
  11446.   exit exitRc
  11447.  
  11448.  Example Output 
  11449.  
  11450.  
  11451.   The operation completed successfully
  11452.  
  11453.  
  11454. ΓòÉΓòÉΓòÉ 13.7. NetMisc(NETERRORLOGREAD) ΓòÉΓòÉΓòÉ
  11455.  
  11456. The function returns read enries from the error log. 
  11457.  
  11458. Syntax 
  11459.  
  11460.  
  11461. MyRc = NetMisc(NETERRORLOGREAD, 'errInfo', SrvName)
  11462.  
  11463. Parameters 
  11464.  
  11465. The parameters required and returned are: 
  11466.  
  11467.  'errInfo'   The error information and control variable, which is divided into: 
  11468.  
  11469.                  errInfo.openflags 
  11470.  
  11471.                   The read operation control flags. The values controlling the 
  11472.                   read operation are: 
  11473.  
  11474.                                     Value Read direction
  11475.                                     ----- --------------
  11476.                                       0   Read the oldest records in the error log first
  11477.  
  11478.                                       1   Read the newest records first
  11479.  
  11480.  
  11481.                                     Value Record read options
  11482.                                     ----- -------------------
  11483.                                       0   Read sequentially from the beginning
  11484.  
  11485.                                       2   Read from the nth. record specified
  11486.                                           in the errInfo.offset parameter
  11487.  
  11488.                   A value of 3 for this variable is identical to read the 
  11489.                   newest records first and read from the record number as 
  11490.                   specified in the errInfo.offset parameter errInfo.openflags 
  11491.  
  11492.                   The default value is 0 which is identical to read the oldest 
  11493.                   records first and read sequentially 
  11494.  
  11495.                  errInfo.offset 
  11496.  
  11497.                   This parameter specifies the record number the read operation 
  11498.                   should be starting from. It requires that the 
  11499.                   errInfo.openflags has the value 2 included 
  11500.  
  11501.                  errInfo.buffer 
  11502.  
  11503.                   The size of the internal working buffer. The value has a 
  11504.                   maximum of 64KB. The default value is 4KB. 
  11505.  
  11506.                  errInfo.resume 
  11507.  
  11508.                   The error log can be processed in multiple steps. Specify 
  11509.                   'INITRESUME' first time and 'RESUME' in next following calls 
  11510.                   to the procedure. See also errInfo.bytesavail 
  11511.  
  11512.                   The default operation is to neglect this parameter 
  11513.  
  11514.                  errInfo.bytesavail 
  11515.  
  11516.                   The errInfo.bytesavail variable returns information about the 
  11517.                   amount if data available. It is only valid if errInfo.resume 
  11518.                   is specified. 
  11519.  
  11520.                   If errInfo.bytesavail is not 0, then more data is available 
  11521.                   in the error log. Continue to call the function with 
  11522.                   errInfo.resume equal to 'RESUME' until the parameter 
  11523.                   errInfo.bytesavail returns a 0 value 
  11524.  
  11525.                  errInfo.count 
  11526.  
  11527.                   The number of error log entries returned. The value can be 0 
  11528.  
  11529.                  errInfo.i.time 
  11530.  
  11531.                   The time as the error log entry i was inserted to the log 
  11532.                   file 
  11533.  
  11534.                  errInfo.i.errcode 
  11535.  
  11536.                   The error code reported in the log file 
  11537.  
  11538.                  errInfo.i.component 
  11539.  
  11540.                   The reporting component 
  11541.  
  11542.                  errInfo.i.nstrings 
  11543.  
  11544.                   The number of text strings related to the error log entry i 
  11545.  
  11546.                  errInfo.i.string.n 
  11547.  
  11548.                   The nth text string for the error log entry i 
  11549.  
  11550.                  errInfo.i.rawlength 
  11551.  
  11552.                   The associated raw data length. This value will be 0 is now 
  11553.                   raw data is associated to the error log entry i 
  11554.  
  11555.                  errInfo.i.rawdata 
  11556.  
  11557.                   The raw data available. This variable is valid only if 
  11558.                   errInfo.i.rawlength is different from 0 
  11559.  
  11560.  SrvName     The computer name of the server to perform the operation on. Use 
  11561.              the value '' for a local computer 
  11562.  
  11563.  Example 
  11564.  
  11565.  
  11566.   /* Read error log entries on server */
  11567.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11568.   call LoadLsRxutFuncs
  11569.  
  11570.   NETERRORLOGREAD = 650
  11571.   SrvName         = '\\DOMAIN_CONTRLR'
  11572.  
  11573.   myRc = NetMisc(NETERRORLOGREAD, 'errInfo', SrvName)
  11574.  
  11575.   if myRc <> '0' then do
  11576.    say 'Got error from NetMisc() ' myRc
  11577.    exitRc = 9
  11578.   end
  11579.   else do
  11580.    say 'Bytes available:  ' errInfo.bytesavail
  11581.    say 'Number of entries:' errInfo.count
  11582.  
  11583.    do i = 1 to errInfo.count
  11584.     say
  11585.     say 'Time:           ' errInfo.i.time
  11586.     say 'Error Code:     ' errInfo.i.errcode
  11587.     say 'Component:      ' errInfo.i.component
  11588.     say 'Text strings:   ' errInfo.i.nstrings
  11589.     if errInfo.i.nstrings <> 0 then do
  11590.      do j = 1 to errInfo.i.nstrings
  11591.       say 'String text:    ' errInfo.i.string.j
  11592.      end
  11593.     end
  11594.     say
  11595.     say 'Raw data length:' errInfo.i.rawlength
  11596.     if errInfo.i.rawlength <> 0 then do
  11597.      do j = 1 to 5
  11598.       say C2X(substr(errInfo.i.rawdata,j,1))
  11599.      end
  11600.     end
  11601.    end
  11602.  
  11603.    exitRc = 0
  11604.   end
  11605.  
  11606.   call DropLsRxutFuncs
  11607.   call RxFuncDrop 'LoadLsRxutFuncs'
  11608.  
  11609.   exit exitRc
  11610.  
  11611.  Example Output 
  11612.  
  11613.  
  11614.   Bytes available:   0
  11615.   Number of entries: 1
  11616.  
  11617.   Time:            Mon Sep  5 13:14:01 1994
  11618.  
  11619.   Error Code:      99
  11620.   Component:       MY_PROC_1
  11621.   Text strings:    2
  11622.   String text:     Error occurred in function error handler
  11623.   String text:     The server computer name was not specified
  11624.  
  11625.   Raw data length: 32
  11626.   00
  11627.   01
  11628.   02
  11629.   03
  11630.   04
  11631.  
  11632.  Example using RESUME operation and record offset 
  11633.  
  11634.  
  11635.   /* Read error log entries on server using RESUME operation */
  11636.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11637.   call LoadLsRxutFuncs
  11638.  
  11639.   NETERRORLOGREAD = 650
  11640.   SrvName = ''
  11641.  
  11642.   entries = 0
  11643.   errInfo.resume    = 'INITRESUME'
  11644.   errInfo.buffer    = 512
  11645.   errInfo.openflags = 2
  11646.   errInfo.offset    = 145
  11647.   SrvName           = '\\DOMAIN_CONTRLR'
  11648.  
  11649.   call theProc
  11650.  
  11651.   if errInfo.bytesavail <> 0 then do
  11652.  
  11653.    errInfo.resume    = 'RESUME'
  11654.    errInfo.openflags = 0  /* This must be 0 or myRc=2440 */
  11655.  
  11656.    do while errInfo.bytesavail <> 0
  11657.     call theProc
  11658.    end
  11659.  
  11660.   end
  11661.  
  11662.   call DropLsRxutFuncs
  11663.   call RxFuncDrop 'LoadLsRxutFuncs'
  11664.  
  11665.   exit exitRc
  11666.  
  11667.   /*************************/
  11668.   /* Get error log entries */
  11669.   /*************************/
  11670.   theProc:
  11671.  
  11672.   myRc = NetMisc(NETERRORLOGREAD, 'errInfo', SrvName)
  11673.  
  11674.   if myRc <> '0' then do
  11675.    say 'Got error from NetMisc() ' myRc
  11676.    exitRc = 9
  11677.    call DropLsRxutFuncs
  11678.    call RxFuncDrop 'LoadLsRxutFuncs'
  11679.    exit exitRc
  11680.   end
  11681.   else do
  11682.    say 'Bytes available:  ' errInfo.bytesavail
  11683.    say 'Number of entries:' errInfo.count
  11684.  
  11685.    do i = 1 to errInfo.count
  11686.     say
  11687.     say 'Time:           ' errInfo.i.time
  11688.     say 'Error Code:     ' errInfo.i.errcode
  11689.     say 'Component:      ' errInfo.i.component
  11690.     say 'Text strings:   ' errInfo.i.nstrings
  11691.     if errInfo.i.nstrings <> 0 then do
  11692.      do j = 1 to errInfo.i.nstrings
  11693.       say 'String text:    ' errInfo.i.string.j
  11694.      end
  11695.     end
  11696.     say
  11697.     say 'Raw data length:' errInfo.i.rawlength
  11698.     if errInfo.i.rawlength <> 0 then do
  11699.      do j = 1 to 5
  11700.       say C2X(substr(errInfo.i.rawdata,j,1))
  11701.      end
  11702.     end
  11703.    end
  11704.  
  11705.    exitRc = 0
  11706.   end
  11707.  
  11708.   return
  11709.  
  11710.  
  11711. ΓòÉΓòÉΓòÉ 13.8. NetMisc(NETERRORLOGWRITE) ΓòÉΓòÉΓòÉ
  11712.  
  11713. The function writes a entry into the error log. The function is only supported 
  11714. on a local computer. 
  11715.  
  11716. To correctly read the entries, use the NetMisc(NETERRORLOGREAD) function. The 
  11717. NET command line interface makes use of the OS/2 system and OS/2 LAN Server 
  11718. messages while formatting error log entries. The may cause log entries to 
  11719. appear differently from the actual content of the values inserted by this 
  11720. function. 
  11721.  
  11722. Syntax 
  11723.  
  11724.  
  11725. MyRc = NetMisc(NETERRORLOGWRITE, 'errInfo')
  11726.  
  11727. Parameters 
  11728.  
  11729. The parameters required and returned are: 
  11730.  
  11731.  'errInfo'   The error information control variable, which is divided into: 
  11732.  
  11733.                  errInfo.errcode 
  11734.  
  11735.                   The error code. The error code will be limited to 2 bytes (16 
  11736.                   bit) The default error code is 87 (invalid parameter) 
  11737.  
  11738.                  errInfo.component 
  11739.  
  11740.                   The name of the component reporting the error. If no value is 
  11741.                   specified the string 'REXX_PROCEDURE' will be used. The 
  11742.                   maximum length of this parameter is 15 characters 
  11743.  
  11744.                  errInfo.nstrings 
  11745.  
  11746.                   The number of text string to insert into the error message. 
  11747.                   The default is to insert 0 strings 
  11748.  
  11749.                  errInfo.string.n 
  11750.  
  11751.                   Error text message string number n, where variable n has a 
  11752.                   value from 1 to errInfo.nstrings. The maximum string length 
  11753.                   is limited to 260 bytes for each entry 
  11754.  
  11755.                   If errInfo.nstrings is specified, but no string is supplied 
  11756.                   the default text string 'REXX' will be inserted 
  11757.  
  11758.                  errInfo.rawdata 
  11759.  
  11760.                   The raw data available from the REXX procedure. It can 
  11761.                   contains a string of values that includes non printable 
  11762.                   characters 
  11763.  
  11764.                  errInfo.rawlength 
  11765.  
  11766.                   The length of the hexadecimal raw data. The default value is 
  11767.                   0 and the maximum length is 256 bytes 
  11768.  
  11769.  Example 
  11770.  
  11771.  
  11772.   /* Write error log entry on local computer */
  11773.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11774.   call LoadLsRxutFuncs
  11775.  
  11776.   NETERRORLOGWRITE  = 660
  11777.   errInfo.errcode   = 99
  11778.   errInfo.component = 'MY_PROC_1'
  11779.   errInfo.nstrings  = 2
  11780.   errInfo.string.1  = 'Error occurred in the function error handler'
  11781.   errInfo.string.2  = 'The server computer name was not specified'
  11782.   errInfo.rawdata   = ''
  11783.  
  11784.   do i=0 to 32
  11785.    errInfo.rawdata = errInfo.rawdata || D2C(i)
  11786.   end
  11787.  
  11788.   errInfo.rawlength = 32
  11789.  
  11790.   myRc = NetMisc(NETERRORLOGWRITE, 'errInfo')
  11791.  
  11792.   if myRc <> '0' then do
  11793.    say 'Got error from NetMisc() ' myRc
  11794.    exitRc = 9
  11795.   end
  11796.   else do
  11797.    say 'Log entry inserted to error log'
  11798.    exitRc = 0
  11799.   end
  11800.  
  11801.   call DropLsRxutFuncs
  11802.   call RxFuncDrop 'LoadLsRxutFuncs'
  11803.  
  11804.   exit exitRc
  11805.  
  11806.  Example Output 
  11807.  
  11808.  
  11809.   Log entry inserted to error log
  11810.  
  11811.  
  11812. ΓòÉΓòÉΓòÉ 13.9. NetMisc(NETMESSAGEBUFFERSEND) ΓòÉΓòÉΓòÉ
  11813.  
  11814. The functions sends a buffer of information to a registered messaging name. 
  11815.  
  11816. Syntax 
  11817.  
  11818.  
  11819. MyRc = NetMisc(NETMESSAGEBUFFERSEND, Message, toName, SrvName)
  11820.  
  11821. Parameters 
  11822.  
  11823. The parameters required are: 
  11824.  
  11825.  Message           The message string to be send 
  11826.  
  11827.                    For broadcast messages to the physical network, where toName 
  11828.                    points to "*" or to "domain (*)", the message can be no 
  11829.                    longer than 128 bytes (and is not guaranteed to be 
  11830.                    delivered). For messages sent to all message names on a 
  11831.                    domain, the limit is 128 bytes. 
  11832.  
  11833.                    Otherwise, the message can be any length, provided it does 
  11834.                    not exceed the maximum receivable message size for that 
  11835.                    computer, which is set with the 'sizmessbuf' parameter in 
  11836.                    IBMLAN.INI. The total size of 'sizmessbuf' can be divided 
  11837.                    among different messages, if messages are arriving at the 
  11838.                    same time. This reduces the actual size of any single 
  11839.                    message that can be received. In addition, the sizmessbuf 
  11840.                    parameter can accept only limited values. 
  11841.  
  11842.                    The function does not require the Messenger service to be 
  11843.                    started on a local computer. 
  11844.  
  11845.  toName            A string containing the name of the userid or application to 
  11846.                    receive the message. To broadcast a message to all 
  11847.                    requesters on the LAN, have the value of toName be an 
  11848.                    asterisk (*) wildcard. 
  11849.  
  11850.                    To broadcast a message to all users on a domain, have the 
  11851.                    value of toName be the domain name followed by an asterisk 
  11852.                    (*). 
  11853.  
  11854.                    A value must be supplied 
  11855.  
  11856.  SrvName           A remote server computer name if remote, otherwise '' 
  11857.  
  11858.  Example 
  11859.  
  11860.  
  11861.   /* Send a message */
  11862.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11863.   call LoadLsRxutFuncs
  11864.  
  11865.   NETMESSAGEBUFFERSEND = 530
  11866.   Message              = 'Server backup of user data has completed'
  11867.   toName               = 'ADMIN04'
  11868.   SrvName              = '\\ANYSRV01'
  11869.  
  11870.   myRc = NetMisc(NETMESSAGEBUFFERSEND, Message, toName, SrvName)
  11871.  
  11872.   if myRc <> '0' then do
  11873.    say 'Got error from NetMisc() ' myRc
  11874.    exitRc = 9
  11875.   end
  11876.   else do
  11877.    say 'Message sent successfully'
  11878.   end
  11879.  
  11880.   call DropLsRxutFuncs
  11881.   call RxFuncDrop 'LoadLsRxutFuncs'
  11882.  
  11883.   exit exitRc
  11884.  
  11885.  Example Output 
  11886.  
  11887.  
  11888.   Message sent successfully
  11889.  
  11890.  
  11891. ΓòÉΓòÉΓòÉ 13.10. NetMisc(NETMESSAGEFILESEND) ΓòÉΓòÉΓòÉ
  11892.  
  11893. The functions sends a file of information to a registered messaging name. 
  11894.  
  11895. Syntax 
  11896.  
  11897.  
  11898. MyRc = NetMisc(NETMESSAGEFILESEND, MessageFile, toName, SrvName)
  11899.  
  11900. Parameters 
  11901.  
  11902. The parameters required are: 
  11903.  
  11904.  MessageFile       The file to sent 
  11905.  
  11906.                    The value is a string containing the full path and the file 
  11907.                    name of the file to be sent. 
  11908.  
  11909.                    For broadcast messages to the physical network, where toName 
  11910.                    points to "*" or to "domain (*)", the messageFile can be no 
  11911.                    longer than 128 bytes (and is not guaranteed to be 
  11912.                    delivered). For messages sent to all message names on a 
  11913.                    domain, the limit is 128 bytes. 
  11914.  
  11915.                    Otherwise, the messageFile can be any length, provided it 
  11916.                    does not exceed the maximum receivable message size for that 
  11917.                    computer, which is set with the sizmessbuf parameter in 
  11918.                    IBMLAN.INI. The total size of sizmessbuf can be divided 
  11919.                    among different messages, if messages are arriving at the 
  11920.                    same time. This reduces the actual size of any single 
  11921.                    message that can be received. In addition, the sizmessbuf 
  11922.                    parameter can accept only limited values. 
  11923.  
  11924.                    The function does not require the Messenger service to be 
  11925.                    started on a local computer. 
  11926.  
  11927.  toName            A string containing the name of the userid or application to 
  11928.                    receive the message. To broadcast a message to all 
  11929.                    requesters on the LAN, have the value of toName be an 
  11930.                    asterisk (*) wildcard. 
  11931.  
  11932.                    To broadcast a message to all users on a domain, have the 
  11933.                    value of toName be the domain name followed by an asterisk 
  11934.                    (*). 
  11935.  
  11936.                    A value must be supplied 
  11937.  
  11938.  SrvName           A server computer name if remote, otherwise '' 
  11939.  
  11940.  Example 
  11941.  
  11942.  
  11943.   /* Sent a message from a file */
  11944.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11945.   call LoadLsRxutFuncs
  11946.  
  11947.   NETMESSAGEFILESEND = 540
  11948.   MessageFile        = 'C:\BACKUP.OK'
  11949.   toName             = 'ADMIN04'
  11950.   SrvName            = '\\ANYSRV01'
  11951.  
  11952.   myRc = NetMisc(NETMESSAGEFILESEND, MessageFile, toName, SrvName)
  11953.  
  11954.   if myRc <> '0' then do
  11955.    say 'Got error from NetMisc() ' myRc
  11956.    exitRc = 9
  11957.   end
  11958.   else do
  11959.    say 'Message from file sent successfully'
  11960.   end
  11961.  
  11962.   call DropLsRxutFuncs
  11963.   call RxFuncDrop 'LoadLsRxutFuncs'
  11964.  
  11965.   exit exitRc
  11966.  
  11967.  Example Output 
  11968.  
  11969.  
  11970.   Message from file sent successfully
  11971.  
  11972.  
  11973. ΓòÉΓòÉΓòÉ 13.11. NetMisc(NETMESSAGENAMEFWD) ΓòÉΓòÉΓòÉ
  11974.  
  11975. The function changes the message name table to forward messages to another 
  11976. messaging name. 
  11977.  
  11978. Syntax 
  11979.  
  11980.  
  11981. MyRc = NetMisc(NETMESSAGENAMEFWD, msgName, fwdAction, fwdName, SrvName)
  11982.  
  11983. Parameters 
  11984.  
  11985. The parameters required are: 
  11986.  
  11987.  msgName           A string specifying the name receiving messages 
  11988.  
  11989.  fwdAction         A integer specifying the action to take if name forwards 
  11990.                    messages to another name. If the value is nonzero, any 
  11991.                    previous forwarded name is deleted; if 0, any previous 
  11992.                    forwarded name is not deleted and an error is returned 
  11993.  
  11994.                    The default value is 0 
  11995.  
  11996.  fwdName           A string specifying the name to receive msgName forwarded 
  11997.                    messages 
  11998.  
  11999.  SrvName           A server computer name if remote otherwise '' 
  12000.  
  12001.  Example 
  12002.  
  12003.  
  12004.   /* Forward a message name */
  12005.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12006.   call LoadLsRxutFuncs
  12007.  
  12008.   NETMESSAGENAMEFWD = 560
  12009.   msgName           = 'ADMIN04'
  12010.   fwdAction         = 0
  12011.   fwdName           = 'USERID'
  12012.   SrvName           = ''  /* This local computer */
  12013.  
  12014.   myRc = NetMisc(NETMESSAGENAMEFWD, msgName, fwdAction, fwdName, SrvName)
  12015.  
  12016.   if myRc <> '0' then do
  12017.    say 'Got error from NetMisc() ' myRc
  12018.    exitRc = 9
  12019.   end
  12020.   else do
  12021.    say 'Message name forwarded successfully'
  12022.   end
  12023.  
  12024.   call DropLsRxutFuncs
  12025.   call RxFuncDrop 'LoadLsRxutFuncs'
  12026.  
  12027.   exit exitRc
  12028.  
  12029.  Example Output 
  12030.  
  12031.  
  12032.   Message name forwarded successfully
  12033.  
  12034.  
  12035. ΓòÉΓòÉΓòÉ 13.12. NetMisc(NETMESSAGENAMEUNFWD) ΓòÉΓòÉΓòÉ
  12036.  
  12037. The function stops forwarding of messages. 
  12038.  
  12039. Syntax 
  12040.  
  12041.  
  12042. MyRc = NetMisc(NETMESSAGENAMEUNFWD, msgName, SrvName)
  12043.  
  12044. Parameters 
  12045.  
  12046. The parameters required are: 
  12047.  
  12048.  msgName           The string specifying the userid name whose message 
  12049.                    forwarding is to be canceled. A value must be specified 
  12050.  
  12051.  SrvName           A server computer name if remote otherwise '' 
  12052.  
  12053.  Example 
  12054.  
  12055.  
  12056.   /* Un-Forward a message name */
  12057.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12058.   call LoadLsRxutFuncs
  12059.  
  12060.   NETMESSAGENAMEUNFWD = 570
  12061.   msgName             = 'ADMIN04'
  12062.   SrvName             = ''
  12063.  
  12064.   myRc = NetMisc(NETMESSAGENAMEUNFWD, msgName, SrvName)
  12065.  
  12066.   if myRc <> '0' then do
  12067.    say 'Got error from NetMisc() ' myRc
  12068.    exitRc = 9
  12069.   end
  12070.   else do
  12071.    say 'Message name un-forwarded successfully'
  12072.   end
  12073.  
  12074.   call DropLsRxutFuncs
  12075.   call RxFuncDrop 'LoadLsRxutFuncs'
  12076.  
  12077.   exit exitRc
  12078.  
  12079.  Example Output 
  12080.  
  12081.  
  12082.   Message name un-forwarded successfully
  12083.  
  12084.  
  12085. ΓòÉΓòÉΓòÉ 13.13. NetMisc(NETREMOTECOPY) ΓòÉΓòÉΓòÉ
  12086.  
  12087. Performs a remote file copy on a server. 
  12088.  
  12089. Syntax 
  12090.  
  12091.  
  12092. MyRc = NetMisc(NETREMOTECOPY, SrcPath, DestPath, 'VarInfo')
  12093.  
  12094. Parameters 
  12095.  
  12096. The parameters required and returned are: 
  12097.  
  12098.  SrcPath   The redirected source path 
  12099.  
  12100.  DestPath  The redirected destination path 
  12101.  
  12102.  'VarInfo' which is divided into: 
  12103.  
  12104.                VarInfo.openflags 
  12105.  
  12106.                 Controls the file open (a decimal value). 
  12107.  
  12108.                 The file open options defined as follows: 
  12109.  
  12110.                                  Bit   Meaning
  12111.                                  ---   -------
  12112.                                  0-1   Used if destpath exists.  If 0, the open fails; if 1,
  12113.                                        the file is appended; and if 2, the file is overwritten
  12114.  
  12115.                                  2-3   Reserved, with a value of 0.
  12116.  
  12117.                                  4     Used if destpath does not exist.  If 0, the open fails;
  12118.                                        if 1, the file is created
  12119.  
  12120.                                  5-15  Reserved, with a value of 0.
  12121.  
  12122.                 The value must be converted to decimal before the function 
  12123.                 call. The default value is 0x0012 which is equal to 18 in 
  12124.                 decimal 
  12125.  
  12126.                VarInfo.copyflags 
  12127.  
  12128.                 Controls the copy options expressed in decimal. 
  12129.  
  12130.                 File copy options defined as follows: 
  12131.  
  12132.                                  Bit   Meaning
  12133.                                  ---   -------
  12134.                                  0     If 1, destpath must be a file. If bit 0 is set to 1,
  12135.                                        bit 1 must be 0
  12136.  
  12137.                                  1     If 1, destpath must be a directory. If bit 1
  12138.                                        is set to 1, bit 0 must be 0
  12139.  
  12140.                                  2     If 0, destpath is opened in binary mode.  If 1,
  12141.                                        destpath is opened in text mode
  12142.  
  12143.                                  3     If 0, sourcepath is opened in binary mode.  If 1,
  12144.                                        sourcepath is opened in text mode
  12145.  
  12146.                                  4     If 1, all writes are verified
  12147.  
  12148.                                  5-15  Reserved.
  12149.  
  12150.                 The value must be converted to decimal before the function 
  12151.                 call. The default value is 0x0011 which is equal to 17 in 
  12152.                 decimal 
  12153.  
  12154.                VarInfo.ci_num_copied 
  12155.  
  12156.                 The number of files copied 
  12157.  
  12158.                VarInfo.ci_err_buf 
  12159.  
  12160.                 The string buffer containing error information of the copy 
  12161.                 operation 
  12162.  
  12163.  Example 
  12164.  
  12165.  
  12166.   /* Perform Net remote copy  */
  12167.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12168.   call LoadLsRxutFuncs
  12169.  
  12170.   NETREMOTECOPY = 670
  12171.   SrvName       = '\\KING_BALU'
  12172.   SrcPath       = 'Y:\CONFIG.SYL'
  12173.   DestPath      = 'Y:\CONFIG.BAC'
  12174.  
  12175.   VarInfo.openflags = x2d('0012')
  12176.   VarInfo.copyflags = x2d('0011')
  12177.  
  12178.   myRc = NetMisc(NETREMOTECOPY, SrcPath, DestPath, 'VarInfo', SrvName)
  12179.  
  12180.   if myRc <> '0' then do
  12181.    say 'Got error from NetMisc() ' myRc
  12182.    rcCode = 9
  12183.   end
  12184.   else do
  12185.    say 'Number files copied ' VarInfo.ci_num_copied
  12186.    say 'Error Information   ' VarInfo.ci_err_buf
  12187.    rcCode = 0
  12188.   end
  12189.  
  12190.   call DropLsRxutFuncs
  12191.   call RxFuncDrop 'LoadLsRxutFuncs'
  12192.  
  12193.   exit rcCode
  12194.  
  12195.  Example Output 
  12196.  
  12197.  
  12198.   Number files copied  1
  12199.   Error Information
  12200.  
  12201.  
  12202. ΓòÉΓòÉΓòÉ 13.14. NetMisc(NETREMOTEMOVE) ΓòÉΓòÉΓòÉ
  12203.  
  12204. Performs a remote file move on a server. 
  12205.  
  12206. Syntax 
  12207.  
  12208.  
  12209. MyRc = NetMisc(NETREMOTEMOVE, SrcPath, DestPath, 'VarInfo')
  12210.  
  12211. Parameters 
  12212.  
  12213. The parameters required and returned are: 
  12214.  
  12215.  SrcPath   The redirected source path 
  12216.  
  12217.  DestPath  The redirected destination path 
  12218.  
  12219.  'VarInfo' which is divided into: 
  12220.  
  12221.                VarInfo.openflags 
  12222.  
  12223.                 Controls the file open. The file open options are defined as 
  12224.                 follows: 
  12225.  
  12226.                                  Bit   Meaning
  12227.                                  ---   -------
  12228.                                  0-1   Used if destpath exists.  If 0, the open fails; if 1,
  12229.                                        the file is appended; and if 2, the file is overwritten.
  12230.  
  12231.                                  2-3   Reserved, with a value of 0.
  12232.  
  12233.                                  4     Used if destpath does not exist.  If 0, the open fails;
  12234.                                        if 1, the file is created.
  12235.  
  12236.                                  5-15  Reserved, with a value of 0.
  12237.  
  12238.                 The value must be converted to decimal before the function 
  12239.                 call. The default value is 0x0012 which is equal to 18 in 
  12240.                 decimal 
  12241.  
  12242.                VarInfo.moveflags 
  12243.  
  12244.                 Controls the move options, expressed in decimal. 
  12245.  
  12246.                 File move options defined as follows: 
  12247.  
  12248.                                  Bit   Meaning
  12249.                                  ---   -------
  12250.                                  0     If 1, destpath must be a file, and bit 1 must be 0.
  12251.  
  12252.                                  1     If 1, destpath must be a directory, and bit 0 must be 0.
  12253.  
  12254.                                  2-15  Reserved; the value of these bits must be 0.
  12255.  
  12256.                 The value must be converted to decimal before the function 
  12257.                 call. The default value is 0x0002 which is equal to 2 in 
  12258.                 decimal 
  12259.  
  12260.                VarInfo.mi_num_moved 
  12261.  
  12262.                 The number of files moved 
  12263.  
  12264.                VarInfo.mi_err_buf 
  12265.  
  12266.                 The string buffer containing error information of the move 
  12267.                 operation 
  12268.  
  12269.  Example 
  12270.  
  12271.  
  12272.   /* Some */
  12273.   /* Perform Net remote move  */
  12274.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12275.   call LoadLsRxutFuncs
  12276.  
  12277.   NETREMOTEMOVE = 690
  12278.   SrvName       = '\\KING_BALU'
  12279.   SrcPath       = 'Y:\CONFIG.ORG'
  12280.   DestPath      = 'Y:\OS2'
  12281.  
  12282.   VarInfo.openflags = x2d('0012')
  12283.   VarInfo.moveflags = x2d('0002')
  12284.  
  12285.   myRc = NetMisc(NETREMOTEMOVE, SrcPath, DestPath, 'VarInfo')
  12286.  
  12287.   if myRc <> '0' then do
  12288.    say 'Got error from NetMisc() ' myRc
  12289.    rcCode = 9
  12290.   end
  12291.   else do
  12292.    say 'Number files moved ' VarInfo.mi_num_moved
  12293.    say 'Error Information  ' VarInfo.mi_err_buf
  12294.    rcCode = 0
  12295.   end
  12296.  
  12297.   call DropLsRxutFuncs
  12298.   call RxFuncDrop 'LoadLsRxutFuncs'
  12299.  
  12300.   exit rcCode
  12301.  
  12302.  Example Output 
  12303.  
  12304.   /* some */
  12305.   Number files moved  1
  12306.   Error Information
  12307.  
  12308.  
  12309. ΓòÉΓòÉΓòÉ 13.15. NetMisc(NETREMOTETOD) ΓòÉΓòÉΓòÉ
  12310.  
  12311. Retrieves the remote time of the day from a remote server. 
  12312.  
  12313. Syntax 
  12314.  
  12315.  
  12316. MyRc = NetMisc(NETREMOTETOD, 'VarRet', SrvName)
  12317.  
  12318. Parameters 
  12319.  
  12320. The parameters required are: 
  12321.  
  12322.  'VarRet' variable, which is divided into: 
  12323.  
  12324.                        VarRet.tod_elapsedt 
  12325.  
  12326.                         The number of seconds that have elapsed since 1 January 
  12327.                         1970 
  12328.  
  12329.                        VarRet.tod_hours 
  12330.  
  12331.                         The current hour 
  12332.  
  12333.                        VarRet.tod_mins 
  12334.  
  12335.                         The current minute 
  12336.  
  12337.                        VarRet.tod_secs 
  12338.  
  12339.                         The current second 
  12340.  
  12341.                        VarRet.tod_hunds 
  12342.  
  12343.                         The current hundredths of a second 
  12344.  
  12345.                        VarRet.tod_msecs 
  12346.  
  12347.                         The current millisecond 
  12348.  
  12349.                        VarRet.tod_timezone 
  12350.  
  12351.                         The time zone of the server, calculated (in minutes) 
  12352.                         from the Greenwich mean time (GMT) zone 
  12353.  
  12354.                        VarRet.tod_tinterval 
  12355.  
  12356.                         The time interval for each tick of the clock 
  12357.                         represneted in 0.0001 seconds 
  12358.  
  12359.                        VarRet.tod_day 
  12360.  
  12361.                         The day of the month (1-31) 
  12362.  
  12363.                        VarRet.tod_month 
  12364.  
  12365.                         The month (1-12) 
  12366.  
  12367.                        VarRet.tod_year 
  12368.  
  12369.                         The year, starting with 0 
  12370.  
  12371.                        VarRet.tod_weekday 
  12372.  
  12373.                         The day of the week (0 means Sunday; 6 means Saturday) 
  12374.  
  12375.  SrvName           The server computer name 
  12376.  
  12377.  Example 
  12378.  
  12379.  
  12380.   /* Perform Net remote TOD  */
  12381.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12382.   call LoadLsRxutFuncs
  12383.  
  12384.   NETREMOTETOD = 700
  12385.   SrvName      = '\\KING_BALU'
  12386.  
  12387.   myRc = NetMisc(NETREMOTETOD, 'VarRet', SrvName)
  12388.  
  12389.   if myRc <> '0' then do
  12390.    say 'Got error from NetMisc() ' myRc
  12391.    rcCode = 9
  12392.   end
  12393.   else do
  12394.    say 'Seconds elaps            ' VarRet.tod_elapsedt
  12395.    say 'Current Hour             ' VarRet.tod_hours
  12396.    say 'Current Minute           ' VarRet.tod_mins
  12397.    say 'Current Second           ' VarRet.tod_secs
  12398.    say 'Current 1/100 sec        ' VarRet.tod_hunds
  12399.    say 'Current mSec             ' VarRet.tod_msecs
  12400.    say 'Timezone in minutes      ' VarRet.tod_timezone
  12401.    say 'Timer Tic in 1/10000 Secs' VarRet.tod_tinterval
  12402.    say 'Day                      ' VarRet.tod_day
  12403.    say 'Month                    ' VarRet.tod_month
  12404.    say 'Year                     ' VarRet.tod_year
  12405.    say 'Day of week              ' VarRet.tod_weekday
  12406.    rcCode = 0
  12407.   end
  12408.  
  12409.   call DropLsRxutFuncs
  12410.   call RxFuncDrop 'LoadLsRxutFuncs'
  12411.  
  12412.   exit rcCode
  12413.  
  12414.  Example Output 
  12415.  
  12416.  
  12417.   Seconds elaps             777749783
  12418.   Current Hour              17
  12419.   Current Minute            36
  12420.   Current Second            23
  12421.   Current 1/100 sec         66
  12422.   Current mSec              96781561
  12423.   Timezone in minutes       65535
  12424.   Timer Tic in 1/10000 Secs 310
  12425.   Day                       24
  12426.   Month                     8
  12427.   Year                      1994
  12428.   Day of week               3
  12429.  
  12430.  
  12431. ΓòÉΓòÉΓòÉ 13.16. NetMisc(NETSERVERADMINCMD) ΓòÉΓòÉΓòÉ
  12432.  
  12433. The function executes a program on a remote server. 
  12434.  
  12435. Syntax 
  12436.  
  12437.  
  12438. MyRc = NetMisc(NETSERVERADMINCMD, RunCommand, SrvName, 'ReturnValue')
  12439.  
  12440. Parameters 
  12441.  
  12442. The parameters required and returned are: 
  12443.  
  12444.  RunCommand        The command to be executed at the remote server 
  12445.  
  12446.  SrvName           The server computer name 
  12447.  
  12448.  'ReturnValue' which is divided into: 
  12449.  
  12450.                        ReturnValue.exitCode 
  12451.  
  12452.                         The program exit code 
  12453.  
  12454.                        ReturnValue.available 
  12455.  
  12456.                         The number of bytes available at the remote location 
  12457.  
  12458.                        ReturnValue.returned 
  12459.  
  12460.                         The number of bytes in the program output. This is 
  12461.                         limited to 4KB using the NetMisc(NETSERVERADMINCMD) 
  12462.                         function 
  12463.  
  12464.                        ReturnValue.output 
  12465.  
  12466.                         The program output. This is limited to 4KB in the 
  12467.                         NetMisc(NETSERVERADMINCMD) function 
  12468.  
  12469.  Example 
  12470.  
  12471.  
  12472.   /* Perform Net remote admin cmd  */
  12473.  
  12474.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12475.   call LoadLsRxutFuncs
  12476.  
  12477.   NETSERVERADMINCMD = 710
  12478.  
  12479.   RunCommand = 'DIR C:\'
  12480.   SrvName    = '\\KING_BALU'
  12481.  
  12482.   myRc = NetMisc(NETSERVERADMINCMD, RunCommand, SrvName, 'ReturnValue')
  12483.  
  12484.   if myRc <> '0' then do
  12485.    say 'Got error from NetMisc() ' myRc
  12486.    rcCode = 9
  12487.   end
  12488.   else do
  12489.    say 'Remote Exit code was           ' ReturnValue.exitCode
  12490.    say 'Returned Bytes are             ' ReturnValue.returned
  12491.    say 'Number bytes at remote location' ReturnValue.available
  12492.    say 'OutPut was'
  12493.    say  ReturnValue.output
  12494.    rcCode = 0
  12495.   end
  12496.  
  12497.   call DropLsRxutFuncs
  12498.   call RxFuncDrop 'LoadLsRxutFuncs'
  12499.  
  12500.   exit rcCode
  12501.  
  12502.  Example Output 
  12503.  
  12504.  
  12505.   Remote Exit code was            0
  12506.   Returned Bytes are              1159
  12507.   Number bytes at remote location 1159
  12508.   OutPut was
  12509.  
  12510.    The volume label in drive C is OS2.
  12511.    The Volume Serial Number is A69B:F814
  12512.    Directory of C:\
  12513.  
  12514.    8-24-94   1:39p     <DIR>           0  .
  12515.    8-24-94   1:39p     <DIR>           0  ..
  12516.    8-23-94  10:33a       311           0  AUTOEXEC.BAT
  12517.  
  12518.    and many more lines
  12519.  
  12520.  
  12521. ΓòÉΓòÉΓòÉ 13.17. NetMisc(NETUSERDCDBINIT) ΓòÉΓòÉΓòÉ
  12522.  
  12523. The function initializes the domain control database for the specified userid 
  12524. and replaces any existing userid specific domain controller database files with 
  12525. empty database files. 
  12526.  
  12527. Syntax 
  12528.  
  12529.  
  12530. MyRc = NetMisc(NETUSERDCDBINIT, Userid, SrvName)
  12531.  
  12532. Parameters 
  12533.  
  12534. The parameters required and returned are: 
  12535.  
  12536.  Userid            The userid name 
  12537.  
  12538.  SrvName           The computer name of the Domain Controller 
  12539.  
  12540.  Example 
  12541.  
  12542.  
  12543.   /* Some */
  12544.   /* Reset DCDB information for a userid */
  12545.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12546.   call LoadLsRxutFuncs
  12547.  
  12548.   NETUSERDCDBINIT = 720
  12549.   UserID          = 'THE_USER_ID'
  12550.   SrvName         = '\\KING_BALU'
  12551.  
  12552.   myRc = NetMisc(NETUSERDCDBINIT, Userid, SrvName)
  12553.  
  12554.   if myRc <> '0' then do
  12555.    say 'Got error from NetMisc() ' myRc
  12556.    exitRc = 9
  12557.   end
  12558.   else do
  12559.    say 'DCDB initialized successfully'
  12560.    say
  12561.    exitRc = 0
  12562.   end
  12563.  
  12564.   call DropLsRxutFuncs
  12565.   call RxFuncDrop 'LoadLsRxutFuncs'
  12566.  
  12567.   exit exitRc
  12568.  
  12569.  Example Output 
  12570.  
  12571.  
  12572.   DCDB initialized successfully
  12573.  
  12574.  
  12575. ΓòÉΓòÉΓòÉ 13.18. NetMisc(NETUSERVALIDATE2) ΓòÉΓòÉΓòÉ
  12576.  
  12577. The function validates a user account with its password, and checks whether 
  12578. there are any logon restrictions for this user account. If the specified user 
  12579. account is not found, this function attempts to validate the guest account, 
  12580. instead. If this happens, all verification checks will be based only on the 
  12581. guest account. 
  12582.  
  12583. Syntax 
  12584.  
  12585.  
  12586. MyRc = NetMisc(NETUSERVALIDATE2, 'userInfo', userId, passWord, DcName)
  12587.  
  12588. Parameters 
  12589.  
  12590. The parameters returned are: 
  12591.  
  12592.  'userInfo'        The REXX variable receiving the result. The variable is 
  12593.                    divided into: 
  12594.  
  12595.                        userInfo.code 
  12596.  
  12597.                         The response from the function call, according to the 
  12598.                         following values: 
  12599.  
  12600.                                                 Value Meaning
  12601.                                                 ----- -------
  12602.                                                 0     No errors were encountered
  12603.  
  12604.                                                 5     The username and password do not
  12605.                                                       correspond to an active account
  12606.  
  12607.                                                 2217  The logon server could not validate
  12608.                                                       the logon
  12609.  
  12610.                                                 2240  The user is not allowed to log on from
  12611.                                                       this requester
  12612.  
  12613.                                                 2241  The user is not allowed to log on at
  12614.                                                       this time
  12615.  
  12616.                                                 2242  The password has expired
  12617.  
  12618.                        userInfo.priv 
  12619.  
  12620.                         The user account privilege level. The following values 
  12621.                         are returned: 
  12622.  
  12623.                                                 Value Meaning
  12624.                                                 ----- -------
  12625.                                                  0    Guest
  12626.  
  12627.                                                  1    User
  12628.  
  12629.                                                  2    Administrator
  12630.  
  12631.  userId            The user account name 
  12632.  
  12633.  passWord          The password for the user account 
  12634.  
  12635.  DcName            The computer name of a domain controller 
  12636.  
  12637.  Example 
  12638.  
  12639.  
  12640.   /* Net User Validate2 */
  12641.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12642.   call LoadLsRxutFuncs
  12643.  
  12644.   NETUSERVALIDATE2 = 500
  12645.   UserId          = 'USER04'
  12646.   passWord        = 'PASSWORD'
  12647.   DcName          = '\\ANYSRV01'
  12648.  
  12649.   myRc = NetMisc(NETUSERVALIDATE2, 'userInfo', Userid, passWord, DcName)
  12650.  
  12651.   if myRc <> '0' then do
  12652.    say 'Got error from NetMisc() ' myRc
  12653.    exitRc = 9
  12654.   end
  12655.   else do
  12656.    say 'Userid validated successfully'
  12657.    say 'Function code' userInfo.code
  12658.    say 'Privilege    ' userInfo.priv
  12659.    exitRc = 0
  12660.   end
  12661.  
  12662.   call DropLsRxutFuncs
  12663.   call RxFuncDrop 'LoadLsRxutFuncs'
  12664.  
  12665.   exit exitRc
  12666.  
  12667.  Example Output 
  12668.  
  12669.  
  12670.   Userid validated successfully
  12671.   Function code  0
  12672.   Privilege      1
  12673.  
  12674.  
  12675. ΓòÉΓòÉΓòÉ 14. NetSetInfo ΓòÉΓòÉΓòÉ
  12676.  
  12677. The Net Set Information functions are a family of functions that can be called 
  12678. with a number of parameters. The use of the NetSetInfo() has minimum of two 
  12679. different parameters. The generic syntax is: 
  12680.  
  12681.  
  12682. MyRc = NetSetInfo(option, stemvar, parm1, parm2, parm3)
  12683. MyRc = NetSetInfo(option, parm1, parm2, parm3)
  12684.  
  12685. The option parameter contains a value to determine what type or option has to 
  12686. be set. 
  12687.  
  12688. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  12689.  
  12690. The MyRc parameter is the return code that will have an value from the 
  12691. NetSetInfo() function. If the call is successful the character '0' will be 
  12692. returned. Otherwise an error code and descriptive text are inserted by 
  12693. NetSetInfo() function. 
  12694.  
  12695. The option parameter values are defined in Option parameter values. 
  12696.  
  12697.  
  12698. ΓòÉΓòÉΓòÉ 14.1. NETACCESS Set Info ΓòÉΓòÉΓòÉ
  12699.  
  12700. The function modifies one or more access control profiles for an existing 
  12701. access control list for a resource. 
  12702.  
  12703. Syntax 
  12704.  
  12705.  
  12706. MyRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
  12707.  
  12708. Parameters 
  12709.  
  12710. The parameters required are: 
  12711.  
  12712.  'ModifyACL'    The REXX variable holding the values. The variable is divided 
  12713.                 into: 
  12714.  
  12715.                     ModifyACL.audit 
  12716.  
  12717.                      The auditing flags. The flags are defined as follows: 
  12718.  
  12719.                        -  A  Audit all. When this bit is set, all access 
  12720.                           attempts will be audited. 
  12721.  
  12722.                        -  O  If O, audit successful file opens. 
  12723.  
  12724.                        -  W  If W, audit successful file writes and successful 
  12725.                           directory creates. 
  12726.  
  12727.                        -  D  If D, audit successful file deletes or truncates 
  12728.                           and successful directory deletes. 
  12729.  
  12730.                        -  P  If P, audit successful file and directory access 
  12731.                           control profile change. 
  12732.  
  12733.                        -  o  If o, audit failed file opens. 
  12734.  
  12735.                        -  w  If w, audit failed file writes and failed 
  12736.                           directory creates. 
  12737.  
  12738.                        -  d  If d, audit failed file deletes or truncates and 
  12739.                           failed directory deletes. 
  12740.  
  12741.                        -  p  If d, audit failed file and directory access 
  12742.                           control profile change. 
  12743.  
  12744.                        -  N or -none-  No auditing is performed. 
  12745.  
  12746.                      If no value is specied or ModifyACL.audit is not defined, 
  12747.                      existing auditing flags are not modified 
  12748.  
  12749.                     ModifyACL.count 
  12750.  
  12751.                      The number of access controls available for the resource. 
  12752.                      The value can be 0 or undefined. In this case access 
  12753.                      control profiles are not modified 
  12754.  
  12755.                     ModifyACL.i.ugname 
  12756.  
  12757.                      The user account or group name. The variable i has a value 
  12758.                      from 1 to ModifyACL.count 
  12759.  
  12760.                     ModifyACL.i.access 
  12761.  
  12762.                      The access control profile. The variable i is specified as 
  12763.                      above. The access control flags are as follows: 
  12764.  
  12765.                        -  N None 
  12766.  
  12767.                        -  A Attribute 
  12768.  
  12769.                        -  R Read 
  12770.  
  12771.                        -  W Write 
  12772.  
  12773.                        -  C Create 
  12774.  
  12775.                        -  X Execute 
  12776.  
  12777.                        -  D Delete 
  12778.  
  12779.                        -  P Permissions 
  12780.  
  12781.                        -  G This is a Group permission. The G parameter is not 
  12782.                           required to be specified 
  12783.  
  12784.  SrvName        The server computer name 
  12785.  
  12786.  resourceName   The resource name must be specified in the name format as 
  12787.                 described below: 
  12788.  
  12789.                                 Resource Type                 Name Format
  12790.                                 -------------                 -----------
  12791.                                 Drive                         drive:
  12792.                                 Path                          \path
  12793.                                 Directory                     drive:pathname
  12794.                                 File                          drive:pathname
  12795.                                 UNC                           \\server\sharename\path
  12796.                                 Pipe                          \pipe\pipename
  12797.                                 Spooler Queue                 \print\queuename
  12798.                                 Serial Device Queue           \comm\chardevqueue
  12799.  
  12800.  Note 
  12801.  
  12802.  The server computer name can be specified as '' for a local server. 
  12803.  
  12804.  Example 
  12805.  
  12806.  
  12807.   /* Modify existing Access Control Entry */
  12808.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12809.   call LoadLsRxutFuncs
  12810.  
  12811.   NETACCESS = 10
  12812.   SrvName = '\\ILIDC'
  12813.   resourceName = 'D:\APPS\TEMP'
  12814.   ModifyACL.count = 1
  12815.   ModifyACL.1.ugname = 'CSUSERS'
  12816.   ModifyACL.1.access = 'RWCD'
  12817.  
  12818.   myRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
  12819.  
  12820.   if myRc <> '0' then do
  12821.    say 'Got error from NetSetInfo() ' myRc
  12822.    call DropLsRxutFuncs
  12823.    exit 9
  12824.   end
  12825.   else do
  12826.    say
  12827.    say "Access Control Profile modified successfully"
  12828.   end
  12829.  
  12830.   call DropLsRxutFuncs
  12831.   call RxFuncDrop 'LoadLsRxutFuncs'
  12832.  
  12833.   exit 0
  12834.  
  12835.  Example Output 
  12836.  
  12837.  
  12838.   Access Control Profile modified successfully
  12839.  
  12840.  
  12841. ΓòÉΓòÉΓòÉ 14.2. NETALIAS Set Info ΓòÉΓòÉΓòÉ
  12842.  
  12843. The function modifies a certain alias definition parameter value. 
  12844.  
  12845. Syntax 
  12846.  
  12847.  
  12848. MyRc = NetSetInfo(NETALIAS, 'PARAMETER', parmValue, SrvName, AliasName)
  12849.  
  12850. Parameters 
  12851.  
  12852. The parameters required are: 
  12853.  
  12854.  'PARAMETER'       The parameter name of the alias value to be modified. The 
  12855.                    parameter values that causes a change of the alias 
  12856.                    definitions are specified below. Only one parameter value 
  12857.                    can be changed at a time. If the parameter is invalid or the 
  12858.                    parameter value is unknown or in error no changes will 
  12859.                    occur. 
  12860.  
  12861.                        remark 
  12862.  
  12863.                         The alias comment or remark 
  12864.  
  12865.                        server 
  12866.  
  12867.                         The location where the resource described by this alias 
  12868.                         resides. This parameter is only valid from the version 
  12869.                         4.0 of the LSRXUT.DLL 
  12870.  
  12871.                        mode 
  12872.  
  12873.                         When the alias is shared. Accepted values are: 
  12874.  
  12875.                                                 When shared                   Shared mode name
  12876.                                                 -----------                   ----------------
  12877.                                                 At server startup             'At server startup'
  12878.                                                                               'STARTUP'
  12879.  
  12880.                                                 Shared by adminstrator        'By administrator'
  12881.                                                                               'BYADMIN'
  12882.  
  12883.                                                 Shared by request to use      'At Requester use'
  12884.                                                                               'DYNAMIC'
  12885.  
  12886.                        maxuses 
  12887.  
  12888.                         The maximum number of users who can have redirection to 
  12889.                         the resource identified by this alias 
  12890.  
  12891.                        path 
  12892.  
  12893.                         The path for files alias only 
  12894.  
  12895.                        priority 
  12896.  
  12897.                         The serial device priority 
  12898.  
  12899.                        device_pool 
  12900.  
  12901.                         The serial device pool 
  12902.  
  12903.  parmValue         The value of the parameter that is being modified 
  12904.  
  12905.  SrvName           The server computer name. In this case the computer name of 
  12906.                    the domain controller 
  12907.  
  12908.  AliasName         The name of the alias 
  12909.  
  12910.  Note 
  12911.  
  12912.  The server computer name can be specified as '' for a local domain controller. 
  12913.  
  12914.  Example 
  12915.  
  12916.  
  12917.   /* Modify existing Alias remark, maxuses and share mode */
  12918.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12919.   call LoadLsRxutFuncs
  12920.  
  12921.   NETALIAS  = 20
  12922.   SrvName   = '\\ILIDC'
  12923.   AliasName = 'BOOKS'
  12924.   aliasInfo.remark  = 'Modified Alias for more uses'
  12925.   aliasInfo.maxuses = 280
  12926.   aliasInfo.mode    = 'At Requester use'
  12927.  
  12928.   myRc = NetSetInfo(NETALIAS, 'remark', aliasInfo.remark, SrvName, AliasName)
  12929.  
  12930.   if myRc <> '0' then do
  12931.    say 'Got error from NetSetInfo() ' myRc
  12932.    call DropLsRxutFuncs
  12933.    exit 9
  12934.   end
  12935.  
  12936.   myRc = NetSetInfo(NETALIAS, 'maxuses', aliasInfo.maxuses, SrvName, AliasName)
  12937.  
  12938.   if myRc <> '0' then do
  12939.    say 'Got error from NetSetInfo() ' myRc
  12940.    call DropLsRxutFuncs
  12941.    exit 9
  12942.   end
  12943.  
  12944.   myRc = NetSetInfo(NETALIAS, 'mode', aliasInfo.mode, SrvName, AliasName)
  12945.  
  12946.   if myRc <> '0' then do
  12947.    say 'Got error from NetSetInfo() ' myRc
  12948.    call DropLsRxutFuncs
  12949.    exit 9
  12950.   end
  12951.   else do
  12952.    say
  12953.    say "Alias definition modified successfully"
  12954.   end
  12955.  
  12956.   call DropLsRxutFuncs
  12957.   call RxFuncDrop 'LoadLsRxutFuncs'
  12958.  
  12959.   exit 0
  12960.  
  12961.  Example Output 
  12962.  
  12963.  
  12964.   Alias definition modified successfully
  12965.  
  12966.  
  12967. ΓòÉΓòÉΓòÉ 14.3. NETAPP Set Info ΓòÉΓòÉΓòÉ
  12968.  
  12969. The function modifies one of the application definition parameter values. 
  12970.  
  12971. Syntax 
  12972.  
  12973.  
  12974. MyRc = NetSetInfo(NETAPP, 'PARAMETER', parmValue, SrvName, AppName, UserId)
  12975.  
  12976. Parameters 
  12977.  
  12978. The parameters required are: 
  12979.  
  12980.  'PARAMETER'       The parameter name of the application value to be modified. 
  12981.                    The parameter values that causes a change of the alias 
  12982.                    definitions are specified below. Only one parameter value 
  12983.                    can be changed at a time. If the parameter is invalid or the 
  12984.                    parameter value is unknown or in error no changes will 
  12985.                    occour. 
  12986.  
  12987.                        remark 
  12988.  
  12989.                         The application remark 
  12990.  
  12991.                        command 
  12992.  
  12993.                         The command that starts the application 
  12994.  
  12995.                        command_parms 
  12996.  
  12997.                         The application start parameters 
  12998.  
  12999.  parmValue         The value of the parameter that is being modified 
  13000.  
  13001.  SrvName           The server computer name. In this case the computer name of 
  13002.                    the domain controller 
  13003.  
  13004.  AppName           The name of the application 
  13005.  
  13006.  UserId            The Userid must be specified for private application. For 
  13007.                    public applications use the value '' 
  13008.  
  13009.  Note 
  13010.  
  13011.  The server computer name can be specified as '' for a local domain controller. 
  13012.  
  13013.  Example 
  13014.  
  13015.  
  13016.   /* Modify existing Public application remark */
  13017.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13018.   call LoadLsRxutFuncs
  13019.  
  13020.   NETAPP  = 30
  13021.   SrvName = '\\ILIDC'
  13022.   AppName = 'BOOKREAD'
  13023.   UserId  = ''
  13024.   appInfo.remark  = 'IBM BookManager Read/2 1.2.1'
  13025.  
  13026.   myRc = NetSetInfo(NETAPP, 'remark', appInfo.remark, SrvName, AppName, UserId)
  13027.  
  13028.   if myRc <> '0' then do
  13029.    say 'Got error from NetSetInfo() ' myRc
  13030.    call DropLsRxutFuncs
  13031.    exit 9
  13032.   end
  13033.   else do
  13034.    say
  13035.    say "Application remark modified successfully"
  13036.   end
  13037.  
  13038.   call DropLsRxutFuncs
  13039.   call RxFuncDrop 'LoadLsRxutFuncs'
  13040.  
  13041.   exit 0
  13042.  
  13043.  Example Output 
  13044.  
  13045.  
  13046.   Application remark modified successfully
  13047.  
  13048.  
  13049. ΓòÉΓòÉΓòÉ 14.4. NETDASD Set Info (LS40) ΓòÉΓòÉΓòÉ
  13050.  
  13051. The function modifies a directory limit parameter. 
  13052.  
  13053. Syntax 
  13054.  
  13055.  
  13056. MyRc = NetSetInfo(NETDASD, 'PARAMETER', parmValue, SrvName, DirPath, Flag)
  13057.  
  13058. Parameters 
  13059.  
  13060. The parameters required are: 
  13061.  
  13062.  'PARAMETER'   The parameter name of the directory limit value to be modified. 
  13063.                The parameter values that causes a change of the directory limit 
  13064.                definitions are specified below. Only one parameter value can be 
  13065.                changed at a time. If the parameter is invalid or the parameter 
  13066.                value is unknown or in error no changes will occour. 
  13067.  
  13068.                    max 
  13069.  
  13070.                     The amount of disk space allotted to this directory by 
  13071.                     directory limits. Specified in KB, this field can be set 
  13072.                     from 1 to 67108863. Note however, that subsequent access to 
  13073.                     the directory specified is functionally limited to the 
  13074.                     smaller of the following: 
  13075.  
  13076.                       1. Any directory limits restrictions on any parent 
  13077.                          directory 
  13078.  
  13079.                       2. The total free space on the drive 
  13080.  
  13081.                    thresh 
  13082.  
  13083.                     The initial alert threshold as a percentage of the total 
  13084.                     directory limit space allotted, with values ranging from 0 
  13085.                     to 99. Zero specifies that no threshold alert is to be 
  13086.                     generated, and 99 specifies that an alert is generated when 
  13087.                     99% of the allotted directory limit for this directory has 
  13088.                     been reached. Note that a minimum of 1KB of disk space must 
  13089.                     be allotted to a threshold; the value obtained by 
  13090.                     multiplying the DASDInfo.thresh decimal-point value (where 
  13091.                     5% is equal to 0.05) by DASDInfo.max must be at least 1KB. 
  13092.  
  13093.                     This threshold setting generates only 1 alert when this 
  13094.                     boundary is crossed. Subsequent alerts (generated 
  13095.                     incrementally after this threshold has been reached but 
  13096.                     before the entire limit is reached) are specified according 
  13097.                     to the DASDInfo.delta parameter 
  13098.  
  13099.                    delta 
  13100.  
  13101.                     The increment in which alerts are to be generated after the 
  13102.                     DASDInfo.thresh threshold has been crossed, but before all 
  13103.                     of the allotted disk space has been used. This parameter 
  13104.                     also is specified as a percentage of the total allotted 
  13105.                     directory limit space and can range from 0 upward, as long 
  13106.                     as its value is less than 99 - DASDInfo.thresh. 
  13107.  
  13108.                     Note that a minimum of 1KB of disk space must be allotted 
  13109.                     to an increment; the value obtained by multiplying the 
  13110.                     DASDInfo.delta decimal-point value (where 5% is equal to 
  13111.                     0.05) by DASDInfo.max must be at least 1KB 
  13112.  
  13113.  parmValue     The value of the parameter that is being modified 
  13114.  
  13115.  SrvName       The server computer name 
  13116.  
  13117.  DirPath       The directory path specification 
  13118.  
  13119.  Flag          A flag controlling the operations when a directory limit is 
  13120.                added The following values are valid: 
  13121.  
  13122.                               Value Meaning
  13123.                               ----- -------
  13124.                                0    Compares a newly specified limit to the amount
  13125.                                     of disk space already taken by the directory.
  13126.                                     If the directory tree size exceeds the new limit,
  13127.                                     NERR_MaxValidationFailed (2304) is returned
  13128.  
  13129.                                1    Sets the new limit regardless of the present
  13130.                                     size of the directory tree
  13131.  
  13132.  Note 
  13133.  
  13134.  The server computer name can be specified as '' for a local server. 
  13135.  
  13136.  Example 
  13137.  
  13138.  
  13139.   /* Set new DASD directory limit maximum size */
  13140.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13141.   call LoadLsRxutFuncs
  13142.  
  13143.   NETDASD             = 750
  13144.   parameter           = 'max'
  13145.   parmValue           = 512
  13146.   SrvName             = '\\DOMAIN_CONTRLR'
  13147.   DirPath             = 'D:\APPS\DATA'
  13148.   Flag                = 1
  13149.  
  13150.   myRc = NetSetInfo(NETDASD, parameter, parmValue, SrvName, DirPath, Flag)
  13151.  
  13152.   if myRc <> '0' then do
  13153.    say 'Got error from NetSetInfo() ' myRc
  13154.    exitRc = 9
  13155.   end
  13156.   else do
  13157.    say 'Directory Limit set successfully'
  13158.    exitRc = 0
  13159.   end
  13160.  
  13161.   call DropLsRxutFuncs
  13162.   call RxFuncDrop 'LoadLsRxutFuncs'
  13163.  
  13164.   exit exitRc
  13165.  
  13166.  Example Output 
  13167.  
  13168.  
  13169.   Directory Limit set successfully
  13170.  
  13171.  
  13172. ΓòÉΓòÉΓòÉ 14.5. NETEXPIREPASSWORD Expire password ΓòÉΓòÉΓòÉ
  13173.  
  13174. The function expires a password for a userid. 
  13175.  
  13176. Syntax 
  13177.  
  13178.  
  13179. MyRc = NetSetInfo(NETEXPIREPASSWORD, SrvName, UserId)
  13180.  
  13181. Parameters 
  13182.  
  13183. The parameters specified are: 
  13184.  
  13185.  SrvName           The computer name of the domain controller 
  13186.  
  13187.  UserId            The userid to expire password on 
  13188.  
  13189.  Note 
  13190.  
  13191.  The server computer name can be specified as '' for a local domain controller. 
  13192.  
  13193.  Example 
  13194.  
  13195.  
  13196.   /* Expire password for a userid */
  13197.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13198.   call LoadLsRxutFuncs
  13199.  
  13200.   NETEXPIREPASSWORD = 400
  13201.   DcName            = '\\ILIDC'
  13202.   Userid            = 'DEPT001'
  13203.  
  13204.   myRc = NetSetInfo(NETEXPIREPASSWORD, DcName, Userid)
  13205.  
  13206.   if myRc <> '0' then do
  13207.    say 'Got error from NetSetInfo() ' myRc
  13208.    call DropLsRxutFuncs
  13209.    exit 9
  13210.   end
  13211.  
  13212.   say 'Password expired successfully for ' Userid
  13213.  
  13214.   call DropLsRxutFuncs
  13215.   call RxFuncDrop 'LoadLsRxutFuncs'
  13216.  
  13217.   exit 0
  13218.  
  13219.  Example Output 
  13220.  
  13221.  
  13222.   Password expired successfully for  DEPT001
  13223.  
  13224.  
  13225. ΓòÉΓòÉΓòÉ 14.6. NETGROUP Set Info ΓòÉΓòÉΓòÉ
  13226.  
  13227. The function modifies the comment field of a group definition. 
  13228.  
  13229. Syntax 
  13230.  
  13231.  
  13232. MyRc = NetSetInfo(NETGROUP, 'PARAMETER', parmValue, SrvName, GroupName)
  13233.  
  13234. Parameters 
  13235.  
  13236. The parameters required are: 
  13237.  
  13238.  'PARAMETER'       The parameter name of the group definition to be modified. 
  13239.                    If the parameter is invalid or the parameter value is 
  13240.                    unknown or in error no changes will occour. 
  13241.  
  13242.                        comment 
  13243.  
  13244.                         The group comment 
  13245.  
  13246.  parmValue         The value of the parameter that is being modified 
  13247.  
  13248.  SrvName           The server computer name. In this case the computer name of 
  13249.                    the domain controller 
  13250.  
  13251.  GroupName         The name of the group 
  13252.  
  13253.  Note 
  13254.  
  13255.  The server computer name can be specified as '' for a local domain controller. 
  13256.  
  13257.  Example 
  13258.  
  13259.  
  13260.   /* Modify a Group comment */
  13261.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13262.   call LoadLsRxutFuncs
  13263.  
  13264.   NETGROUP  = 70
  13265.   SrvName   = '\\FSC30DC0'
  13266.   GroupName = 'ALLGROUP'
  13267.   grpInfo.comment  = 'The New Group for Department Managers'
  13268.  
  13269.   myRc = NetSetInfo(NETGROUP, 'comment', grpInfo.comment, SrvName, GroupName)
  13270.  
  13271.   if myRc <> '0' then do
  13272.    say 'Got error from NetSetInfo() ' myRc
  13273.    call DropLsRxutFuncs
  13274.    exit 9
  13275.   end
  13276.   else do
  13277.    say
  13278.    say "Group comment modified successfully"
  13279.   end
  13280.  
  13281.   call DropLsRxutFuncs
  13282.   call RxFuncDrop 'LoadLsRxutFuncs'
  13283.  
  13284.   exit 0
  13285.  
  13286.  Example Output 
  13287.  
  13288.  
  13289.   Group comment modified successfully
  13290.  
  13291.  
  13292. ΓòÉΓòÉΓòÉ 14.7. NETGROUPUSERS Set Info ΓòÉΓòÉΓòÉ
  13293.  
  13294. The function sets the user accounts belonging to a group. 
  13295.  
  13296. Syntax 
  13297.  
  13298.  
  13299. MyRc = NetSetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  13300.  
  13301. Parameters 
  13302.  
  13303. The parameters required are: 
  13304.  
  13305.  'groupInfo'       The REXX variable describing the userids belonging to a 
  13306.                    group 
  13307.  
  13308.                        groupInfo.count 
  13309.  
  13310.                         The number of the user accounts 
  13311.  
  13312.                        groupInfo.i.userid 
  13313.  
  13314.                         The user account name entry i 
  13315.  
  13316.  SrvName           The computer name of the domain controller 
  13317.  
  13318.  GroupName         The name of the group 
  13319.  
  13320.  Note 
  13321.  
  13322.  The server computer name can be specified as '' for a local domain controller. 
  13323.  
  13324.  Example 
  13325.  
  13326.  
  13327.   /* Set user accounts into a group */
  13328.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13329.   call LoadLsRxutFuncs
  13330.  
  13331.   NETGROUPUSERS = 340
  13332.   SrvName  = '\\DOMAIN_CONTRLR'
  13333.   groupName= 'GROUPA'
  13334.  
  13335.   groupInfo.count = 3
  13336.   groupInfo.1.userid = 'USERID'
  13337.   groupInfo.2.userid = 'ADMINISTRATOR'
  13338.   groupInfo.3.userid = 'THE2'
  13339.  
  13340.   myRc = NetSetInfo(NETGROUPUSERS, 'groupInfo', SrvName, groupName)
  13341.  
  13342.   if myRc <> '0' then do
  13343.    say 'Got error from NetSetInfo() ' myRc
  13344.    exitRc = 9
  13345.   end
  13346.   else do
  13347.    say 'User accounts successfully added to group'
  13348.   end
  13349.  
  13350.   call DropLsRxutFuncs
  13351.   call RxFuncDrop 'LoadLsRxutFuncs'
  13352.  
  13353.   exit exitRc
  13354.  
  13355.  Example Output 
  13356.  
  13357.  
  13358.   User accounts successfully added to group
  13359.  
  13360.  
  13361. ΓòÉΓòÉΓòÉ 14.8. NETHOMEDIR Set Info ΓòÉΓòÉΓòÉ
  13362.  
  13363. The function modifies a home directory definition. 
  13364.  
  13365. Syntax 
  13366.  
  13367.  
  13368. MyRc = NetSetInfo(NETHOMEDIR, dcName, userId, homeDir)
  13369.  
  13370. Parameters 
  13371.  
  13372. The parameters required are: 
  13373.  
  13374.  dcName            The computer name of the domain controller 
  13375.  
  13376.  userId            The name of the userid 
  13377.  
  13378.  homeDir           The home directory specification. It must respect one of the 
  13379.                    following rules: 
  13380.  
  13381.                      1. homeDir is set to a none value, the home directory is 
  13382.                         removed 
  13383.  
  13384.                      2. a drive assignment is required, the homeDir value must 
  13385.                         include: 
  13386.  
  13387.  
  13388.                                                   x:\machineID\Y$\pathname
  13389.                                                   !  !         !  !
  13390.                                                   !  !         !  The path to the home directory
  13391.                                                   !  !         The drive on the server holding the home directory
  13392.                                                   !  The computer name of the server
  13393.                                                   The drive to be assigned
  13394.  
  13395.                         For example, the userid home directory has to be 
  13396.                         located on the server FILESRV on drive D and directory 
  13397.                         \FILES\USERID. The userid will have the home directory 
  13398.                         assigned as the Y drive. This requires the following 
  13399.                         definition of the home directory: 
  13400.  
  13401.                                                 Y:\FILESRV\D$\FILES\USERID
  13402.  
  13403.                      3. a drive assignment is not required, the homeDir value 
  13404.                         must include: 
  13405.  
  13406.  
  13407.                                                   \\machineID\Y$\pathname
  13408.                                                     !         !  !
  13409.                                                     !         !  The path to the home directory
  13410.                                                     !         The drive on the server holding the home directory
  13411.                                                     The computer name of the server
  13412.  
  13413.                         For example, the userid home directory has to be 
  13414.                         located on the server THESRV on drive F and directory 
  13415.                         \FILES\USERS\SHARED. The userid will have the home 
  13416.                         directory assigned as the first free drive. This 
  13417.                         requires the following definition of the home 
  13418.                         directory: 
  13419.  
  13420.                                                 \\THESRV\F$\FILES\USERS\SHARED
  13421.  
  13422.  Note 
  13423.  
  13424.  The dcName can be specified as '' for a local domain controller. 
  13425.  
  13426.  The administrator is responsible for the following: 
  13427.  
  13428.    1. Making sure the home directory exist 
  13429.  
  13430.    2. Creating required access to the directory 
  13431.  
  13432.    3. Removing a home directory if required 
  13433.  
  13434.  Example 
  13435.  
  13436.  
  13437.   /* Set a home director for a userid */
  13438.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13439.   call LoadLsRxutFuncs
  13440.  
  13441.   NETHOMEDIR = 230
  13442.   dcName     = '\\ILIDC'
  13443.   userId     = 'WS222B'
  13444.   homeDir    = 'Y:\ILIDC\D$\SHARED\FILES'
  13445.  
  13446.   /* Remove home directory parameter */
  13447.   /* homeDir    = '' */
  13448.  
  13449.   MyRc = NetSetInfo(NETHOMEDIR, dcName, userId, homeDir)
  13450.  
  13451.   if myRc <> '0' then do
  13452.    say 'Got error from NetSetInfo() ' myRc
  13453.    call DropLsRxutFuncs
  13454.    call RxFuncDrop 'LoadLsRxutFuncs'
  13455.    exit 9
  13456.   end
  13457.   else do
  13458.    say
  13459.    say "Home directory definition modified successfully"
  13460.   end
  13461.  
  13462.   call DropLsRxutFuncs
  13463.   call RxFuncDrop 'LoadLsRxutFuncs'
  13464.  
  13465.   exit 0
  13466.  
  13467.  Example Output 
  13468.  
  13469.  
  13470.   Home directory definition modified successfully
  13471.  
  13472.  
  13473. ΓòÉΓòÉΓòÉ 14.9. NETMESSAGELOGFILE Set Info ΓòÉΓòÉΓòÉ
  13474.  
  13475. The function sets the name of the message log file and the current logging 
  13476. status (on or off). 
  13477.  
  13478. Syntax 
  13479.  
  13480.  
  13481. MyRc = NetSetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  13482.  
  13483. Parameters 
  13484.  
  13485. The parameters specified are: 
  13486.  
  13487.  'msgLogFileInfo'  The REXX variable controlling the operation. The variable is 
  13488.                    divided into: 
  13489.  
  13490.                        msgLogFileInfo.filename 
  13491.  
  13492.                         A string containing the complete path and file name, 
  13493.                         beginning with the drive letter of the message log file 
  13494.  
  13495.                        msgLogFileInfo.logswitch 
  13496.  
  13497.                         A integer value specifying whether logging is enabled. 
  13498.                         If 0, message logging is disabled; otherwise, message 
  13499.                         logging is enabled. The default is to disable message 
  13500.                         logging 
  13501.  
  13502.  SrvName           The server or requester computer name 
  13503.  
  13504.  Note 
  13505.  
  13506.  The server or requester computer name can be specified as '' for a local 
  13507.  server or computer. 
  13508.  
  13509.  Example 
  13510.  
  13511.  
  13512.   /* Set the message log file and logging state */
  13513.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13514.   call LoadLsRxutFuncs
  13515.  
  13516.   NETMESSAGELOGFILE = 550
  13517.   SrvName           = '\\ANYSRV01'
  13518.   msgLogFileInfo.logswitch = 0 /* turn of logging */
  13519.   msgLogFileInfo.filename  = 'C:\IBMLAN\LOGS\MESSAGES.LOG'
  13520.  
  13521.   myRc = NetSetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  13522.  
  13523.   if myRc <> '0' then do
  13524.    say 'Got error from NetSetInfo() ' myRc
  13525.    exitRc = 9
  13526.   end
  13527.   else do
  13528.    say 'Message log file information changed successfully'
  13529.   end
  13530.  
  13531.   call DropLsRxutFuncs
  13532.   call RxFuncDrop 'LoadLsRxutFuncs'
  13533.  
  13534.   exit exitRc
  13535.  
  13536.  Example Output 
  13537.  
  13538.  
  13539.   Message log file information changed successfully
  13540.  
  13541.  
  13542. ΓòÉΓòÉΓòÉ 14.10. NETSERVER Set Info ΓòÉΓòÉΓòÉ
  13543.  
  13544. The function modifies a control parameter of a server. 
  13545.  
  13546. Syntax 
  13547.  
  13548.  
  13549. MyRc = NetSetInfo(NETSERVER, 'PARAMETER', parmValue, SrvName)
  13550.  
  13551. Parameters 
  13552.  
  13553. The parameters required are: 
  13554.  
  13555.  'PARAMETER'       The parameter name of the server parameter to be modified. 
  13556.                    The parameter values that causes a change of the server 
  13557.                    control definitions are specified below. Only one parameter 
  13558.                    value can be changed at a time. If the parameter is invalid 
  13559.                    or the parameter value is unknown or in error, no changes 
  13560.                    will occur. 
  13561.  
  13562.                        comment 
  13563.  
  13564.                         A string containing a comment describing the server 
  13565.  
  13566.                        disc 
  13567.  
  13568.                         The autodisconnect time (in minutes).  A session is 
  13569.                         disconnected if it is idle longer than the time 
  13570.                         specified by the parameter disc 
  13571.  
  13572.                        alerts 
  13573.  
  13574.                         A string containing the list of user names on the alert 
  13575.                         table of the server. Spaces separate the names 
  13576.  
  13577.                        hidden 
  13578.  
  13579.                         The parameter determines whether the server is visible 
  13580.                         to other computers in the same domain. The following 
  13581.                         values are defined: 
  13582.  
  13583.  
  13584.                                                 VALUE     MEANING
  13585.                                                 -----     -------
  13586.                                                 0         Visible server
  13587.                                                 1         Hidden server, not visible
  13588.  
  13589.                        announce 
  13590.  
  13591.                         The network announce delta (in seconds), which 
  13592.                         determines how often the server is to be announced to 
  13593.                         other computers on the network 
  13594.  
  13595.                        anndelta 
  13596.  
  13597.                         The random announce rate (in milliseconds) for the 
  13598.                         announce parameter. The announce interval (announce 
  13599.                         parameter) can vary by the amount specified in the 
  13600.                         anndelta parameter 
  13601.  
  13602.                        alertsched 
  13603.  
  13604.                         The alert interval (in seconds) for notifying an 
  13605.                         administrator of a network event 
  13606.  
  13607.                        erroralert 
  13608.  
  13609.                         The number of entries that can be written to the error 
  13610.                         log file during the alertsched parameter interval 
  13611.                         before notifying an administrator 
  13612.  
  13613.                        logonalert 
  13614.  
  13615.                         The number of failed logon attempts to allow a user 
  13616.                         before notifying an administrator 
  13617.  
  13618.                        accessalert 
  13619.  
  13620.                         The number of failed file accesses to allow before 
  13621.                         issuing an administrative alert 
  13622.  
  13623.                        diskalert 
  13624.  
  13625.                         The number of kilobytes of free disk space at which an 
  13626.                         administrator must be notified that the free space is 
  13627.                         low 
  13628.  
  13629.                        netioalert 
  13630.  
  13631.                         The network I/O error ratio (in tenths of a percent) to 
  13632.                         allow before notifying an administrator 
  13633.  
  13634.                        maxauditsz 
  13635.  
  13636.                         The maximum audit file size (in KB) 
  13637.  
  13638.  parmValue         The value of the parameter that is being modified 
  13639.  
  13640.  SrvName           The server computer name 
  13641.  
  13642.  Note 
  13643.  
  13644.  The server computer name can be specified as '' for a local server. 
  13645.  
  13646.  Example 
  13647.  
  13648.  
  13649.   /* Net server set info */
  13650.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13651.   call LoadLsRxutFuncs
  13652.  
  13653.   NETSERVER  = 160
  13654.   parameter  = 'maxauditsz'
  13655.   parmValue  =  512
  13656.   SrvName    = '\\KING_BALU'
  13657.  
  13658.   myRc = NetSetInfo(NETSERVER, parameter, parmValue, SrvName)
  13659.  
  13660.   if myRc <> '0' then do
  13661.    say 'Got error from NetSetInfo() ' myRc
  13662.    rcCode = 9
  13663.   end
  13664.   else do
  13665.    say "Done"
  13666.    rcCode = 0
  13667.   end
  13668.  
  13669.   call DropLsRxutFuncs
  13670.   call RxFuncDrop 'LoadLsRxutFuncs'
  13671.  
  13672.   exit rcCode
  13673.  
  13674.  Example Output 
  13675.  
  13676.  
  13677.   Done
  13678.  
  13679.  The function modifies a parameter of a shared resource. 
  13680.  
  13681.  Syntax 
  13682.  
  13683.  
  13684.   MyRc = NetSetInfo(NETSHARE, 'PARAMETER', parmValue, netName, SrvName)
  13685.  
  13686.  Parameters 
  13687.  
  13688.  The parameters required are: 
  13689.  
  13690.  'PARAMETER'       The parameter name of the share parameter value to be 
  13691.                    modified. The parameter values that causes a change of the 
  13692.                    share definitions are specified below. Only one parameter 
  13693.                    value can be changed at a time. If the parameter is invalid 
  13694.                    or the parameter value is unknown or in error, no changes 
  13695.                    will occour. 
  13696.  
  13697.                        remark 
  13698.  
  13699.                         The remark set for the resource share 
  13700.  
  13701.                        max_uses 
  13702.  
  13703.                         The maximum of concurrent connections to the shared 
  13704.                         resource 
  13705.  
  13706.  parmValue         The value of the parameter that is being modified 
  13707.  
  13708.  netName           The network name of the shared resource 
  13709.  
  13710.  SrvName           The server computer name where the shared resource resides 
  13711.  
  13712.  Note 
  13713.  
  13714.  The server computer name can be specified as '' for a local server. 
  13715.  
  13716.  Example 
  13717.  
  13718.  
  13719.   /* Net share set info */
  13720.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13721.   call LoadLsRxutFuncs
  13722.  
  13723.   NETSHARE  = 190
  13724.   /* parmValue = 100 */
  13725.   parmValue = 'This is Book ManagerRead/2'
  13726.   netName   = 'BOOKMGR'
  13727.   SrvName   = '\\KING_BALU'
  13728.  
  13729.   /* myRc = NetSetInfo(NETSHARE, 'max_uses', parmValue, netName, SrvName) */
  13730.   myRc = NetSetInfo(NETSHARE, 'remark', parmValue, netName, SrvName)
  13731.  
  13732.   if myRc <> '0' then do
  13733.    say 'Got error from NetSetInfo() ' myRc
  13734.    rcCode = 9
  13735.   end
  13736.   else do
  13737.    say "Done"
  13738.    rcCode = 0
  13739.   end
  13740.  
  13741.   call DropLsRxutFuncs
  13742.   call RxFuncDrop 'LoadLsRxutFuncs'
  13743.  
  13744.   exit rcCode
  13745.  
  13746.  Example Output 
  13747.  
  13748.  
  13749.   Done
  13750.  
  13751.  
  13752. ΓòÉΓòÉΓòÉ 14.11. NETSERVERMODALS Set Info ΓòÉΓòÉΓòÉ
  13753.  
  13754. The function sets server related modals information in the user accounts 
  13755. subsystem (UAS) database. The NETLOGON service must be stopped to successfully 
  13756. set the parameter specified. 
  13757.  
  13758. Syntax 
  13759.  
  13760.  
  13761. MyRc = NetSetInfo(NETSERVERMODALS, 'PARAMETER', parmValue, SrvName)
  13762.  
  13763. Parameters 
  13764.  
  13765. The parameters required are: 
  13766.  
  13767.  'PARAMETER'       The parameter name of the server modals parameter value to 
  13768.                    be modified. The parameter values that causes a change of 
  13769.                    the server modals definitions are specified below. Only one 
  13770.                    parameter value can be changed at a time. If the parameter 
  13771.                    is invalid or the parameter value is unknown or in error, no 
  13772.                    changes will occur. 
  13773.  
  13774.                        role 
  13775.  
  13776.                         The server role. The following values are required to 
  13777.                         be specified: 
  13778.  
  13779.                                                 Value  Meaning
  13780.                                                 -----  -------
  13781.                                                  0     Standalone server
  13782.                                                  1     Member server in the domain
  13783.                                                  2     Backup server in the domain
  13784.                                                  3     Primary server in the domain
  13785.  
  13786.                        primary 
  13787.  
  13788.                         The computer name of the primary domain controller to 
  13789.                         which the server belongs 
  13790.  
  13791.  parmValue         The value of the parameter that is being modified 
  13792.  
  13793.  SrvName           The server computer name 
  13794.  
  13795.  Note 
  13796.  
  13797.  The server computer name can be specified as '' for a local server. 
  13798.  
  13799.  Example 
  13800.  
  13801.  
  13802.   /* Set server modals */
  13803.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13804.   call LoadLsRxutFuncs
  13805.  
  13806.   NETSERVERMODALS = 370
  13807.   SrvName  = '\\DOMAIN_CONTRLR'
  13808.  
  13809.   parmValue = 3     /* Primary */
  13810.  
  13811.   myRc = NetSetInfo(NETSERVERMODALS, 'role', parmValue, SrvName)
  13812.  
  13813.   if myRc <> '0' then do
  13814.    say 'Got error from NetSetInfo() ' myRc
  13815.    exitRc = 9
  13816.   end
  13817.   else do
  13818.    say 'Done'
  13819.   end
  13820.  
  13821.   call DropLsRxutFuncs
  13822.   call RxFuncDrop 'LoadLsRxutFuncs'
  13823.  
  13824.   exit exitRc
  13825.  
  13826.  Example Output 
  13827.  
  13828.  
  13829.   Done
  13830.  
  13831.  
  13832. ΓòÉΓòÉΓòÉ 14.12. NETUSER Set Info ΓòÉΓòÉΓòÉ
  13833.  
  13834. The function modifies one of the userid definition parameter values. See also 
  13835. the additional userid account modification functions below: 
  13836.  
  13837.      NETUSERPASSWORD Set Info 
  13838.      NETEXPIREPASSWORD Expire password 
  13839.      NETHOMEDIR Set Info 
  13840.  
  13841.  Syntax 
  13842.  
  13843.  
  13844.   MyRc = NetSetInfo(NETUSER, 'PARAMETER', parmValue, SrvName, UserId)
  13845.  
  13846.  Parameters 
  13847.  
  13848.  The parameters required are: 
  13849.  
  13850.  'PARAMETER'       The parameter name of the application value to be modified. 
  13851.                    The parameter values that causes a change of the userid 
  13852.                    definitions are specified below. Only one parameter value 
  13853.                    can be changed at a time. If the parameter is invalid or the 
  13854.                    parameter value is unknown or in error, no changes will 
  13855.                    occur. 
  13856.  
  13857.                        name 
  13858.  
  13859.                         The user account name 
  13860.  
  13861.                        password 
  13862.  
  13863.                         The user account password 
  13864.  
  13865.                        priv 
  13866.  
  13867.                         The user account privilege level. The following values 
  13868.                         are allowed: 
  13869.  
  13870.                                                 Account type                     Value
  13871.                                                 ------------                     -----
  13872.                                                 Guest                            'Guest'
  13873.                                                 User                             'User'
  13874.                                                 Administrator                    'Admin'
  13875.  
  13876.                        home_dir 
  13877.  
  13878.                         If home_dir is set to a none value, the home directory 
  13879.                         is removed 
  13880.  
  13881.                         If a drive assignment is required, the home_dir value 
  13882.                         must include: 
  13883.  
  13884.  
  13885.                                                   x:\machineID\Y$\pathname
  13886.                                                   !  !         !  !
  13887.                                                   !  !         !  The path to the home directory
  13888.                                                   !  !         The drive on the server holding the home directory
  13889.                                                   !  The computer name of the server
  13890.                                                   The drive to be assigned
  13891.  
  13892.                         For example, the userid home directory has to be 
  13893.                         located on the server FILESRV on drive D and directory 
  13894.                         \FILES\USERID. The userid will have the home directory 
  13895.                         assigned as the Y drive. This requires the following 
  13896.                         definition of the home directory: 
  13897.  
  13898.                                                 Y:\FILESRV\D$\FILES\USERID
  13899.  
  13900.                         Another method is, when a drive assignment is not 
  13901.                         required, the home_dir value must include: 
  13902.  
  13903.  
  13904.                                                   \\machineID\Y$\pathname
  13905.                                                     !         !  !
  13906.                                                     !         !  The path to the home directory
  13907.                                                     !         The drive on the server holding the home directory
  13908.                                                     The computer name of the server
  13909.  
  13910.                         For example, the userid home directory has to be 
  13911.                         located on the server THESRV on drive F and directory 
  13912.                         \FILES\USERS\SHARED. The userid will have the home 
  13913.                         directory assigned as the first free drive. This 
  13914.                         requires the following definition of the home 
  13915.                         directory: 
  13916.  
  13917.                                                 \\THESRV\F$\FILES\USERS\SHARED
  13918.  
  13919.                        comment 
  13920.  
  13921.                         The user account comment string. Up to 48 characters 
  13922.                         can be specified 
  13923.  
  13924.                        flags 
  13925.  
  13926.                         User account flags. See below for the numeric values 
  13927.                         allowed: 
  13928.  
  13929.                                                 Value  Meaning
  13930.                                                 -----  ---------------------------------------------
  13931.                                                   1    Must be 1.  Logon script enabled
  13932.                                                   2    If 2, user's account disabled
  13933.                                                   4    If 4, user's account cannot be deleted
  13934.                                                   8    If 8, home directory required
  13935.                                                  32    If 32, password not required
  13936.                                                  64    If 64, user cannot change password
  13937.  
  13938.                         Use addition to set multiple values 
  13939.  
  13940.                        script_path 
  13941.  
  13942.                         The name of the logon script together with the path 
  13943.                         specification relative to the NETLOGON SCRIPT parameter 
  13944.  
  13945.                        auth_flags 
  13946.  
  13947.                         Grants operator privilege (accounts, print, comm, and 
  13948.                         server) to users. See below for the numeric values 
  13949.                         allowed: 
  13950.  
  13951.                                                  Bits   Meaning
  13952.                                                  -----  ---------------------------------------------
  13953.                                                  0      If 1, print operator privilege is enabled.
  13954.  
  13955.                                                  1      If 1, comm operator privilege is enabled.
  13956.  
  13957.                                                  2      If 1, server operator privilege is enabled.
  13958.  
  13959.                                                  3      If 1, accounts operator privilege is enabled.
  13960.  
  13961.                         A value of decimal 3 is equal to a print and comm 
  13962.                         operator privilege. 
  13963.  
  13964.                        full_name 
  13965.  
  13966.                         The full name of the user. Up to 48 characters can be 
  13967.                         specified 
  13968.  
  13969.                        usr_comment 
  13970.  
  13971.                         The account comment which is a user-settable comment. 
  13972.                         Up to 48 characters can be specified 
  13973.  
  13974.                        workstations 
  13975.  
  13976.                         A string containing a list of requesters from which a 
  13977.                         userid is permitted to log on. A null string means all 
  13978.                         requesters are allowed. (To disallow logon, the account 
  13979.                         disabled flag must be set.) Up to 8 requesters can be 
  13980.                         specified, where the names are separated by spaces 
  13981.  
  13982.                        max_storage 
  13983.  
  13984.                         The maximum storage allotted for the home directory in 
  13985.                         kilobytes. Use the value -1 to specify no limit 
  13986.  
  13987.                        logon_server 
  13988.  
  13989.                         The computer to handle logon requests for a user 
  13990.                         account 
  13991.  
  13992.  parmValue         The value of the parameter that is being modified 
  13993.  
  13994.  SrvName           The server computer name. In this case the computer name of 
  13995.                    the domain controller 
  13996.  
  13997.  UserId            The user account must be specified 
  13998.  
  13999.  Note 
  14000.  
  14001.  The server computer name can be specified as '' for a local domain controller. 
  14002.  
  14003.  Example 
  14004.  
  14005.  
  14006.   /* Modify the max_storage parameter for a userid */
  14007.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14008.   call LoadLsRxutFuncs
  14009.  
  14010.   NETUSER = 280
  14011.   SrvName = '\\ILIDC'
  14012.   UserId  = 'THEONE'
  14013.   usrInfo.max_storage = 1024
  14014.  
  14015.   myRc = NetSetInfo(NETUSER, 'max_storage', usrInfo.max_storage, SrvName, UserId)
  14016.  
  14017.   if myRc <> '0' then do
  14018.    say 'Got error from NetSetInfo() ' myRc
  14019.    call DropLsRxutFuncs
  14020.    exit 9
  14021.   end
  14022.   else do
  14023.    say
  14024.    say "Set home directory max storage parameter successfully"
  14025.   end
  14026.  
  14027.   call DropLsRxutFuncs
  14028.   call RxFuncDrop 'LoadLsRxutFuncs'
  14029.  
  14030.   exit 0
  14031.  
  14032.  Example Output 
  14033.  
  14034.  
  14035.   Set home directory max storage parameter successfully
  14036.  
  14037.  
  14038. ΓòÉΓòÉΓòÉ 14.13. NETUSERMODALS Set Info ΓòÉΓòÉΓòÉ
  14039.  
  14040. The function sets global modals related information for all user accounts and 
  14041. groups in the user accounts subsystem (UAS) database. 
  14042.  
  14043. Syntax 
  14044.  
  14045.  
  14046. MyRc = NetSetInfo(NETUSERMODALS, 'PARAMETER', parmValue, SrvName)
  14047.  
  14048. Parameters 
  14049.  
  14050. The parameters required are: 
  14051.  
  14052.  'PARAMETER'       The parameter name of the user modals to be modified. The 
  14053.                    parameter values that causes a change of the user modals 
  14054.                    definitions are specified below. Only one parameter value 
  14055.                    can be changed at a time. If the parameter is invalid or the 
  14056.                    parameter value is unknown or in error, no changes will 
  14057.                    occour. 
  14058.  
  14059.                        min_passwd_len 
  14060.  
  14061.                         The minimum password length 
  14062.  
  14063.                        max_passwd_age 
  14064.  
  14065.                         The maximum password age in days 
  14066.  
  14067.                        min_passwd_age 
  14068.  
  14069.                         The minimum password age in days 
  14070.  
  14071.                        force_logoff 
  14072.  
  14073.                         The length of time (in seconds) after the valid logon 
  14074.                         hours that the user account should be forced off the 
  14075.                         network 
  14076.  
  14077.                        password_hist_len 
  14078.  
  14079.                         The length of the password history, that is, the number 
  14080.                         of passwords in the history buffer that are scanned 
  14081.                         versus the new password in a password change attempt 
  14082.  
  14083.  parmValue         The value of the parameter that is being modified 
  14084.  
  14085.  SrvName           The domain controller computer name 
  14086.  
  14087.  Note 
  14088.  
  14089.  The server computer name can be specified as '' for a local domain controller. 
  14090.  
  14091.  Example 
  14092.  
  14093.  
  14094.   /* Set user modals */
  14095.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14096.   call LoadLsRxutFuncs
  14097.  
  14098.   NETUSERMODALS = 360
  14099.   SrvName       = '\\DOMAIN_CONTRLR'
  14100.  
  14101.   parmValue = 6 /* Minimum password length is 6 */
  14102.  
  14103.   myRc = NetSetInfo(NETUSERMODALS, 'min_passwd_len', parmValue, SrvName)
  14104.  
  14105.   if myRc <> '0' then do
  14106.    say 'Got error from NetSetInfo() ' myRc
  14107.    exitRc = 9
  14108.   end
  14109.   else do
  14110.    say 'Done'
  14111.   end
  14112.  
  14113.   call DropLsRxutFuncs
  14114.   call RxFuncDrop 'LoadLsRxutFuncs'
  14115.  
  14116.   exit exitRc
  14117.  
  14118.  Example Output 
  14119.  
  14120.  
  14121.   Done
  14122.  
  14123.  
  14124. ΓòÉΓòÉΓòÉ 14.14. NETUSERGROUPS Set Info ΓòÉΓòÉΓòÉ
  14125.  
  14126. The function sets the groups of which a user account is a member. 
  14127.  
  14128. Syntax 
  14129.  
  14130.  
  14131. MyRc = NetSetInfo(NETUSERGROUPS, 'GroupNames', SrvName, UserId)
  14132.  
  14133. Parameters 
  14134.  
  14135. The parameters required are: 
  14136.  
  14137.  'GroupNames'      The REXX variable describing the groups a userid is 
  14138.                    belonging to 
  14139.  
  14140.                        GroupNames.count 
  14141.  
  14142.                         The number of the groups 
  14143.  
  14144.                        GroupNames.i.groupname 
  14145.  
  14146.                         The group name entry i 
  14147.  
  14148.  SrvName           The computer name of the domain controller 
  14149.  
  14150.  UserId            The name of the user account 
  14151.  
  14152.  Note 
  14153.  
  14154.  The server computer name can be specified as '' for a local domain controller. 
  14155.  
  14156.  Example 
  14157.  
  14158.  
  14159.   /* Set userid group membership */
  14160.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14161.   call LoadLsRxutFuncs
  14162.  
  14163.   NETUSERGROUPS = 330
  14164.   SrvName  = '\\DOMAIN_CONTRLR'
  14165.   UserId   = 'WS2222'
  14166.  
  14167.   groupNames.count = 3
  14168.   groupNames.1.name = 'GROUPA'
  14169.   groupNames.2.name = 'GROUPB'
  14170.   groupNames.3.name = 'GROUPC'
  14171.  
  14172.   myRc = NetSetInfo(NETUSERGROUPS, 'groupNames', SrvName, UserId)
  14173.  
  14174.   if myRc <> '0' then do
  14175.    say 'Got error from NetSetInfo() ' myRc
  14176.    exitRc = 9
  14177.   end
  14178.   else do
  14179.    say 'Done'
  14180.   end
  14181.  
  14182.   call DropLsRxutFuncs
  14183.   call RxFuncDrop 'LoadLsRxutFuncs'
  14184.  
  14185.   exit exitRc
  14186.  
  14187.  Example Output 
  14188.  
  14189.  
  14190.   Done
  14191.  
  14192.  
  14193. ΓòÉΓòÉΓòÉ 14.15. NETUSERPASSWORD Set Info ΓòÉΓòÉΓòÉ
  14194.  
  14195. The function changes a user account password. 
  14196.  
  14197. Syntax 
  14198.  
  14199.  
  14200. MyRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
  14201.  
  14202. Parameters 
  14203.  
  14204. The parameters specified are: 
  14205.  
  14206.  SrvName           The server computer name 
  14207.  
  14208.  UserId            The name of the userid to change to password on 
  14209.  
  14210.  OldPw             The old password 
  14211.  
  14212.  NewPw             The new password 
  14213.  
  14214.  Note 
  14215.  
  14216.  The server computer name can be specified as '' for a local domain controller. 
  14217.  
  14218.  Example 
  14219.  
  14220.  
  14221.   /* Change a userid password */
  14222.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14223.   call LoadLsRxutFuncs
  14224.  
  14225.   NETUSERPASSWORD = 260
  14226.   SrvName         = '\\ILIDC'
  14227.   UserId          = 'WS12345'
  14228.   OldPw           = 'PASSWORD'
  14229.   NewPw           = 'NEWPASS'
  14230.  
  14231.   myRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
  14232.  
  14233.   if myRc <> '0' then do
  14234.    say 'Got error from NetSetInfo() ' myRc
  14235.    call DropLsRxutFuncs
  14236.    exit 9
  14237.   end
  14238.   else do
  14239.    say 'Changed Password successfully'
  14240.    say
  14241.   end
  14242.  
  14243.   call DropLsRxutFuncs
  14244.   call RxFuncDrop 'LoadLsRxutFuncs'
  14245.  
  14246.   exit 0
  14247.  
  14248.  Example Output 
  14249.  
  14250.  
  14251.   Changed Password successfully
  14252.  
  14253.  
  14254. ΓòÉΓòÉΓòÉ 14.16. NETWKSTA Set Info ΓòÉΓòÉΓòÉ
  14255.  
  14256. The function modifies a control parameter of a requester. 
  14257.  
  14258. Syntax 
  14259.  
  14260.  
  14261. MyRc = NetSetInfo(NETWKSTA, 'PARAMETER', parmValue, ReqName)
  14262.  
  14263. Parameters 
  14264.  
  14265. The parameters required are: 
  14266.  
  14267.  'PARAMETER'       The parameter name of the requester parameter value to be 
  14268.                    modified. The parameter values that causes a change of the 
  14269.                    requester definitions are specified below. Only one 
  14270.                    parameter value can be changed at a time. If the parameter 
  14271.                    is invalid or the parameter value is unknown or in error, no 
  14272.                    changes will occur. 
  14273.  
  14274.                        charwait 
  14275.  
  14276.                         The number of seconds the requester waits for a remote 
  14277.                         serial or communication device to become available 
  14278.  
  14279.                        chartime 
  14280.  
  14281.                         The number of milliseconds the requester waits to 
  14282.                         collect data to send to a remote serial or 
  14283.                         communication device 
  14284.  
  14285.                        charcount 
  14286.  
  14287.                         The number of bytes of information the requester sends 
  14288.                         to a remote serial or communication device 
  14289.  
  14290.                        errlogsz 
  14291.  
  14292.                         The maximum size (in KB) of the error log file of the 
  14293.                         requester 
  14294.  
  14295.                        printbuftime 
  14296.  
  14297.                         The number of seconds closing print jobs are closed 
  14298.  
  14299.                        wrkheuristics 
  14300.  
  14301.                         A string of flags used to control a requesters 
  14302.                         operation 
  14303.  
  14304.                        oth_domains 
  14305.  
  14306.                         A string listing all domains on which the machine 
  14307.                         currently is listed. The string is space-delimited list 
  14308.                         of domains 
  14309.  
  14310.  parmValue         The value of the parameter that is being modified 
  14311.  
  14312.  ReqName           The requester computer name 
  14313.  
  14314.  Note 
  14315.  
  14316.  The requester computer name can be specified as '' for a local requester. 
  14317.  
  14318.  Example 
  14319.  
  14320.  
  14321.   /* Perform Net Wksta Set info */
  14322.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14323.   call LoadLsRxutFuncs
  14324.  
  14325.   NETWKSTA = 350
  14326.   CpuName  = '\\KING_BALU'
  14327.  
  14328.   wkstaInfo.parm  = 'wrkheuristics'
  14329.   wkstaInfo.value = '11111111213111111100010111201112210012110'
  14330.  
  14331.   myRc = NetSetInfo(NETWKSTA, wkstaInfo.parm, wkstaInfo.value, CpuName)
  14332.  
  14333.   if myRc <> '0' then do
  14334.    say 'Got error from NetSetInfo() ' myRc
  14335.    exitCode = 9
  14336.   end
  14337.   else do
  14338.    say "Set parameter successfully"
  14339.    exitCode = 0
  14340.   end
  14341.  
  14342.   call DropLsRxutFuncs
  14343.   call RxFuncDrop 'LoadLsRxutFuncs'
  14344.  
  14345.   exit exitCode
  14346.  
  14347.  Example Output 
  14348.  
  14349.  
  14350.   Set parameter successfully
  14351.  
  14352.  
  14353. ΓòÉΓòÉΓòÉ 15. RxSpl functions ΓòÉΓòÉΓòÉ
  14354.  
  14355. The DOS Spooler functions provided in LSRXUT.DLL are listed below: 
  14356.  
  14357. RxSplControlDevice()            Control a printer port
  14358. RxSplCreateDevice()             Create a print device
  14359. RxSplCreateQueue()              Create a print queue
  14360. RxSplDeleteDevice()             Delete a print device
  14361. RxSplDeleteJob()                Delete a print job
  14362. RxSplDeleteQueue()              Delete a print queue
  14363. RxSplEnumDevice()               Enumerate print devices
  14364. RxSplEnumDriver()               Enumerate printer drivers
  14365. RxSplEnumJob()                  Enumerate print jobs
  14366. RxSplEnumPort()                 Enumerate printer ports
  14367. RxSplEnumPrinter()              Enumerate print destinations
  14368. RxSplEnumQueue()                Enumerate print queues
  14369. RxSplHoldJob()                  Hold (pause) a print job
  14370. RxSplHoldQueue()                Hold (pause) a printer queue
  14371. RxSplPurgeQueue()               Purge print jobs in a printer queue
  14372. RxSplQueryDevice()              Query print device information
  14373. RxSplQueryJob()                 Query print job information
  14374. RxSplQueryQueue()               Query print queue information
  14375. RxSplReleaseJob()               Release a paused print job
  14376. RxSplReleaseQueue()             Release a paused printer queue
  14377. RxSplSetJob()
  14378.  
  14379.  
  14380. ΓòÉΓòÉΓòÉ 15.1. Spooler Comments ΓòÉΓòÉΓòÉ
  14381.  
  14382. All of the functions are can be called on a local computer. But for some of the 
  14383. functions restrictions apply. 
  14384.  
  14385. A printer driver is divided into two components: The components are the printer 
  14386. driver name and the device name. For example: 
  14387.  
  14388.  
  14389.   PLOTTER.HP7475A
  14390.  
  14391.  
  14392.   PLOTTER is the printer driver name
  14393.  
  14394.   HP7475A is the device name
  14395.  
  14396.  
  14397. ΓòÉΓòÉΓòÉ 15.2. RxSplControlDevice() ΓòÉΓòÉΓòÉ
  14398.  
  14399. The function cancels, holds, continues, or restarts a print device. Use this 
  14400. function with care. 
  14401.  
  14402. Syntax 
  14403.  
  14404.  
  14405. MyRc = RxSplControlDevice(ComputerName, RxStem)
  14406.  
  14407. Parameters 
  14408.  
  14409. The required parameter values are: 
  14410.  
  14411.  ComputerName   Must be either be specified as '' for a local computer or 
  14412.                 '\\computername'. 
  14413.  
  14414.  'RxStem'       A REXX variable which is divided into: 
  14415.  
  14416.                     RxStem.PrintDeviceName 
  14417.  
  14418.                      The printer name 
  14419.  
  14420.                     RxStem.Control 
  14421.  
  14422.                      The control action. The following values are valid: 
  14423.  
  14424.                                           Value            What it does
  14425.                                           -----------      -------------------------
  14426.                                           PRD_DELETE       Delete current print job
  14427.                                           PRD_PAUSE        Pause printing
  14428.                                           PRD_CONT         Continue paused print job
  14429.                                           PRD_RESTART      Restart print job.
  14430.  
  14431.  
  14432.  Example use 
  14433.  
  14434.   /* Control a printer device */
  14435.   if RxFuncQuery('RxSplControlDevice') <> 0 then do
  14436.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14437.    call LoadLsRxutFuncs
  14438.   end
  14439.  
  14440.   ComputerName           = '\\ILIDC'
  14441.   RxStem.PrintDeviceName = 'LPT1'
  14442.   RxStem.Control         = 'PRD_PAUSE'
  14443.  
  14444.   MyRc = RxSplControlDevice(ComputerName, RxStem)
  14445.  
  14446.   if MyRc <> '0' then do
  14447.    say 'Error from RxSplControlDevice. RC =' MyRc
  14448.    exit 9
  14449.   end
  14450.   else do
  14451.    say 'Printer Device' RxStem.PrintDeviceName 'paused successfully'
  14452.   end
  14453.  
  14454.   exit 0
  14455.  
  14456.  
  14457. ΓòÉΓòÉΓòÉ 15.3. RxSplCreateDevice() ΓòÉΓòÉΓòÉ
  14458.  
  14459. The function creates a printer device. The printer drivers used must be 
  14460. installed before using this function. 
  14461.  
  14462. Syntax 
  14463.  
  14464.  
  14465. MyRc = RxSplCreateDevice(ComputerName, RxStem)
  14466.  
  14467. Parameters 
  14468.  
  14469. The required parameter values are: 
  14470.  
  14471.  ComputerName   Must be either be specified as '' for a local computer or 
  14472.                 '\\computername'. For the remote case, administrator authority 
  14473.                 is required 
  14474.  
  14475.  'RxStem'       A REXX variable which is divided into: 
  14476.  
  14477.                     RxStem.PrinterName 
  14478.  
  14479.                      The printer name 
  14480.  
  14481.                     RxStem.LogAddr 
  14482.  
  14483.                      The printer port logical address. (For example LPT2). The 
  14484.                      port address must exist 
  14485.  
  14486.                     RxStem.Comment 
  14487.  
  14488.                      The printer device description 
  14489.  
  14490.                     RxStem.Drivers 
  14491.  
  14492.                      The printer drivers supported by this print device. If 
  14493.                      more than one printer driver is specified, the ',' must be 
  14494.                      used as separator 
  14495.  
  14496.                     RxStem.TimeOut 
  14497.  
  14498.                      The printer device timeout value 
  14499.  
  14500.  Example use 
  14501.  
  14502.   /* Create a printer device */
  14503.   if RxFuncQuery('RxSplCreateDevice') <> 0 then do
  14504.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14505.    call LoadLsRxutFuncs
  14506.   end
  14507.  
  14508.   ComputerName       = '\\ILIDC'
  14509.   RxStem.PrinterName = 'TestDev'
  14510.   RxStem.LogAddr     = 'LPT3'
  14511.   RxStem.Comment     = 'Test of REXX Printer Device create'
  14512.   RxStem.Drivers     = 'IBMNULL,IBM4019.IBM 4019 LaserPrinter'
  14513.   RxStem.TimeOut     = 54
  14514.  
  14515.   MyRc = RxSplCreateDevice(ComputerName, RxStem)
  14516.  
  14517.   if MyRc <> '0' then do
  14518.    say 'Error from RxSplCreateDevice. RC =' MyRc
  14519.    exit 9
  14520.   end
  14521.   else do
  14522.    say 'Printer Device' RxStem.PrinterName 'created successfully'
  14523.   end
  14524.  
  14525.   exit 0
  14526.  
  14527.  
  14528. ΓòÉΓòÉΓòÉ 15.4. RxSplCreateQueue() ΓòÉΓòÉΓòÉ
  14529.  
  14530. The function creates a printer queue on a local computer. If this function is 
  14531. used to create a queue on a remote server, the workstation running this 
  14532. procedure must have the 100 percent identical printer driver installed as used 
  14533. for the default printer driver. The reason for this restriction is the use of 
  14534. required default printer driver information needed for queue creation. 
  14535.  
  14536. Syntax 
  14537.  
  14538.  
  14539. MyRc = RxSplCreateQueue(ComputerName, RxStem)
  14540.  
  14541. Parameters 
  14542.  
  14543. The required parameter values are: 
  14544.  
  14545.  ComputerName   Must be specified as '' or '\\computername' for a remote queue 
  14546.  
  14547.  'RxStem'       A REXX variable which is divided into: 
  14548.  
  14549.                     RxStem.Name 
  14550.  
  14551.                      The printer queue name 
  14552.  
  14553.                     RxStem.Priority 
  14554.  
  14555.                      The printer queue priority. (A value from 1 to 9) 
  14556.  
  14557.                     RxStem.StartTime 
  14558.  
  14559.                      The printer queue start time in minutes after midnight 
  14560.  
  14561.                     RxStem.UntilTime 
  14562.  
  14563.                      The printer queue until time in minutes after midnight 
  14564.  
  14565.                     RxStem.Type 
  14566.  
  14567.                      The printer queue type. The values are added together: 
  14568.  
  14569.                                           Value specified     ##  This is
  14570.                                           ------------------- --  ------------------------------------------
  14571.                                           PRQ3_TYPE_RAW        1  Data is always enqueued in the device
  14572.                                                                   specific format.
  14573.                                           PRQ3_TYPE_BYPASS     2  Allows the spooler to bypass the queue
  14574.                                                                   processor and send data directly to the
  14575.                                                                   Printer Driver. Setting this bit allows
  14576.                                                                   the spooler to print jobs of type PM_Q_RAW
  14577.                                                                   while they are still being spooled.
  14578.                                           PRQ3_TYPE_APPDEFAULT 4  This bit is set for the application
  14579.                                                                   default queue only.
  14580.  
  14581.                                           For example: Setting the new queue to print while spooling and
  14582.                                           set it to the default printer specify a value of 6 (2 + 4).
  14583.  
  14584.                     RxStem.SepFile 
  14585.  
  14586.                      The printer queue separator file name including the path. 
  14587.                      Both the path and separator file name must exist 
  14588.  
  14589.                     RxStem.PrProc 
  14590.  
  14591.                      The printer queue default queue processor. Normally 
  14592.                      'PMPRINT' 
  14593.  
  14594.                     RxStem.Parms 
  14595.  
  14596.                      The printer queue queue-processor parameters. Normally '' 
  14597.  
  14598.                     RxStem.Comment 
  14599.  
  14600.                      The printer queue description 
  14601.  
  14602.                     RxStem.Printers 
  14603.  
  14604.                      The printer devices connected to the printer queue. The 
  14605.                      devices must exist 
  14606.  
  14607.                     RxStem.DriverName 
  14608.  
  14609.                      The default printer driver name. For example IBMNULL or 
  14610.                      IBM4019 
  14611.  
  14612.                     RxStem.DeviceName 
  14613.  
  14614.                      The default printer device name. For example '' or 'IBM 
  14615.                      4019 LaserPrinter' 
  14616.  
  14617.                      The Printer Driver Name and Printer Device name are 
  14618.                      combined to the actual used default printer presentation 
  14619.                      driver name 
  14620.  
  14621.  Example use 
  14622.  
  14623.   /* Create a printer queue */
  14624.   if RxFuncQuery('RxSplCreateQueue') <> 0 then do
  14625.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14626.    call LoadLsRxutFuncs
  14627.   end
  14628.  
  14629.   ComputerName      = '\\ILIDC'
  14630.   RxStem.Name       = 'TestQue'
  14631.   RxStem.Priority   = 5
  14632.   RxStem.StartTime  = 0
  14633.   RxStem.UntilTime  = 0
  14634.   RxStem.Type       = 2
  14635.   RxStem.SepFile    = 'C:\SPOOL\TQ.SEP'
  14636.   RxStem.PrProc     = 'PMPRINT'
  14637.   RxStem.Parms      = ''
  14638.   RxStem.Comment    = 'Test Queue'
  14639.   RxStem.Printers   = 'TestDev'
  14640.   RxStem.DriverName = 'IBM4019'
  14641.   RxStem.DeviceName = 'IBM 4019 LaserPrinter'
  14642.  
  14643.   MyRc = RxSplCreateQueue(Computername, RxStem)
  14644.  
  14645.   if MyRc <> '0' then do
  14646.    say 'Error from RxSplCreateQueue. RC =' MyRc
  14647.    exit 9
  14648.   end
  14649.   else do
  14650.    say 'Printer Queue created successfully'
  14651.   end
  14652.  
  14653.   exit 0
  14654.  
  14655.  
  14656. ΓòÉΓòÉΓòÉ 15.5. RxSplDeleteDevice() ΓòÉΓòÉΓòÉ
  14657.  
  14658. The function deletes a printer device definition. 
  14659.  
  14660. Syntax 
  14661.  
  14662.  
  14663. MyRc = RxSplDeleteDevice(ComputerName, PrDevName)
  14664.  
  14665. Parameters 
  14666.  
  14667. The parameter values are: 
  14668.  
  14669.  MyRc           Return code from the function call 
  14670.  
  14671.  ComputerName   The name of the computer on which the Printer Device exist. Use 
  14672.                 '' for a local computer 
  14673.  
  14674.  PrDevName      The printer device name to delete 
  14675.  
  14676.  Example use 
  14677.  
  14678.   /* Delete printer device */
  14679.   if RxFuncQuery('RxSplDeleteDevice') <> 0 then do
  14680.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14681.    call LoadLsRxutFuncs
  14682.   end
  14683.  
  14684.   ComputerName = '\\ILIDC'
  14685.   PrDevName    = 'DelPrint'
  14686.  
  14687.   MyRc = RxSplDeleteDevice(ComputerName, PrDevName)
  14688.  
  14689.   if MyRc <> '0' then do
  14690.    say 'Error from RxSplDeleteDevice. RC =' MyRc
  14691.    exit 9
  14692.   end
  14693.  
  14694.   say 'Printer device deleted successfully'
  14695.  
  14696.   exit 0
  14697.  
  14698.  
  14699. ΓòÉΓòÉΓòÉ 15.6. RxSplDeleteJob() ΓòÉΓòÉΓòÉ
  14700.  
  14701. The function deletes a print job. 
  14702.  
  14703. Syntax 
  14704.  
  14705.  
  14706. MyRc = RxSplDeleteJob(ComputerName, QueueName, JobId)
  14707.  
  14708. Parameters 
  14709.  
  14710. The required parameter values are: 
  14711.  
  14712.  ComputerName   Must be either be specified as '' for a local computer or 
  14713.                 '\\computername'. 
  14714.  
  14715.  QueueName      The name of the queue where the print job resides 
  14716.  
  14717.  JobId          The print job Id (numeric value) 
  14718.  
  14719.  Example use 
  14720.  
  14721.   /* Delete a print job in specified printer queue */
  14722.   if RxFuncQuery('RxSplDeleteJob') <> 0 then do
  14723.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14724.    call LoadLsRxutFuncs
  14725.   end
  14726.  
  14727.   ComputerName = '\\ILIDC'
  14728.   QueueName    = 'IBM4019L'
  14729.   JobId        = 2
  14730.  
  14731.   MyRc = RxSplDeleteJob(ComputerName, QueueName, JobId)
  14732.  
  14733.   if MyRc <> '0' then do
  14734.    say 'Error from RxSplDeleteJob. RC =' MyRc
  14735.    exit 9
  14736.   end
  14737.   else do
  14738.    say 'Print job Id' JobId 'deleted successfully'
  14739.   end
  14740.  
  14741.   exit 0
  14742.  
  14743.  
  14744. ΓòÉΓòÉΓòÉ 15.7. RxSplDeleteQueue() ΓòÉΓòÉΓòÉ
  14745.  
  14746. The function deletes a printer queue. 
  14747.  
  14748. Syntax 
  14749.  
  14750.  
  14751. MyRc = RxSplDeleteQueue(ComputerName, PrQName)
  14752.  
  14753. Parameters 
  14754.  
  14755. The parameter values are: 
  14756.  
  14757.  MyRc           Return code from the function call 
  14758.  
  14759.  ComputerName   The name of the computer on which the Printer Queue exist. Use 
  14760.                 '' for a local computer 
  14761.  
  14762.  PrQName        The printer queue name to delete 
  14763.  
  14764.  Example use 
  14765.  
  14766.   /* Delete printer queue */
  14767.   if RxFuncQuery('RxSplDeleteQueue') <> 0 then do
  14768.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14769.    call LoadLsRxutFuncs
  14770.   end
  14771.  
  14772.   ComputerName = '\\ILIDC'
  14773.   PrQName      = 'DelPrint'
  14774.  
  14775.   MyRc = RxSplDeleteQueue(ComputerName, PrQName)
  14776.  
  14777.   if MyRc <> '0' then do
  14778.    say 'Error from RxSplDeleteQueue. RC =' MyRc
  14779.    exit 9
  14780.   end
  14781.  
  14782.   say 'Queue deleted successfully'
  14783.  
  14784.   exit 0
  14785.  
  14786.  
  14787. ΓòÉΓòÉΓòÉ 15.8. RxSplEnumDevice() ΓòÉΓòÉΓòÉ
  14788.  
  14789. The function enumerates printer devices on a local or remote computer. 
  14790.  
  14791. Syntax 
  14792.  
  14793.  
  14794. MyRc = RxSplEnumDevice(ComputerName, RxStem)
  14795.  
  14796. Parameters 
  14797.  
  14798.  ComputerName   The name of the computer to query. Use '' for a local computer 
  14799.  
  14800.  The returned parameter values are: 
  14801.  
  14802.  MyRc           Return code from the function call. It must be 0 otherwise all 
  14803.                 other returned values are invalid 
  14804.  
  14805.  'RxStem'       A REXX variable which is divided into: 
  14806.  
  14807.                     RxStem.count 
  14808.  
  14809.                      The number of printer devices. If 0, the following 
  14810.                      variables are invalid 
  14811.  
  14812.                     RxStem.n.PrinterName 
  14813.  
  14814.                      The printer device name for entry n. (n = 1 to 
  14815.                      RxStem.count) 
  14816.  
  14817.                     RxStem.n.LogAddr 
  14818.  
  14819.                      The printer device logical address for entry n. (n = 1 to 
  14820.                      RxStem.count) 
  14821.  
  14822.                     RxStem.n.Comment 
  14823.  
  14824.                      The printer device comment for entry n. (n = 1 to 
  14825.                      RxStem.count) 
  14826.  
  14827.                     RxStem.n.Drivers 
  14828.  
  14829.                      The printer drivers supported by device entry n. (n = 1 to 
  14830.                      RxStem.count) If more than one printer driver is 
  14831.                      specified, drivers are separated by a comma. The first 
  14832.                      printer driver specified is the default printer driver. 
  14833.  
  14834.  Example use 
  14835.  
  14836.   /* Enumerate printer devices */
  14837.   if RxFuncQuery('RxSplEnumDevice') <> 0 then do
  14838.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14839.    call LoadLsRxutFuncs
  14840.   end
  14841.  
  14842.   ComputerName = '\\ILIDC'
  14843.  
  14844.   MyRc = RxSplEnumDevice(ComputerName, RxStem)
  14845.  
  14846.   if MyRc <> '0' then do
  14847.    say 'Error from RxSplEnumDevice. RC =' MyRc
  14848.    exit 9
  14849.   end
  14850.  
  14851.   say 'Number of Printer Devices =' RxStem.count
  14852.  
  14853.   do i=1 to RxStem.count
  14854.    say
  14855.    say 'Printer device name   ' RxStem.i.PrinterName
  14856.    say 'Logical addresses     ' RxStem.i.LogAddr
  14857.    say 'Printer device comment' RxStem.i.Comment
  14858.    say 'Printer drivers       ' RxStem.i.Drivers
  14859.   end
  14860.  
  14861.   exit 0
  14862.  
  14863.  
  14864. ΓòÉΓòÉΓòÉ 15.9. RxSplEnumDriver() ΓòÉΓòÉΓòÉ
  14865.  
  14866. The function enumerates the printer presentation drivers. 
  14867.  
  14868. Syntax 
  14869.  
  14870.  
  14871. MyRc = RxSplEnumDriver(ComputerName, RxStem)
  14872.  
  14873. Parameters 
  14874.  
  14875.  ComputerName   The name of the computer to query. Use '' for a local computer 
  14876.  
  14877.  The returned parameter values are: 
  14878.  
  14879.  MyRc           Return code from the function call. It must be 0 otherwise all 
  14880.                 other returned values are invalid 
  14881.  
  14882.  'RxStem'       A REXX variable which is divided into: 
  14883.  
  14884.                     RxStem.count 
  14885.  
  14886.                      The number of printer presentation drivers available. If 
  14887.                      0, the following variables are invalid 
  14888.  
  14889.                     RxStem.n.DrivName 
  14890.  
  14891.                      The printer presentation driver name for entry n. (n = 1 
  14892.                      to RxStem.count) 
  14893.  
  14894.  Example use 
  14895.  
  14896.   /* Enumerate printer presentation driver names */
  14897.   if RxFuncQuery('RxSplEnumDriver') <> 0 then do
  14898.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14899.    call LoadLsRxutFuncs
  14900.   end
  14901.  
  14902.   ComputerName = '\\ILIDC'
  14903.  
  14904.   MyRc = RxSplEnumDriver(ComputerName, RxStem)
  14905.  
  14906.   if MyRc <> '0' then do
  14907.    say 'Error from RxSplEnumDriver. RC =' MyRc
  14908.    exit 9
  14909.   end
  14910.  
  14911.   say 'Number of Printer Presentation Drivers =' RxStem.count
  14912.  
  14913.   do i=1 to RxStem.count
  14914.    say
  14915.    say 'Printer presentation driver name' RxStem.i.DrivName
  14916.   end
  14917.  
  14918.   exit 0
  14919.  
  14920.  
  14921. ΓòÉΓòÉΓòÉ 15.10. RxSplEnumJob() ΓòÉΓòÉΓòÉ
  14922.  
  14923. The function returns a list of jobs in a print queue. This function is 
  14924. identical to NetEnumerate(NETPRINTJOB). 
  14925.  
  14926. Syntax 
  14927.  
  14928.  
  14929. MyRc = RxSplEnumJob('printJobInfo', SrvName, QueueName)
  14930.  
  14931. Parameters 
  14932.  
  14933. The parameters specified are: 
  14934.  
  14935.  'printJobInfo'    The REXX variable receiving the result. The variable is 
  14936.                    divided into: 
  14937.  
  14938.                        printJobInfo.count 
  14939.  
  14940.                         The number of print jobs in the queue 
  14941.  
  14942.                        printJobInfo.i.JobId 
  14943.  
  14944.                         The print job identification entry i, where the 
  14945.                         variable i has a value from 1 to printJobInfo.count 
  14946.  
  14947.                        printJobInfo.i.Priority 
  14948.  
  14949.                         The print job priority entry i, where the variable i 
  14950.                         has a value from 1 to printJobInfo.count 
  14951.  
  14952.                        printJobInfo.i.Position 
  14953.  
  14954.                         The print job position in the queue entry i, where the 
  14955.                         variable i has a value from 1 to printJobInfo.count 
  14956.  
  14957.                        printJobInfo.i.Status 
  14958.  
  14959.                         The print job status in the queue entry i, where the 
  14960.                         variable i has a value from 1 to printJobInfo.count 
  14961.  
  14962.                        printJobInfo.i.Size 
  14963.  
  14964.                         The print job size entry i, where the variable i has a 
  14965.                         value from 1 to printJobInfo.count 
  14966.  
  14967.                        printJobInfo.i.UserName 
  14968.  
  14969.                         The userid entry i, where the variable i has a value 
  14970.                         from 1 to printJobInfo.count 
  14971.  
  14972.                        printJobInfo.i.Document 
  14973.  
  14974.                         The document name entry i, where the variable i has a 
  14975.                         value from 1 to printJobInfo.count 
  14976.  
  14977.                        printJobInfo.i.Comment 
  14978.  
  14979.                         The comment entry i, where the variable i has a value 
  14980.                         from 1 to printJobInfo.count 
  14981.  
  14982.  SrvName           The server name 
  14983.  
  14984.  QueueName         The queue name, which must be supplied 
  14985.  
  14986.  Note 
  14987.  
  14988.  The server name can be specified as '' for a local server or computer. 
  14989.  
  14990.  Example 
  14991.  
  14992.   /* List print jobs in a print queue */
  14993.   if RxFuncQuery('RxSplEnumJob') <> 0 then do
  14994.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14995.    call LoadLsRxutFuncs
  14996.   end
  14997.  
  14998.   SrvName   = '\\DOMAIN_CONTRLR'
  14999.   QueueName = 'LPT1Q'
  15000.  
  15001.   myRc = RxSplEnumJob('printJobInfo', SrvName, QueueName)
  15002.  
  15003.   if myRc <> '0' then do
  15004.    say 'Got error from RxSplEnumJob() ' myRc
  15005.    exit 9
  15006.   end
  15007.  
  15008.   if printJobInfo.count = 0 then do
  15009.    say 'No print jobs in printer queue'
  15010.    exit 0
  15011.   end
  15012.  
  15013.   say 'Number of print jobs: ' printJobInfo.count
  15014.  
  15015.   do i=1 to printJobInfo.count
  15016.    say
  15017.    say 'Job Id:        ' printJobInfo.i.JobId
  15018.    say 'Userid:        ' printJobInfo.i.UserName
  15019.    say 'Document name: ' printJobInfo.i.Document
  15020.   end
  15021.  
  15022.   exit 0
  15023.  
  15024.  
  15025. ΓòÉΓòÉΓòÉ 15.11. RxSplEnumPort() ΓòÉΓòÉΓòÉ
  15026.  
  15027. The function enumerates the printer port names on a local or remote computer. 
  15028.  
  15029. Syntax 
  15030.  
  15031.  
  15032. MyRc = RxSplEnumPort(ComputerName, RxStem)
  15033.  
  15034. Parameters 
  15035.  
  15036.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15037.  
  15038.  The returned parameter values are: 
  15039.  
  15040.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15041.                 other returned values are invalid 
  15042.  
  15043.  'RxStem'       A REXX variable which is divided into: 
  15044.  
  15045.                     RxStem.count 
  15046.  
  15047.                      The number of printer presentation drivers available. If 
  15048.                      0, the following variables are invalid 
  15049.  
  15050.                     RxStem.n.PortName 
  15051.  
  15052.                      The name of the port name for entry n. (n = 1 to 
  15053.                      RxStem.count) 
  15054.  
  15055.                     RxStem.n.PortDriverName 
  15056.  
  15057.                      The name of the port driver name for entry n. (n = 1 to 
  15058.                      RxStem.count) 
  15059.  
  15060.                     RxStem.n.PortDriverPathName 
  15061.  
  15062.                      The path to the port driver for entry n. (n = 1 to 
  15063.                      RxStem.count) 
  15064.  
  15065.  Example use 
  15066.  
  15067.   /* Enumerate printer port names */
  15068.   if RxFuncQuery('RxSplEnumPort') <> 0 then do
  15069.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15070.    call LoadLsRxutFuncs
  15071.   end
  15072.  
  15073.   ComputerName = '\\ILIDC'
  15074.  
  15075.   MyRc = RxSplEnumPort(ComputerName, RxStem)
  15076.  
  15077.   if MyRc <> '0' then do
  15078.    say 'Error from RxSplEnumPort. RC =' MyRc
  15079.    exit 9
  15080.   end
  15081.  
  15082.   say 'Number of Printer Ports =' RxStem.count
  15083.  
  15084.   do i=1 to RxStem.count
  15085.    say
  15086.    say 'Printer port name       ' RxStem.i.PortName
  15087.    say 'Printer port driver name' RxStem.i.PortDriverName
  15088.    say 'Printer port driver path' RxStem.i.PortDriverPathName
  15089.   end
  15090.  
  15091.   exit 0
  15092.  
  15093.  
  15094. ΓòÉΓòÉΓòÉ 15.12. RxSplEnumPrinter() ΓòÉΓòÉΓòÉ
  15095.  
  15096. The function enumerates print destinations available. 
  15097.  
  15098. Syntax 
  15099.  
  15100.  
  15101. MyRc = RxSplEnumPrinter(ComputerName, RxStem)
  15102.  
  15103. Parameters 
  15104.  
  15105.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15106.  
  15107.  The returned parameter values are: 
  15108.  
  15109.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15110.                 other returned values are invalid 
  15111.  
  15112.  'RxStem'       A REXX variable which is divided into: 
  15113.  
  15114.                     RxStem.count 
  15115.  
  15116.                      The number of printer destinations available. If 0, the 
  15117.                      following variables are invalid 
  15118.  
  15119.                     RxStem.n.Type 
  15120.  
  15121.                      The print destination type for entry n. (n = 1 to 
  15122.                      RxStem.count) The following values are returned: 
  15123.  
  15124.                                           Value returned        This is
  15125.                                           --------------------  ------------------------------------------
  15126.                                           SPL_PR_QUEUE          Print destination is a queue
  15127.                                           SPL_PR_DIRECT_DEVICE  Print destination is a direct print device
  15128.                                           SPL_PR_QUEUED_DEVICE  Print destination is a queued print device
  15129.                                           SPL_PR_UNKWOWN        Print destination is unkwown
  15130.  
  15131.                     RxStem.n.PrintDestinationName 
  15132.  
  15133.                      The print destination name for entry n. (n = 1 to 
  15134.                      RxStem.count) 
  15135.  
  15136.                     RxStem.n.Description 
  15137.  
  15138.                      The print destination description for entry n. (n = 1 to 
  15139.                      RxStem.count) 
  15140.  
  15141.                     RxStem.n.LocalName 
  15142.  
  15143.                      The local name of a remote print destination for entry n. 
  15144.                      (n = 1 to RxStem.count) 
  15145.  
  15146.  Example use 
  15147.  
  15148.   /* Enumerate printer destination information */
  15149.   if RxFuncQuery('RxSplEnumPrinter') <> 0 then do
  15150.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15151.    call LoadLsRxutFuncs
  15152.   end
  15153.  
  15154.   ComputerName = '\\ILIDC'
  15155.  
  15156.   MyRc = RxSplEnumPrinter(ComputerName, RxStem)
  15157.  
  15158.   if MyRc <> '0' then do
  15159.    say 'Error from RxSplEnumPrinter. RC =' MyRc
  15160.    exit 9
  15161.   end
  15162.  
  15163.   say 'Number of Printer Descriptions =' RxStem.count
  15164.  
  15165.   do i=1 to RxStem.count
  15166.    say
  15167.    say 'Printer Destination type       ' RxStem.i.Type
  15168.    say 'Printer Destination name       ' RxStem.i.PrintDestinationName
  15169.    say 'Printer Destination description' RxStem.i.Description
  15170.    say 'Printer Destination local name ' RxStem.i.LocalName
  15171.   end
  15172.  
  15173.   exit 0
  15174.  
  15175.  
  15176. ΓòÉΓòÉΓòÉ 15.13. RxSplEnumQueue() ΓòÉΓòÉΓòÉ
  15177.  
  15178. The function enumerates print queues available. 
  15179.  
  15180. Syntax 
  15181.  
  15182.  
  15183. MyRc = RxSplEnumQueue(ComputerName, RxStem)
  15184.  
  15185. Parameters 
  15186.  
  15187.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15188.  
  15189.  The returned parameter values are: 
  15190.  
  15191.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15192.                 other returned values are invalid 
  15193.  
  15194.  'RxStem'       A REXX variable which is divided into: 
  15195.  
  15196.                     RxStem.count 
  15197.  
  15198.                      The number of printer queues available. If 0, the 
  15199.                      following variables are invalid 
  15200.  
  15201.                     RxStem.n.Name 
  15202.  
  15203.                      The print queue name for entry n. (n = 1 to RxStem.count) 
  15204.  
  15205.                     RxStem.n.Priority 
  15206.  
  15207.                      The print queue priority for entry n. (n = 1 to 
  15208.                      RxStem.count) 
  15209.  
  15210.                     RxStem.n.StartTime 
  15211.  
  15212.                      The print queue starting time in minuttes after midnight 
  15213.                      for entry n. (n = 1 to RxStem.count) 
  15214.  
  15215.                     RxStem.n.UntilTime 
  15216.  
  15217.                      The print queue until time in minuttes after midnight for 
  15218.                      entry n. (n = 1 to RxStem.count) 
  15219.  
  15220.                     RxStem.n.Type 
  15221.  
  15222.                      The print queue type for entry n. (n = 1 to RxStem.count) 
  15223.                      The following values are returned together with the 
  15224.                      decimal Type value: 
  15225.  
  15226.                                           Value returned        This is
  15227.                                           --------------------  ------------------------------------------
  15228.                                           PRQ3_TYPE_RAW         Data is always enqueued in the device
  15229.                                                                 specific format.
  15230.                                           PRQ3_TYPE_BYPASS      Allows the spooler to bypass the queue
  15231.                                                                 processor and send data directly to the
  15232.                                                                 Printer Driver. Setting this bit allows
  15233.                                                                 the spooler to print jobs of type PM_Q_RAW
  15234.                                                                 while they are still being spooled.
  15235.                                           PRQ3_TYPE_APPDEFAULT  This bit is set for the application
  15236.                                                                 default queue only.
  15237.  
  15238.                     RxStem.n.Jobs 
  15239.  
  15240.                      The number of jobs in the queue 
  15241.  
  15242.                     RxStem.n.Status 
  15243.  
  15244.                      The printer queue status 
  15245.  
  15246.                                           Value  Meaning
  15247.                                           -----  -------
  15248.                                            0     Ok
  15249.                                            1     Print Queue is paused
  15250.                                            2     Delete pending
  15251.  
  15252.                     RxStem.n.SepFile 
  15253.  
  15254.                      The separator file for entry n. (n = 1 to RxStem.count) 
  15255.  
  15256.                     RxStem.n.PrProc 
  15257.  
  15258.                      The default queue processor for entry n. (n = 1 to 
  15259.                      RxStem.count) 
  15260.  
  15261.                     RxStem.n.Parms 
  15262.  
  15263.                      The default queue processor parameters for entry n. (n = 1 
  15264.                      to RxStem.count) 
  15265.  
  15266.                     RxStem.n.Comment 
  15267.  
  15268.                      The queue description for entry n. (n = 1 to RxStem.count) 
  15269.  
  15270.                     RxStem.n.Printers 
  15271.  
  15272.                      The printer devices connected to the queue for entry n. (n 
  15273.                      = 1 to RxStem.count) 
  15274.  
  15275.                     RxStem.n.DriverName 
  15276.  
  15277.                      The queue default printer driver name for entry n. (n = 1 
  15278.                      to RxStem.count) 
  15279.  
  15280.  Example use 
  15281.  
  15282.   /* Enumerate printer destination information */
  15283.   if RxFuncQuery('RxSplEnumQueue') <> 0 then do
  15284.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15285.    call LoadLsRxutFuncs
  15286.   end
  15287.  
  15288.   ComputerName = '\\ILIDC'
  15289.  
  15290.   MyRc = RxSplEnumQueue(ComputerName, RxStem)
  15291.  
  15292.   if MyRc <> '0' then do
  15293.    say 'Error from RxSplEnumQueue. RC =' MyRc
  15294.    exit 9
  15295.   end
  15296.  
  15297.   if RxStem.count <> 0 then do
  15298.    say 'Number of Queue Descriptions =' RxStem.count
  15299.  
  15300.    do i=1 to RxStem.count
  15301.     say
  15302.     say 'Printer Queue name          ' RxStem.i.Name
  15303.     say 'Printer Queue priority      ' RxStem.i.Priority
  15304.     say 'Printer Queue starting time ' RxStem.i.StartTime
  15305.     say 'Printer Queue until time    ' RxStem.i.UntilTime
  15306.     say 'Printer Queue type          ' RxStem.i.Type
  15307.     say 'Printer Queue seperator file' RxStem.i.SepFile
  15308.     say 'Default queue processor     ' RxStem.i.PrProc
  15309.     say 'Queue processor parameters  ' RxStem.i.Parms
  15310.     say 'Printer Queue description   ' RxStem.i.Comment
  15311.     say 'Printers connected to Queue ' RxStem.i.Printers
  15312.     say 'Default printer driver name ' RxStem.i.DriverName
  15313.    end
  15314.   end
  15315.   else do
  15316.    say 'No Printer Queues available'
  15317.   end
  15318.  
  15319.   call DropLsRxutFuncs
  15320.   call RxFuncDrop 'LoadLsRxutFuncs'
  15321.  
  15322.   exit 0
  15323.  
  15324.  
  15325. ΓòÉΓòÉΓòÉ 15.14. RxSplHoldJob() ΓòÉΓòÉΓòÉ
  15326.  
  15327. The function holds (pauses) a print job. 
  15328.  
  15329. Syntax 
  15330.  
  15331.  
  15332. MyRc = RxSplHoldJob(ComputerName, QueueName, JobId)
  15333.  
  15334. Parameters 
  15335.  
  15336. The required parameter values are: 
  15337.  
  15338.  ComputerName   Must be either be specified as '' for a local computer or 
  15339.                 '\\computername'. 
  15340.  
  15341.  QueueName      The name of the queue where the print job resides 
  15342.  
  15343.  JobId          The print job Id (numeric value) 
  15344.  
  15345.  Example use 
  15346.  
  15347.   /* Hold a print job in a specified printer queue */
  15348.   if RxFuncQuery('RxSplHoldJob') <> 0 then do
  15349.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15350.    call LoadLsRxutFuncs
  15351.   end
  15352.  
  15353.   ComputerName = '\\ILIDC'
  15354.   QueueName    = 'IBM4019L'
  15355.   JobId        = 2
  15356.  
  15357.   MyRc = RxSplHoldJob(ComputerName, QueueName, JobId)
  15358.  
  15359.   if MyRc <> '0' then do
  15360.    say 'Error from RxSplHoldJob. RC =' MyRc
  15361.    exit 9
  15362.   end
  15363.   else do
  15364.    say 'Print job Id' JobId 'is holding'
  15365.   end
  15366.  
  15367.   exit 0
  15368.  
  15369.  
  15370. ΓòÉΓòÉΓòÉ 15.15. RxSplHoldQueue() ΓòÉΓòÉΓòÉ
  15371.  
  15372. The function holds (pauses) a printer queue. 
  15373.  
  15374. Syntax 
  15375.  
  15376.  
  15377. MyRc = RxSplHoldQueue(ComputerName, QueueName)
  15378.  
  15379. Parameters 
  15380.  
  15381. The required parameter values are: 
  15382.  
  15383.  ComputerName   Must be either be specified as '' for a local computer or 
  15384.                 '\\computername'. 
  15385.  
  15386.  QueueName      The name of the queue where the print job resides 
  15387.  
  15388.  Example use 
  15389.  
  15390.   /* Hold a printer queue on a specified computer */
  15391.   if RxFuncQuery('RxSplHoldQueue') <> 0 then do
  15392.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15393.    call LoadLsRxutFuncs
  15394.   end
  15395.  
  15396.   ComputerName = '\\ILIDC'
  15397.   QueueName    = 'IBM4019L'
  15398.  
  15399.   MyRc = RxSplHoldQueue(ComputerName, QueueName)
  15400.  
  15401.   if MyRc <> '0' then do
  15402.    say 'Error from RxSplHoldQueue. RC =' MyRc
  15403.    exit 9
  15404.   end
  15405.   else do
  15406.    say 'Printer queue' QueueName 'is holding (paused)'
  15407.   end
  15408.  
  15409.   exit 0
  15410.  
  15411.  
  15412. ΓòÉΓòÉΓòÉ 15.16. RxSplPurgeQueue() ΓòÉΓòÉΓòÉ
  15413.  
  15414. The function removes all jobs, except any currently printing, from a print 
  15415. queue. 
  15416.  
  15417. Syntax 
  15418.  
  15419.  
  15420. MyRc = RxSplPurgeQueue(ComputerName, QueueName)
  15421.  
  15422. Parameters 
  15423.  
  15424. The required parameter values are: 
  15425.  
  15426.  ComputerName   Must be either be specified as '' for a local computer or 
  15427.                 '\\computername'. 
  15428.  
  15429.  QueueName      The name of the queue where the print jobs resides 
  15430.  
  15431.  Example use 
  15432.  
  15433.   /* Purge print jobs in a queue on a specified computer */
  15434.   if RxFuncQuery('RxSplPurgeQueue') <> 0 then do
  15435.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15436.    call LoadLsRxutFuncs
  15437.   end
  15438.  
  15439.   ComputerName = '\\ILIDC'
  15440.   QueueName    = 'IBM4019L'
  15441.  
  15442.   MyRc = RxSplPurgeQueue(ComputerName, QueueName)
  15443.  
  15444.   if MyRc <> '0' then do
  15445.    say 'Error from RxSplPurgeQueue. RC =' MyRc
  15446.    exit 9
  15447.   end
  15448.   else do
  15449.    say 'Print jobs purged in queue' QueueName
  15450.   end
  15451.  
  15452.   exit 0
  15453.  
  15454.  
  15455. ΓòÉΓòÉΓòÉ 15.17. RxSplQueryDevice() ΓòÉΓòÉΓòÉ
  15456.  
  15457. The function does a returns print device information. A print device name must 
  15458. be specified. 
  15459.  
  15460. Syntax 
  15461.  
  15462.  
  15463. MyRc = RxSplQueryDevice(ComputerName, RxStem, PrDevName)
  15464.  
  15465. Parameters 
  15466.  
  15467.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15468.  
  15469.  PrDevName      The print device name to do the query against 
  15470.  
  15471.  The returned parameter values are: 
  15472.  
  15473.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15474.                 other returned values are invalid 
  15475.  
  15476.  'RxStem'       A REXX variable which is divided into: 
  15477.  
  15478.                     RxStem.LogAddr 
  15479.  
  15480.                      The printer device logical address 
  15481.  
  15482.                     RxStem.Comment 
  15483.  
  15484.                      The printer device description 
  15485.  
  15486.                     RxStem.Drivers 
  15487.  
  15488.                      Printer Drivers supported by the printer device. If more 
  15489.                      printer drivers are connected, the printer drivers will be 
  15490.                      separated by a comma. 
  15491.  
  15492.                     RxStem.time 
  15493.  
  15494.                      Time the current job has been printing 
  15495.  
  15496.                     RxStem.Status 
  15497.  
  15498.                      The printer device status 
  15499.  
  15500.                     RxStem.JobId 
  15501.  
  15502.                      The id of the print job currently printing. A 0 indicates 
  15503.                      no print job is currently printing 
  15504.  
  15505.                     RxStem.TimeOut 
  15506.  
  15507.                      Printer device time out value 
  15508.  
  15509.  Example use 
  15510.  
  15511.   /* Get printer device information */
  15512.   if RxFuncQuery('RxSplQueryDevice') <> 0 then do
  15513.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15514.    call LoadLsRxutFuncs
  15515.   end
  15516.  
  15517.   ComputerName = '\\ILIDC'
  15518.   PrDevName = 'PRINTER1'
  15519.  
  15520.   MyRc = RxSplQueryDevice(ComputerName, RxStem, PrDevName)
  15521.  
  15522.   if MyRc <> '0' then do
  15523.    say 'Error from RxSplQueryDevice. RC =' MyRc
  15524.    exit 9
  15525.   end
  15526.  
  15527.   say
  15528.   say 'Printer Device name           ' PrDevName
  15529.   say 'Printer Device logical address' RxStem.LogAddr
  15530.   say 'Printer Device description    ' RxStem.Comment
  15531.   say 'Connected printer drivers     ' RxStem.Drivers
  15532.   say 'Printer Device time out value ' RxStem.TimeOut
  15533.  
  15534.   exit 0
  15535.  
  15536.  
  15537. ΓòÉΓòÉΓòÉ 15.18. RxSplQueryJob() ΓòÉΓòÉΓòÉ
  15538.  
  15539. The function returns information about a print job. This function is identical 
  15540. to NetGetInfo(NETPRINTJOB). 
  15541.  
  15542. Syntax 
  15543.  
  15544.  
  15545. MyRc = RxSplQueryJob('prtJobInfo', SrvName, QueueName, PrtJobId)
  15546.  
  15547. Parameters 
  15548.  
  15549. The parameters specified are 
  15550.  
  15551.  'prtJobInfo'      The REXX variable receiving the result. The variable is 
  15552.                    divided into: 
  15553.  
  15554.                        prtJobInfo.JobId 
  15555.  
  15556.                         The print job id 
  15557.  
  15558.                        prtJobInfo.Priority 
  15559.  
  15560.                         The print job priority 
  15561.  
  15562.                        prtJobInfo.UserName 
  15563.  
  15564.                         The userid of the job submitting the job 
  15565.  
  15566.                        prtJobInfo.Position 
  15567.  
  15568.                         The job position in the print queue 
  15569.  
  15570.                        prtJobInfo.Status 
  15571.  
  15572.                         The status of the print job 
  15573.  
  15574.                        prtJobInfo.Submitted 
  15575.  
  15576.                         The time when the job was submitted 
  15577.  
  15578.                        prtJobInfo.Size 
  15579.  
  15580.                         The print job size 
  15581.  
  15582.                        prtJobInfo.Comment 
  15583.  
  15584.                         The print job comment 
  15585.  
  15586.                        prtJobInfo.Document 
  15587.  
  15588.                         The document name 
  15589.  
  15590.                        prtJobInfo.NotifyName 
  15591.  
  15592.                         Messaging alias for print alert 
  15593.  
  15594.                        prtJobInfo.DataType 
  15595.  
  15596.                         The data type of the submitted file 
  15597.  
  15598.                        prtJobInfo.Parms 
  15599.  
  15600.                         The parameters related to the print job 
  15601.  
  15602.                        prtJobInfo.StatusComment 
  15603.  
  15604.                         The status comment 
  15605.  
  15606.                        prtJobInfo.Queue 
  15607.  
  15608.                         The queue name 
  15609.  
  15610.                        prtJobInfo.QProcName 
  15611.  
  15612.                         The queue processor name 
  15613.  
  15614.                        prtJobInfo.QProcParms 
  15615.  
  15616.                         The queue processor parameters 
  15617.  
  15618.                        prtJobInfo.PrinterName 
  15619.  
  15620.                         The printer name 
  15621.  
  15622.                        prtJobInfo.Version 
  15623.  
  15624.                         The printer driver version 
  15625.  
  15626.                        prtJobInfo.DeviceName 
  15627.  
  15628.                         The device name 
  15629.  
  15630.  SrvName           The server name 
  15631.  
  15632.  QueueName         The Queue name 
  15633.  
  15634.  PrtJobId          The Printer Job Id 
  15635.  
  15636.  Note 
  15637.  
  15638.  The server name can be specified as '' for a local server or computer. 
  15639.  
  15640.  Example 
  15641.  
  15642.  
  15643.   /* Get Print job information */
  15644.   if RxFuncQuery('RxSplQueryJob') <> 0 then do
  15645.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15646.    call LoadLsRxutFuncs
  15647.   end
  15648.  
  15649.   SrvName = '\\ILIDC'
  15650.   QueueName = 'IBM4019L'
  15651.   PrtJobId = 5
  15652.  
  15653.   myRc = RxSplQueryJob('prtJobInfo', SrvName, QueueName, PrtJobId)
  15654.  
  15655.   if myRc <> '0' then do
  15656.    say 'Got error from RxSplQueryJob() ' myRc
  15657.    exit 9
  15658.   end
  15659.  
  15660.   if prtJobInfo.1 = '-none-' then do
  15661.    say prtJobInfo.1
  15662.    exit 0
  15663.   end
  15664.  
  15665.   say
  15666.   say 'Job id:                     ' prtJobInfo.JobId
  15667.   say 'Job priority:               ' prtJobInfo.Priority
  15668.   say 'Userid who submitted job:   ' prtJobInfo.UserName
  15669.   say 'Job position in Queue:      ' prtJobInfo.Position
  15670.   say 'Job status:                 ' prtJobInfo.Status
  15671.   say 'Submitted at:               ' prtJobInfo.Submitted
  15672.   say 'Job size:                   ' prtJobInfo.Size
  15673.   say 'Job comment:                ' prtJobInfo.Comment
  15674.   say 'Document name:              ' prtJobInfo.Document
  15675.   say 'Notify:                     ' prtJobInfo.NotifyName
  15676.   say 'Data type:                  ' prtJobInfo.DataType
  15677.   say 'Job parameters:             ' prtJobInfo.Parms
  15678.   say 'Job status comment:         ' prtJobInfo.StatusComment
  15679.   say 'Queue name:                 ' prtJobInfo.Queue
  15680.   say 'Queue processor:            ' prtJobInfo.QProcName
  15681.   say 'Queue processor parameters: ' prtJobInfo.QProcParms
  15682.   say 'The printer name:           ' prtJobInfo.PrinterName
  15683.   say 'Printer Driver version:     ' prtJobInfo.Version
  15684.   say 'Device Name:                ' prtJobInfo.DeviceName
  15685.  
  15686.   exit 0
  15687.  
  15688.  
  15689. ΓòÉΓòÉΓòÉ 15.19. RxSplQueryQueue() ΓòÉΓòÉΓòÉ
  15690.  
  15691. The function returns information about a print queue. A print queue name must 
  15692. be specified. 
  15693.  
  15694. Syntax 
  15695.  
  15696.  
  15697. MyRc = RxSplQueryQueue(ComputerName, RxStem, PrQueueName)
  15698.  
  15699. Parameters 
  15700.  
  15701.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15702.  
  15703.  PrQueueName    The print queue name to do the query against 
  15704.  
  15705.  The returned parameter values are: 
  15706.  
  15707.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15708.                 other returned values are invalid 
  15709.  
  15710.  'RxStem'       A REXX variable which is divided into: 
  15711.  
  15712.                     RxStem.Priority 
  15713.  
  15714.                      The printer queue priority 
  15715.  
  15716.                     RxStem.StartTime 
  15717.  
  15718.                      The printer queue starttime in minutes after midnight 
  15719.  
  15720.                     RxStem.UntilTime 
  15721.  
  15722.                      The printer queue until time in minutes after midnight 
  15723.  
  15724.                     RxStem.Type 
  15725.  
  15726.                      The printer queue type value and text. The following 
  15727.                      values are returned together with the decimal Type value: 
  15728.  
  15729.                                           Value returned        This is
  15730.                                           --------------------  ------------------------------------------
  15731.                                           PRQ3_TYPE_RAW         Data is always enqueued in the device
  15732.                                                                 specific format.
  15733.                                           PRQ3_TYPE_BYPASS      Allows the spooler to bypass the queue
  15734.                                                                 processor and send data directly to the
  15735.                                                                 Printer Driver. Setting this bit allows
  15736.                                                                 the spooler to print jobs of type PM_Q_RAW
  15737.                                                                 while they are still being spooled.
  15738.                                           PRQ3_TYPE_APPDEFAULT  This bit is set for the application
  15739.                                                                 default queue only.
  15740.  
  15741.                     RxStem.Jobs 
  15742.  
  15743.                      The number of jobs in the queue 
  15744.  
  15745.                     RxStem.Status 
  15746.  
  15747.                      The printer queue status 
  15748.  
  15749.                                           Value  Meaning
  15750.                                           -----  -------
  15751.                                            0     Ok
  15752.                                            1     Print Queue is paused
  15753.                                            2     Delete pending
  15754.  
  15755.                     RxStem.SepFile 
  15756.  
  15757.                      The printer queue separator file path and name 
  15758.  
  15759.                     RxStem.PrProc 
  15760.  
  15761.                      The printer queue default queue processor 
  15762.  
  15763.                     RxStem.Parms 
  15764.  
  15765.                      The printer queue queue-processor parameters 
  15766.  
  15767.                     RxStem.Comment 
  15768.  
  15769.                      The printer queue description 
  15770.  
  15771.                     RxStem.Printers 
  15772.  
  15773.                      Printer drivers connected to the queue. If more printer 
  15774.                      drivers are specified, then they are separated by a comma 
  15775.  
  15776.                     RxStem.DriverName 
  15777.  
  15778.                      Default printer driver 
  15779.  
  15780.  Example use 
  15781.  
  15782.   /* Get printer queue information */
  15783.   if RxFuncQuery('RxSplQueryQueue') <> 0 then do
  15784.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15785.    call LoadLsRxutFuncs
  15786.   end
  15787.  
  15788.   ComputerName = '\\ILIDC'
  15789.   PrQueueName = 'HPLJ6'
  15790.  
  15791.   MyRc = RxSplQueryQueue(ComputerName, RxStem, PrQueueName)
  15792.  
  15793.   if MyRc <> '0' then do
  15794.    say 'Error from RxSplQueryQueue. RC =' MyRc
  15795.    exit 9
  15796.   end
  15797.  
  15798.   say
  15799.   say 'Printer Queue name          ' PrQueueName
  15800.   say 'Printer Queue priority      ' RxStem.Priority
  15801.   say 'Printer Queue start time    ' RxStem.StartTime
  15802.   say 'Printer Queue until time    ' RxStem.UntilTime
  15803.   say 'Printer Queue type          ' RxStem.Type
  15804.   say 'Printer Queue separator file' RxStem.SepFile
  15805.   say 'Default queue Processor     ' RxStem.PrProc
  15806.   say 'Queue processor parameters  ' RxStem.Parms
  15807.   say 'Printer Queue description   ' RxStem.Comment
  15808.   say 'Connected printer drivers   ' RxStem.Printers
  15809.   say 'Default printer driver      ' RxStem.DriverName
  15810.  
  15811.   exit 0
  15812.  
  15813.  
  15814. ΓòÉΓòÉΓòÉ 15.20. RxSplReleaseJob() ΓòÉΓòÉΓòÉ
  15815.  
  15816. The function releases a previously held (paused) print job. 
  15817.  
  15818. Syntax 
  15819.  
  15820.  
  15821. MyRc = RxSplReleaseJob(ComputerName, QueueName, JobId)
  15822.  
  15823. Parameters 
  15824.  
  15825. The required parameter values are: 
  15826.  
  15827.  ComputerName   Must be either be specified as '' for a local computer or 
  15828.                 '\\computername'. 
  15829.  
  15830.  QueueName      The name of the queue where the print job resides 
  15831.  
  15832.  JobId          The print job Id (numeric value) 
  15833.  
  15834.  Example use 
  15835.  
  15836.   /* Release a print job in a specified printer queue */
  15837.   if RxFuncQuery('RxSplReleaseJob') <> 0 then do
  15838.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15839.    call LoadLsRxutFuncs
  15840.   end
  15841.  
  15842.   ComputerName = '\\ILIDC'
  15843.   QueueName    = 'IBM4019L'
  15844.   JobId        = 6
  15845.  
  15846.   MyRc = RxSplReleaseJob(ComputerName, QueueName, JobId)
  15847.  
  15848.   if MyRc <> '0' then do
  15849.    say 'Error from RxSplReleaseJob. RC =' MyRc
  15850.    exit 9
  15851.   end
  15852.   else do
  15853.    say 'Print job Id' JobId 'is released for printing'
  15854.   end
  15855.  
  15856.   exit 0
  15857.  
  15858.  
  15859. ΓòÉΓòÉΓòÉ 15.21. RxSplReleaseQueue() ΓòÉΓòÉΓòÉ
  15860.  
  15861. The function releases a previously held (paused) printer queue. 
  15862.  
  15863. Syntax 
  15864.  
  15865.  
  15866. MyRc = RxSplReleaseQueue(ComputerName, QueueName)
  15867.  
  15868. Parameters 
  15869.  
  15870. The required parameter values are: 
  15871.  
  15872.  ComputerName   Must be either be specified as '' for a local computer or 
  15873.                 '\\computername'. 
  15874.  
  15875.  QueueName      The name of the queue where the print job resides 
  15876.  
  15877.  Example use 
  15878.  
  15879.   /* Release a held printer queue on a specified computer */
  15880.   if RxFuncQuery('RxSplReleaseQueue') <> 0 then do
  15881.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15882.    call LoadLsRxutFuncs
  15883.   end
  15884.  
  15885.   ComputerName = '\\ILIDC'
  15886.   QueueName    = 'IBM4019L'
  15887.  
  15888.   MyRc = RxSplReleaseQueue(ComputerName, QueueName)
  15889.  
  15890.   if MyRc <> '0' then do
  15891.    say 'Error from RxSplReleaseQueue. RC =' MyRc
  15892.    exit 9
  15893.   end
  15894.   else do
  15895.    say 'Printer queue' QueueName 'is released'
  15896.   end
  15897.  
  15898.   exit 0
  15899.  
  15900.  
  15901. ΓòÉΓòÉΓòÉ 15.22. RxSplSetJob() ΓòÉΓòÉΓòÉ
  15902.  
  15903. The function modifies a parameter value of a print job. 
  15904.  
  15905. Syntax 
  15906.  
  15907.  
  15908. MyRc = RxSplSetJob('PARAMETER', parmValue, SrvName, QueueName, JobId)
  15909.  
  15910. Parameters 
  15911.  
  15912. The parameters required are: 
  15913.  
  15914.  'PARAMETER'       The parameter name of the print job value to be modified. 
  15915.                    Only one parameter value can be changed at a time. If the 
  15916.                    parameter is invalid or the parameter value is unknown or in 
  15917.                    error no changes will occur. 
  15918.  
  15919.                        NotifyName 
  15920.  
  15921.                         Messaging alias for print alert. This value is either a 
  15922.                         computer name or a message name 
  15923.  
  15924.                        Comment 
  15925.  
  15926.                         A comment string for information about the print job. 
  15927.                         The maximum length of the string is 48 characters 
  15928.  
  15929.                        Document 
  15930.  
  15931.                         The document name of the print job (set by the 
  15932.                         application that submitted the print job). The maximum 
  15933.                         length of the string is 260 characters 
  15934.  
  15935.                        Position 
  15936.  
  15937.                         Must be given the appropriate value, as follows: 
  15938.  
  15939.                                                 Value  Change performed
  15940.                                                 -----  ----------------
  15941.                                                 0      No change
  15942.                                                 1      Move to first place
  15943.                                                 >1     Move to this position, or if the specified
  15944.                                                        value is greater than the number of jobs
  15945.                                                        in the queue, move to the end of the queue.
  15946.  
  15947.                        Priority 
  15948.  
  15949.                         The job-priority range is 1 through 99, with 99 the 
  15950.                         highest job priority. The job priority determines the 
  15951.                         order of jobs in the queue. If multiple queues print to 
  15952.                         the same printer, the job on the front of each queue is 
  15953.                         examined. The job with the highest priority is printed 
  15954.                         first. If there is more than one job with the highest 
  15955.                         priority, the oldest job with this highest priority is 
  15956.                         printed first. 
  15957.  
  15958.  parmValue         The value of the parameter that is being modified 
  15959.  
  15960.  SrvName           The server name on which the printer queue and print job 
  15961.                    resides 
  15962.  
  15963.  QueueName         The name of the printer queue 
  15964.  
  15965.  JobId             The numeric job identification number 
  15966.  
  15967.  Note 
  15968.  
  15969.  The server name can be specified as '' for a local server. 
  15970.  
  15971.  Example 
  15972.  
  15973.   /* Modify a number of print job values */
  15974.   if RxFuncQuery('RxSplSetJob') <> 0 then do
  15975.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15976.    call LoadLsRxutFuncs
  15977.   end
  15978.  
  15979.   /* Set notify name */
  15980.   parmValue = '\\PRTMON'
  15981.   SrvName   = '\\ILIDC'
  15982.   QueueName = 'IBM4019L'
  15983.   JobId     = 6
  15984.  
  15985.   myRc = RxSplSetJob('NotifyName', parmValue, SrvName, QueueName, JobId)
  15986.  
  15987.   if myRc <> '0' then do
  15988.    say 'Got error from RxSplSetJob() ' myRc
  15989.    exit 9
  15990.   end
  15991.  
  15992.   /* Set comment */
  15993.   parmValue = 'This was a changed by REXX'
  15994.  
  15995.   myRc = RxSplSetJob('Comment', parmValue, SrvName, QueueName, JobId)
  15996.  
  15997.   if myRc <> '0' then do
  15998.    say 'Got error from RxSplSetJob() ' myRc
  15999.    exit 9
  16000.   end
  16001.  
  16002.   /* Set document name */
  16003.   parmValue = 'TheDoc'
  16004.  
  16005.   myRc = RxSplSetJob('Document', parmValue, SrvName, QueueName, JobId)
  16006.  
  16007.   if myRc <> '0' then do
  16008.    say 'Got error from RxSplSetJob() ' myRc
  16009.    exit 9
  16010.   end
  16011.  
  16012.   /* Set position */
  16013.   parmValue = 1
  16014.  
  16015.   myRc = RxSplSetJob('Position', parmValue, SrvName, QueueName, JobId)
  16016.  
  16017.   if myRc <> '0' then do
  16018.    say 'Got error from RxSplSetJob() ' myRc
  16019.    exit 9
  16020.   end
  16021.  
  16022.   /* Set priority */
  16023.   parmValue = 51
  16024.  
  16025.   myRc = RxSplSetJob('Priority', parmValue, SrvName, QueueName, JobId)
  16026.  
  16027.   if myRc <> '0' then do
  16028.    say 'Got error from RxSplSetJob() ' myRc
  16029.    exit 9
  16030.   end
  16031.   else do
  16032.    say
  16033.    say "Modified print job values successfully"
  16034.   end
  16035.  
  16036.   exit 0
  16037.  
  16038.  
  16039. ΓòÉΓòÉΓòÉ 16. Option Parameter Values ΓòÉΓòÉΓòÉ
  16040.  
  16041. The option parameter values used in most of the functions available in the 
  16042. LSRXUT.DLL are defined as follows: 
  16043.  
  16044. NETACCESS                10
  16045. NETACCESSUSERPERMS       12
  16046. NETALIAS                 20
  16047. NETAPP                   30
  16048. NETAPPSEL                32
  16049. NETCONNECTION            40
  16050. NETLOGON                 50
  16051. NETLOGONASN              52
  16052. NETFILE                  60
  16053. NETGROUP                 70
  16054. NETMESSAGENAME           80
  16055. NETBIOS                  90
  16056. NETPRINTDEST            100
  16057. NETPRINTJOB             110
  16058. NETPRINTQUEUE           120
  16059. NETCHARDEV              130
  16060. NETCHARDEVQ             140
  16061. NETSERVERDISK           150
  16062. NETSERVER               160
  16063. NETSERVICE              170
  16064. NETSESSION              180
  16065. NETSHARE                190
  16066. NETSTATISTICS           195
  16067. NETSHARECHECK           210
  16068. NETFILECLOSE            220
  16069. NETHOMEDIR              230
  16070. NETACCESSDEL            240
  16071. NETACCESSADD            250
  16072. NETUSERPASSWORD         260
  16073. NETUSE                  270
  16074. NETUSER                 280
  16075. NETUSER2                282
  16076. NETUSERINITDCDB         290
  16077. NETPRINTPORT            300
  16078. NETPRINTDRIVER          310
  16079. NETPRINTQPROC           320
  16080. NETUSERGROUPS           330
  16081. NETGROUPUSERS           340
  16082. NETWKSTA                350
  16083. NETUSERMODALS           360
  16084. NETSERVERMODALS         370
  16085. NETEXPIREPASSWORD       400
  16086. NETFINDADDRESS          410
  16087. NETACCESSCHECK          420
  16088. NETUSERVALIDATE2        500
  16089. NETGETDCNAME            510
  16090. NETACCESSAPPLY          520
  16091. NETMESSAGEBUFFERSEND    530
  16092. NETMESSAGEFILESEND      540
  16093. NETMESSAGELOGFILE       550
  16094. NETMESSAGENAMEFWD       560
  16095. NETMESSAGENAMEUNFWD     570
  16096. NETAUDITLOGCLEAR        580
  16097. NETERRORLOGCLEAR        640
  16098. NETERRORLOGREAD         650
  16099. NETERRORLOGWRITE        660
  16100. NETREMOTECOPY           670
  16101. NETREMOTEEXEC           680
  16102. NETREMOTEMOVE           690
  16103. NETREMOTETOD            700
  16104. NETSERVERADMINCMD       710
  16105. NETUSERDCDBINIT         720
  16106. NETDASDCHECK            730
  16107. NETDASDCONTROL          740
  16108. NETDASD                 750
  16109.  
  16110.  
  16111. ΓòÉΓòÉΓòÉ 17. Sample REXX Procedure ΓòÉΓòÉΓòÉ
  16112.  
  16113. This chapter describes a REXX procedure that combines a number of the 
  16114. LSRXUT.DLL functions into a work related procedure. 
  16115.  
  16116.  
  16117. ΓòÉΓòÉΓòÉ 17.1. Monitor Number Shares ΓòÉΓòÉΓòÉ
  16118.  
  16119. This function monitors the number of shares on a server. The administrator who 
  16120. wrote this procedure wanted to know if the MAXSHARES parameter was configured 
  16121. correctly. 
  16122.  
  16123. NUMSHARE Procedure 
  16124.  
  16125.  
  16126. /* Display number shares on a server */
  16127. call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs
  16128. call SysLoadFuncs
  16129. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  16130. call LoadLsRxutFuncs
  16131.  
  16132. NETSHARE = 190
  16133. SrvName = '\\FSCDC'
  16134. '@CLS'
  16135.  
  16136. signal on error name error
  16137. signal on halt name error
  16138. signal on syntax name error
  16139. call SysCurState OFF
  16140.  
  16141. do forever
  16142.  myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  16143.  
  16144.  if myRc <> '0' then do
  16145.   say 'Got error from NetEnumerate() ' myRc
  16146.   call SysCurState ON
  16147.   call DropLsRxutFuncs
  16148.   call SysDropFuncs
  16149.   exit 9
  16150.  end
  16151.  
  16152.  if shareInfo.1 = '-none-' then do
  16153.   say shareInfo.1
  16154.   call SysCurState ON
  16155.   call DropLsRxutFuncs
  16156.   call SysDropFuncs
  16157.   exit 0
  16158.  end
  16159.  
  16160.  pos = SysCurPos(0,0)
  16161.  say 'Time:' TIME('N') 'Num shares: ' shareInfo.0
  16162.  call SysSleep 60
  16163.  
  16164. end
  16165.  
  16166. error:
  16167. call SysCurState ON
  16168. call DropLsRxutFuncs
  16169. call SysDropFuncs
  16170. call RxFuncDrop 'LoadLsRxutFuncs'
  16171.  
  16172. exit 0
  16173.  
  16174.