home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / lsrxu207.zip / lsrxutil.inf (.txt) < prev   
OS/2 Help File  |  1997-10-24  |  228KB  |  16,187 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.                 multiple 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 an incomplete list of additional 
  251.                 functions 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 is now upper-cased when user account created. 
  292.                 RxSplEnumQueue 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.  Version 2.0.5  NetSetInfo:NetDasd now returns ERROR_INVALID_PARAMETER when a 
  301.                 parameter other than 'delta', 'max', or 'thresh' is specified. 
  302.  
  303.  Version 2.0.6  RxSplCreateDevice fixed to not truncate logaddr. 
  304.  
  305.  Version 2.0.7  NetEnumerate:NetServr was incorrectly returning ERROR_MORE_DATA 
  306.                 for a small number of servers.  Fixed to return a list of 
  307.                 servers even if a valid ERROR_MORE_DATA condition is 
  308.                 encountered. 
  309.  
  310.  
  311. ΓòÉΓòÉΓòÉ 3.2. The Files ΓòÉΓòÉΓòÉ
  312.  
  313. The IBM OS/2 LAN Server Utility DLL package contains the following files: 
  314.  
  315.    1. The LSRXUTIL.INF file 
  316.  
  317.       If you experience TRAP D messages in HELPMGR.DLL while doing copy to 
  318.       Clipboard, file or printing, you need to obtain the APAR PJ11200 for 
  319.       OS/2. 
  320.  
  321.    2. Two versions of the LSRXUT.DLL: 
  322.  
  323.         a) LSRXUT4.DLL 
  324.  
  325.            for Warp Server, Merlin Connect clients, Warp Connect clients, and 
  326.            LAN Server 4.0 based systems.  It can be used to call Warp Server, 
  327.            Merlin Connect, Warp Connect, LAN Server 3.0, and LAN Server 4.0 
  328.            systems. 
  329.  
  330.         b) LSRXUT3.DLL 
  331.  
  332.            for LAN Server 3.0 based systems. 
  333.  
  334.  
  335. ΓòÉΓòÉΓòÉ 3.3. References ΓòÉΓòÉΓòÉ
  336.  
  337. The following documentation contains additional description of the parameters 
  338. and values used and provided in the LSRXUT.DLL: 
  339.  
  340.    o  IBM LAN Server Family Programming Reference 
  341.  
  342.    o  IBM LAN Server 4.0 Application Programming Reference 
  343.  
  344.    o  IBM LAN Server 3.0 Application Programming Reference 
  345.  
  346.    o  Automating IBM OS/2 LAN Server Administration, IBM Form number GG24-4442 
  347.  
  348.       This book also contains the source code of the LSRXUT.DLL 
  349.  
  350.  
  351. ΓòÉΓòÉΓòÉ 4. How to use ΓòÉΓòÉΓòÉ
  352.  
  353. To use LSRXUT.DLL functions, OS/2 Warp (or higher) and IBM LAN Server 3.0 (or 
  354. higher) must be installed. 
  355.  
  356. Before you start, rename either the file LSRXUT3.DLL or LSRXUT4.DLL to 
  357. LSRXUT.DLL. 
  358.  
  359. The LSRXUT.DLL must be copied to any subdirectory that is included in the 
  360. CONFIG.SYS LIBPATH= parameter. 
  361.  
  362. To validate the correct installation of the LSRXUT.DLL the following REXX 
  363. procedure can be used: 
  364.  
  365. /************************************************/
  366. Say 'Testing LSRXUT.DLL access'
  367.  
  368. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  369. call LoadLsRxutFuncs
  370.  
  371. Say 'LoadLsRxutFuncs is complete.'
  372.  
  373. version = LsRxutVer()
  374. say 'Version is ' version
  375.  
  376. call DropLsRxutFuncs
  377.  
  378. exit 0
  379.  
  380. An example output of the test function would be like the following: 
  381.  
  382. Testing LSRXUT.DLL access
  383. LoadLsRxutFuncs is complete.
  384. Version is  2.00.00
  385.  
  386.  
  387. ΓòÉΓòÉΓòÉ 5. LSRXUT.DLL Load and Drop ΓòÉΓòÉΓòÉ
  388.  
  389. To activate the functions of the LSRXUT.DLL a REXX call must be made to make 
  390. REXX aware of the existence of the LSRXUT.DLL functions. 
  391.  
  392. A similar REXX call must be made to unload (drop) the function in the 
  393. LSRXUT.DLL. 
  394.  
  395. To provide this, two functions are implemented. They are: 
  396.  
  397.    o  LoadLsRxutFuncs() 
  398.  
  399.    o  DropLsRxutFuncs() 
  400.  
  401.  
  402. ΓòÉΓòÉΓòÉ 5.1. DropLsRxutFuncs() ΓòÉΓòÉΓòÉ
  403.  
  404. This function drop all functions in LSRXUT.DLL 
  405.  
  406. Syntax 
  407.  
  408. call DropLsRxutFuncs
  409.  
  410. Parameters 
  411.  
  412. none
  413.  
  414. Note 
  415.  
  416. The call to the function DropLsRxutFuncs can be initiated after any use of the 
  417. LSRXUT.DLL functions. 
  418.  
  419. Example 
  420.  
  421. /************************************************/
  422. Say 'Testing LSRXUT.DLL access'
  423.  
  424. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  425. call LoadLsRxutFuncs
  426.  
  427. Say 'LoadLsRxutFuncs is complete.'
  428.  
  429. version = LsRxutVer()
  430. say 'Version is ' version
  431.  
  432. call DropLsRxutFuncs
  433.  
  434. exit 0
  435.  
  436. Example output 
  437.  
  438. Testing LSRXUT.DLL access
  439. LoadLsRxutFuncs is complete.
  440. Version is  2.00.00
  441.  
  442.  
  443. ΓòÉΓòÉΓòÉ 5.2. LoadLsRxutFuncs() ΓòÉΓòÉΓòÉ
  444.  
  445. This function registers all functions in LSRXUT.DLL. 
  446.  
  447. Syntax 
  448.  
  449. call LoadLsRxutFuncs
  450.  
  451. Parameters 
  452.  
  453. none
  454.  
  455. Note 
  456.  
  457. The call to LoadLsRxutFuncs must be combined with the RxFuncAdd function. The 
  458. correct sequence is: 
  459.  
  460. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  461. call LoadLsRxutFuncs
  462.  
  463. Example 
  464.  
  465. /************************************************/
  466. Say 'Testing LSRXUT.DLL access'
  467.  
  468. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  469. call LoadLsRxutFuncs
  470.  
  471. Say 'LoadLsRxutFuncs is complete.'
  472.  
  473. version = LsRxutVer()
  474. say 'Version is ' version
  475.  
  476. call DropLsRxutFuncs
  477.  
  478. exit 0
  479.  
  480. Example output 
  481.  
  482. Testing LSRXUT.DLL access
  483. LoadLsRxutFuncs is complete.
  484. Version is  2.00.00
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ 6. Using LSRXUT.DLL in Multiple Processes ΓòÉΓòÉΓòÉ
  488.  
  489. When using the 'DropLsRxutFuncs' function, other processes using the LSRXUT.DLL 
  490. are no more able to use the functions provided by LSRXUT.DLL before another set 
  491. of of the functions are executed: 
  492.  
  493. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  494. call LoadLsRxutFuncs
  495.  
  496. If you are experiencing strange results, please be sure that you are not using 
  497. the DropLsRxutFuncs function while other REXX cmd files are still being 
  498. executed. 
  499.  
  500. In multiple processing scenarios register the LSRXUT.DLL functions once. You 
  501. can even execute the loading of LSRXUT.DLL from any starting procedure on your 
  502. system, and then use the functions from any other REXX procedure file 
  503. afterwords. 
  504.  
  505. Use the 'RxFuncQuery()' to validate the presence of the LSRXUT.DLL funcions 
  506. once in the start of your procedures. If the function you intend to use is 
  507. absent, register all LSRXUT.DLL functions only once. 
  508.  
  509. For example: 
  510.  
  511. /* Part of REXX proecedure to Control a printer device */
  512. if RxFuncQuery('RxSplControlDevice') <> 0 then do
  513.  call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  514.  call LoadLsRxutFuncs
  515. end
  516.  
  517. In the above example we want to check whether the 'RxSplControlDevice()' 
  518. function is registered. If not, we register all LSRXUT.DLL functions by using 
  519. the two function calls in the 'if-then' block. 
  520.  
  521. We use the same technique in WatCom Visual REXX or VisPro/REXX to register the 
  522. LSRXUT.DLL functions only once if they are not present. We prefer never to use 
  523. the 'DropLsRxutFuncs' function. If you have memory constrants on the system you 
  524. are running, you can use the 'DropLsRxutFuncs' function to release memory. 
  525.  
  526.  
  527. ΓòÉΓòÉΓòÉ 7. The Base Functions ΓòÉΓòÉΓòÉ
  528.  
  529. The LSRXUT.DLL contains a set of work related functions that were written 
  530. during a redbook residency in Austin, Texas. These functions are still 
  531. included, but avoid using them. They do for most cases not handle the presence 
  532. of multiple domains correctly. The base functions are: 
  533.  
  534.  GetDCName()            Get the domain controller name 
  535.  
  536.  CopyDirAcls()          Copy directory access control profiles specified in the 
  537.                         source location to the destination location. The source 
  538.                         directory will be created if it does not exist. Local 
  539.                         support only 
  540.  
  541.  DumpAllUsers()         Dump information about all userids to a binary file 
  542.  
  543.  DumpUser()             Dump information about a specified userid to a binary 
  544.                         file 
  545.  
  546.  InsertAllUsers()       From a dump file re-establish all userid definitions. A 
  547.                         new password must be supplied for each userid 
  548.  
  549.  QueryDirAliasPath()    Query the path of a directory alias 
  550.  
  551.  MoveDirAlias()         Redefine a directory alias and specify a new directory 
  552.                         path 
  553.  
  554.  SetLogonAsn()          Set logon assignments for a userid 
  555.  
  556.  GetLogonAsn()          Get logon assignments for a userid 
  557.  
  558.  NetEnum()              Enumerate some of the LAN Server provided information 
  559.  
  560.  GetLogonAsnAcp()       Get logon assignments access control profiles 
  561.  
  562.  
  563. ΓòÉΓòÉΓòÉ 7.1. GetDCName() ΓòÉΓòÉΓòÉ
  564.  
  565. This function retrieves the Domain Controller Computer name. To function 
  566. correctly, the administrator must be logged on to one domain only and not have 
  567. any value specified in the othdomains = parameter in IBMLAN.INI. 
  568.  
  569. It is recommended to use the function  NetEnumerate(NETSERVER)  as a 
  570. replacement. 
  571.  
  572. Syntax 
  573.  
  574.  
  575. parse value GetDCName() with MyRc dcName
  576.  
  577. Parameters 
  578.  
  579. The parameters returned are: 
  580.  
  581.  MyRc              The return code from the operation 
  582.  
  583.  dcName            The Domain Controller Computer name 
  584.  
  585.  Note 
  586.  
  587.  The function is only capable of returning one computer name. 
  588.  
  589.  Example 
  590.  
  591.  
  592.   /* Get the DC computer name */
  593.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  594.   call LoadLsRxutFuncs
  595.  
  596.   parse value GetDCName() with MyRc dcName
  597.  
  598.   if MyRc <> '0' then do
  599.    say 'Could not obtain Domain Controller name'
  600.    exit 9
  601.   end
  602.  
  603.   if dcName = '' then do
  604.    say 'Could not obtain Domain Controller name'
  605.    exit 9
  606.   end
  607.  
  608.   say 'Domain Controller Name is :' dcName
  609.  
  610.   call DropLsRxutFuncs
  611.   call RxFuncDrop 'LoadLsRxutFuncs'
  612.  
  613.   exit 0
  614.  
  615.  Example Output 
  616.  
  617.  
  618.   Domain Controller Name is : \\ILIDC
  619.  
  620.  
  621. ΓòÉΓòÉΓòÉ 7.2. CopyDirAcls() ΓòÉΓòÉΓòÉ
  622.  
  623. This function copies Directory Access Control Profiles specified in the source 
  624. location to the destination location. 
  625.  
  626. The source directory will be created if it does not exist. 
  627.  
  628. Syntax 
  629.  
  630.  
  631. MyRc = CopyDirAcls(srcDir, destDir)
  632.  
  633. Parameters 
  634.  
  635. The parameters specified are: 
  636.  
  637.  srcDir            The path to the source directory, which must exist 
  638.  
  639.  destDir           The destination directory 
  640.  
  641.  Note 
  642.  
  643.  The function requires that the source directory path exists. 
  644.  
  645.  Example 
  646.  
  647.  
  648.   /* Copy ACLs from source to destination */
  649.  
  650.   parse arg srcDir destdir
  651.  
  652.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  653.   call LoadLsRxutFuncs
  654.  
  655.   say 'Source:' srcDir
  656.   say 'Destination:' destDir
  657.  
  658.   MyRc = CopyDirAcls( srcDir, destDir )
  659.   say 'Returncode from CopyDirAcls(srcDir, destDir):' MyRc
  660.  
  661.   call DropLsRxutFuncs
  662.   call RxFuncDrop 'LoadLsRxutFuncs'
  663.  
  664.   exit 0
  665.  
  666.  Example Output 
  667.  
  668.  
  669.   Source: D:\APPS\BOOKS
  670.   Destination: F:\APPS\BOOKS
  671.   Returncode from CopyDirAcls(srcDir, destDir): 0
  672.  
  673.  
  674. ΓòÉΓòÉΓòÉ 7.3. DumpAllUsers() ΓòÉΓòÉΓòÉ
  675.  
  676. This function copies all Userid definitions to a binary file. If the file is a 
  677. valid "userid binary file" (a file created by the functions provided in 
  678. LSRXUT.DLL), additional users can be appended to the file. 
  679.  
  680. Syntax 
  681.  
  682.  
  683. MyRc = DumpAllUsers(dcName, dumpFile)
  684.  
  685. Parameters 
  686.  
  687. The parameters specified are: 
  688.  
  689.  dcName            The computer name of the domain controller 
  690.  
  691.  dumpFile          The file name of the resulting binary file containing userid 
  692.                    definitions 
  693.  
  694.  Note 
  695.  
  696.  The function copies userid definitions only into a binary file. The resulting 
  697.  binary file is intended to be used together with the InserAllUsers() function. 
  698.  
  699.  Example 
  700.  
  701.  
  702.   /* Dump userid definitions to a binary file for safekeeping */
  703.  
  704.   parse upper arg dumpFile
  705.  
  706.   if dumpFile = '' then
  707.    dumpFile = 'C:\USERDEFS.BIN'
  708.  
  709.   dcName = '\\ILIDC'
  710.  
  711.   /* Get access to LSRXUT.DLL functions */
  712.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  713.   call LoadLsRxutFuncs
  714.  
  715.   McRc = DumpAllUsers(dcName, dumpFile)
  716.   say 'DumpAllUsers() returned:' MyRc
  717.  
  718.   call DropLsRxutFuncs
  719.   call RxFuncDrop 'LoadLsRxutFuncs'
  720.  
  721.   exit 0
  722.  
  723.  Example Output 
  724.  
  725.  
  726.   DumpAllUsers() returned:  0
  727.  
  728.  
  729. ΓòÉΓòÉΓòÉ 7.4. DumpUser() ΓòÉΓòÉΓòÉ
  730.  
  731. Dump a userid specified to a binary file. If the file is a valid "userid binary 
  732. file" (a file created by the functions provided in LSRXUT.DLL), additional 
  733. users can be appended to the file. 
  734.  
  735. This function copies a Userid definition to a binary file. The function is 
  736. similar to the function DumpAllUsers(). 
  737.  
  738. Syntax 
  739.  
  740.  
  741. MyRc = DumpUser(dcName, dumpFile, userId)
  742.  
  743. Parameters 
  744.  
  745. The parameters specified are: 
  746.  
  747.  dcName            The computer name of the domain controller 
  748.  
  749.  dumpFile          The file name of the resulting binary file containing userid 
  750.                    definitions 
  751.  
  752.  userId            The userid definition to dump into the binary file 
  753.  
  754.  Note 
  755.  
  756.  The function copies userid definitions only into a binary file. The resulting 
  757.  binary file is intended to be used together with the InserAllUsers() function. 
  758.  
  759.  Example 
  760.  
  761.  
  762.   /* Dump a userid definition to a binary file for safekeeping */
  763.  
  764.   parse upper arg dumpFile
  765.  
  766.   if dumpFile = '' then
  767.    dumpFile = 'C:\USERDEFS.BIN'
  768.  
  769.   dcName = '\\ILIDC'
  770.   userId = 'WS2221'
  771.  
  772.   /* Get access to LSRXUT.DLL functions */
  773.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  774.   call LoadLsRxutFuncs
  775.  
  776.   MyRc = DumpUser(dcName, dumpFile, userId)
  777.   say 'DumpUser() returned:' MyRc
  778.  
  779.   call DropLsRxutFuncs
  780.   call RxFuncDrop 'LoadLsRxutFuncs'
  781.  
  782.   exit 0
  783.  
  784.  Example Output 
  785.  
  786.  
  787.   DumpUser() returned:  0
  788.  
  789.  
  790. ΓòÉΓòÉΓòÉ 7.5. InsertAllUsers() ΓòÉΓòÉΓòÉ
  791.  
  792. From a binary userid dump file re-establish all userid definitions. A new 
  793. password must be supplied. 
  794.  
  795. If one or more additional server ids are included in the dump file, but 
  796. currently not defined, the resyncronisation of servers must be performed. 
  797.  
  798. The input binary userid dump file is created by the functions DumpAllUsers() or 
  799. DumpUser(). 
  800.  
  801. Syntax 
  802.  
  803.  
  804. MyRc = InsertAllUsers(dcName, dumpfile, logfile, newpassword)
  805.  
  806. Parameters 
  807.  
  808. The parameters specified are: 
  809.  
  810.  dcName            The computer name of the domain controller 
  811.  
  812.  dumpFile          The file name of the resulting binary file containing userid 
  813.                    definitions 
  814.  
  815.  logfile           A file containing log information 
  816.  
  817.  newpassword       A new password must be supplied. 
  818.  
  819.  Note 
  820.  
  821.  The function copies userid definitions from a binary file back to the domain. 
  822.  Use the log file created by this function to verify the success of the 
  823.  operation. 
  824.  
  825.  Example 
  826.  
  827.  
  828.   /* Insert userid defintions from a binary dump file */
  829.  
  830.   dcName   = '\\ILIDC'
  831.   dumpfile = 'C:\USERDEFS.BIN'
  832.   logfile  = 'C:\USERDEFS.LOG'
  833.   newpassword = 'NEWPW'
  834.  
  835.   /* Get access to LSRXUT.DLL functions */
  836.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  837.   call LoadLsRxutFuncs
  838.  
  839.   MyRc = InsertAllUsers(dcName, dumpfile, logfile, newpassword)
  840.   say 'InsertAllUsers() returned:' MyRc
  841.  
  842.   call DropLsRxutFuncs
  843.   call RxFuncDrop 'LoadLsRxutFuncs'
  844.  
  845.   exit 0
  846.  
  847.  Example Output 
  848.  
  849.  
  850.   InsertAllUsers() returned:'  0
  851.  
  852.  The log file contains for the insertion of the userids WS222B and WS222C. 
  853.  
  854.  
  855.   Userid WS222B successfully added.
  856.   Userid WS222C already exists. No modification performed.
  857.   End of binary userid dump file reached
  858.  
  859.  
  860. ΓòÉΓòÉΓòÉ 7.6. QueryDirAliasPath() ΓòÉΓòÉΓòÉ
  861.  
  862. This function returns the path of a directory alias. The function is a limited 
  863. subset of  NetGetInfo(NETALIAS)  which should be used instead. 
  864.  
  865. Syntax 
  866.  
  867.  
  868. parse value QueryDirAliasPath(dcName, aliasName) with MyRc aliasPath
  869.  
  870. Parameters 
  871.  
  872. The parameters specified are: 
  873.  
  874.  dcName            The computer name of the domain controller, which contains 
  875.                    the alias definitions 
  876.  
  877.  aliasName         The directory alias name 
  878.  
  879.  aliasPath         The directory path returned if MyRc return code is 0. 
  880.  
  881.  Note 
  882.  
  883.  The function works only on directory alias definitions and the server name 
  884.  specified must be the domain controller computer name. 
  885.  
  886.  Example 
  887.  
  888.  
  889.   /* Retrieve the directory path for a alias. */
  890.  
  891.   dcName   = '\\ILIDC'
  892.   aliasName = 'BOOKS'
  893.  
  894.   /* Get access to LSRXUT.DLL functions */
  895.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  896.   call LoadLsRxutFuncs
  897.  
  898.   parse value QueryDirAliasPath(dcName, aliasName) with MyRc aliasPath
  899.   if MyRc = 0 then do
  900.    say 'Alias' aliasName 'has the path'
  901.    say aliasPath
  902.   end
  903.   else do
  904.    say 'QueryDirAliasPath(dcName, aliasName) returned errorcode' MyRc
  905.   end
  906.  
  907.   call DropLsRxutFuncs
  908.   call RxFuncDrop 'LoadLsRxutFuncs'
  909.  
  910.   exit 0
  911.  
  912.  Example Output 
  913.  
  914.  
  915.   Alias  BOOKS  has the path
  916.   D:\APPS\BOOKS
  917.  
  918.  
  919. ΓòÉΓòÉΓòÉ 7.7. MoveDirAlias() ΓòÉΓòÉΓòÉ
  920.  
  921. This function changes the directory definition of a directory alias. It does 
  922. not move files and access control profiles. 
  923.  
  924. Syntax 
  925.  
  926.  
  927. MyRc = MoveDirAlias(dcName, aliasName, serverName, newAliasDir)
  928.  
  929. Parameters 
  930.  
  931. The parameters specified are: 
  932.  
  933.  dcName            The computer name of the domain controller, which contains 
  934.                    the alias definition 
  935.  
  936.  aliasName         The directory alias name 
  937.  
  938.  serverName        The server name on which the new directory is located 
  939.  
  940.  netAliasDir       The new alias directory path 
  941.  
  942.  Note 
  943.  
  944.  The function works only on directory alias definitions. The new directory must 
  945.  exist. 
  946.  
  947.  Example 
  948.  
  949.  
  950.   /* Change the directory path for an alias. */
  951.  
  952.   dcName      = '\\ILIDC'
  953.   aliasName   = 'ALLFILES'
  954.   serverName  = '\\ILIDC'
  955.   newAliasDir = 'D:\SHARED\FILES'
  956.  
  957.   /* Get access to LSRXUT.DLL functions */
  958.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  959.   call LoadLsRxutFuncs
  960.  
  961.   MyRc = MoveDirAlias(dcName, aliasName, serverName, newAliasDir)
  962.   if MyRc \= 0 then do
  963.    say 'MoveDirAlias returned with error code' MyRc
  964.   end
  965.   else do
  966.    say 'Changed alias directory definition successfully'
  967.   end
  968.  
  969.   call DropLsRxutFuncs
  970.   call RxFuncDrop 'LoadLsRxutFuncs'
  971.  
  972.   exit 0
  973.  
  974.  Example Output 
  975.  
  976.  
  977.   Changed alias directory definition successfully
  978.  
  979.  
  980. ΓòÉΓòÉΓòÉ 7.8. SetLogonAsn() ΓòÉΓòÉΓòÉ
  981.  
  982. This function sets logon assignment for a userid. 
  983.  
  984. To function correctly, the administrator must be logged on to one domain only 
  985. and not have any value specified in the othdomains = parameter in IBMLAN.INI. 
  986.  
  987. It is recommended to use the functions described in  NetAdd(NETAPPSEL)  and 
  988. NetAdd(NETLOGONASN)  as a replacement. 
  989.  
  990. Syntax 
  991.  
  992.  
  993. MyRc = SetLogonAsn(userid, asnType, device, alias)
  994.  
  995. Parameters 
  996.  
  997. The parameters specified are: 
  998.  
  999.  userid            The userid 
  1000.  
  1001.  asnType           The assignment type. The accepted values are: 
  1002.  
  1003.                                       asnType What
  1004.                                       ------- ----
  1005.                                        'A='   Public application assignment
  1006.                                        'D='   Device assignment, such as G:, COM5, LPT3 or none
  1007.  
  1008.                    For a device assignment type a parameter value of '' can be 
  1009.                    specified 
  1010.  
  1011.  device            The device specification. This value can either be a drive, 
  1012.                    a com port or a printer port. An empty value can also be 
  1013.                    specified. 
  1014.  
  1015.                    This parameter value is ignored for Public application 
  1016.                    assignments 
  1017.  
  1018.  alias             The alias name for devices otherwise the name of the public 
  1019.                    application 
  1020.  
  1021.  Note 
  1022.  
  1023.  The function works only on a single domain. The function will fail if the 
  1024.  administrator has a value specified in the othdomains = parameter in 
  1025.  IBMLAN.INI or logged on to another domain. 
  1026.  
  1027.  Example 
  1028.  
  1029.  
  1030.   /* Add device and application logon assignments */
  1031.  
  1032.   userid      = 'WS222B'
  1033.   device      = 'X:'
  1034.   alias       = 'ALLFILES'
  1035.  
  1036.   /* Get access to LSRXUT.DLL functions */
  1037.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1038.   call LoadLsRxutFuncs
  1039.  
  1040.   MyRc = SetLogonAsn(userid, 'D=', device, alias)
  1041.   if MyRc <> '0' then do
  1042.    say 'SetLogonAsn() returned ' MyRc
  1043.   end
  1044.   else do
  1045.    say 'Successfully performed Logon Assignment'
  1046.   end
  1047.  
  1048.   applName = 'BOOKMST'
  1049.  
  1050.   MyRc = SetLogonAsn(userid, 'A=', '', applname)
  1051.   if MyRc <> '0' then do
  1052.    say 'SetLogonAsn() returned ' MyRc
  1053.   end
  1054.   else do
  1055.    say 'Successfully performed Public Application Assignment'
  1056.   end
  1057.  
  1058.   call DropLsRxutFuncs
  1059.   call RxFuncDrop 'LoadLsRxutFuncs'
  1060.  
  1061.   exit 0
  1062.  
  1063.  Example Output 
  1064.  
  1065.  
  1066.   Successfully performed Logon Assignment
  1067.   Successfully performed Public Application Assignment
  1068.  
  1069.  
  1070. ΓòÉΓòÉΓòÉ 7.9. GetLogonAsn() ΓòÉΓòÉΓòÉ
  1071.  
  1072. This function returns the logon assignments for a userid. 
  1073.  
  1074. To function correctly, the administrator must be logged on one domain only and 
  1075. not have any value specified in the othdomains = parameter in IBMLAN.INI. 
  1076.  
  1077. It is recommended to use the functions described in  NetGetInfo(NETAPPSEL)  and 
  1078. NetGetInfo(NETLOGONASN)  as a replacement. 
  1079.  
  1080. Syntax 
  1081.  
  1082.  
  1083. MyRc = GetLogonAsn(userid, 'asnList')
  1084.  
  1085. Parameters 
  1086.  
  1087. The parameters specified and returned are: 
  1088.  
  1089.  userid            The userid 
  1090.  
  1091.  asnList.0         The number of logon assignment found. It has a value of 
  1092.                    '-none-' if no assignments are found 
  1093.  
  1094.  asnList.i         The returned assignment list. i has a value from 1 to 
  1095.                    asnList.0 The returned values are divided into two classes. 
  1096.                    For a device: 
  1097.  
  1098.                                       type  device  alias
  1099.  
  1100.                                       For example:
  1101.  
  1102.                                       D= X: ALLFILES
  1103.  
  1104.                    For an public application the following values are returned: 
  1105.  
  1106.                                       type applicationName
  1107.  
  1108.                                       For example:
  1109.  
  1110.                                       A= BOOKMST
  1111.  
  1112.  Note 
  1113.  
  1114.  The function works only on a single domain. The function will fail if the 
  1115.  administrator has a value specified in the othdomains = parameter in 
  1116.  IBMLAN.INI. 
  1117.  
  1118.  Example 
  1119.  
  1120.  
  1121.   /* List device and application assignment for a userid */
  1122.  
  1123.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1124.   call LoadLsRxutFuncs
  1125.  
  1126.   userId = 'WS222B'
  1127.  
  1128.   MyRc = GetLogonAsn(userId, 'asnList')
  1129.  
  1130.   if MyRc = '0' then do
  1131.    say 'userid=' userId
  1132.    if asnList <> '-none-' then do
  1133.     do i=1 to asnList.0
  1134.      say asnList.i
  1135.     end
  1136.    end
  1137.   end
  1138.  
  1139.   call DropLsRxutFuncs
  1140.   call RxFuncDrop 'LoadLsRxutFuncs'
  1141.  
  1142.   exit 0
  1143.  
  1144.  Example Output 
  1145.  
  1146.  
  1147.   A= BOOKMST
  1148.   D=            X  ALLFILES
  1149.  
  1150.  
  1151. ΓòÉΓòÉΓòÉ 7.10. NetEnum() ΓòÉΓòÉΓòÉ
  1152.  
  1153. The functions provided are replaced with the NetEnumerate() function. 
  1154.  
  1155.  
  1156. ΓòÉΓòÉΓòÉ 7.11. GetLogonAsnAcp() ΓòÉΓòÉΓòÉ
  1157.  
  1158. This function returns the logon assignment access control profiles. 
  1159.  
  1160. To function correctly, the administrator must be logged on one domain only and 
  1161. not have any value specified in the othdomains = parameter in IBMLAN.INI. 
  1162.  
  1163. Syntax 
  1164.  
  1165.  
  1166. MyRc = GetLogonAsnAcp(userid, asnType, acpList)
  1167.  
  1168. Parameters 
  1169.  
  1170. The parameters specified and returned are: 
  1171.  
  1172.  userid            The userid 
  1173.  
  1174.  asnType           The logon assignment type. Use: 
  1175.  
  1176.                                       'D='  for device type logon assignment
  1177.                                       'A='  for public application type assignment
  1178.                                       'ALL' for both device and public application type assignments
  1179.  
  1180.  acpList.0         The number of logon assignments found. It has a value of 
  1181.                    '-none-' if no assignments are found 
  1182.  
  1183.  acpList.i         The returned assignment list. i has a value from 1 to 
  1184.                    acpList.0 The returned values are divided into: 
  1185.  
  1186.                                       type  name  access
  1187.  
  1188.                                       For example:
  1189.  
  1190.                                       D= ALLDILES  RWC
  1191.  
  1192.                    See for example  NetGetInfo(NETACCESS)  for more information 
  1193.                    about the access values. 
  1194.  
  1195.                    The returned values contains a list of all referenced alias 
  1196.                    used by an public application. Multiple entries for one 
  1197.                    public application may therefore occur. 
  1198.  
  1199.  Note 
  1200.  
  1201.  The function works only on a single domain. The function will fail if the 
  1202.  administrator has a value specified in the othdomains = parameter in 
  1203.  IBMLAN.INI. 
  1204.  
  1205.  Example 
  1206.  
  1207.  
  1208.   /* List device and application assignment ACP a userid */
  1209.  
  1210.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1211.   call LoadLsRxutFuncs
  1212.  
  1213.   userId = 'WS222B'
  1214.  
  1215.   MyRc = GetLogonAsnAcp(userId, 'ALL', acpList)
  1216.  
  1217.   if MyRc = '0' then do
  1218.    say 'userid=' userId
  1219.    if acpList <> '-none-' then do
  1220.     do i=1 to acpList.0
  1221.      say acpList.i
  1222.     end
  1223.    end
  1224.   end
  1225.   else do
  1226.    say 'GetLogonAsnAcp() failed with return code' MyRc
  1227.   end
  1228.  
  1229.   call DropLsRxutFuncs
  1230.   call RxFuncDrop 'LoadLsRxutFuncs'
  1231.  
  1232.   exit 0
  1233.  
  1234.  Example Output 
  1235.  
  1236.  
  1237.   userid= WS222B
  1238.   A=        BOOKS             RWCXD
  1239.   A=      BOOKMST No working directory specified
  1240.   D=     ALLFILES                RX
  1241.  
  1242.  
  1243. ΓòÉΓòÉΓòÉ 8. Handling Error Codes ΓòÉΓòÉΓòÉ
  1244.  
  1245. The REXX procedures using the IBM LAN Server utility DLL do return error codes 
  1246. from time to time. The return codes are either documented in the IBM OS/2 
  1247. Programming Tools and Information (Toolkit) or the IBM LAN Server Application 
  1248. Programming Interface documentation. Another and very good way to understand 
  1249. the meaning of the return codes, is the OS/2 help facility. If you for example 
  1250. have a return code 3, what does is say? 
  1251.  
  1252. Try for example the following: 
  1253.  
  1254. HELP NET0003 does not exist
  1255.  
  1256. but 
  1257.  
  1258. HELP SYS0003 does
  1259.  
  1260. Another example. If you have the return code 2138, then information retrieved 
  1261. from the OS/2 help facility is: 
  1262.  
  1263.  
  1264. HELP NET2138 requester not started
  1265.  
  1266. HELP SYS2138 requester not started
  1267.  
  1268.  
  1269. ΓòÉΓòÉΓòÉ 9. NetAdd ΓòÉΓòÉΓòÉ
  1270.  
  1271. The Net Add functions are a family of functions that can be called with a 
  1272. number of parameters. The NetAdd function has minimum two different parameters. 
  1273. The generic syntax is: 
  1274.  
  1275.  
  1276. MyRc = NetAdd(option, 'stemvar', parm1, parm2, parm3)
  1277. MyRc = NetAdd(option, parm1, parm2, parm3)
  1278.  
  1279. The option parameter contains a value to determine what type or option has to 
  1280. be added. An example would be the addition of a user account. 
  1281.  
  1282. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  1283.  
  1284. The MyRc parameter is the return code that will have an value from the NetAdd() 
  1285. function. If the call is successful the character '0' will be returned. 
  1286. Otherwise an error code and descriptive text are inserted by the NetAdd() 
  1287. function. 
  1288.  
  1289. The option parameter values are defined in Option parameter values. 
  1290.  
  1291.  
  1292. ΓòÉΓòÉΓòÉ 9.1. NETACCESS Add ΓòÉΓòÉΓòÉ
  1293.  
  1294. The function creates the auditing entry for a resource and adds 0 or more 
  1295. entries in the access control list for a resource. 
  1296.  
  1297. Syntax 
  1298.  
  1299.  
  1300. MyRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
  1301.  
  1302. Parameters 
  1303.  
  1304. The parameters required are: 
  1305.  
  1306.  'Access'  The REXX variable holding the values. The variable is divided into: 
  1307.  
  1308.              o  Access.count 
  1309.  
  1310.                 The number of access controls available for the resource. The 
  1311.                 value can be 0 or undefined. In this case access control 
  1312.                 profiles are not created 
  1313.  
  1314.              o  Access.audit 
  1315.  
  1316.                 The auditing flags. If the variable is undefined a default 
  1317.                 value of No auditing is used. The flags are defined as: 
  1318.  
  1319.                   -  A  Audit all. When this bit is set, all access attempts 
  1320.                      will be audited 
  1321.  
  1322.                   -  O  If O, audit successful file opens 
  1323.  
  1324.                   -  W  If W, audit successful file writes and successful 
  1325.                      directory creates 
  1326.  
  1327.                   -  D  If D, audit successful file deletes or truncates and 
  1328.                      successful directory deletes 
  1329.  
  1330.                   -  P  If P, audit successful file and directory access 
  1331.                      control profile change 
  1332.  
  1333.                   -  o  If o, audit failed file opens 
  1334.  
  1335.                   -  w  If w, audit failed file writes and failed directory 
  1336.                      creates 
  1337.  
  1338.                   -  d  If d, audit failed file deletes or truncates and failed 
  1339.                      directory deletes 
  1340.  
  1341.                   -  p  If d, audit failed file and directory access control 
  1342.                      profile change 
  1343.  
  1344.                   -  N or -none-  No auditing is performed 
  1345.  
  1346.              o  Access.i.ugname 
  1347.  
  1348.                 The user account or group name. i is a value from 1 to 
  1349.                 Access.count 
  1350.  
  1351.                 Use the group name USERS to create an access control profile 
  1352.                 for all users 
  1353.  
  1354.              o  Access.i.access 
  1355.  
  1356.                 The access profile. i is specified as above. The access control 
  1357.                 flags are as follows: 
  1358.  
  1359.                   -  N None 
  1360.  
  1361.                   -  R Read 
  1362.  
  1363.                   -  A Attribute 
  1364.  
  1365.                   -  W Write 
  1366.  
  1367.                   -  C Create 
  1368.  
  1369.                   -  X Execute 
  1370.  
  1371.                   -  D Delete 
  1372.  
  1373.                   -  P Permissions 
  1374.  
  1375.                   -  G This is a Group permission. The G parameter is not 
  1376.                      required to be specified 
  1377.  
  1378.  SrvName   The server computer name 
  1379.  
  1380.  resourceName The resource name must be specified in the name format as 
  1381.            described below: 
  1382.  
  1383.                       Resource Type                 Name Format
  1384.                       -------------                 -----------
  1385.                       Drive                         drive:
  1386.                       Path                          \path
  1387.                       Directory                     drive:pathname
  1388.                       File                          drive:pathname
  1389.                       UNC                           \\server\sharename\path
  1390.                       Pipe                          \pipe\pipename
  1391.                       Spooler Queue                 \print\queuename
  1392.                       Serial Device Queue           \comm\chardevqueue
  1393.  
  1394.  Note 
  1395.  
  1396.  The server computer name can be specified as '' for a local server. 
  1397.  
  1398.  Example 
  1399.  
  1400.  
  1401.   /* Create a access control profile for a resource */
  1402.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1403.   call LoadLsRxutFuncs
  1404.  
  1405.   NETACCESS = 10
  1406.   SrvName = '\\ILIDC'
  1407.   resourceName = 'D:\APPS\TEMP'
  1408.   Access.audit = 'A'
  1409.   Access.count = 2
  1410.   Access.1.ugname = 'CSUSERS'
  1411.   Access.1.access = 'RX'
  1412.   Access.2.ugname = 'FMAM'
  1413.   Access.2.access = 'RWCXDP'
  1414.  
  1415.   myRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
  1416.  
  1417.   if myRc <> '0' then do
  1418.    say 'Got error from NetAdd() ' myRc
  1419.    call DropLsRxutFuncs
  1420.    exit 9
  1421.   end
  1422.   else do
  1423.    say
  1424.    say 'Access Control Profile created successfully'
  1425.   end
  1426.  
  1427.   call DropLsRxutFuncs
  1428.   call RxFuncDrop 'LoadLsRxutFuncs'
  1429.  
  1430.   exit 0
  1431.  
  1432.  Example Output 
  1433.  
  1434.  
  1435.   Access Control Profile created successfully
  1436.  
  1437.  
  1438. ΓòÉΓòÉΓòÉ 9.2. NETACCESSADD ΓòÉΓòÉΓòÉ
  1439.  
  1440. The function adds one or more access control profiles to a existing access 
  1441. control list for a resource. 
  1442.  
  1443. Syntax 
  1444.  
  1445.  
  1446. MyRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
  1447.  
  1448. Parameters 
  1449.  
  1450. The parameters required are: 
  1451.  
  1452.  'AddtoACL'  The REXX variable holding the values. The variable is divided 
  1453.              into: 
  1454.  
  1455.                o  AddtoACL.count 
  1456.  
  1457.                   The number of access controls available for the resource. The 
  1458.                   value can be 0 or undefined. In this case access control 
  1459.                   profiles are not created 
  1460.  
  1461.                o  AddtoACL.i.ugname 
  1462.  
  1463.                   The user account or group name. The variable i has a value 
  1464.                   from 1 to AddtoACL.count 
  1465.  
  1466.                o  AddtoACL.i.access 
  1467.  
  1468.                   The access profile. The variable i is specified as above. The 
  1469.                   access control flags are as follows: 
  1470.  
  1471.                     -  N None 
  1472.  
  1473.                     -  A Attribute 
  1474.  
  1475.                     -  R Read 
  1476.  
  1477.                     -  W Write 
  1478.  
  1479.                     -  C Create 
  1480.  
  1481.                     -  X Execute 
  1482.  
  1483.                     -  D Delete 
  1484.  
  1485.                     -  P Permissions 
  1486.  
  1487.                     -  G This is a Group permission. The G parameter is not 
  1488.                        required to be specified 
  1489.  
  1490.  SrvName     The server computer name 
  1491.  
  1492.  resourceName The resource name must be specified in the name format as 
  1493.              described below: 
  1494.  
  1495.                           Resource Type                 Name Format
  1496.                           -------------                 -----------
  1497.                           Drive                         drive:
  1498.                           Path                          \path
  1499.                           Directory                     drive:pathname
  1500.                           File                          drive:pathname
  1501.                           UNC                           \\server\sharename\path
  1502.                           Pipe                          \pipe\pipename
  1503.                           Spooler Queue                 \print\queuename
  1504.                           Serial Device Queue           \comm\chardevqueue
  1505.  
  1506.  Note 
  1507.  
  1508.  The server computer name can be specified as '' for a local server. 
  1509.  
  1510.  Example 
  1511.  
  1512.  
  1513.   /* Add another Access Control Entry to existing Access Profile List */
  1514.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1515.   call LoadLsRxutFuncs
  1516.  
  1517.   NETACCESSADD = 250
  1518.   SrvName = '\\ILIDC'
  1519.   resourceName = 'D:\APPS\TEMP'
  1520.   AddtoACL.count = 1
  1521.   AddtoACL.1.ugname = 'CSUSERS'
  1522.   AddtoACL.1.access = 'RWC'
  1523.  
  1524.   myRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
  1525.  
  1526.   if myRc <> '0' then do
  1527.    say 'Got error from NetAdd() ' myRc
  1528.    call DropLsRxutFuncs
  1529.    exit 9
  1530.   end
  1531.   else do
  1532.    say
  1533.    say "Additional Access Control Profile added successfully"
  1534.   end
  1535.  
  1536.   call DropLsRxutFuncs
  1537.   call RxFuncDrop 'LoadLsRxutFuncs'
  1538.  
  1539.   exit 0
  1540.  
  1541.  Example Output 
  1542.  
  1543.  
  1544.   Additional Access Control Profile added successfully
  1545.  
  1546.  
  1547. ΓòÉΓòÉΓòÉ 9.3. NETALIAS Add ΓòÉΓòÉΓòÉ
  1548.  
  1549. The function creates an alias definition for a resource. 
  1550.  
  1551. Syntax 
  1552.  
  1553.  
  1554. MyRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
  1555.  
  1556. Parameters 
  1557.  
  1558. The parameters required are: 
  1559.  
  1560.  'AliasInfo'  The REXX variable holding the alias information values. The 
  1561.               variable is divided into: 
  1562.  
  1563.                 o  AliasInfo.name 
  1564.  
  1565.                    The alias name 
  1566.  
  1567.                 o  AliasInfo.remark 
  1568.  
  1569.                    The alias remark 
  1570.  
  1571.                 o  AliasInfo.server 
  1572.  
  1573.                    The computer name of the server where the resource described 
  1574.                    by this alias resides. The server computer name can be 
  1575.                    different from the SrvName parameter 
  1576.  
  1577.                 o  AliasInfo.netname 
  1578.  
  1579.                    The alias name for files aliases, and the queue name for 
  1580.                    printer and serial device aliases. This value is not used by 
  1581.                    the NetAdd() function 
  1582.  
  1583.                 o  AliasInfo.location 
  1584.  
  1585.                    The alias location. The following values are valid: 
  1586.  
  1587.                                       Location                      Location value
  1588.                                       --------                      --------------
  1589.                                       Within the domain             'Within Domain'
  1590.                                                                     'INTERNAL'
  1591.  
  1592.                                       External, for DOS             'External, for DOS'
  1593.                                                                     'EXTERNAL_DOS'
  1594.  
  1595.                                       External, for OS/2            'External, for OS/2'
  1596.                                                                     'EXTERNAL_OS2'
  1597.  
  1598.                                       External, for DOS and OS/2    'External, for DOS and OS/2'
  1599.                                                                     'EXTERNAL_BOTH'
  1600.  
  1601.                    The default value is 'Within Domain' 
  1602.  
  1603.                 o  AliasInfo.mode 
  1604.  
  1605.                    When the alias is shared. The following values are valid: 
  1606.  
  1607.                                       Sharing mode                  Mode value
  1608.                                       ------------                  ----------
  1609.                                       At server startup             'At server startup'
  1610.                                                                     'STARTUP'
  1611.  
  1612.                                       By administrator              'By administrator'
  1613.                                                                     'BYADMIN'
  1614.  
  1615.                                       At Requester use              'At Requester use'
  1616.                                                                     'DYNAMIC'
  1617.  
  1618.                    The default value is 'At Requester use' 
  1619.  
  1620.                 o  AliasInfo.maxuses 
  1621.  
  1622.                    The maximum number of users who can have redirection to the 
  1623.                    resource identified by this alias. The default value is 
  1624.                    65535 
  1625.  
  1626.                 o  AliasInfo.type 
  1627.  
  1628.                    The alias type. The following values are valid: 
  1629.  
  1630.                                       Type                          Type value
  1631.                                       ----                          ----------
  1632.                                       Files alias                   'Files'
  1633.  
  1634.                                       Printer alias                 'Printer'
  1635.  
  1636.                                       Serial alias                  'Serial'
  1637.  
  1638.                 o  AliasInfo.queue 
  1639.  
  1640.                    The queue name for serial or printer alias only 
  1641.  
  1642.                 o  AliasInfo.path 
  1643.  
  1644.                    The path for files alias only 
  1645.  
  1646.                 o  AliasInfo.priority 
  1647.  
  1648.                    The serial device priority. The value can be from 1 to 9. 1 
  1649.                    is the highest priority. The value of 9 will be used as 
  1650.                    default if no value is specified 
  1651.  
  1652.                 o  AliasInfo.device_pool 
  1653.  
  1654.                    The serial device pool. LPT1 to LPT9 and COM1 to COM9 can be 
  1655.                    used. If specified the entries are separated by a space. For 
  1656.                    example 'COM1 COM4' 
  1657.  
  1658.  SrvName      The server computer name of the domain controller 
  1659.  
  1660.  Note 
  1661.  
  1662.  The server computer name can be specified as '' for a local domain controller. 
  1663.  
  1664.  Example 
  1665.  
  1666.  
  1667.   /* Add a alias */
  1668.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1669.   call LoadLsRxutFuncs
  1670.  
  1671.   NETALIAS           = 20
  1672.   SrvName            = '\\ILIDC'
  1673.   AliasInfo.name     = 'THEBOOK'
  1674.   AliasInfo.remark   = 'Temporary alias'
  1675.   AliasInfo.server   = '\\ILIDC'
  1676.   AliasInfo.location = 'Within Domain'
  1677.   AliasInfo.mode     = 'At Requester use'
  1678.   AliasInfo.type     = 'Files'
  1679.   AliasInfo.path     = 'D:\APPS\TEMP'
  1680.  
  1681.   myRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
  1682.  
  1683.   if myRc <> '0' then do
  1684.    say 'Got error from NetAdd() ' myRc
  1685.    call DropLsRxutFuncs
  1686.    exit 9
  1687.   end
  1688.   else do
  1689.    say 'Alias added successfully'
  1690.    say
  1691.   end
  1692.  
  1693.   call DropLsRxutFuncs
  1694.   call RxFuncDrop 'LoadLsRxutFuncs'
  1695.  
  1696.   exit 0
  1697.  
  1698.  Example Output 
  1699.  
  1700.  
  1701.   Alias added successfully
  1702.  
  1703.  
  1704. ΓòÉΓòÉΓòÉ 9.4. NETAPP Add ΓòÉΓòÉΓòÉ
  1705.  
  1706. The function creates a public or private application. 
  1707.  
  1708. Syntax 
  1709.  
  1710.  
  1711. MyRc = NetAdd(NETAPP, 'AppInfo', SrvName)
  1712. MyRc = NetAdd(NETAPP, 'AppInfo', SrvName, UserId)
  1713.  
  1714. Parameters 
  1715.  
  1716. The parameters required are: 
  1717.  
  1718.  'AppInfo'  The REXX variable holding the application information. The variable 
  1719.             is divided into: 
  1720.  
  1721.               o  AppInfo.name 
  1722.  
  1723.                  The application name 
  1724.  
  1725.               o  AppInfo.remark 
  1726.  
  1727.                  The application remark or description. A remark must be 
  1728.                  provided 
  1729.  
  1730.               o  AppInfo.command 
  1731.  
  1732.                  The command that starts the application 
  1733.  
  1734.               o  AppInfo.command_parms 
  1735.  
  1736.                  The application start parameters if required 
  1737.  
  1738.               o  AppInfo.app_alias_or_drv 
  1739.  
  1740.                  The alias or drive where the application resides. It specifies 
  1741.                  a drive letter, followed by a colon (:), if the application 
  1742.                  resides on the user's local machine or it specifies an 
  1743.                  existing alias if the application resides on a server 
  1744.  
  1745.               o  AppInfo.app_drive 
  1746.  
  1747.                  Applies to DOS public applications only. It is used to specify 
  1748.                  the drive that is current when the application runs. Valid 
  1749.                  letters are A through X. A value of * indicates that the 
  1750.                  system should choose a drive letter 
  1751.  
  1752.               o  AppInfo.app_path_to_dir 
  1753.  
  1754.                  The remaining path to the application 
  1755.  
  1756.               o  AppInfo.wrkdir_alias_or_drv 
  1757.  
  1758.                  Specifies the directory that is made current when the 
  1759.                  application runs. If the working directory is on the local 
  1760.                  machine, it specifies the drive, where the directory is 
  1761.                  located. If the working directory is remote, it specifies an 
  1762.                  existing alias where the directory is located 
  1763.  
  1764.               o  AppInfo.wrkdir_drive 
  1765.  
  1766.                  Specifies the drive that the working directory is to be 
  1767.                  assigned to when the application is started. For OS/2 
  1768.                  applications, this can be any letter D through Z. For DOS 
  1769.                  applications, this can be any letter A through X. A value of * 
  1770.                  indicates that the system should choose a drive when the 
  1771.                  application is started. 
  1772.  
  1773.               o  AppInfo.wrkdir_path_to_dir 
  1774.  
  1775.                  The remaining path to the working directory 
  1776.  
  1777.               o  AppInfo.prompt 
  1778.  
  1779.                  Prompt for parameters. The following values can be used: 
  1780.  
  1781.                                   Prompt for parameters            Value
  1782.                                   ---------------------            -----
  1783.                                   Yes                              'Prompt user for parameters'
  1784.                                                                    'Yes'
  1785.  
  1786.                                   No                               'Do not prompt user for parameters'
  1787.                                                                    'No'
  1788.  
  1789.                  The default value is 'No'. 
  1790.  
  1791.               o  AppInfo.interface 
  1792.  
  1793.                  The interface type. The values can be: 
  1794.  
  1795.                                   Interface type                   Value
  1796.                                   --------------                   -----
  1797.                                   Presentation Manager             'Presentation Manager'
  1798.                                                                    'PM'
  1799.  
  1800.                                   OS/2 Fullscreen                  'Fullscreen'
  1801.                                                                    'FS'
  1802.  
  1803.                                   OS/2 Windowed                    'Windowed'
  1804.                                                                    'WIN'
  1805.  
  1806.                  The default value is 'Presentation Manager'. 
  1807.  
  1808.               o  AppInfo.type 
  1809.  
  1810.                  The application type. The following values are used: 
  1811.  
  1812.                                   Application type                 Value
  1813.                                   ----------------                 -----
  1814.                                   Public DOS                       'Public DOS application'
  1815.                                                                    'PUBLIC_DOS'
  1816.  
  1817.                                   Public OS/2                      'Public OS/2 application'
  1818.                                                                    'PUBLIC_OS2'
  1819.  
  1820.                                   Private OS/2                     'Private OS/2 application'
  1821.                                                                    'PRIVATE_OS2'
  1822.  
  1823.                  The default value is 'Public OS/2 application'. 
  1824.  
  1825.               o  AppInfo.res_count 
  1826.  
  1827.                  The number of application resource list entries that follows. 
  1828.                  A value of zero indicates that the application does not 
  1829.                  require any redirected devices when it runs. 
  1830.  
  1831.               o  AppInfo.i.arl_alias 
  1832.  
  1833.                  The alias for the resource required by the application. The 
  1834.                  variable i must have a value from 1 to AppInfo.res_count 
  1835.  
  1836.               o  AppInfo.i.arl_device 
  1837.  
  1838.                  The device assigned to the resource specified. 
  1839.  
  1840.                  If AppInfo.i.arl_alias specifies a files alias, 
  1841.                  AppInfo.i.arl_device must be a drive letter followed by a 
  1842.                  colon (:). Valid drive letters for OS/2 applications are D: 
  1843.                  through Z:. Valid drive letters for DOS applications are A: 
  1844.                  through X:. 
  1845.  
  1846.                  If AppInfo.i.arl_alias specifies a print alias, valid values 
  1847.                  are LPT1 through LPT9. 
  1848.  
  1849.                  If AppInfo.i.arl_alias specifies a serial device alias, valid 
  1850.                  values for AppInfo.i.arl_device are LPT1 through LPT9 and COM1 
  1851.                  through COM9. 
  1852.  
  1853.                  Additionally, each application resource list entry must have a 
  1854.                  unique value for its AppInfo.i.arl_device field. For example, 
  1855.                  if AppInfo.i.arl_alias specifies a files alias, the drive 
  1856.                  letter specified in the AppInfo.i.arl_device field must be 
  1857.                  different from AppInfo.app_drive, AppInfo.wrkdir_drive, and 
  1858.                  any other AppInfo.i.arl_device fields for files aliases. 
  1859.  
  1860.                  The variable i must have a value from 1 to AppInfo.res_count 
  1861.  
  1862.  SrvName    The server computer name of the domain controller 
  1863.  
  1864.  Application The application name 
  1865.  
  1866.  UserId     The name of the userid. The name of the userid must be specified 
  1867.             for private applications 
  1868.  
  1869.  Note 
  1870.  
  1871.  The server computer name can be specified as '' for a local domain controller. 
  1872.  
  1873.  Example 
  1874.  
  1875.  
  1876.   /* Add a public application */
  1877.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1878.   call LoadLsRxutFuncs
  1879.  
  1880.   NETAPP  = 30
  1881.   SrvName = '\\ILIDC'
  1882.  
  1883.   AppInfo.name                = 'BOOKREAD'
  1884.   AppInfo.remark              = 'Shared Bookmanager Read/2'
  1885.   AppInfo.command             = 'BOOKMGR.EXE'
  1886.   AppInfo.command_parms       = ''
  1887.   AppInfo.app_alias_or_drv    = 'BOOKMGR' /* Bookmanager programs alias */
  1888.                                           /* AppInfo.app_drive not used */
  1889.   AppInfo.app_path_to_dir     = '\'
  1890.   AppInfo.wrkdir_alias_or_drv = 'BOOKMGR'
  1891.   AppInfo.wrkdir_drive        = 'R'       /* Make R: the working dir    */
  1892.   AppInfo.wrkdir_path_to_dir  = '\'       /* Remaining path             */
  1893.   AppInfo.prompt              = 'Do not prompt user for parameters'
  1894.   AppInfo.interface           = 'Presentation Manager'
  1895.   AppInfo.type                = 'Public OS/2 application'
  1896.  
  1897.   /* The additional resources */
  1898.   AppInfo.res_count    = 3
  1899.   AppInfo.1.arl_alias  = 'SHAREDLL'
  1900.   AppInfo.1.arl_device = 'Y:'
  1901.   AppInfo.2.arl_alias  = 'THEBOOK'
  1902.   AppInfo.2.arl_device = 'Q:'
  1903.   AppInfo.3.arl_alias  = 'PRINTIT'
  1904.   AppInfo.3.arl_device = 'LPT4'
  1905.  
  1906.   myRc = NetAdd(NETAPP, 'AppInfo', SrvName)
  1907.  
  1908.   if myRc <> '0' then do
  1909.    say 'Got error from NetAdd() ' myRc
  1910.    call DropLsRxutFuncs
  1911.    exit 9
  1912.   end
  1913.   else do
  1914.    say 'Application added successfully'
  1915.    say
  1916.   end
  1917.  
  1918.   call DropLsRxutFuncs
  1919.   call RxFuncDrop 'LoadLsRxutFuncs'
  1920.  
  1921.   exit 0
  1922.  
  1923.  Example Output 
  1924.  
  1925.  
  1926.   Application added successfully
  1927.  
  1928.  
  1929. ΓòÉΓòÉΓòÉ 9.5. NETAPPSEL Add ΓòÉΓòÉΓòÉ
  1930.  
  1931. The function adds an application to the specified userid application list. 
  1932.  
  1933. Syntax 
  1934.  
  1935.  
  1936. MyRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
  1937.  
  1938. Parameters 
  1939.  
  1940. The parameters required are: 
  1941.  
  1942.  DcName           The Domain Controller computer name 
  1943.  
  1944.  ApplicationName  The name of the application 
  1945.  
  1946.  UserId           The userid 
  1947.  
  1948.  AppType          Application type. The following application types are 
  1949.                   supported: 
  1950.  
  1951.                                     Application type             Value
  1952.                                     ----------------             -----
  1953.                                     Public DOS application       'Public DOS application'
  1954.                                                                  'DOS_PUBLIC'
  1955.  
  1956.                                     Public OS/2 application      'Public OS/2 application'
  1957.                                                                  'OS2_PUBLIC'
  1958.  
  1959.                                     Private OS/2 application     'Private OS/2 application'
  1960.                                                                  'OS2_PRIVATE'
  1961.  
  1962.                   The default value is 'Public OS/2 application'. 
  1963.  
  1964.  Note 
  1965.  
  1966.  The domain controller computer name can be specified as '' for a local domain 
  1967.  controller. 
  1968.  
  1969.  If the application already is in the list, the application will not be added. 
  1970.  
  1971.  Example 
  1972.  
  1973.  
  1974.   /* Add a application to userid application list */
  1975.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  1976.   call LoadLsRxutFuncs
  1977.  
  1978.   NETAPPSEL       = 32
  1979.   DcName          = '\\ILIDC'
  1980.   ApplicationName = 'BOOKREAD'
  1981.   UserId          = 'WS2221'
  1982.   AppType         = 'Public OS/2 application'
  1983.  
  1984.   myRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
  1985.  
  1986.   if myRc <> '0' then do
  1987.    say 'Got error from NetAdd() ' myRc
  1988.    call DropLsRxutFuncs
  1989.    exit 9
  1990.   end
  1991.   else do
  1992.    say
  1993.    say "Application added successfully to user application list"
  1994.   end
  1995.  
  1996.   call DropLsRxutFuncs
  1997.   call RxFuncDrop 'LoadLsRxutFuncs'
  1998.  
  1999.   exit 0
  2000.  
  2001.  Example Output 
  2002.  
  2003.  
  2004.   Application added successfully to user application list
  2005.  
  2006.  
  2007. ΓòÉΓòÉΓòÉ 9.6. NETDASD Add (LS40) ΓòÉΓòÉΓòÉ
  2008.  
  2009. The function invokes the directory limit function, placing a limit on the 
  2010. amount of disk space that can be used within a directory tree. Before this 
  2011. function can be invoked, directory limits must be enabled on the 386-HPFS 
  2012. drive. (See the NetMisc(NETDASDCONTROL) function) 
  2013.  
  2014. Syntax 
  2015.  
  2016.  
  2017. MyRc = NetAdd(NETDASD, 'DASDInfo', SrvName)
  2018.  
  2019. Parameters 
  2020.  
  2021. The parameters required and returned are: 
  2022.  
  2023.  'DASDInfo'  The directory limits information variable, which is divided into: 
  2024.  
  2025.                o  DASDInfo.resource_name 
  2026.  
  2027.                   The name of the directory to add directory limit on. The 
  2028.                   parameter is the directory name, beginning with the drive 
  2029.                   letter and ending without the backslash (\). The path 
  2030.                   specified can be on a redirected drive. In this case, the 
  2031.                   SrvName parameter must be '' 
  2032.  
  2033.                o  DASDInfo.max 
  2034.  
  2035.                   The amount of disk space allotted to this directory by 
  2036.                   directory limits. Specified in KB, this field can be set from 
  2037.                   1 to 67108863. Note however, that subsequent access to the 
  2038.                   directory specified is functionally limited to the smaller of 
  2039.                   the following: 
  2040.  
  2041.                     1. Any directory limits restrictions on any parent 
  2042.                        directory 
  2043.  
  2044.                     2. The total free space on the drive 
  2045.  
  2046.                o  DASDInfo.flag 
  2047.  
  2048.                   A flag controlling the operations when a directory limit 
  2049.                   added The following values are valid: 
  2050.  
  2051.                                     Value Meaning
  2052.                                     ----- -------
  2053.                                      0    Compares a newly specified limit to the amount
  2054.                                           of disk space already taken by the directory.
  2055.                                           If the directory tree size exceeds the new limit,
  2056.                                           NERR_MaxValidationFailed (2304) is returned
  2057.  
  2058.                                      1    Sets the new limit regardless of the present
  2059.                                           size of the directory tree
  2060.  
  2061.                   The default is 0 
  2062.  
  2063.                o  DASDInfo.thresh 
  2064.  
  2065.                   The initial alert threshold as a percentage of the total 
  2066.                   directory limit space allotted, with values ranging from 0 to 
  2067.                   99. Zero specifies that no threshold alert is to be 
  2068.                   generated, and 99 specifies that an alert is generated when 
  2069.                   99% of the allotted directory limit for this directory has 
  2070.                   been reached. Note that a minimum of 1KB of disk space must 
  2071.                   be allotted to a threshold; the value obtained by multiplying 
  2072.                   the DASDInfo.thresh decimal-point value (where 5% is equal to 
  2073.                   0.05) by DASDInfo.max must be at least 1KB. 
  2074.  
  2075.                   This threshold setting generates only 1 alert when this 
  2076.                   boundary is crossed. Subsequent alerts (generated 
  2077.                   incrementally after this threshold has been reached but 
  2078.                   before the entire limit is reached) are specified according 
  2079.                   to the DASDInfo.delta parameter 
  2080.  
  2081.                   The default value is 0 
  2082.  
  2083.                o  DASDInfo.delta 
  2084.  
  2085.                   The increment in which alerts are to be generated after the 
  2086.                   DASDInfo.thresh threshold has been crossed, but before all of 
  2087.                   the allotted disk space has been used. This parameter also is 
  2088.                   specified as a percentage of the total allotted directory 
  2089.                   limit space and can range from 0 upward, as long as its value 
  2090.                   is less than 99 - DASDInfo.thresh. 
  2091.  
  2092.                   Note that a minimum of 1KB of disk space must be allotted to 
  2093.                   an increment; the value obtained by multiplying the 
  2094.                   DASDInfo.delta decimal-point value (where 5% is equal to 
  2095.                   0.05) by DASDInfo.max must be at least 1KB 
  2096.  
  2097.  SrvName     The computer name of the server to perform the directory limit add 
  2098.              operation on 
  2099.  
  2100.  Note 
  2101.  
  2102.  The server computer name can be specified as '' for a local server. 
  2103.  
  2104.  Example 
  2105.  
  2106.  
  2107.   /* Add DASD directory limits on server */
  2108.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2109.   call LoadLsRxutFuncs
  2110.  
  2111.   NETDASD                = 750
  2112.   DASDInfo.resource_name = 'D:\APPS\DATA'
  2113.   DASDInfo.max           = 512
  2114.   DASDInfo.flag          = 0
  2115.   DASDInfo.thresh        = 90
  2116.   DASDInfo.delta         = 5
  2117.   SrvName                = '\\DOMAIN_CONTRLR'
  2118.  
  2119.   myRc = NetAdd(NETDASD, 'DASDInfo', SrvName)
  2120.  
  2121.   if myRc <> '0' then do
  2122.    say 'Got error from NetAdd() ' myRc
  2123.    exitRc = 9
  2124.   end
  2125.   else do
  2126.    say 'Directory limit successfully added'
  2127.    exitRc = 0
  2128.   end
  2129.  
  2130.   call DropLsRxutFuncs
  2131.   call RxFuncDrop 'LoadLsRxutFuncs'
  2132.  
  2133.   exit exitRc
  2134.  
  2135.  Example Output 
  2136.  
  2137.  
  2138.   Directory limit successfully added
  2139.  
  2140.  
  2141. ΓòÉΓòÉΓòÉ 9.7. NETGROUP Add ΓòÉΓòÉΓòÉ
  2142.  
  2143. The function creates a group. 
  2144.  
  2145. Syntax 
  2146.  
  2147.  
  2148. MyRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
  2149.  
  2150. Parameters 
  2151.  
  2152. The parameters required are: 
  2153.  
  2154.  'groupInfo'       The REXX variable holding the group information. The 
  2155.                    variable is divided into 
  2156.  
  2157.                      o  groupInfo.name 
  2158.  
  2159.                         The group name 
  2160.  
  2161.                      o  groupInfo.comment 
  2162.  
  2163.                         The group comment or description. A default comment 
  2164.                         will be provided if groupInfo.comment does not hold a 
  2165.                         value. 
  2166.  
  2167.  SrvName           The server computer name of the domain controller 
  2168.  
  2169.  Note 
  2170.  
  2171.  The server computer name can be specified as '' for a local domain controller. 
  2172.  
  2173.  Example 
  2174.  
  2175.  
  2176.   /* Create a new group with a comment */
  2177.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2178.   call LoadLsRxutFuncs
  2179.  
  2180.   NETGROUP = 70
  2181.   SrvName  = '\\ILIDC'
  2182.   groupInfo.name = 'CSUSERS'
  2183.   groupInfo.comment = 'The Client/Server users group'
  2184.  
  2185.   myRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
  2186.  
  2187.   if myRc <> '0' then do
  2188.    say 'Got error from NetAdd() ' myRc
  2189.    call DropLsRxutFuncs
  2190.    exit 9
  2191.   end
  2192.   else do
  2193.    say
  2194.    say "Group created successfully"
  2195.   end
  2196.  
  2197.   call DropLsRxutFuncs
  2198.   call RxFuncDrop 'LoadLsRxutFuncs'
  2199.  
  2200.   exit 0
  2201.  
  2202.  Example Output 
  2203.  
  2204.  
  2205.   Group created successfully
  2206.  
  2207.  
  2208. ΓòÉΓòÉΓòÉ 9.8. NETGROUPUSERS Add ΓòÉΓòÉΓòÉ
  2209.  
  2210. The function adds a user account to a group. 
  2211.  
  2212. Syntax 
  2213.  
  2214.  
  2215. MyRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
  2216.  
  2217. Parameters 
  2218.  
  2219. The parameters required are: 
  2220.  
  2221.  SrvName           The server computer name of the domain controller 
  2222.  
  2223.  GroupName         The group name 
  2224.  
  2225.  UserId            The name of the userid to add 
  2226.  
  2227.  Note 
  2228.  
  2229.  The server computer name can be specified as '' for a local domain controller. 
  2230.  
  2231.  Example 
  2232.  
  2233.  
  2234.   /* Add a userid to a group */
  2235.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2236.   call LoadLsRxutFuncs
  2237.  
  2238.   NETGROUPUSERS = 340
  2239.   SrvName       = '\\ILIDC'
  2240.   GroupName     = 'CS2USERS'
  2241.   UserId        = 'WS2332'
  2242.  
  2243.   myRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
  2244.  
  2245.   if myRc <> '0' then do
  2246.    say 'Got error from NetAdd() ' myRc
  2247.    call DropLsRxutFuncs
  2248.    exit 9
  2249.   end
  2250.   else do
  2251.    say
  2252.    say "Userid added to Group successfully"
  2253.   end
  2254.  
  2255.   call DropLsRxutFuncs
  2256.   call RxFuncDrop 'LoadLsRxutFuncs'
  2257.  
  2258.   exit 0
  2259.  
  2260.  Example Output 
  2261.  
  2262.  
  2263.   Userid added to Group successfully
  2264.  
  2265.  
  2266. ΓòÉΓòÉΓòÉ 9.9. NETLOGONASN Add ΓòÉΓòÉΓòÉ
  2267.  
  2268. The function adds a logon assignment for a userid. 
  2269.  
  2270. Syntax 
  2271.  
  2272.  
  2273. MyRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
  2274.  
  2275. Parameters 
  2276.  
  2277. The parameters required are: 
  2278.  
  2279.  DcName      The domain controller computer name 
  2280.  
  2281.  aliasName   The name of the alias to be assigned 
  2282.  
  2283.  LocalName   The device that will be assigned to the resource specified by 
  2284.              aliasName when the user logs on. Valid drive letters are A through 
  2285.              Z. The drive letter can be followed by a colon (:), but a colon is 
  2286.              not required. A value of * indicates that the system will choose 
  2287.              the first available drive. Valid print devices are LPT1 through 
  2288.              LPT9. Valid serial devices are LPT1 through LPT9 and COM1 through 
  2289.              COM9. Print and serial devices should not be followed by a colon 
  2290.              (that is, COM1: is considered to be an invalid serial device). If 
  2291.              the device field is left blank, the connection is to be 
  2292.              deviceless. 
  2293.  
  2294.  UserId      The name of the userid 
  2295.  
  2296.  Note 
  2297.  
  2298.  The domain controller computer name can be specified as '' for a local domain 
  2299.  controller. 
  2300.  
  2301.  If the logon assignment already is in the list, the additional assignment will 
  2302.  not be added. 
  2303.  
  2304.  Example 
  2305.  
  2306.  
  2307.   /* Add a logon assignment for a userid */
  2308.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2309.   call LoadLsRxutFuncs
  2310.  
  2311.   NETLOGONASN = 52
  2312.   DcName      = '\\ILIDC'
  2313.   aliasName   = 'BOOKS'
  2314.   LocalName   = 'W'
  2315.   UserId      = 'WS2221'
  2316.  
  2317.   myRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
  2318.  
  2319.   if myRc <> '0' then do
  2320.    say 'Got error from NetAdd() ' myRc
  2321.    call DropLsRxutFuncs
  2322.    exit 9
  2323.   end
  2324.   else do
  2325.    say
  2326.    say "Logon assignment added successfully"
  2327.   end
  2328.  
  2329.   call DropLsRxutFuncs
  2330.   call RxFuncDrop 'LoadLsRxutFuncs'
  2331.  
  2332.   exit 0
  2333.  
  2334.  Example Output 
  2335.  
  2336.  
  2337.   Logon assignment added successfully
  2338.  
  2339.  
  2340. ΓòÉΓòÉΓòÉ 9.10. NETMESSAGENAME Add ΓòÉΓòÉΓòÉ
  2341.  
  2342. The function registers a name in the message name table. 
  2343.  
  2344. Syntax 
  2345.  
  2346.  
  2347. MyRc = NetAdd(NETMESSAGENAME, msgName, fwdAction, SrvName)
  2348.  
  2349. Parameters 
  2350.  
  2351. The parameters required are: 
  2352.  
  2353.  msgName           The message name to add into the name table 
  2354.  
  2355.  fwdAction         The action to take if name already is forwarded. If the 
  2356.                    value is not 0, the name is added to the message name table; 
  2357.                    if the value is 0, and the name has been forwarded already, 
  2358.                    an error is returned 
  2359.  
  2360.                    The default value is 0 
  2361.  
  2362.  SrvName           The server computer name 
  2363.  
  2364.  Note 
  2365.  
  2366.  The server computer name can be specified as '' for a local server or 
  2367.  workstation. 
  2368.  
  2369.  Example 
  2370.  
  2371.  
  2372.   /* Add a message name */
  2373.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2374.   call LoadLsRxutFuncs
  2375.  
  2376.   NETMESSAGENAME = 80
  2377.   msgName        = 'MSGNAME'
  2378.   fwdAction      = 0
  2379.   SrvName        = '\\ANYSRV01'
  2380.  
  2381.   myRc = NetAdd(NETMESSAGENAME, msgName, fwdAction, SrvName)
  2382.  
  2383.   if myRc <> '0' then do
  2384.    say 'Got error from NetAdd() ' myRc
  2385.    exitRc = 9
  2386.   end
  2387.   else do
  2388.    say 'Message name entry added successfully'
  2389.   end
  2390.  
  2391.   call DropLsRxutFuncs
  2392.   call RxFuncDrop 'LoadLsRxutFuncs'
  2393.  
  2394.   exit exitRc
  2395.  
  2396.  Example Output 
  2397.  
  2398.  
  2399.   Message name entry added successfully
  2400.  
  2401.  
  2402. ΓòÉΓòÉΓòÉ 9.11. NETSHARE Add ΓòÉΓòÉΓòÉ
  2403.  
  2404. The function adds a server share using either a alias or a shareInfo structure. 
  2405.  
  2406. Syntax 
  2407.  
  2408.  
  2409. MyRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
  2410. MyRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
  2411.  
  2412. Parameters 
  2413.  
  2414. The parameters required are: 
  2415.  
  2416.  'shareInfo'  The REXX variable holding the share information. The variable is 
  2417.               divided into: 
  2418.  
  2419.                 o  shareInfo.netname 
  2420.  
  2421.                    The netname of a resource. It is recommended that the 
  2422.                    shareInfo.netname and the shareInfo.path be the same for a 
  2423.                    Spooler Queue; otherwise, the result is unpredictable 
  2424.  
  2425.                 o  shareInfo.type 
  2426.  
  2427.                    The share type. The following values are used: 
  2428.  
  2429.                                       Share type                       Value
  2430.                                       ----------                       -----
  2431.                                       Disk drive                       'Disk Drive'
  2432.                                                                        'DISKTREE'
  2433.  
  2434.                                       Spooler queue                    'Spooler Queue'
  2435.                                                                        'PRINTQ'
  2436.  
  2437.                                       Serial device                    'Serial Device'
  2438.                                                                        'DEVICE'
  2439.  
  2440.                                       Interprocess Communications      'Interprocess communication (IPC)'
  2441.                                                                        'IPC'
  2442.  
  2443.                 o  shareInfo.remark 
  2444.  
  2445.                    The share remark 
  2446.  
  2447.                 o  shareInfo.max_uses 
  2448.  
  2449.                    The maximum number of concurrent connections that the shared 
  2450.                    resource can accommodate. The default value is 65535 
  2451.  
  2452.                 o  shareInfo.path 
  2453.  
  2454.                    The string containing the local path name of the shared 
  2455.                    resource. For disks, shareInfo.path is the path being 
  2456.                    shared. For spooler queues, shareInfo.path is the name of 
  2457.                    the spooler queue being shared. For serial device queues, 
  2458.                    shareInfo.path is a string of one or more communication 
  2459.                    device names separated by spaces (for example, COM1 COM2 
  2460.                    COM6). 
  2461.  
  2462.                    It is recommended that the shareInfo.netname and the 
  2463.                    shareInfo.path be the same for a Spooler Queue; otherwise, 
  2464.                    the result is unpredictable 
  2465.  
  2466.  SrvName      The computer name of the server that has the resource to be 
  2467.               shared 
  2468.  
  2469.  The second form of the function call is divided into: 
  2470.  
  2471.  DcName            The domain controller computer name, which holds the alias 
  2472.                    information 
  2473.  
  2474.  aliasName         The alias name 
  2475.  
  2476.  NetName           The share network name. For a spooler queue the Queue name 
  2477.                    will be identical with the netname. It the value is empty, 
  2478.                    the default Alias netname will be used. 
  2479.  
  2480.                    It is recommended to use the same netname as the alias name 
  2481.  
  2482.  Note 
  2483.  
  2484.  The server and DcName computer names can be specified as '' for a local 
  2485.  server. 
  2486.  
  2487.  Example using shareInfo structure 
  2488.  
  2489.  
  2490.   /* Net share add using a net share info structure */
  2491.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2492.   call LoadLsRxutFuncs
  2493.  
  2494.   NETSHARE   = 190
  2495.   SrvName    = '\\ILIDC'
  2496.  
  2497.   shareInfo.netname  = 'TEMP'
  2498.   shareInfo.type     = 'Disk Drive'
  2499.   shareInfo.remark   = 'Temporary files share'
  2500.   shareInfo.max_uses = 10
  2501.   shareInfo.path     = 'D:\TEMP\FILES'
  2502.  
  2503.   myRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
  2504.  
  2505.   if myRc <> '0' then do
  2506.    say 'Got error from NetAdd() ' myRc
  2507.    call DropLsRxutFuncs
  2508.    exit 9
  2509.   end
  2510.   else do
  2511.    say
  2512.    say "Resource shared successfully"
  2513.   end
  2514.  
  2515.   call DropLsRxutFuncs
  2516.   call RxFuncDrop 'LoadLsRxutFuncs'
  2517.  
  2518.   exit 0
  2519.  
  2520.  Example Output 
  2521.  
  2522.  
  2523.   Resource shared successfully
  2524.  
  2525.  Example using an alias 
  2526.  
  2527.  
  2528.   /* Net share add using an alias */
  2529.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2530.   call LoadLsRxutFuncs
  2531.  
  2532.   NETSHARE   = 190
  2533.   DcName     = '\\ILIDC'
  2534.   aliasName  = 'THEBOOK'
  2535.   NetName    = 'THEBOOK'
  2536.  
  2537.   myRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
  2538.  
  2539.   if myRc <> '0' then do
  2540.    say 'Got error from NetAdd() ' myRc
  2541.    call DropLsRxutFuncs
  2542.    exit 9
  2543.   end
  2544.   else do
  2545.    say
  2546.    say "Resource shared successfully"
  2547.   end
  2548.  
  2549.   call DropLsRxutFuncs
  2550.   call RxFuncDrop 'LoadLsRxutFuncs'
  2551.  
  2552.   exit 0
  2553.  
  2554.  Example Output 
  2555.  
  2556.  
  2557.   Resource shared successfully
  2558.  
  2559.  
  2560. ΓòÉΓòÉΓòÉ 9.12. NETUSE Add ΓòÉΓòÉΓòÉ
  2561.  
  2562. The function adds a use to a resource using either a UNC name or an alias. 
  2563.  
  2564. Syntax 
  2565.  
  2566.  
  2567. MyRc = NetAdd(NETUSE, 'useInfo', ComputerName)
  2568. MyRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
  2569.  
  2570. Parameters 
  2571.  
  2572. The parameters required are: 
  2573.  
  2574.  'useInfo'  The REXX variable holding the use information. The variable is 
  2575.             divided into: 
  2576.  
  2577.               o  useInfo.local 
  2578.  
  2579.                  The local device name being redirected to the shared resource. 
  2580.                  The variable can either be a device name connection or a UNC 
  2581.                  connection. The following format can be used: 
  2582.  
  2583.                                   Connection type                  Format
  2584.                                   ---------------                  ------
  2585.                                   Device Name                      D: to Z:
  2586.                                                                    LPT1: to LPT9:
  2587.                                                                    COM1: to COM9:
  2588.  
  2589.                                   UNC                              ''
  2590.  
  2591.                  For UNC connections the remote parameter will be used to 
  2592.                  specify the resource to be used 
  2593.  
  2594.               o  useInfo.remote 
  2595.  
  2596.                  The UNC name of the remote resource being accessed. 
  2597.  
  2598.                  The following UNC syntax must be used: 
  2599.  
  2600.                                   \\servername\sharename
  2601.  
  2602.                  The sharename is identical to the netname 
  2603.  
  2604.               o  useInfo.password 
  2605.  
  2606.                  This password if required. A value of 'N/A' or '' will be used 
  2607.                  as no password required. If the variable does not exist the 
  2608.                  default default value is no password required 
  2609.  
  2610.               o  useInfo.asg_type 
  2611.  
  2612.                  The resource type. The following values must be used: 
  2613.  
  2614.                                   Device type                      Value
  2615.                                   -----------                      ------
  2616.                                   Disk Device                      'Disk device'
  2617.                                                                    'DISKDEV'
  2618.  
  2619.                                   Spooled device                   'Spooled printer'
  2620.                                                                    'SPOOLDEV'
  2621.  
  2622.                                   Serial device                    'Serial device'
  2623.                                                                    'CHARDEV'
  2624.  
  2625.                                   Interprocess communication (IPC) 'Interprocess communication (IPC)'
  2626.                                                                    'IPC'
  2627.  
  2628.                                   UNC where local is ''            'UNC'
  2629.  
  2630.  ComputerName The name of the computer that performs the net use operation. For 
  2631.             a local workstation the value can be ''. 
  2632.  
  2633.  The second form requires that the resource specified by the alias already is 
  2634.  shared, otherwise a return code 67 will be returned. The second form of the 
  2635.  function call is divided into: 
  2636.  
  2637.  DcName            The domain controller computer name, which holds the alias 
  2638.                    information 
  2639.  
  2640.  aliasName         The alias name 
  2641.  
  2642.  LocalName         The local device name being redirected to the shared 
  2643.                    resource. The variable can either be a device name 
  2644.                    connection or a UNC connection. The following format can be 
  2645.                    used: 
  2646.  
  2647.                                       Connection type                  Format
  2648.                                       ---------------                  ------
  2649.                                       Device Name                      D: to Z:
  2650.                                                                        LPT1: to LPT9:
  2651.                                                                        COM1: to COM9:
  2652.  
  2653.                                       UNC                              ''
  2654.  
  2655.                    For UNC connections the remote resource name will be created 
  2656.                    from the alias 
  2657.  
  2658.  ComputerName      The name of the computer that performs the net use 
  2659.                    operation. For a local workstation the value can be ''. 
  2660.  
  2661.  Note 
  2662.  
  2663.  The ComputerName and DcName can be specified as '' for a local server 
  2664.  
  2665.  A example using the useInfo structure 
  2666.  
  2667.  
  2668.   /* Net use add using a net use info structure */
  2669.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2670.   call LoadLsRxutFuncs
  2671.  
  2672.   NETUSE       = 270
  2673.   ComputerName = '\\ILIDC'
  2674.  
  2675.   useInfo.local    = 'W:'
  2676.   useInfo.remote   = '\\ILIDC\BOOKS'
  2677.   useInfo.password = ''
  2678.   useInfo.asg_type = 'Disk device'
  2679.  
  2680.   myRc = NetAdd(NETUSE, 'useInfo', ComputerName)
  2681.  
  2682.   if myRc <> '0' then do
  2683.    say 'Got error from NetAdd() ' myRc
  2684.    call DropLsRxutFuncs
  2685.    exit 9
  2686.   end
  2687.   else do
  2688.    say
  2689.    say "Successfully using resource"
  2690.   end
  2691.  
  2692.   call DropLsRxutFuncs
  2693.   call RxFuncDrop 'LoadLsRxutFuncs'
  2694.  
  2695.   exit 0
  2696.  
  2697.  Example Output 
  2698.  
  2699.  
  2700.   Successfully using resource
  2701.  
  2702.  A example using an alias as parameter 
  2703.  
  2704.  
  2705.   /* Net use add using an alias */
  2706.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2707.   call LoadLsRxutFuncs
  2708.  
  2709.   NETUSE       = 270
  2710.   DcName       = '\\ILIDC'
  2711.   aliasName    = 'BOOKMGR'
  2712.   LocalName    = 'X:'
  2713.   ComputerName = '\\ILIDC'
  2714.  
  2715.   myRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
  2716.  
  2717.   if myRc <> '0' then do
  2718.    say 'Got error from NetAdd() ' myRc
  2719.    call DropLsRxutFuncs
  2720.    exit 9
  2721.   end
  2722.   else do
  2723.    say
  2724.    say "Successfully using resource"
  2725.   end
  2726.  
  2727.   call DropLsRxutFuncs
  2728.   call RxFuncDrop 'LoadLsRxutFuncs'
  2729.  
  2730.   exit 0
  2731.  
  2732.  Example Output 
  2733.  
  2734.  
  2735.   Successfully using resource
  2736.  
  2737.  
  2738. ΓòÉΓòÉΓòÉ 9.13. NETUSER Add ΓòÉΓòÉΓòÉ
  2739.  
  2740. The function adds a user account. 
  2741.  
  2742. Syntax 
  2743.  
  2744.  
  2745. MyRc = NetAdd(NETUSER, 'userInfo', SrvName)
  2746.  
  2747. Parameters 
  2748.  
  2749. The parameters required are: 
  2750.  
  2751.  'userInfo'  The REXX variable holding the user account information. The 
  2752.              variable is divided into: 
  2753.  
  2754.                o  userInfo.name 
  2755.  
  2756.                   The userid account name 
  2757.  
  2758.                o  userInfo.password 
  2759.  
  2760.                   The userid account password 
  2761.  
  2762.                o  userInfo.priv 
  2763.  
  2764.                   The userid account privilege level. The following values can 
  2765.                   be used: 
  2766.  
  2767.                                     Account type                     Value
  2768.                                     ------------                     -----
  2769.                                     Guest                            'Guest'
  2770.  
  2771.                                     User                             'User'
  2772.  
  2773.                                     Administrator                    'Admin'
  2774.  
  2775.                o  userInfo.home_dir 
  2776.  
  2777.                   The path to the userid home directory, if any. The following 
  2778.                   rules apply: 
  2779.  
  2780.                   This string can take one of two forms. The first form defines 
  2781.                   the drive of the user that will be assigned to the home 
  2782.                   directory. It can have as many as 260 bytes. 
  2783.  
  2784.  
  2785.                                     x:\machineID\y$\pathname
  2786.  
  2787.                   where x is the drive letter to be assigned, machineID is the 
  2788.                   name of the server that holds the home directory, y is the 
  2789.                   driver letter on the server where the home directory exists, 
  2790.                   and pathname is the remaining path to the directory. 
  2791.  
  2792.                   The second form defines a first available drive specification 
  2793.                   for the name directory: 
  2794.  
  2795.  
  2796.                                     \\machineID\y$\pathname
  2797.  
  2798.                   where machineID, y, and pathname are defined as in the 
  2799.                   preceding example. To define a home directory at the root of 
  2800.                   a server's drive, omit \pathname from either of the forms 
  2801.                   previously mentioned. 
  2802.  
  2803.                   It is important to ensure that this field follows the correct 
  2804.                   format or users may not get their home directory at logon 
  2805.                   time. An access control profile must also be created, giving 
  2806.                   users access to the home directory. 
  2807.  
  2808.                o  userInfo.comment 
  2809.  
  2810.                   The user account comment 
  2811.  
  2812.  SrvName     The server computer name of the domain controller 
  2813.  
  2814.  Note 
  2815.  
  2816.  The server computer name can be specified as '' for a local domain controller. 
  2817.  
  2818.  Example 
  2819.  
  2820.  
  2821.   /* Add a userid */
  2822.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  2823.   call LoadLsRxutFuncs
  2824.  
  2825.   NETUSER = 280
  2826.   SrvName = '\\ILIDC'
  2827.  
  2828.   userInfo.name        = 'WS2221'
  2829.   userInfo.password    = 'PASSWORD'
  2830.   userInfo.priv        = 'User'
  2831.   userInfo.home_dir    = ''
  2832.   userInfo.comment     = 'WS2221 user in location N91-3161'
  2833.  
  2834.   myRc = NetAdd(NETUSER, 'userInfo', SrvName)
  2835.  
  2836.   if myRc <> '0' then do
  2837.    say 'Got error from NetAdd() ' myRc
  2838.    call DropLsRxutFuncs
  2839.    exit 9
  2840.   end
  2841.   else do
  2842.    say
  2843.    say "User created successfully"
  2844.   end
  2845.  
  2846.   call DropLsRxutFuncs
  2847.   call RxFuncDrop 'LoadLsRxutFuncs'
  2848.  
  2849.   exit 0
  2850.  
  2851.  Example Output 
  2852.  
  2853.  
  2854.   User created successfully
  2855.  
  2856.  
  2857. ΓòÉΓòÉΓòÉ 9.14. NETUSER2 Add ΓòÉΓòÉΓòÉ
  2858.  
  2859. The function creates a user account entry with more parameters available for 
  2860. setting during creation. 
  2861.  
  2862. Syntax 
  2863.  
  2864.  
  2865. MyRc = NetAdd(NETUSER2, 'userInfo', SrvName)
  2866.  
  2867. Parameters 
  2868.  
  2869. The parameters required are: 
  2870.  
  2871.  'userInfo'  The REXX variable holding the user account information. The 
  2872.              variable is divided into: 
  2873.  
  2874.                o  userInfo.name 
  2875.  
  2876.                   The userid account name 
  2877.  
  2878.                o  userInfo.password 
  2879.  
  2880.                   The userid account password 
  2881.  
  2882.                o  userInfo.priv 
  2883.  
  2884.                   The userid account privilege level. The following values can 
  2885.                   be used: 
  2886.  
  2887.                                     Account type                     Value
  2888.                                     ------------                     -----
  2889.                                     Guest                            'Guest'
  2890.  
  2891.                                     User                             'User'
  2892.  
  2893.                                     Administrator                    'Administrator'
  2894.  
  2895.                o  userInfo.home_dir 
  2896.  
  2897.                   The path to the userid home directory, if any. The following 
  2898.                   rules apply: 
  2899.  
  2900.                   This string can take one of two forms. The first form defines 
  2901.                   the drive of the user that will be assigned to the home 
  2902.                   directory. It can have as many as 260 bytes. 
  2903.  
  2904.  
  2905.                                     x:\machineID\y$\pathname
  2906.  
  2907.                   where x is the drive letter to be assigned, machineID is the 
  2908.                   name of the server that holds the home directory, y is the 
  2909.                   driver letter on the server where the home directory exists, 
  2910.                   and pathname is the remaining path to the directory. 
  2911.  
  2912.                   The second form defines a first available drive specification 
  2913.                   for the name directory: 
  2914.  
  2915.  
  2916.                                     \\machineID\y$\pathname
  2917.  
  2918.                   where machineID, y, and pathname are defined as in the 
  2919.                   preceding example. To define a home directory at the root of 
  2920.                   a server's drive, omit \pathname from either of the forms 
  2921.                   previously mentioned. 
  2922.  
  2923.                   It is important to ensure that this field follows the correct 
  2924.                   format or users may not get their home directory at logon 
  2925.                   time. An access control profile must also be created, giving 
  2926.                   users access to the home directory. 
  2927.  
  2928.                o  userInfo.comment 
  2929.  
  2930.                   The user account comment 
  2931.  
  2932.                o  userInfo.flags 
  2933.  
  2934.                   The flags parameter determines whether a logon script is to 
  2935.                   be run and whether the user account is enabled. The following 
  2936.                   values must be used: 
  2937.  
  2938.                                     Value   Meaning
  2939.                                     -----   -------
  2940.                                       1    Must be 1. Logon script enabled
  2941.                                       2    If 1, user account disabled
  2942.                                       4    If 1, user account cannot be deleted
  2943.                                       8    If 1, home directory required
  2944.                                      32    If 1, password not required
  2945.                                      64    If 1, user cannot change password
  2946.  
  2947.                   You can combine flags by adding the values 
  2948.  
  2949.                o  userInfo.auth_flags 
  2950.  
  2951.                   The authorization flags parameter grants operator privileges 
  2952.                   (accounts, print, comm, server) to the userid. The following 
  2953.                   values can be used: 
  2954.  
  2955.                                     Value   Meaning
  2956.                                     -----   -------
  2957.                                      1      Print operator privilege is enabled
  2958.                                      2      Comm operator privilege is enabled
  2959.                                      4      Server operator privilege is enabled
  2960.                                      8      Accounts operator privilege is enabled
  2961.  
  2962.                   You can combine operator privileges by adding the values 
  2963.  
  2964.                o  userInfo.full_name 
  2965.  
  2966.                   The full name of the user account 
  2967.  
  2968.                o  userInfo.usr_comment 
  2969.  
  2970.                   A string that is a user settable field 
  2971.  
  2972.                o  userInfo.script_path 
  2973.  
  2974.                   The name of the logon script together with the path 
  2975.                   specification relative to the NETLOGON SCRIPT parameter 
  2976.  
  2977.                o  userInfo.max_storage 
  2978.  
  2979.                   The maximum storage allotted for the home directory. The 
  2980.                   units are kilobytes (KB). An entry of 0xFFFFFFFF or (-1) 
  2981.                   means unlimited storage. The default is -1. 
  2982.  
  2983.                   You can also specify "No Limit" 
  2984.  
  2985.                o  userInfo.logon_server 
  2986.  
  2987.                   An string that contains the name of the preferred server that 
  2988.                   validates user logon requests for this userid. The server 
  2989.                   computer name should be preceded by a double backslash (\\) 
  2990.                   and should be the name of a domain controller or backup 
  2991.                   server on the domain. A server computer name of an asterisk 
  2992.                   (\\*) indicates that the logon request can be handled by any 
  2993.                   domain controller or backup on the domain, this is the 
  2994.                   default setting 
  2995.  
  2996.  SrvName     The server computer name of the domain controller 
  2997.  
  2998.  Note 
  2999.  
  3000.  The server computer name can be specified as '' for a local domain controller. 
  3001.  
  3002.  Example 
  3003.  
  3004.  
  3005.   /* Add a userid using extended call */
  3006.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3007.   call LoadLsRxutFuncs
  3008.  
  3009.   NETUSER2 = 282
  3010.   SrvName  = '\\DOMAIN_CONTRLR'
  3011.  
  3012.   userInfo.name        = 'WS2222'
  3013.   userInfo.password    = 'PASSWORD'
  3014.   userInfo.priv        = 'User'
  3015.   userInfo.home_dir    = ''
  3016.   userInfo.comment     = 'WS2221 user on new domain controller'
  3017.   userInfo.flags       = 1
  3018.   userInfo.auth_flags  = 3
  3019.   userInfo.full_name   = 'Peter The Great'
  3020.   userInfo.usr_comment = 'Your Comment'
  3021.   userInfo.script_path = 'HELLO.CMD'
  3022.   userInfo.max_storage = 1000
  3023.   userInfo.logon_server= '\\*'
  3024.  
  3025.   myRc = NetAdd(NETUSER2, 'userInfo', SrvName)
  3026.  
  3027.   if myRc <> '0' then do
  3028.    say 'Got error from NetAdd() ' myRc
  3029.    exitRc = 9
  3030.   end
  3031.   else do
  3032.    say 'Userid defined successfully'
  3033.    say
  3034.    exitRc = 0
  3035.   end
  3036.  
  3037.   call DropLsRxutFuncs
  3038.   call RxFuncDrop 'LoadLsRxutFuncs'
  3039.  
  3040.   exit exitRc
  3041.  
  3042.  Example Output 
  3043.  
  3044.  
  3045.   Userid defined successfully
  3046.  
  3047.  
  3048. ΓòÉΓòÉΓòÉ 9.15. NETUSERINITDCDB Add ΓòÉΓòÉΓòÉ
  3049.  
  3050. The function creates a new userid entry and forces the creation of the 
  3051. \IBMLAN\DCDB\USERS\userid directory on the Domain Controller. The function is 
  3052. otherwise identical to NetAdd(NETUSER). 
  3053.  
  3054. Syntax 
  3055.  
  3056.  
  3057. MyRc = NetAdd(NETUSERINITDCDB, 'userInfo', SrvName)
  3058.  
  3059. Example 
  3060.  
  3061.  
  3062. /* Add a userid and make DCDBInit request */
  3063. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3064. call LoadLsRxutFuncs
  3065.  
  3066. NETUSERINITDCDB = 290
  3067. SrvName = '\\ILIDC'
  3068.  
  3069. userInfo.name     = 'WST1'
  3070. userInfo.password = 'PASSWORD'
  3071. userInfo.priv     = 'User'
  3072. userInfo.home_dir = ''
  3073. userInfo.comment  = 'Workstation with DCDB directory'
  3074.  
  3075. myRc = NetAdd(NETUSERINITDCDB, 'userInfo', SrvName)
  3076.  
  3077. if myRc <> '0' then do
  3078.  say 'Got error from NetAdd() ' myRc
  3079.  call DropLsRxutFuncs
  3080.  exit 9
  3081. end
  3082. else do
  3083.  say
  3084.  say 'Userid successfully added'
  3085. end
  3086.  
  3087. call DropLsRxutFuncs
  3088. call RxFuncDrop 'LoadLsRxutFuncs'
  3089.  
  3090. exit 0
  3091.  
  3092. Example Output 
  3093.  
  3094.  
  3095. Userid successfully added
  3096.  
  3097.  
  3098. ΓòÉΓòÉΓòÉ 10. NetDelete ΓòÉΓòÉΓòÉ
  3099.  
  3100. The Net delete functions are a family of functions that can be called with a 
  3101. number of parameters. The use of the NetDelete has a minimum of two different 
  3102. parameters. The generic syntax is: 
  3103.  
  3104.  
  3105. MyRc = NetDelete(option, parm1, parm2, parm3)
  3106.  
  3107. The option parameter contains a value to determine what type or option has to 
  3108. be deleted. An example would be the deletion of a user account. 
  3109.  
  3110. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  3111.  
  3112. The MyRc parameter is the return code that will have an value from the 
  3113. NetDelete() function. If the call is successful the character '0' will be 
  3114. returned. Otherwise an error code and descriptive text are inserted by 
  3115. NetDelete() function. 
  3116.  
  3117. The option parameter values are defined in Option parameter values. 
  3118.  
  3119.  
  3120. ΓòÉΓòÉΓòÉ 10.1. NETACCESS Delete ΓòÉΓòÉΓòÉ
  3121.  
  3122. The function deletes all access permission records for a particular shared 
  3123. resource. 
  3124.  
  3125. Syntax 
  3126.  
  3127.  
  3128. MyRc = NetDelete(NETACCESS, SrvName, Path)
  3129.  
  3130. Parameters 
  3131.  
  3132. The parameters specified are: 
  3133.  
  3134.  SrvName   The server computer name 
  3135.  
  3136.  Path      The path. This variable must have a value. See below: 
  3137.  
  3138.                       Resource Type                 Basepath Format
  3139.                       -------------                 ---------------
  3140.                       Drive                         drive:
  3141.                       Path                          \path
  3142.                       Directory                     drive:pathname
  3143.                       File                          drive:pathname
  3144.                       UNC                           \\server\sharename\path
  3145.                       Pipe                          \pipe\pipename
  3146.                       Spooler Queue                 \print\queuename
  3147.                       Serial Device Queue           \comm\chardevqueue
  3148.  
  3149.  Note 
  3150.  
  3151.  The server computer name can be specified as '' for a local server. 
  3152.  
  3153.  Example 
  3154.  
  3155.  
  3156.   /* Delete access control profile */
  3157.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3158.   call LoadLsRxutFuncs
  3159.  
  3160.   NETACCESS = 10
  3161.   SrvName = '\\ILIDC'
  3162.   Path = 'D:\TEMP'
  3163.  
  3164.   myRc = NetDelete(NETACCESS, SrvName, Path)
  3165.  
  3166.   if myRc <> '0' then do
  3167.    say 'Got error from NetDelete() ' myRc
  3168.    call DropLsRxutFuncs
  3169.    exit 9
  3170.   end
  3171.   else do
  3172.    say 'Access Control Profile deleted'
  3173.    say
  3174.   end
  3175.  
  3176.   call DropLsRxutFuncs
  3177.   call RxFuncDrop 'LoadLsRxutFuncs'
  3178.  
  3179.   exit 0
  3180.  
  3181.  Example Output 
  3182.  
  3183.  
  3184.   Access Control Profile deleted
  3185.  
  3186.  
  3187. ΓòÉΓòÉΓòÉ 10.2. NETACCESSDEL ΓòÉΓòÉΓòÉ
  3188.  
  3189. The function deletes one access permission record for a particular existing 
  3190. access control profile. 
  3191.  
  3192. Syntax 
  3193.  
  3194.  
  3195. MyRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
  3196.  
  3197. Parameters 
  3198.  
  3199. The parameters specified are: 
  3200.  
  3201.  SrvName           The server computer name 
  3202.  
  3203.  resourceName      The name of the resource. This variable must have a value. 
  3204.                    See below for accepted values: 
  3205.  
  3206.                                       Resource Type                 Basepath Format
  3207.                                       -------------                 ---------------
  3208.                                       Drive                         drive:
  3209.                                       Path                          \path
  3210.                                       Directory                     drive:pathname
  3211.                                       File                          drive:pathname
  3212.                                       UNC                           \\server\sharename\path
  3213.                                       Pipe                          \pipe\pipename
  3214.                                       Spooler Queue                 \print\queuename
  3215.                                       Serial Device Queue           \comm\chardevqueue
  3216.  
  3217.  ugName            The user or group name 
  3218.  
  3219.  Note 
  3220.  
  3221.  The server computer name can be specified as '' for a local server. 
  3222.  
  3223.  Example 
  3224.  
  3225.  
  3226.   /* Delete access control profile entry */
  3227.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3228.   call LoadLsRxutFuncs
  3229.  
  3230.   NETACCESSDEL = 240
  3231.   SrvName      = '\\ILIDC'
  3232.   resourceName = 'D:\APPS\TEMP'
  3233.   ugName       = 'CSUSERS'
  3234.  
  3235.   myRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
  3236.  
  3237.   if myRc <> '0' then do
  3238.    say 'Got error from NetDelete() ' myRc
  3239.    call DropLsRxutFuncs
  3240.    exit 9
  3241.   end
  3242.   else do
  3243.    say 'Access Control Profile Entry deleted successfully'
  3244.    say
  3245.   end
  3246.  
  3247.   call DropLsRxutFuncs
  3248.   call RxFuncDrop 'LoadLsRxutFuncs'
  3249.  
  3250.   exit 0
  3251.  
  3252.  Example Output 
  3253.  
  3254.  
  3255.   Access Control Profile Entry deleted successfully
  3256.  
  3257.  
  3258. ΓòÉΓòÉΓòÉ 10.3. NETALIAS Delete ΓòÉΓòÉΓòÉ
  3259.  
  3260. The function deletes an alias definition. 
  3261.  
  3262. Syntax 
  3263.  
  3264.  
  3265. MyRc = NetDelete(NETALIAS, SrvName, AliasName)
  3266.  
  3267. Parameters 
  3268.  
  3269. The parameters specified are: 
  3270.  
  3271.  SrvName           The server computer name 
  3272.  
  3273.  AliasName         The alias name 
  3274.  
  3275.  Note 
  3276.  
  3277.  The server computer name can be specified as '' for a local server. 
  3278.  
  3279.  Example 
  3280.  
  3281.  
  3282.   /* Delete alias definition */
  3283.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3284.   call LoadLsRxutFuncs
  3285.  
  3286.   NETALIAS = 20
  3287.   SrvName  = '\\ILIDC'
  3288.   AliasName = 'THEALIAS'
  3289.  
  3290.   myRc = NetDelete(NETALIAS, SrvName, AliasName)
  3291.  
  3292.   if myRc <> '0' then do
  3293.    say 'Got error from NetDelete() ' myRc
  3294.    call DropLsRxutFuncs
  3295.    exit 9
  3296.   end
  3297.   else do
  3298.    say 'Alias deleted successfully'
  3299.    say
  3300.   end
  3301.  
  3302.   call DropLsRxutFuncs
  3303.   call RxFuncDrop 'LoadLsRxutFuncs'
  3304.  
  3305.   exit 0
  3306.  
  3307.  Example Output 
  3308.  
  3309.  
  3310.   Alias deleted successfully
  3311.  
  3312.  
  3313. ΓòÉΓòÉΓòÉ 10.4. NETAPP Delete ΓòÉΓòÉΓòÉ
  3314.  
  3315. The function deletes a public or private application definition. 
  3316.  
  3317. Syntax 
  3318.  
  3319.  
  3320. MyRc = NetDelete(NETAPP, SrvName, PublicApp)
  3321. MyRc = NetDelete(NETAPP, SrvName, PrivateApp, UserId)
  3322.  
  3323. Parameters 
  3324.  
  3325. The parameters specified are: 
  3326.  
  3327.  SrvName           The server computer name 
  3328.  
  3329.  PublicApp         Use the NetDelete() function with 3 arguments to delete a 
  3330.                    public application 
  3331.  
  3332.  PrivateApp        This is the name of a private application. It must be used 
  3333.                    together with a userid 
  3334.  
  3335.  UserId            The userid 
  3336.  
  3337.  Note 
  3338.  
  3339.  The server computer name can be specified as '' for a local server. 
  3340.  
  3341.  Example 
  3342.  
  3343.  
  3344.   /* Delete a public application definition */
  3345.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3346.   call LoadLsRxutFuncs
  3347.  
  3348.   NETAPP  = 30
  3349.   SrvName = '\\ILIDC'
  3350.   PublicApp = 'MSAPP'
  3351.  
  3352.   myRc = NetDelete(NETAPP, SrvName, PublicApp)
  3353.  
  3354.   if myRc <> '0' then do
  3355.    say 'Got error from NetDelete() ' myRc
  3356.    call DropLsRxutFuncs
  3357.    exit 9
  3358.   end
  3359.   else do
  3360.    say 'Public application deleted successfully'
  3361.    say
  3362.   end
  3363.  
  3364.   call DropLsRxutFuncs
  3365.   call RxFuncDrop 'LoadLsRxutFuncs'
  3366.  
  3367.   exit 0
  3368.  
  3369.  Example Output 
  3370.  
  3371.  
  3372.   Public application deleted successfully
  3373.  
  3374.  
  3375. ΓòÉΓòÉΓòÉ 10.5. NETAPPSEL Delete ΓòÉΓòÉΓòÉ
  3376.  
  3377. The function removes an application from the specified userid application 
  3378. selector list. 
  3379.  
  3380. Syntax 
  3381.  
  3382.  
  3383. MyRc = NetDelete(NETAPPSEL, SrvName, UserId)
  3384. MyRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
  3385.  
  3386. Parameters 
  3387.  
  3388. The parameters specified are: 
  3389.  
  3390.  SrvName           The server computer name 
  3391.  
  3392.  UserId            The userid to be deleted 
  3393.  
  3394.  ApplicationName   The application name to remove from the application 
  3395.                    selection list. Using the function call without an 
  3396.                    application name removes all applications from the specified 
  3397.                    userid application selector list 
  3398.  
  3399.  Note 
  3400.  
  3401.  The server computer name can be specified as '' for a local server. 
  3402.  
  3403.  Example 
  3404.  
  3405.  
  3406.   /* Delete a application from user dekstop */
  3407.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3408.   call LoadLsRxutFuncs
  3409.  
  3410.   NETAPPSEL = 32
  3411.   SrvName = '\\ILIDC'
  3412.   UserId = 'WS12345'
  3413.   ApplicationName = 'LIVA'
  3414.  
  3415.   myRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
  3416.  
  3417.   if myRc <> '0' then do
  3418.    say 'Got error from NetDelete() ' myRc
  3419.    call DropLsRxutFuncs
  3420.    exit 9
  3421.   end
  3422.   else do
  3423.    say 'Application removed from desktop successfully'
  3424.    say
  3425.   end
  3426.  
  3427.   call DropLsRxutFuncs
  3428.   call RxFuncDrop 'LoadLsRxutFuncs'
  3429.  
  3430.   exit 0
  3431.  
  3432.  Example Output 
  3433.  
  3434.  
  3435.   Application removed from desktop successfully
  3436.  
  3437.  
  3438. ΓòÉΓòÉΓòÉ 10.6. NETDASD Delete (LS40) ΓòÉΓòÉΓòÉ
  3439.  
  3440. The function deletes a directory limit from a specified directory. Before this 
  3441. function can be invoked, directory limits must be enabled on the 386-HPFS 
  3442. drive. (See the NetMisc(NETDASDCONTROL) function) 
  3443.  
  3444. Syntax 
  3445.  
  3446.  
  3447. MyRc = NetDelete(NETDASD, DirPath, SrvName)
  3448.  
  3449. Parameters 
  3450.  
  3451. The parameters specified are: 
  3452.  
  3453.  SrvName       The server computer name 
  3454.  
  3455.  DirPath       The path specification for the directory limit to delete 
  3456.  
  3457.  Note 
  3458.  
  3459.  The server computer name can be specified as '' for a local server. 
  3460.  
  3461.  Example 
  3462.  
  3463.  
  3464.   /* Delete a DASD directory limit on server */
  3465.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3466.   call LoadLsRxutFuncs
  3467.  
  3468.   NETDASD = 750
  3469.   DirPath = 'D:\APPS\DATA'
  3470.   SrvName = '\\DOMAIN_CONTRLR'
  3471.  
  3472.   myRc = NetDelete(NETDASD, DirPath, SrvName)
  3473.  
  3474.   if myRc <> '0' then do
  3475.    say 'Got error from NetDelete() ' myRc
  3476.    exitRc = 9
  3477.   end
  3478.   else do
  3479.    say 'Directory limit successfully deleted'
  3480.    exitRc = 0
  3481.   end
  3482.  
  3483.   call DropLsRxutFuncs
  3484.   call RxFuncDrop 'LoadLsRxutFuncs'
  3485.  
  3486.   exit exitRc
  3487.  
  3488.   exit 0
  3489.  
  3490.  Example Output 
  3491.  
  3492.  
  3493.   Directory limit successfully deleted
  3494.  
  3495.  
  3496. ΓòÉΓòÉΓòÉ 10.7. NETFILECLOSE Close a fileid ΓòÉΓòÉΓòÉ
  3497.  
  3498. The function performs a close on an opened file. 
  3499.  
  3500. Syntax 
  3501.  
  3502.  
  3503. MyRc = NetDelete(NETFILECLOSE, SrvName, FileId)
  3504.  
  3505. Parameters 
  3506.  
  3507. The parameters specified are: 
  3508.  
  3509.  SrvName           The server computer name on which the file is opened 
  3510.  
  3511.  FileId            The numeric file identifier of the file to be closed 
  3512.  
  3513.  Note 
  3514.  
  3515.  The server computer name can be specified as '' for a local server. 
  3516.  
  3517.  Example 
  3518.  
  3519.  
  3520.   /* Close an opened file on a server */
  3521.   if RxFuncQuery('NetDelete') <> 0 then do
  3522.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3523.    call LoadLsRxutFuncs
  3524.   end
  3525.  
  3526.   NETFILECLOSE = 220
  3527.   SrvName      = '\\ILIDC'
  3528.   FileId       = 3
  3529.  
  3530.   myRc = NetDelete(NETFILECLOSE, SrvName, FileId)
  3531.  
  3532.   if myRc <> '0' then do
  3533.    say 'Got error from NetDelete() ' myRc
  3534.    exit 9
  3535.   end
  3536.   else do
  3537.    say 'File closed successfully'
  3538.    say
  3539.   end
  3540.  
  3541.   exit 0
  3542.  
  3543.  Example Output 
  3544.  
  3545.  
  3546.   File closed successfully
  3547.  
  3548.  
  3549. ΓòÉΓòÉΓòÉ 10.8. NETGROUP Delete ΓòÉΓòÉΓòÉ
  3550.  
  3551. The function deletes a group definition. 
  3552.  
  3553. Syntax 
  3554.  
  3555.  
  3556. MyRc = NetDelete(NETGROUP, SrvName, GroupName)
  3557.  
  3558. Parameters 
  3559.  
  3560. The parameters specified are: 
  3561.  
  3562.  SrvName           The server computer name 
  3563.  
  3564.  GroupName         The name of the group definition to delete 
  3565.  
  3566.  Note 
  3567.  
  3568.  The server computer name can be specified as '' for a local server. 
  3569.  
  3570.  Example 
  3571.  
  3572.  
  3573.   /* Delete a group definition */
  3574.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3575.   call LoadLsRxutFuncs
  3576.  
  3577.   NETGROUP = 70
  3578.   SrvName  = '\\ILIDC'
  3579.   GroupName = 'TMPGROUP'
  3580.  
  3581.   myRc = NetDelete(NETGROUP, SrvName, GroupName)
  3582.  
  3583.   if myRc <> '0' then do
  3584.    say 'Got error from NetDelete() ' myRc
  3585.    call DropLsRxutFuncs
  3586.    exit 9
  3587.   end
  3588.   else do
  3589.    say 'Group definition deleted successfully'
  3590.    say
  3591.   end
  3592.  
  3593.   call DropLsRxutFuncs
  3594.   call RxFuncDrop 'LoadLsRxutFuncs'
  3595.  
  3596.   exit 0
  3597.  
  3598.  Example Output 
  3599.  
  3600.  
  3601.   Group definition deleted successfully
  3602.  
  3603.  
  3604. ΓòÉΓòÉΓòÉ 10.9. NETGROUPUSERS Delete ΓòÉΓòÉΓòÉ
  3605.  
  3606. The function deletes a userid from a group definition. 
  3607.  
  3608. Syntax 
  3609.  
  3610.  
  3611. MyRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
  3612.  
  3613. Parameters 
  3614.  
  3615. The parameters specified are: 
  3616.  
  3617.  SrvName           The server computer name 
  3618.  
  3619.  GroupName         The name of the group 
  3620.  
  3621.  UserId            The userid to delete from a group 
  3622.  
  3623.  Note 
  3624.  
  3625.  The server computer name can be specified as '' for a local server. 
  3626.  
  3627.  Example 
  3628.  
  3629.  
  3630.   /* Delete a group definition */
  3631.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3632.   call LoadLsRxutFuncs
  3633.  
  3634.   NETGROUPUSERS = 340
  3635.   SrvName       = '\\ILIDC'
  3636.   GroupName     = 'THEGROUP'
  3637.   UserId        = 'WS1000'
  3638.  
  3639.   myRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
  3640.  
  3641.   if myRc <> '0' then do
  3642.    say 'Got error from NetDelete() ' myRc
  3643.    call DropLsRxutFuncs
  3644.    exit 9
  3645.   end
  3646.   else do
  3647.    say 'Userid deleted from group successfully'
  3648.    say
  3649.   end
  3650.  
  3651.   call DropLsRxutFuncs
  3652.   call RxFuncDrop 'LoadLsRxutFuncs'
  3653.  
  3654.   exit 0
  3655.  
  3656.  Example Output 
  3657.  
  3658.  
  3659.   Userid deleted from group successfully
  3660.  
  3661.  
  3662. ΓòÉΓòÉΓòÉ 10.10. NETLOGONASN Delete ΓòÉΓòÉΓòÉ
  3663.  
  3664. The function removes all or one resource from a userid logon assignment list. 
  3665.  
  3666. Syntax 
  3667.  
  3668.  
  3669. MyRc = NetDelete(NETLOGONASN, SrvName, UserId)
  3670. MyRc = NetDelete(NETLOGONASN, SrvName, UserId, AliasName)
  3671.  
  3672. Parameters 
  3673.  
  3674. The parameters specified are: 
  3675.  
  3676.  SrvName           The server computer name 
  3677.  
  3678.  UserId            The userid to be deleted 
  3679.  
  3680.  AliasName         The alias name which will be removed from the logon 
  3681.                    assignment list 
  3682.  
  3683.                    Use the function call with 3 parameters to delete all logon 
  3684.                    assignments for a userid. Use the function call with 4 
  3685.                    parameters to delete a logon assignment for a known alias 
  3686.  
  3687.  Note 
  3688.  
  3689.  The server computer name can be specified as '' for a local server. 
  3690.  
  3691.  Example 
  3692.  
  3693.  
  3694.   /* Delete a logon assignment for a user */
  3695.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3696.   call LoadLsRxutFuncs
  3697.  
  3698.   NETLOGONASN = 52
  3699.   SrvName = '\\ILIDC'
  3700.   UserId = 'WS12345'
  3701.   Alias = 'BOOKS'
  3702.  
  3703.   myRc = NetDelete(NETLOGONASN, SrvName, UserId, Alias)
  3704.  
  3705.   if myRc <> '0' then do
  3706.    say 'Got error from NetDelete() ' myRc
  3707.    call DropLsRxutFuncs
  3708.    exit 9
  3709.   end
  3710.   else do
  3711.    say 'Logon Assignment removed successfully'
  3712.    say
  3713.   end
  3714.  
  3715.   call DropLsRxutFuncs
  3716.   call RxFuncDrop 'LoadLsRxutFuncs'
  3717.  
  3718.   exit 0
  3719.  
  3720.  Example Output 
  3721.  
  3722.  
  3723.   Logon Assignment removed successfully
  3724.  
  3725.  
  3726. ΓòÉΓòÉΓòÉ 10.11. NETMESSAGENAME Delete ΓòÉΓòÉΓòÉ
  3727.  
  3728. The function deletes a name in the message name table. 
  3729.  
  3730. Syntax 
  3731.  
  3732.  
  3733. MyRc = NetDelete(NETMESSAGENAME, msgName, fwdAction, SrvName)
  3734.  
  3735. Parameters 
  3736.  
  3737. The parameters required are: 
  3738.  
  3739.  msgName           The message name to delete from the name table 
  3740.  
  3741.  fwdAction         The action to take if the messages for name are forwarded to 
  3742.                    another name. If the value is nonzero, the forwarded name is 
  3743.                    deleted. If the value is 0, the name is not deleted. 
  3744.  
  3745.                    The default value is 0 
  3746.  
  3747.  SrvName           The server computer name 
  3748.  
  3749.  Note 
  3750.  
  3751.  The server computer name can be specified as '' for a local server. 
  3752.  
  3753.  Example 
  3754.  
  3755.  
  3756.   /* Delete a name from the message name table */
  3757.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3758.   call LoadLsRxutFuncs
  3759.  
  3760.   NETMESSAGENAME = 80
  3761.   msgName        = 'MSGNAME'
  3762.   fwdAction      = 0
  3763.   SrvName        = '\\ANYSRV01'
  3764.  
  3765.   myRc = NetDelete(NETMESSAGENAME, msgName, fwdAction, SrvName)
  3766.  
  3767.   if myRc <> '0' then do
  3768.    say 'Got error from NetAdd() ' myRc
  3769.    exitRc = 9
  3770.   end
  3771.   else do
  3772.    say 'Message name entry deleted successfully'
  3773.   end
  3774.  
  3775.   call DropLsRxutFuncs
  3776.   call RxFuncDrop 'LoadLsRxutFuncs'
  3777.  
  3778.   exit exitRc
  3779.  
  3780.  Example Output 
  3781.  
  3782.  
  3783.   Message name entry deleted successfully
  3784.  
  3785.  
  3786. ΓòÉΓòÉΓòÉ 10.12. NETPRINTJOB Delete ΓòÉΓòÉΓòÉ
  3787.  
  3788. The function deletes a print job from a printer queue. 
  3789.  
  3790. Syntax 
  3791.  
  3792.  
  3793. MyRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
  3794.  
  3795. Parameters 
  3796.  
  3797. The parameters specified are: 
  3798.  
  3799.  SrvName           The server computer name 
  3800.  
  3801.  QueueName         The name of the printer queue 
  3802.  
  3803.  JobId             The job identification number 
  3804.  
  3805.  Note 
  3806.  
  3807.  The server computer name can be specified as '' for a local server. 
  3808.  
  3809.  Example 
  3810.  
  3811.  
  3812.   /* Delete a print job */
  3813.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3814.   call LoadLsRxutFuncs
  3815.  
  3816.   NETPRINTJOB = 110
  3817.   SrvName     = '\\ILIDC'
  3818.   QueueName   = 'IBM4019L'
  3819.   JobId = 6
  3820.  
  3821.   myRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
  3822.  
  3823.   if myRc <> '0' then do
  3824.    say 'Got error from NetDelete() ' myRc
  3825.    call DropLsRxutFuncs
  3826.    exit 9
  3827.   end
  3828.   else do
  3829.    say 'Print job deleted successfully'
  3830.    say
  3831.   end
  3832.  
  3833.   call DropLsRxutFuncs
  3834.   call RxFuncDrop 'LoadLsRxutFuncs'
  3835.  
  3836.   exit 0
  3837.  
  3838.  Example Output 
  3839.  
  3840.  
  3841.   Print job deleted successfully
  3842.  
  3843.  
  3844. ΓòÉΓòÉΓòÉ 10.13. NETSESSION Delete ΓòÉΓòÉΓòÉ
  3845.  
  3846. The function ends a session between a requester and a server. 
  3847.  
  3848. Syntax 
  3849.  
  3850.  
  3851. MyRc = NetDelete(NETSESSION, SrvName, RequesterName)
  3852.  
  3853. Parameters 
  3854.  
  3855. The parameters specified are: 
  3856.  
  3857.  SrvName           The server computer name 
  3858.  
  3859.  RequesterName     The computer name of the requester that established the 
  3860.                    session being discontinued 
  3861.  
  3862.  Note 
  3863.  
  3864.  The server computer name can be specified as '' for a local server. 
  3865.  
  3866.  Example 
  3867.  
  3868.  
  3869.   /* Stop a session between a server and a requester */
  3870.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3871.   call LoadLsRxutFuncs
  3872.  
  3873.   NETSESSION = 180
  3874.   SrvName    = '\\ILIDC'
  3875.   RequesterName = '\\TEST19'
  3876.  
  3877.   myRc = NetDelete(NETSESSION, SrvName, RequesterName)
  3878.  
  3879.   if myRc <> '0' then do
  3880.    say 'Got error from NetDelete() ' myRc
  3881.    call DropLsRxutFuncs
  3882.    exit 9
  3883.   end
  3884.   else do
  3885.    say 'Session stopped successfully'
  3886.    say
  3887.   end
  3888.  
  3889.   call DropLsRxutFuncs
  3890.   call RxFuncDrop 'LoadLsRxutFuncs'
  3891.  
  3892.   exit 0
  3893.  
  3894.  Example Output 
  3895.  
  3896.  
  3897.   Session stopped successfully
  3898.  
  3899.  
  3900. ΓòÉΓòÉΓòÉ 10.14. NETSHARE Delete ΓòÉΓòÉΓòÉ
  3901.  
  3902. The function deletes a network name from the list of shared resources of a 
  3903. server. 
  3904.  
  3905. Syntax 
  3906.  
  3907.  
  3908. MyRc = NetDelete(NETSHARE, SrvName, NetName)
  3909.  
  3910. Parameters 
  3911.  
  3912. The parameters specified are: 
  3913.  
  3914.  SrvName           The server computer name 
  3915.  
  3916.  NetName           The network name of the shared resource 
  3917.  
  3918.  Note 
  3919.  
  3920.  The server computer name can be specified as '' for a local server. 
  3921.  
  3922.  Example 
  3923.  
  3924.  
  3925.   /* Stop sharing a shared resource */
  3926.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  3927.   call LoadLsRxutFuncs
  3928.  
  3929.   NETSHARE = 190
  3930.   SrvName = '\\ILIDC'
  3931.   NetName = 'BOOKS'
  3932.  
  3933.   myRc = NetDelete(NETSHARE, SrvName, NetName)
  3934.  
  3935.   if myRc <> '0' then do
  3936.    say 'Got error from NetDelete() ' myRc
  3937.    call DropLsRxutFuncs
  3938.    exit 9
  3939.   end
  3940.   else do
  3941.    say 'Share stopped successfully'
  3942.    say
  3943.   end
  3944.  
  3945.   call DropLsRxutFuncs
  3946.   call RxFuncDrop 'LoadLsRxutFuncs'
  3947.  
  3948.   exit 0
  3949.  
  3950.  Example Output 
  3951.  
  3952.  
  3953.   Share stopped successfully
  3954.  
  3955.  
  3956. ΓòÉΓòÉΓòÉ 10.15. NETUSE Delete ΓòÉΓòÉΓòÉ
  3957.  
  3958. The function ends a connection between a local or UNC device name and a shared 
  3959. resource. 
  3960.  
  3961. Syntax 
  3962.  
  3963.  
  3964. MyRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
  3965.  
  3966. Parameters 
  3967.  
  3968. The parameters specified are: 
  3969.  
  3970.  SrvName      The server computer name 
  3971.  
  3972.  DeviceName   The device name that contains the following information: 
  3973.  
  3974.                 o  If the connection is a device name connection, the name 
  3975.                    specified must be the name of the local device 
  3976.  
  3977.                 o  If the connection is a UNC connection (either implicit or 
  3978.                    explicit), the name must be the UNC name 
  3979.  
  3980.  Force        Is one of three values specifying the type of disconnection. The 
  3981.               following force values are available: 
  3982.  
  3983.               0            USE_NOFORCE 
  3984.  
  3985.                            Maintains the connection in a dormant state, 
  3986.                            decrementing the usecount. A dormant session can 
  3987.                            quickly be activated as soon as reconnection is 
  3988.                            needed, improving system performance 
  3989.  
  3990.               1            USE_FORCE 
  3991.  
  3992.                            Connection is removed only if no file, directory, or 
  3993.                            drive is opened. The usecount is decremented for a 
  3994.                            local device name connection and forced to 0 for a 
  3995.                            UNC connection 
  3996.  
  3997.               2            USE_LOTS_OF_FORCE 
  3998.  
  3999.                            All files, directories, and drives open on the 
  4000.                            connection are forced closed 
  4001.  
  4002.  Note 
  4003.  
  4004.  The server computer name can be specified as '' for a local server. 
  4005.  
  4006.  Example 
  4007.  
  4008.  
  4009.   /* Stop using a UNC name */
  4010.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4011.   call LoadLsRxutFuncs
  4012.  
  4013.   NETUSE = 270
  4014.   SrvName = '\\ILIDC'
  4015.   DeviceName = '\\ILIDC\BOOKS'
  4016.   Force = 1
  4017.  
  4018.   myRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
  4019.  
  4020.   if myRc <> '0' then do
  4021.    say 'Got error from NetDelete() ' myRc
  4022.    call DropLsRxutFuncs
  4023.    exit 9
  4024.   end
  4025.   else do
  4026.    say 'Net Use stopped successfully'
  4027.    say
  4028.   end
  4029.  
  4030.   call DropLsRxutFuncs
  4031.   call RxFuncDrop 'LoadLsRxutFuncs'
  4032.  
  4033.   exit 0
  4034.  
  4035.  Example Output 
  4036.  
  4037.  
  4038.   Net Use stopped successfully
  4039.  
  4040.  
  4041. ΓòÉΓòÉΓòÉ 10.16. NETUSER Delete ΓòÉΓòÉΓòÉ
  4042.  
  4043. The function removes an user account from the user account subsystem database 
  4044. (UAS), ending all access to the resources in the system. 
  4045.  
  4046. Syntax 
  4047.  
  4048.  
  4049. MyRc = NetDelete(NETUSER, SrvName, UserId)
  4050.  
  4051. Parameters 
  4052.  
  4053. The parameters specified are: 
  4054.  
  4055.  SrvName           The server computer name 
  4056.  
  4057.  UserId            The userid to be deleted 
  4058.  
  4059.  Note 
  4060.  
  4061.  The server computer name can be specified as '' for a local server. 
  4062.  
  4063.  Example 
  4064.  
  4065.  
  4066.   /* Delete a userid */
  4067.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4068.   call LoadLsRxutFuncs
  4069.  
  4070.   NETUSER = 280
  4071.   SrvName = '\\ILIDC'
  4072.   UserId = 'WS1000'
  4073.  
  4074.   myRc = NetDelete(NETUSER, SrvName, UserId)
  4075.  
  4076.   if myRc <> '0' then do
  4077.    say 'Got error from NetDelete() ' myRc
  4078.    call DropLsRxutFuncs
  4079.    exit 9
  4080.   end
  4081.   else do
  4082.    say 'Userid deleted successfully'
  4083.    say
  4084.   end
  4085.  
  4086.   call DropLsRxutFuncs
  4087.   call RxFuncDrop 'LoadLsRxutFuncs'
  4088.  
  4089.   exit 0
  4090.  
  4091.  Example Output 
  4092.  
  4093.  
  4094.   Userid deleted successfully
  4095.  
  4096.  
  4097. ΓòÉΓòÉΓòÉ 11. NetEnumerate ΓòÉΓòÉΓòÉ
  4098.  
  4099. The Net enumerate functions are a family of functions that can be called with a 
  4100. number of parameters.  The NetEnumerate function has two to five different 
  4101. parameters.  The generic syntax is: 
  4102.  
  4103.  
  4104. MyRc = NetEnumerate(option, 'StemVar', parm1, parm2, parm3)
  4105.  
  4106. The option parameter contains a value to determine what type or option has to 
  4107. be enumerated.  An example would be the enumeration of user accounts. 
  4108.  
  4109. The StemVar parameter is specified in quotes.  It will contain the resulting 
  4110. information from the enumeration.  The StemVar.0 element will be set to the 
  4111. number of entries returned in 'StemVar'.  The StemVar.totalentries element will 
  4112. be set to the total number of items (such as shares or users) that exist at the 
  4113. server at the time of the function call.  When very large numbers of items are 
  4114. available, a NetEnumerate call may not be able to return all of them.  In this 
  4115. case, StemVar.0 will indicate a number less than StemVar.totalentries. 
  4116.  
  4117. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  4118.  
  4119. The MyRc parameter is the return code that will have an value from the 
  4120. NetEnumerate() function.  If the call is successful the character '0' will be 
  4121. returned.  Otherwise an error code and descriptive text are inserted by 
  4122. NetEnumerate() function. 
  4123.  
  4124. The optional parameter values are defined in Option parameter values. 
  4125.  
  4126.  
  4127. ΓòÉΓòÉΓòÉ 11.1. NETACCESS Enumerate ΓòÉΓòÉΓòÉ
  4128.  
  4129. The function enumerates resource names having a access permission record (ACP, 
  4130. Access Control Profile). The number of returned entries will be either complete 
  4131. or incomplete. 
  4132.  
  4133. Syntax 
  4134.  
  4135.  
  4136. MyRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
  4137.  
  4138. Parameters 
  4139.  
  4140. The parameters specified are: 
  4141.  
  4142.  'resourcesAcp'  The REXX variable receiving the result. The variable is 
  4143.                  divided into: 
  4144.  
  4145.                    o  resourcesAcp.extend 
  4146.  
  4147.                       This variable indicates if the list provided is either 
  4148.                       'Complete' or 'Incomplete'. A incomplete list of 
  4149.                       resources having a access control profile can be extended 
  4150.                       by calling the NetEnumerate with different base path 
  4151.                       values 
  4152.  
  4153.                    o  resourcesAcp.0 
  4154.  
  4155.                       The number of resources having a access control profile. 
  4156.                       If no access control profiles where found, the value is 0 
  4157.                       and the resourcesAcp.1 is equal to '-none-' 
  4158.  
  4159.                    o  resourcesAcp.i 
  4160.  
  4161.                       The resources having a access control profile. The 
  4162.                       variable i has a value from 1 to resourcesAcp.0. The 
  4163.                       resources listed are relative to the basepath specified 
  4164.  
  4165.  SrvName         The server computer name 
  4166.  
  4167.  Basepath        This variable can either be '' or have a path value. See 
  4168.                  below: 
  4169.  
  4170.                                   Resource Type                 Basepath Format
  4171.                                   -------------                 ---------------
  4172.                                   Directory                     drive:pathname
  4173.                                   File                          drive:pathname
  4174.                                   Pipe                          \pipe\pipename
  4175.                                   Spooler Queue                 \print\queuename
  4176.                                   Serial Device Queue           \comm\chardevqueue
  4177.  
  4178.  Note 
  4179.  
  4180.  The server computer name can be specified as '' for a local server. 
  4181.  
  4182.  Example 
  4183.  
  4184.  
  4185.   /* List resources having a access control profile */
  4186.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4187.   call LoadLsRxutFuncs
  4188.  
  4189.   NETACCESS = 10
  4190.   SrvName   = '\\DOMAIN_CONTRLR'
  4191.   BasePath  = 'C:\IBMLAN'
  4192.   /* BasePath = '' */
  4193.  
  4194.   myRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
  4195.  
  4196.   if myRc <> '0' then do
  4197.    say 'Got error from NetEnumerate() ' myRc
  4198.    call DropLsRxutFuncs
  4199.    exit 9
  4200.   end
  4201.  
  4202.   if resourcesAcp.0 = 0 then do
  4203.    say '-none-'
  4204.    call DropLsRxutFuncs
  4205.    exit 0
  4206.   end
  4207.  
  4208.   say 'The list provided is: ' resourcesAcp.extend
  4209.   say 'Number of resources having a access control profile: ' resourcesAcp.0
  4210.   say
  4211.   say 'The base path is: ' BasePath
  4212.   say 'Resources listed are relative to the base path'
  4213.   say
  4214.  
  4215.   do i=1 to resourcesAcp.0
  4216.    say resourcesAcp.i
  4217.   end
  4218.  
  4219.   call DropLsRxutFuncs
  4220.   call RxFuncDrop 'LoadLsRxutFuncs'
  4221.  
  4222.   exit 0
  4223.  
  4224.  Example Output 
  4225.  
  4226.  
  4227.   The list provided is:  Complete
  4228.   Number of resources having an access control profile:  19
  4229.  
  4230.   The base path is:  C:\IBMLAN
  4231.   Resources listed are relative to the base path
  4232.  
  4233.   \DOSLAN\DOS
  4234.   \DOSLAN\NET
  4235.   \DCDB
  4236.   \DCDB\DATA
  4237.   \DCDB\USERS\FMAM
  4238.   \BOOK
  4239.   \DCDB\APPS
  4240.   \DCDB\USERS\USERID\BATCH
  4241.   \DCDB\USERS\LINDBERG\BATCH
  4242.   \DCDB\USERS\FMAM\BATCH
  4243.   \DCDB\FILES
  4244.   \DCDB\LISTS
  4245.   \DCDB\IMAGES
  4246.   \DCDB\USERS\USERID
  4247.   \DCDB\DEVICES
  4248.   \NETPROG
  4249.   \REPL\IMPORT\SCRIPTS
  4250.   \DCDB\USERS\LINDBERG
  4251.   \DCDB\PRINTERS
  4252.  
  4253.  
  4254. ΓòÉΓòÉΓòÉ 11.2. NETALIAS Enumerate ΓòÉΓòÉΓòÉ
  4255.  
  4256. The function enumerates alias names of a given type. 
  4257.  
  4258. Syntax 
  4259.  
  4260.  
  4261. MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
  4262. MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName, AliasType)
  4263.  
  4264. Parameters 
  4265.  
  4266. The parameters specified are: 
  4267.  
  4268.  'aliasNames'      The REXX variable receiving the result. The variable is 
  4269.                    divided into: 
  4270.  
  4271.                      o  aliasNames.0 
  4272.  
  4273.                         The number of alias names returned 
  4274.  
  4275.                      o  aliasNames.i 
  4276.  
  4277.                         The alias name number i, where the variable i has a 
  4278.                         value from 1 to aliasNames.0. 
  4279.  
  4280.  SrvName           The server computer name 
  4281.  
  4282.  AliasType         The AliasType can be specified as indicated below: 
  4283.  
  4284.                                       ALIAS_TYPE_FILE     = 1
  4285.                                       ALIAS_TYPE_PRINTER  = 2
  4286.                                       ALIAS_TYPE_SERIAL   = 4
  4287.  
  4288.                    If AliasType is specified as '', it is identical as 
  4289.                    enumerate all alias names defined. This is identical as the 
  4290.                    call to NetEnumerate() without specifying a forth parameter 
  4291.  
  4292.  Note 
  4293.  
  4294.  The server computer name can be specified as '' for a local server. 
  4295.  
  4296.  Example 
  4297.  
  4298.  
  4299.   /* List all defined alias names */
  4300.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4301.   call LoadLsRxutFuncs
  4302.  
  4303.   NETALIAS = 20
  4304.   SrvName = '\\DOMAIN_CONTRLR'
  4305.  
  4306.   myRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
  4307.  
  4308.   if myRc <> '0' then do
  4309.    say 'Got error from NetEnumerate() ' myRc
  4310.    call DropLsRxutFuncs
  4311.    exit 9
  4312.   end
  4313.  
  4314.   if aliasNames.0 = 0 then do
  4315.    say '-none-'
  4316.    call DropLsRxutFuncs
  4317.    exit 0
  4318.   end
  4319.  
  4320.   say 'Number of alias names: ' aliasNames.0
  4321.   say
  4322.  
  4323.   do i=1 to aliasNames.0
  4324.    say aliasNames.i
  4325.   end
  4326.  
  4327.   call DropLsRxutFuncs
  4328.   call RxFuncDrop 'LoadLsRxutFuncs'
  4329.  
  4330.   exit 0
  4331.  
  4332.  Example Output 
  4333.  
  4334.  
  4335.   Number of alias names:  3
  4336.  
  4337.   BOOKS
  4338.   MYDEMO
  4339.   SRVCOM
  4340.  
  4341.  
  4342. ΓòÉΓòÉΓòÉ 11.3. NETAPP Enumerate ΓòÉΓòÉΓòÉ
  4343.  
  4344. The function returns the application names of a given type. 
  4345.  
  4346. Syntax 
  4347.  
  4348.  
  4349. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName)
  4350. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
  4351. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId, AppType)
  4352.  
  4353. Parameters 
  4354.  
  4355. The parameters specified are: 
  4356.  
  4357.  'appNames'    The REXX variable receiving the result. The variable is divided 
  4358.                into: 
  4359.  
  4360.                  o  appNames.0 
  4361.  
  4362.                     The number of application names returned 
  4363.  
  4364.                  o  appNames.i 
  4365.  
  4366.                     The application name number i, where the variable i has a 
  4367.                     value from 1 to appNames.0. 
  4368.  
  4369.  SrvName       The server computer name of the domain controller 
  4370.  
  4371.  UserId        The Userid is specified for private application. For a list of 
  4372.                all public DOS and OS/2 application use NetEnumerate(NETAPP) 
  4373.                with 3 parameters. 
  4374.  
  4375.  AppType       Use this value together with the five parameter call til 
  4376.                NetEnumerate() to control the application names returned. The 
  4377.                values defined can be added to enumerate a combination of 
  4378.                application types. Use a empty value for the UserId parameter to 
  4379.                enumerate public applications. The following values are used: 
  4380.  
  4381.                               Value   Enumerate
  4382.                               -----   ---------
  4383.                                1      Public DOS applications
  4384.                                2      Public OS/2 applications
  4385.                                4      Private OS/2 applications
  4386.                                8      Private DOS applications
  4387.  
  4388.  MyRc          The return code. You will get the return code 3 if the userid 
  4389.                specified for the private applications does not have the domain 
  4390.                controller database entries available. See also NETUSERINITDCDB 
  4391.  
  4392.  Note 
  4393.  
  4394.  The server computer name can be specified as '' for a local domain controller. 
  4395.  
  4396.  Example 
  4397.  
  4398.  
  4399.   /* List all public applications and private applications for FMAM */
  4400.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4401.   call LoadLsRxutFuncs
  4402.  
  4403.   NETAPP  = 30
  4404.   SrvName = '\\DOMAIN_CONTRLR'
  4405.   UserId  = 'FMAM'
  4406.  
  4407.   /* Get all public application names */
  4408.   myRc = NetEnumerate(NETAPP, 'appNames', SrvName)
  4409.  
  4410.   if myRc <> '0' then do
  4411.    say 'Got error from NetEnumerate() ' myRc
  4412.    call DropLsRxutFuncs
  4413.    exit 9
  4414.   end
  4415.  
  4416.   if appNames.0 = 0 then do
  4417.    say 'No public applications defined'
  4418.   end
  4419.   else do
  4420.    say 'Number of public applications: ' appNames.0
  4421.    say
  4422.  
  4423.    do i=1 to appNames.0
  4424.     say appNames.i
  4425.    end
  4426.  
  4427.    say
  4428.   end
  4429.  
  4430.   /* Get all private application names for UserId */
  4431.   myRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
  4432.  
  4433.   if myRc <> '0' then do
  4434.    say 'Got error from NetEnumerate() ' myRc
  4435.    call DropLsRxutFuncs
  4436.    exit 9
  4437.   end
  4438.  
  4439.   if appNames.0 = 0 then do
  4440.    say 'No private applications defined for ' UserId
  4441.    call DropLsRxutFuncs
  4442.    exit 0
  4443.   end
  4444.  
  4445.   say 'Number of private applications for ' UserId 'is:' appNames.0
  4446.   say
  4447.  
  4448.   do i=1 to appNames.0
  4449.    say appNames.i
  4450.   end
  4451.  
  4452.   call DropLsRxutFuncs
  4453.   call RxFuncDrop 'LoadLsRxutFuncs'
  4454.  
  4455.   exit 0
  4456.  
  4457.  Example Output 
  4458.  
  4459.  
  4460.   Number of public applications:  3
  4461.  
  4462.   ALLAPPS
  4463.   LANMSG
  4464.   THENEW
  4465.  
  4466.   No private applications defined for  FMAM
  4467.  
  4468.  
  4469. ΓòÉΓòÉΓòÉ 11.4. NETBIOS Enumerate ΓòÉΓòÉΓòÉ
  4470.  
  4471. The function returns information on all network device drivers installed on a 
  4472. computer. 
  4473.  
  4474. Syntax 
  4475.  
  4476.  
  4477. MyRc = NetEnumerate(NETBIOS, 'netBiosInfo')
  4478. MyRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
  4479.  
  4480. Parameters 
  4481.  
  4482. The parameters specified are: 
  4483.  
  4484.  'netBiosInfo'     The REXX variable receiving the result. The variable is 
  4485.                    divided into: 
  4486.  
  4487.                      o  netBiosInfo.0 
  4488.  
  4489.                         The number of netbios device drivers 
  4490.  
  4491.                      o  netBiosInfo.i 
  4492.  
  4493.                         The netbios device driver name entry i, where the 
  4494.                         variable i has a value from 1 to netBiosInfo.0 
  4495.  
  4496.  SrvName           The requester or server computer name 
  4497.  
  4498.  Note 
  4499.  
  4500.  The server computer name can be specified as '' for a local computer 
  4501.  
  4502.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  4503.  parameters where SrvName is set to ''. 
  4504.  
  4505.  Example 
  4506.  
  4507.  
  4508.   /* List NetBIOS device drivers names */
  4509.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4510.   call LoadLsRxutFuncs
  4511.  
  4512.   NETBIOS = 90
  4513.   SrvName = '\\DOMAIN_CONTRLR'
  4514.  
  4515.   myRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
  4516.  
  4517.   if myRc <> '0' then do
  4518.    say 'Got error from NetEnumerate() ' myRc
  4519.    call DropLsRxutFuncs
  4520.    exit 9
  4521.   end
  4522.  
  4523.   if netBiosInfo.0 = 0 then do
  4524.    say 'No driver information'
  4525.    call DropLsRxutFuncs
  4526.    exit 0
  4527.   end
  4528.  
  4529.   say 'Number of NetBIOS device drivers: ' netBiosInfo.0
  4530.   say
  4531.  
  4532.   do i=1 to netBiosInfo.0
  4533.    say netBiosInfo.i
  4534.   end
  4535.  
  4536.   call DropLsRxutFuncs
  4537.   call RxFuncDrop 'LoadLsRxutFuncs'
  4538.  
  4539.   exit 0
  4540.  
  4541.  Example Output 
  4542.  
  4543.  
  4544.   Number of NetBIOS device drivers:  1
  4545.  
  4546.   NETLB
  4547.  
  4548.  
  4549. ΓòÉΓòÉΓòÉ 11.5. NETCHARDEV Enumerate ΓòÉΓòÉΓòÉ
  4550.  
  4551. The function provides a list of serial devices on a server. 
  4552.  
  4553. Syntax 
  4554.  
  4555.  
  4556. MyRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
  4557.  
  4558. Parameters 
  4559.  
  4560. The parameters specified are: 
  4561.  
  4562.  'charDevInfo'     The REXX variable receiving the result. The variable is 
  4563.                    divided into: 
  4564.  
  4565.                      o  charDevInfo.0 
  4566.  
  4567.                         The number of serial devices 
  4568.  
  4569.                      o  charDevInfo.i 
  4570.  
  4571.                         The serial device name entry i, where the variable i 
  4572.                         has a value from 1 to charDevInfo.0 
  4573.  
  4574.  SrvName           The server computer name 
  4575.  
  4576.  Note 
  4577.  
  4578.  The server computer name can be specified as '' for a local server or 
  4579.  computer. 
  4580.  
  4581.  Example 
  4582.  
  4583.  
  4584.   /* List serial device names on a server */
  4585.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4586.   call LoadLsRxutFuncs
  4587.  
  4588.   NETCHARDEV = 130
  4589.   SrvName    = '\\DOMAIN_CONTRLR'
  4590.  
  4591.   myRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
  4592.  
  4593.   if myRc <> '0' then do
  4594.    say 'Got error from NetEnumerate() ' myRc
  4595.    call DropLsRxutFuncs
  4596.    exit 9
  4597.   end
  4598.  
  4599.   if charDevInfo.0 = 0 then do
  4600.    say 'No serial devices defined on server'
  4601.    call DropLsRxutFuncs
  4602.    exit 0
  4603.   end
  4604.  
  4605.   say 'Number of serial device names: ' charDevInfo.0
  4606.   say
  4607.  
  4608.   do i=1 to charDevInfo.0
  4609.    say charDevInfo.i
  4610.   end
  4611.  
  4612.   call DropLsRxutFuncs
  4613.   call RxFuncDrop 'LoadLsRxutFuncs'
  4614.  
  4615.   exit 0
  4616.  
  4617.  Example Output 
  4618.  
  4619.  
  4620.   Number of serial device names:  1
  4621.  
  4622.   COM1
  4623.  
  4624.  
  4625. ΓòÉΓòÉΓòÉ 11.6. NETCHARDEVQ Enumerate ΓòÉΓòÉΓòÉ
  4626.  
  4627. The function provides a list of serial device queues on a server. 
  4628.  
  4629. Syntax 
  4630.  
  4631.  
  4632. MyRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
  4633.  
  4634. Parameters 
  4635.  
  4636. The parameters specified are: 
  4637.  
  4638.  'charDevQInfo'    The REXX variable receiving the result. The variable is 
  4639.                    divided into: 
  4640.  
  4641.                      o  charDevQInfo.0 
  4642.  
  4643.                         The number of serial device queues 
  4644.  
  4645.                      o  charDevQInfo.i 
  4646.  
  4647.                         The serial device queue name entry i, where the 
  4648.                         variable i has a value from 1 to charDevQInfo.0 
  4649.  
  4650.  SrvName           The server computer name 
  4651.  
  4652.  Note 
  4653.  
  4654.  The server computer name can be specified as '' for a local server or 
  4655.  computer. 
  4656.  
  4657.  Example 
  4658.  
  4659.  
  4660.   /* List serial device queue names on a server */
  4661.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4662.   call LoadLsRxutFuncs
  4663.  
  4664.   NETCHARDEVQ = 140
  4665.   SrvName     = '\\DOMAIN_CONTRLR'
  4666.  
  4667.   myRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
  4668.  
  4669.   if myRc <> '0' then do
  4670.    say 'Got error from NetEnumerate() ' myRc
  4671.    call DropLsRxutFuncs
  4672.    exit 9
  4673.   end
  4674.  
  4675.   if charDevQInfo.0 = 0 then do
  4676.    say 'No serial device queues defined'
  4677.    call DropLsRxutFuncs
  4678.    exit 0
  4679.   end
  4680.  
  4681.   say 'Number of serial device queue names: ' charDevQInfo.0
  4682.   say
  4683.  
  4684.   do i=1 to charDevQInfo.0
  4685.    say charDevQInfo.i
  4686.   end
  4687.  
  4688.   call DropLsRxutFuncs
  4689.   call RxFuncDrop 'LoadLsRxutFuncs'
  4690.  
  4691.   exit 0
  4692.  
  4693.  Example Output 
  4694.  
  4695.  
  4696.   Number of serial device queue names:  1
  4697.  
  4698.   SRVCOM
  4699.  
  4700.  
  4701. ΓòÉΓòÉΓòÉ 11.7. NETCONNECTION Enumerate ΓòÉΓòÉΓòÉ
  4702.  
  4703. The function returns a list of connections made to a shared resource of a 
  4704. server, or a list of all connections established from a particular computer to 
  4705. a server. This function is identical to NetGetInfo(NETCONNECTION). 
  4706.  
  4707. Syntax 
  4708.  
  4709.  
  4710. MyRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  4711.  
  4712. Parameters 
  4713.  
  4714. The parameters specified are: 
  4715.  
  4716.  'connInfo'  The REXX variable receiving the result. The variable is divided 
  4717.              into: 
  4718.  
  4719.                o  connInfo.num_entries 
  4720.  
  4721.                   The number of connection information entries. Each entry is 
  4722.                   obtained by the index i, which has a value from 1 to 
  4723.                   connInfo.num_entries. 
  4724.  
  4725.                   The connInfo.0 has the same value available 
  4726.  
  4727.                o  connInfo.i.id 
  4728.  
  4729.                   The connection id 
  4730.  
  4731.                o  connInfo.i.type 
  4732.  
  4733.                   The type of connection made from the local device name to the 
  4734.                   shared resource 
  4735.  
  4736.                o  connInfo.i.num_opens 
  4737.  
  4738.                   The number of files that are currently open as a result of 
  4739.                   the connection 
  4740.  
  4741.                o  connInfo.i.num_users 
  4742.  
  4743.                   The number of users on the connection 
  4744.  
  4745.                o  connInfo.i.time 
  4746.  
  4747.                   The number of seconds the connection has been established 
  4748.  
  4749.                o  connInfo.i.username 
  4750.  
  4751.                   The name of the user that made the connection 
  4752.  
  4753.                o  connInfo.i.netname 
  4754.  
  4755.                   A string indicating either the netname of the shared resource 
  4756.                   of the server or the computer name of the requester, 
  4757.                   depending on which name was specified as the Qualifier 
  4758.                   parameter 
  4759.  
  4760.  SrvName     The server computer name 
  4761.  
  4762.  Qualifier   A string specifying either the netname of the shared resource 
  4763.              whose connections will be listed or the client name of the 
  4764.              requester whose connections to the shared resource will be listed 
  4765.  
  4766.  Note 
  4767.  
  4768.  The server computer name can be specified as '' for a local server. 
  4769.  
  4770.  Example 
  4771.  
  4772.  
  4773.   /* Enumerate connection information */
  4774.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4775.   call LoadLsRxutFuncs
  4776.  
  4777.   NETCONNECTION = 40
  4778.   SrvName       = '\\DOMAIN_CONTRLR'
  4779.   Qualifier     = '\\ITSCWK21'
  4780.  
  4781.   myRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  4782.  
  4783.   if myRc <> '0' then do
  4784.    say 'Got error from NetEnumerate() ' myRc
  4785.    call DropLsRxutFuncs
  4786.    exit 9
  4787.   end
  4788.  
  4789.   if connInfo.0 = 0 then do
  4790.    say 'No connections established'
  4791.    call DropLsRxutFuncs
  4792.    exit 0
  4793.   end
  4794.  
  4795.   if connInfo.num_entries <> 0 then do
  4796.    say "Number of entries: " connInfo.num_entries
  4797.  
  4798.    do i=1 to connInfo.num_entries
  4799.     say
  4800.     say "Connection id:        " connInfo.i.id
  4801.     say "Connection type:      " connInfo.i.type
  4802.     say "Connection num opens: " connInfo.i.num_opens
  4803.     say "Connection num users: " connInfo.i.num_users
  4804.     say "Connection time:      " connInfo.i.time
  4805.     say "Connection user name: " connInfo.i.username
  4806.     say "Connection net name:  " connInfo.i.netname
  4807.    end
  4808.  
  4809.   end
  4810.  
  4811.   call DropLsRxutFuncs
  4812.   call RxFuncDrop 'LoadLsRxutFuncs'
  4813.  
  4814.   exit 0
  4815.  
  4816.  Example Output 
  4817.  
  4818.  
  4819.   Number of entries:  2
  4820.  
  4821.   Connection id:         6145
  4822.   Connection type:       Interprocess Communication Connection
  4823.   Connection num opens:  0
  4824.   Connection num users:  1
  4825.   Connection time:       411
  4826.   Connection user name:  ADMIN04
  4827.   Connection net name:   IPC$
  4828.  
  4829.   Connection id:         59393
  4830.   Connection type:       Disk Connection
  4831.   Connection num opens:  1
  4832.   Connection num users:  1
  4833.   Connection time:       367
  4834.   Connection user name:  ADMIN04
  4835.   Connection net name:   C$
  4836.  
  4837.  
  4838. ΓòÉΓòÉΓòÉ 11.8. NETDASD Enumerate (LS40) ΓòÉΓòÉΓòÉ
  4839.  
  4840. The function returns a list of directories that have had directory limits 
  4841. applied to them. Before this function can be used successfully, directory 
  4842. limits must be enabled on the 386-HPFS drive. (See the NetMisc(NETDASDCONTROL) 
  4843. function) 
  4844.  
  4845. Syntax 
  4846.  
  4847.  
  4848. MyRc = NetEnumerate(NETDASD, 'DASDInfo', SrvName)
  4849.  
  4850. Parameters 
  4851.  
  4852. The parameters required and returned are: 
  4853.  
  4854.  'DASDInfo'  The directory limits information variable, which is divided into: 
  4855.  
  4856.                o  DASDInfo.DirPath 
  4857.  
  4858.                   A string containing the directory path to be enumerated The 
  4859.                   string must be directory path, beginning with the drive 
  4860.                   letter, and only ending with a backslash when a root 
  4861.                   directory is specified. 
  4862.  
  4863.                   If DASDInfo.DirPath is set to '', the function returns all 
  4864.                   root directories and subdirectories with directory limits for 
  4865.                   each logical 386-HPFS drive. 
  4866.  
  4867.                   If a redirected drive is specified for DASDInfo.DirPath, the 
  4868.                   SrvName parameter must be '' 
  4869.  
  4870.                o  DASDInfo.BufferSize 
  4871.  
  4872.                   This is a internal workbuffer to hold the directory limits. 
  4873.                   It is used to limit the amount of returned directory limits 
  4874.  
  4875.                o  DASDInfo.recursive 
  4876.  
  4877.                   A varaible controlling recursive enumeration. The values are: 
  4878.  
  4879.                                     Value Meaning
  4880.                                     ----- -------
  4881.                                       0   Return directory limit for the
  4882.                                           directory specified only
  4883.  
  4884.                                       1   Return all directory limits for
  4885.                                           the directory specified and all
  4886.                                           subdirectories
  4887.  
  4888.                   The default value is 0 
  4889.  
  4890.                o  DASDInfo.count 
  4891.  
  4892.                   The number of directory limits returned. The variable i has a 
  4893.                   value from 1 to DASDInfo.count for the following parameters 
  4894.  
  4895.                o  DASDInfo.EntriesAvail 
  4896.  
  4897.                   This is a parameter returned to indicate if there where more 
  4898.                   data available with the Buffer Size specified 
  4899.  
  4900.                   If the value is larger then DASDInfo.count then more data 
  4901.                   than BufferSize was available. Otherwise the BufferSize was 
  4902.                   sufficient for to hold all directory limits retrieved 
  4903.  
  4904.                o  DASDInfo.i.resource_name 
  4905.  
  4906.                   The relative name of the directory having a directory limit. 
  4907.                   For the base path itself, the value '' is returned. The 
  4908.                   folowing directory entries are all relative to the base path 
  4909.                   (DASDInfo.DirPath) 
  4910.  
  4911.                o  DASDInfo.i.max 
  4912.  
  4913.                   The amount of disk space allotted to this directory by 
  4914.                   directory eimits. Specified in KB, this field can be set from 
  4915.                   1 to 67108863. 
  4916.  
  4917.                o  DASDInfo.i.use 
  4918.  
  4919.                   The amount (in KB) of disk space already occupied within the 
  4920.                   specified directory resource 
  4921.  
  4922.                o  DASDInfo.i.thresh 
  4923.  
  4924.                   The initial alert threshold as a percentage of the total 
  4925.                   directory limit space allotted, with values ranging from 0 to 
  4926.                   99. Zero specifies that no threshold alert is to be 
  4927.                   generated, and 99 specifies that an alert is generated when 
  4928.                   99% of the allotted directory limit for this directory has 
  4929.                   been reached. 
  4930.  
  4931.                o  DASDInfo.i.delta 
  4932.  
  4933.                   The increment in which alerts are to be generated after the 
  4934.                   DASDInfo.i.thresh threshold has been crossed, but before all 
  4935.                   of the allotted disk space has been used. 
  4936.  
  4937.  SrvName     The computer name of the server to enumerate the directory limits 
  4938.              on 
  4939.  
  4940.  Note 
  4941.  
  4942.  The server computer name can be specified as '' for a local server. 
  4943.  
  4944.  Example 
  4945.  
  4946.  
  4947.   /* Enumerate DASD directory limit on server */
  4948.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  4949.   call LoadLsRxutFuncs
  4950.  
  4951.   NETDASD             = 750
  4952.   DASDInfo.DirPath    = 'D:\APPS\DATA'
  4953.   DASDInfo.recursive  = 1
  4954.   DASDInfo.BufferSize = 4096
  4955.   SrvName             = '\\DOMAIN_CONTRLR'
  4956.  
  4957.   myRc = NetEnumerate(NETDASD, 'DASDInfo', SrvName)
  4958.  
  4959.   if myRc <> '0' then do
  4960.    say 'Got error from NetEnumerate() ' myRc
  4961.    exitRc = 9
  4962.   end
  4963.   else do
  4964.    say 'Directory limit enumeration returned'
  4965.    say 'Number entries available' DASDInfo.EntriesAvail
  4966.    say 'Number entries returned ' DASDInfo.count
  4967.    say 'First dir path          ' DASDInfo.1.resource_name
  4968.    say 'First limit size        ' DASDInfo.1.max
  4969.    say 'First limit usage       ' DASDInfo.1.use
  4970.    say 'Threshold               ' DASDInfo.1.thresh
  4971.    say 'Delta                   ' DASDInfo.1.delta
  4972.  
  4973.    exitRc = 0
  4974.   end
  4975.  
  4976.   call DropLsRxutFuncs
  4977.   call RxFuncDrop 'LoadLsRxutFuncs'
  4978.  
  4979.   exit exitRc
  4980.  
  4981.  Example Output 
  4982.  
  4983.  
  4984.   Directory limit enumeration returned
  4985.   Number entries available   1
  4986.   Number entries returned    1
  4987.   First dir path
  4988.   First limit size           512
  4989.   First limit usage          102
  4990.   Threshold                  90
  4991.   Delta                      5
  4992.  
  4993.  
  4994. ΓòÉΓòÉΓòÉ 11.9. NETFILE Enumerate ΓòÉΓòÉΓòÉ
  4995.  
  4996. The function returns information about some or all open files on a server. 
  4997.  
  4998. Syntax 
  4999.  
  5000.  
  5001. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  5002. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath)
  5003. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
  5004.  
  5005. Parameters 
  5006.  
  5007. The parameters specified are: 
  5008.  
  5009.  'fileInfo'  The REXX variable receiving the result. The variable is divided 
  5010.              into: 
  5011.  
  5012.                o  fileInfo.count 
  5013.  
  5014.                   The number of open files. The same value is available in the 
  5015.                   variable fileInfo.0 
  5016.  
  5017.                o  fileInfo.i.id 
  5018.  
  5019.                   The file id i, where the variable i has a value from 1 to 
  5020.                   fileInfo.count 
  5021.  
  5022.                o  fileInfo.i.permissions 
  5023.  
  5024.                   Indicates the access permissions of the file opening. It is a 
  5025.                   hexedecimal value combined of the following: 
  5026.  
  5027.  
  5028.                                     Hex Value  What
  5029.                                     ---------  ---------------------------------------
  5030.                                       0x1      Permission to read a resource and by default,
  5031.                                                execute the resource.
  5032.  
  5033.                                       0x2      Permission to write to a resource.
  5034.  
  5035.                                       0x4      Permission to create a resource. Data can be
  5036.                                                written when creating the resource.
  5037.  
  5038.                o  fileInfo.i.num_locks 
  5039.  
  5040.                   The number of file locks on the file, device, or pipe. 
  5041.  
  5042.                o  fileInfo.i.pathname 
  5043.  
  5044.                   The path name i, where the variable i has a value from 1 to 
  5045.                   fileInfo.count 
  5046.  
  5047.                o  fileInfo.i.username 
  5048.  
  5049.                   The name of the userid that opened the resource. 
  5050.  
  5051.                o  fileInfo.frk 
  5052.  
  5053.                   On server with many open files, the fileInfo.frk parameter 
  5054.                   can be used to get a partial enumeration, process the 
  5055.                   returned information and resume open file enumeration. 
  5056.  
  5057.                   To control this operation the value 'INITRESUME' must be 
  5058.                   specified on the first call and 'RESUME' on the following 
  5059.                   calls until the returned number of open files is 0 
  5060.                   (fileInfo.count) 
  5061.  
  5062.                o  fileInfo.frkMoreData 
  5063.  
  5064.                   This variable will be set to 234 (ERROR_MORE_DATA) if there 
  5065.                   is more data available, otherwise the value will be 0 
  5066.  
  5067.                o  fileInfo.frkBuffer 
  5068.  
  5069.                   The internal binary work buffer size for the fileInfo.frk 
  5070.                   control parameter. The size should be from 1024 to 65535 
  5071.                   bytes. The default value is 4096 bytes 
  5072.  
  5073.                   This buffer size is used on every call to hold the binary 
  5074.                   data, that will be formatted into the returned REXX variables 
  5075.  
  5076.  SrvName     The server computer name. If the server computer name is '', it is 
  5077.              a call to the local server 
  5078.  
  5079.  BasePath    The base path to the open files. For example is 'C:\' a base path 
  5080.  
  5081.  UserId      A userid to enumerate open files on 
  5082.  
  5083.  Note 
  5084.  
  5085.  The server computer name can be specified as '' for a local server. 
  5086.  
  5087.  There are 3 different calls to NetEnumerate(NETFILE). They are not identical 
  5088.  if one or more specified parameters have the value ''. 
  5089.  
  5090.  An example without the resume key 
  5091.  
  5092.  
  5093.   /* List open files on server */
  5094.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5095.   call LoadLsRxutFuncs
  5096.  
  5097.   NETFILE  = 60
  5098.   SrvName  = '\\DOMAIN_CONTRLR'
  5099.   BasePath = 'C:'
  5100.   UserId   = 'ADMIN04'
  5101.  
  5102.   myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
  5103.  
  5104.   if myRc <> '0' then do
  5105.    say 'Got error from NetEnumerate() ' myRc
  5106.    call DropLsRxutFuncs
  5107.    exit 9
  5108.   end
  5109.  
  5110.   if fileInfo.count = 0 then do
  5111.    say 'No files open on the server'
  5112.    call DropLsRxutFuncs
  5113.    exit 0
  5114.   end
  5115.  
  5116.   say 'Number of open file entries: ' fileInfo.count
  5117.   say
  5118.  
  5119.   do i=1 to fileInfo.count
  5120.    say 'Id            ' fileInfo.i.id
  5121.    say 'Permissions   ' fileInfo.i.permissions
  5122.    say 'Number locks  ' fileInfo.i.num_locks
  5123.    say 'Path Name     ' fileInfo.i.pathname
  5124.    say 'Opening Userid' fileInfo.i.username
  5125.    say
  5126.   end
  5127.  
  5128.   call DropLsRxutFuncs
  5129.   call RxFuncDrop 'LoadLsRxutFuncs'
  5130.  
  5131.   exit 0
  5132.  
  5133.  Example Output 
  5134.  
  5135.  
  5136.   Number of open file entries:  2
  5137.  
  5138.   Id             142218
  5139.   Permissions    1
  5140.   Number locks   0
  5141.   Path Name      C:\OS2\VIEW.EXE
  5142.   Opening Userid ADMIN04
  5143.  
  5144.   Id             142250
  5145.   Permissions    1
  5146.   Number locks   0
  5147.   Path Name      C:\OS2\VIEWDOC.EXE
  5148.   Opening Userid ADMIN04
  5149.  
  5150.  An example with the resume key 
  5151.  
  5152.  
  5153.   /* Net enumerate open files using resume operation */
  5154.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5155.   call LoadLsRxutFuncs
  5156.  
  5157.   NETFILE  = 60
  5158.   SrvName  = '\\KING_BALU'
  5159.   BasePath = ''
  5160.   UserId   = 'ADMIN04'
  5161.   fileInfo.frkBuffer =  512
  5162.  
  5163.   fileInfo.resumekey = 'INITRESUME'
  5164.   myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  5165.  
  5166.   /* Process the file information and test the
  5167.      fileInfo.frkMoreData variable. If 234 then
  5168.      make the following call
  5169.  
  5170.      fileInfo.resumekey = 'RESUME'
  5171.      myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  5172.   */
  5173.  
  5174.   if myRc <> '0' then do
  5175.    say 'Got error from NetEnumerate() ' myRc
  5176.    ExitRc = 9
  5177.   end
  5178.   else do
  5179.    if fileInfo.count = 0 then do
  5180.     say 'No files open on the server specified'
  5181.     ExitRc = 0
  5182.    end
  5183.    else do
  5184.     say 'Number of open file entries: ' fileInfo.count
  5185.     say
  5186.  
  5187.     do i=1 to fileInfo.count
  5188.      say 'Id            ' fileInfo.i.id
  5189.      say 'Permissions   ' fileInfo.i.permissions
  5190.      say 'Number locks  ' fileInfo.i.num_locks
  5191.      say 'Path Name     ' fileInfo.i.pathname
  5192.      say 'Opening Userid' fileInfo.i.username
  5193.      say
  5194.     end
  5195.    end
  5196.   end
  5197.   call DropLsRxutFuncs
  5198.   call RxFuncDrop 'LoadLsRxutFuncs'
  5199.  
  5200.   exit rcCode
  5201.  
  5202.  
  5203. ΓòÉΓòÉΓòÉ 11.10. NETGROUP Enumerate ΓòÉΓòÉΓòÉ
  5204.  
  5205. The function lists all group accounts on the UAS database. 
  5206.  
  5207. Syntax 
  5208.  
  5209.  
  5210. MyRc = NetEnumerate(NETGROUP, 'groupInfo')
  5211. MyRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
  5212.  
  5213. Parameters 
  5214.  
  5215. The parameters specified are: 
  5216.  
  5217.  'groupInfo'       The REXX variable receiving the result. The variable is 
  5218.                    divided into: 
  5219.  
  5220.                      o  groupInfo.0 
  5221.  
  5222.                         The number of groups 
  5223.  
  5224.                      o  groupInfo.i 
  5225.  
  5226.                         The group name i, where the variable i has a value from 
  5227.                         1 to groupInfo.0 
  5228.  
  5229.  SrvName           The server computer name 
  5230.  
  5231.  Note 
  5232.  
  5233.  The server computer name can be specified as '' for a local server. 
  5234.  
  5235.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  5236.  parameters where SrvName is set to ''. 
  5237.  
  5238.  Example 
  5239.  
  5240.  
  5241.   /* List group names */
  5242.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5243.   call LoadLsRxutFuncs
  5244.  
  5245.   NETGROUP = 70
  5246.   SrvName  = '\\DOMAIN_CONTRLR'
  5247.  
  5248.   myRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
  5249.  
  5250.   if myRc <> '0' then do
  5251.    say 'Got error from NetEnumerate() ' myRc
  5252.    call DropLsRxutFuncs
  5253.    exit 9
  5254.   end
  5255.  
  5256.   if groupInfo.0 = 0 then do
  5257.    say 'No group names found. You may have a problem.'
  5258.    call DropLsRxutFuncs
  5259.    exit 0
  5260.   end
  5261.  
  5262.   say 'Number of group names: ' groupInfo.0
  5263.   say
  5264.  
  5265.   do i=1 to groupInfo.0
  5266.    say groupInfo.i
  5267.   end
  5268.  
  5269.   call DropLsRxutFuncs
  5270.   call RxFuncDrop 'LoadLsRxutFuncs'
  5271.  
  5272.   exit 0
  5273.  
  5274.  Example Output 
  5275.  
  5276.  
  5277.   Number of group names:  10
  5278.  
  5279.   GROUPID
  5280.   GROUP200
  5281.   GROUP201
  5282.   GROUP202
  5283.   SERVERS
  5284.   ACLGROUP
  5285.   LOCAL
  5286.   USERS
  5287.   ADMINS
  5288.   GUESTS
  5289.  
  5290.  
  5291. ΓòÉΓòÉΓòÉ 11.11. NETLOGON Enumerate ΓòÉΓòÉΓòÉ
  5292.  
  5293. The function enumerates logged on user accounts. 
  5294.  
  5295. Syntax 
  5296.  
  5297.  
  5298. MyRc = NetEnumerate(NETLOGON, 'logonInfo')
  5299. MyRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
  5300.  
  5301. Parameters 
  5302.  
  5303. The parameters specified are: 
  5304.  
  5305.  'logonInfo'       The REXX variable receiving the result. The variable is 
  5306.                    divided into: 
  5307.  
  5308.                      o  logonInfo.0 
  5309.  
  5310.                         The number of user account names logged on 
  5311.  
  5312.                      o  logonInfo.i 
  5313.  
  5314.                         The user account name i, where the variable i has a 
  5315.                         value from 1 to logonInfo.0 
  5316.  
  5317.  SrvName           The server computer name. If the server computer name is '', 
  5318.                    this will be identical as a call to NetEnumerate(NETLOGON) 
  5319.                    with only two parameters (local server) 
  5320.  
  5321.  Note 
  5322.  
  5323.  The server computer name can be specified as '' for a local server. 
  5324.  
  5325.  Example 
  5326.  
  5327.  
  5328.   /* List logged on users accounts */
  5329.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5330.   call LoadLsRxutFuncs
  5331.  
  5332.   NETLOGON = 50
  5333.   SrvName  = '\\ITSCSV00'
  5334.  
  5335.   myRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
  5336.  
  5337.   if myRc <> '0' then do
  5338.    say 'Got error from NetEnumerate() ' myRc
  5339.    call DropLsRxutFuncs
  5340.    exit 9
  5341.   end
  5342.  
  5343.   if logonInfo.0 = 0 then do
  5344.    say 'No user accounts logged on'
  5345.    call DropLsRxutFuncs
  5346.    exit 0
  5347.   end
  5348.  
  5349.   say 'Number of user entries: ' logonInfo.0
  5350.   say
  5351.  
  5352.   do i=1 to logonInfo.0
  5353.    say logonInfo.i
  5354.   end
  5355.  
  5356.   call DropLsRxutFuncs
  5357.   call RxFuncDrop 'LoadLsRxutFuncs'
  5358.  
  5359.   exit 0
  5360.  
  5361.  Example Output 
  5362.  
  5363.  
  5364.   Number of user entries:  9
  5365.  
  5366.   BERIT
  5367.   A948R11
  5368.   ITSCAIX1
  5369.   SHIMIZU
  5370.   A948R29
  5371.   N$HUY
  5372.   A948R33
  5373.   JACOBB
  5374.   A948R30
  5375.  
  5376.  
  5377. ΓòÉΓòÉΓòÉ 11.12. NETMESSAGENAME Enumerate ΓòÉΓòÉΓòÉ
  5378.  
  5379. The function lists the name entries in a message name table. 
  5380.  
  5381. Syntax 
  5382.  
  5383.  
  5384. MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo')
  5385. MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
  5386.  
  5387. Parameters 
  5388.  
  5389. The parameters specified are: 
  5390.  
  5391.  'msgNameInfo'     The REXX variable receiving the result. The variable is 
  5392.                    divided into: 
  5393.  
  5394.                      o  msgNameInfo.0 
  5395.  
  5396.                         The number of message name entries 
  5397.  
  5398.                      o  msgNameInfo.i 
  5399.  
  5400.                         The message name entry i, where the variable i has a 
  5401.                         value from 1 to msgNameInfo.0 
  5402.  
  5403.  SrvName           The server computer name 
  5404.  
  5405.  Note 
  5406.  
  5407.  The server computer name can be specified as '' for a local server or 
  5408.  requester. 
  5409.  
  5410.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  5411.  parameters where SrvName is set to ''. 
  5412.  
  5413.  Example 
  5414.  
  5415.  
  5416.   /* List message names */
  5417.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5418.   call LoadLsRxutFuncs
  5419.  
  5420.   NETMESSAGENAME = 80
  5421.   SrvName        = '\\DOMAIN_CONTRLR'
  5422.  
  5423.   myRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
  5424.  
  5425.   if myRc <> '0' then do
  5426.    say 'Got error from NetEnumerate() ' myRc
  5427.    call DropLsRxutFuncs
  5428.    exit 9
  5429.   end
  5430.  
  5431.   if msgNameInfo.0 = 0 then do
  5432.    say 'No message name registered'
  5433.    call DropLsRxutFuncs
  5434.    exit 0
  5435.   end
  5436.  
  5437.   say 'Number of message names: ' msgNameInfo.0
  5438.   say
  5439.  
  5440.   do i=1 to msgNameInfo.0
  5441.    say msgNameInfo.i
  5442.   end
  5443.  
  5444.   call DropLsRxutFuncs
  5445.   call RxFuncDrop 'LoadLsRxutFuncs'
  5446.  
  5447.   exit 0
  5448.  
  5449.  Example Output 
  5450.  
  5451.  
  5452.   Number of message names:  1
  5453.  
  5454.   DOMAIN_CONTRLR
  5455.  
  5456.  
  5457. ΓòÉΓòÉΓòÉ 11.13. NETPRINTDEST Enumerate ΓòÉΓòÉΓòÉ
  5458.  
  5459. The function returns a list of print devices. 
  5460.  
  5461. Syntax 
  5462.  
  5463.  
  5464. MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo')
  5465. MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
  5466.  
  5467. Parameters 
  5468.  
  5469. The parameters specified are: 
  5470.  
  5471.  'printDestInfo'   The REXX variable receiving the result. The variable is 
  5472.                    divided into: 
  5473.  
  5474.                      o  printDestInfo.0 
  5475.  
  5476.                         The number of print devices 
  5477.  
  5478.                      o  printDestInfo.i 
  5479.  
  5480.                         The print device name entry i, where the variable i has 
  5481.                         a value from 1 to printDestInfo.0 
  5482.  
  5483.  SrvName           The server computer name 
  5484.  
  5485.  Note 
  5486.  
  5487.  The server computer name can be specified as '' for a local server or 
  5488.  computer. 
  5489.  
  5490.  There call to NetEnumerate with 2 parameters is identical to the call with 3 
  5491.  parameters where SrvName is set to ''. 
  5492.  
  5493.  Example 
  5494.  
  5495.  
  5496.   /* List print destination names */
  5497.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5498.   call LoadLsRxutFuncs
  5499.  
  5500.   NETPRINTDEST = 100
  5501.   SrvName      = '\\DOMAIN_CONTRLR'
  5502.  
  5503.   myRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
  5504.  
  5505.   if myRc <> '0' then do
  5506.    say 'Got error from NetEnumerate() ' myRc
  5507.    call DropLsRxutFuncs
  5508.    exit 9
  5509.   end
  5510.  
  5511.   if printDestInfo.0 = 0 then do
  5512.    say 'No print destinations available'
  5513.    call DropLsRxutFuncs
  5514.    exit 0
  5515.   end
  5516.  
  5517.   say 'Number of print destination names: ' printDestInfo.0
  5518.   say
  5519.  
  5520.   do i=1 to printDestInfo.0
  5521.    say printDestInfo.i
  5522.   end
  5523.  
  5524.   call DropLsRxutFuncs
  5525.   call RxFuncDrop 'LoadLsRxutFuncs'
  5526.  
  5527.   exit 0
  5528.  
  5529.  Example Output 
  5530.  
  5531.  
  5532.   Number of print destination names:  1
  5533.  
  5534.   LPT1Q
  5535.  
  5536.  
  5537. ΓòÉΓòÉΓòÉ 11.14. NETPRINTDRIVER Enumerate ΓòÉΓòÉΓòÉ
  5538.  
  5539. The function retrieves a list of printer presentation drivers on a server or 
  5540. workstation. 
  5541.  
  5542. Syntax 
  5543.  
  5544.  
  5545. MyRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
  5546.  
  5547. Parameters 
  5548.  
  5549. The parameters specified are: 
  5550.  
  5551.  'prtDriverInfo'   The REXX variable receiving the result. The variable is 
  5552.                    divided into: 
  5553.  
  5554.                      o  prtDriverInfo.0 
  5555.  
  5556.                         The number of printer presentation drivers 
  5557.  
  5558.                      o  prtDriverInfo.i 
  5559.  
  5560.                         Printer presentation driver name entry i, where the 
  5561.                         variable i has a value from 1 to prtDriverInfo.0 
  5562.  
  5563.  SrvName           The server computer name 
  5564.  
  5565.  Note 
  5566.  
  5567.  The server computer name can be specified as '' for a local computer. 
  5568.  
  5569.  Example 
  5570.  
  5571.  
  5572.   /* List printer presentation drivers */
  5573.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5574.   call LoadLsRxutFuncs
  5575.  
  5576.   NETPRINTDRIVER = 310
  5577.   SrvName        = ''
  5578.  
  5579.   myRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
  5580.  
  5581.   if myRc <> '0' then do
  5582.    say 'Got error from NetEnumerate() ' myRc
  5583.    call DropLsRxutFuncs
  5584.    exit 9
  5585.   end
  5586.  
  5587.   if prtDriverInfo.0 = 0 then do
  5588.    say 'No print drivers available'
  5589.    call DropLsRxutFuncs
  5590.    exit 0
  5591.   end
  5592.  
  5593.   say 'Number of printer presentation drivers defined: ' prtDriverInfo.0
  5594.   say
  5595.  
  5596.   do i=1 to prtDriverInfo.0
  5597.    say prtDriverInfo.i
  5598.   end
  5599.  
  5600.   call DropLsRxutFuncs
  5601.   call RxFuncDrop 'LoadLsRxutFuncs'
  5602.  
  5603.   exit 0
  5604.  
  5605.  Example Output 
  5606.  
  5607.  
  5608.   Number of printer presentation drivers defined:  2
  5609.  
  5610.   PSCRIPT.IBM 4019 v52_1 (39 Fonts)
  5611.   IBMNULL
  5612.  
  5613.  
  5614. ΓòÉΓòÉΓòÉ 11.15. NETPRINTJOB Enumerate ΓòÉΓòÉΓòÉ
  5615.  
  5616. The function returns a list of print jobs in a print queue. 
  5617.  
  5618. Syntax 
  5619.  
  5620.  
  5621. MyRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
  5622.  
  5623. Parameters 
  5624.  
  5625. The parameters specified are: 
  5626.  
  5627.  'printJobInfo'    The REXX variable receiving the result. The variable is 
  5628.                    divided into: 
  5629.  
  5630.                      o  printJobInfo.count 
  5631.  
  5632.                         The number of print jobs in the queue 
  5633.  
  5634.                      o  printJobInfo.i.JobId 
  5635.  
  5636.                         The print job identification entry i, where the 
  5637.                         variable i has a value from 1 to printJobInfo.count 
  5638.  
  5639.                      o  printJobInfo.i.Priority 
  5640.  
  5641.                         The print job priority entry i, where the variable i 
  5642.                         has a value from 1 to printJobInfo.count 
  5643.  
  5644.                      o  printJobInfo.i.Position 
  5645.  
  5646.                         The print job position in the queue entry i, where the 
  5647.                         variable i has a value from 1 to printJobInfo.count 
  5648.  
  5649.                      o  printJobInfo.i.Status 
  5650.  
  5651.                         The print job status in the queue entry i, where the 
  5652.                         variable i has a value from 1 to printJobInfo.count 
  5653.  
  5654.                      o  printJobInfo.i.Size 
  5655.  
  5656.                         The print job size entry i, where the variable i has a 
  5657.                         value from 1 to printJobInfo.count 
  5658.  
  5659.                      o  printJobInfo.i.UserName 
  5660.  
  5661.                         The userid entry i, where the variable i has a value 
  5662.                         from 1 to printJobInfo.count 
  5663.  
  5664.                      o  printJobInfo.i.Document 
  5665.  
  5666.                         The document name entry i, where the variable i has a 
  5667.                         value from 1 to printJobInfo.count 
  5668.  
  5669.                      o  printJobInfo.i.Comment 
  5670.  
  5671.                         The comment entry i, where the variable i has a value 
  5672.                         from 1 to printJobInfo.count 
  5673.  
  5674.  SrvName           The server computer name 
  5675.  
  5676.  QueueName         The queue name, which must be supplied 
  5677.  
  5678.  Note 
  5679.  
  5680.  The server computer name can be specified as '' for a local server or 
  5681.  computer. 
  5682.  
  5683.  Example 
  5684.  
  5685.  
  5686.   /* List print jobs in a print queue */
  5687.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5688.   call LoadLsRxutFuncs
  5689.  
  5690.   NETPRINTJOB = 110
  5691.   SrvName     = '\\DOMAIN_CONTRLR'
  5692.   QueueName   = 'LPT1Q'
  5693.  
  5694.   myRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
  5695.  
  5696.   if myRc <> '0' then do
  5697.    say 'Got error from NetEnumerate() ' myRc
  5698.    call DropLsRxutFuncs
  5699.    exit 9
  5700.   end
  5701.  
  5702.   if printJobInfo.count = 0 then do
  5703.    say 'No print jobs in printer queue'
  5704.    call DropLsRxutFuncs
  5705.    exit 0
  5706.   end
  5707.  
  5708.   say 'Number of print jobs: ' printJobInfo.count
  5709.  
  5710.   do i=1 to printJobInfo.count
  5711.    say
  5712.    say 'Job Id:        ' printJobInfo.i.JobId
  5713.    say 'Userid:        ' printJobInfo.i.UserName
  5714.    say 'Document name: ' printJobInfo.i.Document
  5715.   end
  5716.  
  5717.   call DropLsRxutFuncs
  5718.   call RxFuncDrop 'LoadLsRxutFuncs'
  5719.  
  5720.   exit 0
  5721.  
  5722.  Example Output 
  5723.  
  5724.  
  5725.   Number of print jobs:  2
  5726.  
  5727.   Job Id:         12
  5728.   Userid:         ADMIN04
  5729.   Document name:  Unknown
  5730.  
  5731.   Job Id:         14
  5732.   Userid:         ADMIN04
  5733.   Document name:  Unknown
  5734.  
  5735.  
  5736. ΓòÉΓòÉΓòÉ 11.16. NETPRINTPORT Enumerate ΓòÉΓòÉΓòÉ
  5737.  
  5738. The function retrieves a list of printer ports on a server or workstation. 
  5739.  
  5740. Syntax 
  5741.  
  5742.  
  5743. MyRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
  5744.  
  5745. Parameters 
  5746.  
  5747. The parameters specified are: 
  5748.  
  5749.  'prtPortInfo'   The REXX variable receiving the result. The variable is 
  5750.                  divided into: 
  5751.  
  5752.                    o  prtPortInfo.0 
  5753.  
  5754.                       The number of printer ports 
  5755.  
  5756.                    o  prtPortInfo.i 
  5757.  
  5758.                       Port name entry i, where the variable i has a value from 
  5759.                       1 to prtPortInfo.0 
  5760.  
  5761.  SrvName         The server computer name 
  5762.  
  5763.  Note 
  5764.  
  5765.  The server computer name can be specified as '' for a local computer. 
  5766.  
  5767.  Example 
  5768.  
  5769.  
  5770.   /* List printer ports */
  5771.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5772.   call LoadLsRxutFuncs
  5773.  
  5774.   NETPRINTPORT = 300
  5775.   SrvName      = '\\DOMAIN_CONTRLR'
  5776.  
  5777.   myRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
  5778.  
  5779.   if myRc <> '0' then do
  5780.    say 'Got error from NetEnumerate() ' myRc
  5781.    call DropLsRxutFuncs
  5782.    exit 9
  5783.   end
  5784.  
  5785.   if prtPortInfo.0 = 0 then do
  5786.    say 'No printer ports available'
  5787.    call DropLsRxutFuncs
  5788.    exit 0
  5789.   end
  5790.  
  5791.   say 'Number of printer ports defined: ' prtPortInfo.0
  5792.   say
  5793.  
  5794.   do i=1 to prtPortInfo.0
  5795.    say prtPortInfo.i
  5796.   end
  5797.  
  5798.   call DropLsRxutFuncs
  5799.   call RxFuncDrop 'LoadLsRxutFuncs'
  5800.  
  5801.   exit 0
  5802.  
  5803.  Example Output 
  5804.  
  5805.  
  5806.   Number of printer ports defined:  8
  5807.  
  5808.   FILE
  5809.   COM4
  5810.   COM3
  5811.   COM2
  5812.   COM1
  5813.   LPT3
  5814.   LPT2
  5815.   LPT1
  5816.  
  5817.  
  5818. ΓòÉΓòÉΓòÉ 11.17. NETPRINTQPROC Enumerate ΓòÉΓòÉΓòÉ
  5819.  
  5820. The function retrieves a list of printer queue processors on a server or 
  5821. workstation. 
  5822.  
  5823. Syntax 
  5824.  
  5825.  
  5826. MyRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
  5827.  
  5828. Parameters 
  5829.  
  5830. The parameters specified are: 
  5831.  
  5832.  'prtQProcInfo'    The REXX variable receiving the result. The variable is 
  5833.                    divided into: 
  5834.  
  5835.                      o  prtQProcInfo.0 
  5836.  
  5837.                         The number of printer queue processors 
  5838.  
  5839.                      o  prtQProcInfo.i 
  5840.  
  5841.                         Printer queue processor name entry i, where the 
  5842.                         variable i has a value from 1 to prtQProcInfo.0 
  5843.  
  5844.  SrvName           The server computer name 
  5845.  
  5846.  Note 
  5847.  
  5848.  The server computer name can be specified as '' for a local computer. 
  5849.  
  5850.  Example 
  5851.  
  5852.  
  5853.   /* List printer queue processors */
  5854.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5855.   call LoadLsRxutFuncs
  5856.  
  5857.   NETPRINTQPROC = 320
  5858.   SrvName       = '\\DOMAIN_CONTRLR'
  5859.  
  5860.   myRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
  5861.  
  5862.   if myRc <> '0' then do
  5863.    say 'Got error from NetEnumerate() ' myRc
  5864.    call DropLsRxutFuncs
  5865.    exit 9
  5866.   end
  5867.  
  5868.   if prtQProcInfo.0 = 0 then do
  5869.    say 'No printer queue processor defined'
  5870.    call DropLsRxutFuncs
  5871.    exit 0
  5872.   end
  5873.  
  5874.   say 'Number of entries: ' prtQProcInfo.0
  5875.   say
  5876.  
  5877.   do i=1 to prtQProcInfo.0
  5878.    say prtQProcInfo.i
  5879.   end
  5880.  
  5881.   call DropLsRxutFuncs
  5882.   call RxFuncDrop 'LoadLsRxutFuncs'
  5883.  
  5884.   exit 0
  5885.  
  5886.  Example Output 
  5887.  
  5888.  
  5889.   Number of entries:  1
  5890.  
  5891.   PMPRINT
  5892.  
  5893.  
  5894. ΓòÉΓòÉΓòÉ 11.18. NETPRINTQUEUE Enumerate ΓòÉΓòÉΓòÉ
  5895.  
  5896. The function returns a list of print queues. 
  5897.  
  5898. Syntax 
  5899.  
  5900.  
  5901. MyRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
  5902.  
  5903. Parameters 
  5904.  
  5905. The parameters specified are: 
  5906.  
  5907.  'printQInfo'      The REXX variable receiving the result. The variable is 
  5908.                    divided into: 
  5909.  
  5910.                      o  printQInfo.0 
  5911.  
  5912.                         The number of print queues 
  5913.  
  5914.                      o  printQInfo.i 
  5915.  
  5916.                         The print queue name entry i, where the variable i has 
  5917.                         a value from 1 to printQInfo.0 
  5918.  
  5919.  SrvName           The server computer name 
  5920.  
  5921.  Note 
  5922.  
  5923.  The server computer name can be specified as '' for a local server or 
  5924.  computer. 
  5925.  
  5926.  Example 
  5927.  
  5928.  
  5929.   /* List print queue names */
  5930.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  5931.   call LoadLsRxutFuncs
  5932.  
  5933.   NETPRINTQUEUE = 120
  5934.   SrvName       = '\\DOMAIN_CONTRLR'
  5935.  
  5936.   myRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
  5937.  
  5938.   if myRc <> '0' then do
  5939.    say 'Got error from NetEnumerate() ' myRc
  5940.    call DropLsRxutFuncs
  5941.    exit 9
  5942.   end
  5943.  
  5944.   if printQInfo.0 = 0 then do
  5945.    say 'No printer queues defined'
  5946.    call DropLsRxutFuncs
  5947.    exit 0
  5948.   end
  5949.  
  5950.   say 'Number of printer queue names: ' printQInfo.0
  5951.   say
  5952.  
  5953.   do i=1 to printQInfo.0
  5954.    say printQInfo.i
  5955.   end
  5956.  
  5957.   call DropLsRxutFuncs
  5958.   call RxFuncDrop 'LoadLsRxutFuncs'
  5959.  
  5960.   exit 0
  5961.  
  5962.  Example Output 
  5963.  
  5964.  
  5965.   Number of printer queue names:  6
  5966.  
  5967.   LPT1Q
  5968.   PS203
  5969.   PCL203
  5970.   PS202
  5971.   PCL202
  5972.   IBM4029
  5973.  
  5974.  
  5975. ΓòÉΓòÉΓòÉ 11.19. NETSERVERDISK Enumerate ΓòÉΓòÉΓòÉ
  5976.  
  5977. The function retrieves a list of diskette and disk drives on a server. 
  5978.  
  5979. Syntax 
  5980.  
  5981.  
  5982. MyRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
  5983.  
  5984. Parameters 
  5985.  
  5986. The parameters specified are: 
  5987.  
  5988.  'srvDiskInfo'     The REXX variable receiving the result. The variable is 
  5989.                    divided into: 
  5990.  
  5991.                      o  srvDiskInfo.0 
  5992.  
  5993.                         The number of disk drives available on the server 
  5994.                         specified 
  5995.  
  5996.                      o  srvDiskInfo.i 
  5997.  
  5998.                         The disk drive name entry i, where the variable i has a 
  5999.                         value from 1 to srvDiskInfo.0 
  6000.  
  6001.  SrvName           The server computer name 
  6002.  
  6003.  Note 
  6004.  
  6005.  The server computer name can be specified as '' for a local server. 
  6006.  
  6007.  Example 
  6008.  
  6009.  
  6010.   /* List disk drives on a server */
  6011.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6012.   call LoadLsRxutFuncs
  6013.  
  6014.   NETSERVERDISK = 150
  6015.   SrvName       = '\\DOMAIN_CONTRLR'
  6016.  
  6017.   myRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
  6018.  
  6019.   if myRc <> '0' then do
  6020.    say 'Got error from NetEnumerate() ' myRc
  6021.    call DropLsRxutFuncs
  6022.    exit 9
  6023.   end
  6024.  
  6025.   if srvDiskInfo.0 = 0 then do
  6026.    say 'No server disk drives'
  6027.    call DropLsRxutFuncs
  6028.    exit 0
  6029.   end
  6030.  
  6031.   say 'Number of disk drives: ' srvDiskInfo.0
  6032.   say
  6033.  
  6034.   do i=1 to srvDiskInfo.0
  6035.    say srvDiskInfo.i
  6036.   end
  6037.  
  6038.   call DropLsRxutFuncs
  6039.   call RxFuncDrop 'LoadLsRxutFuncs'
  6040.  
  6041.   exit 0
  6042.  
  6043.  Example Output 
  6044.  
  6045.  
  6046.   Number of disk drives:  7
  6047.  
  6048.   A:
  6049.   B:
  6050.   C:
  6051.   D:
  6052.   E:
  6053.   F:
  6054.   G:
  6055.  
  6056.  
  6057. ΓòÉΓòÉΓòÉ 11.20. NETSERVER Enumerate ΓòÉΓòÉΓòÉ
  6058.  
  6059. The function list all servers visible on the network. 
  6060.  
  6061. Syntax 
  6062.  
  6063.  
  6064. MyRc = NetEnumerate(NETSERVER, 'serverList')
  6065. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName)
  6066. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType)
  6067. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
  6068.  
  6069. Parameters 
  6070.  
  6071. The parameters specified are: 
  6072.  
  6073.  'serverList'   The REXX variable receiving the result. The variable is divided 
  6074.                 into: 
  6075.  
  6076.                   o  serverList.0 
  6077.  
  6078.                      The number of servers found 
  6079.  
  6080.                   o  serverList.i 
  6081.  
  6082.                      The server computer name entry i, where the variable i has 
  6083.                      a value from 1 to serverList.0 
  6084.  
  6085.  SrvType        The server type values are defined as follows: 
  6086.  
  6087.                                 SV_TYPE_WORKSTATION    =   1   /* Workstation */
  6088.                                 SV_TYPE_SERVER         =   2   /* Server */
  6089.                                 SV_TYPE_SQLSERVER      =   4   /* SQL server */
  6090.                                 SV_TYPE_DOMAIN_CTRL    =   8   /* Domain controller */
  6091.                                 SV_TYPE_DOMAIN_BAKCTRL =  16   /* Backup domain controller */
  6092.                                 SV_TYPE_TIME_SOURCE    =  32   /* Time server */
  6093.                                 SV_TYPE_AFP            =  64   /* Apple File Protocol (AFP) service */
  6094.                                 SV_TYPE_NOVELL         = 128   /* Novell service */
  6095.                                 SV_TYPE_ALL            =  -1   /* All types of servers */
  6096.  
  6097.  SrvName        The server computer name 
  6098.  
  6099.  DomainName     The domain name 
  6100.  
  6101.  Note 
  6102.  
  6103.  The server computer name can be specified as '' for a local server or 
  6104.  workstation. 
  6105.  
  6106.  The default values in the four different call forms are as follows: 
  6107.  
  6108.  2 parms     The function executes on the local computer, list all domain 
  6109.              controllers found in the logon domain and domains found in the 
  6110.              'other Domains' parameter 
  6111.  
  6112.  3 parms     The function executes on the computer specified, list all domain 
  6113.              controllers found in the logon domain and domains found in the 
  6114.              'other Domains' parameter 
  6115.  
  6116.  4 parms     The function executes on the computer specified, list the server 
  6117.              types specified in the logon domain and domains found in the 
  6118.              'other Domains' parameter 
  6119.  
  6120.  5 parms     The function executes on the computer specified, list the server 
  6121.              types specified in the domain specified 
  6122.  
  6123.  Example 
  6124.  
  6125.  
  6126.   /* Get the domain controller computer name */
  6127.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6128.   call LoadLsRxutFuncs
  6129.  
  6130.   NETSERVER = 160
  6131.   SrvName   = '\\DOMAIN_CONTRLR'
  6132.   SrvType   = 8    /* Domain Controller */
  6133.   DomainName = 'ITSO_AUSTIN_442'
  6134.  
  6135.   myRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
  6136.  
  6137.   if myRc <> '0' then do
  6138.    say 'Got error from NetEnumerate() ' myRc
  6139.    call DropLsRxutFuncs
  6140.    exit 9
  6141.   end
  6142.  
  6143.   if serverList.0 = 0 then do
  6144.    say 'Domain controller was not found'
  6145.    call DropLsRxutFuncs
  6146.    exit 0
  6147.   end
  6148.  
  6149.   say 'Number of servers found: ' serverList.0
  6150.   say
  6151.  
  6152.   do i=1 to serverList.0
  6153.    say serverList.i
  6154.   end
  6155.  
  6156.   call DropLsRxutFuncs
  6157.   call RxFuncDrop 'LoadLsRxutFuncs'
  6158.  
  6159.   exit 0
  6160.  
  6161.  Example Output 
  6162.  
  6163.  
  6164.   Number of servers found:  1
  6165.  
  6166.   DOMAIN_CONTRLR
  6167.  
  6168.  
  6169. ΓòÉΓòÉΓòÉ 11.21. NETSERVICE Enumerate ΓòÉΓòÉΓòÉ
  6170.  
  6171. The function retrieves a list of all network services that are started. 
  6172.  
  6173. Syntax 
  6174.  
  6175.  
  6176. MyRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
  6177.  
  6178. Parameters 
  6179.  
  6180. The parameters specified are: 
  6181.  
  6182.  'serviceInfo'     The REXX variable receiving the result. The variable is 
  6183.                    divided into: 
  6184.  
  6185.                      o  serviceInfo.0 
  6186.  
  6187.                         The number of services started 
  6188.  
  6189.                      o  serviceInfo.i 
  6190.  
  6191.                         The started service name entry i, where the variable i 
  6192.                         has a value from 1 to serviceInfo.0 
  6193.  
  6194.  SrvName           The server computer name 
  6195.  
  6196.  Note 
  6197.  
  6198.  The server computer name can be specified as '' for a local server. 
  6199.  
  6200.  Example 
  6201.  
  6202.  
  6203.   /* List service names started on computer */
  6204.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6205.   call LoadLsRxutFuncs
  6206.  
  6207.   NETSERVICE = 170
  6208.   SrvName    = '\\DOMAIN_CONTRLR'
  6209.  
  6210.   myRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
  6211.  
  6212.   if myRc <> '0' then do
  6213.    say 'Got error from NetEnumerate() ' myRc
  6214.    call DropLsRxutFuncs
  6215.    exit 9
  6216.   end
  6217.  
  6218.   if serviceInfo.0 = 0 then do
  6219.    say 'No service listed as started'
  6220.    call DropLsRxutFuncs
  6221.    exit 0
  6222.   end
  6223.  
  6224.   say 'Number of services started: ' serviceInfo.0
  6225.   say
  6226.  
  6227.   do i=1 to serviceInfo.0
  6228.    say serviceInfo.i
  6229.   end
  6230.  
  6231.   call DropLsRxutFuncs
  6232.   call RxFuncDrop 'LoadLsRxutFuncs'
  6233.  
  6234.   exit 0
  6235.  
  6236.  Example Output 
  6237.  
  6238.  
  6239.   Number of services started:  8
  6240.  
  6241.   REQUESTER
  6242.   MESSENGER
  6243.   SERVER
  6244.   NETLOGON
  6245.   LSSERVER
  6246.   ALERTER
  6247.   NETRUN
  6248.   TIMESOURCE
  6249.  
  6250.  
  6251. ΓòÉΓòÉΓòÉ 11.22. NETSESSION Enumerate ΓòÉΓòÉΓòÉ
  6252.  
  6253. The function retrieves a list of computer names having a session to a server. 
  6254.  
  6255. Syntax 
  6256.  
  6257.  
  6258. MyRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
  6259.  
  6260. Parameters 
  6261.  
  6262. The parameters specified are: 
  6263.  
  6264.  'sessionInfo'  The REXX variable receiving the result. The variable is divided 
  6265.                 into: 
  6266.  
  6267.                   o  sessionInfo.0 
  6268.  
  6269.                      The number of sessions 
  6270.  
  6271.                   o  sessionInfo.i 
  6272.  
  6273.                      The computer name entry i, where the variable i has a 
  6274.                      value from 1 to sessionInfo.0 
  6275.  
  6276.                   o  sessionInfo.i.username 
  6277.  
  6278.                      The name of the userid who established the session 
  6279.  
  6280.                   o  sessionInfo.i.num_conns 
  6281.  
  6282.                      The number of connections that have been made during the 
  6283.                      session 
  6284.  
  6285.                   o  sessionInfo.i.num_opens 
  6286.  
  6287.                      The number of files, devices, and pipes that have been 
  6288.                      opened during the session 
  6289.  
  6290.                   o  sessionInfo.i.num_users 
  6291.  
  6292.                      The number of sessions that are established between the 
  6293.                      server and the requester 
  6294.  
  6295.                   o  sessionInfo.i.time 
  6296.  
  6297.                      The number of seconds a session has been active 
  6298.  
  6299.                   o  sessionInfo.i.idle_time 
  6300.  
  6301.                      The number of seconds a session has been idle 
  6302.  
  6303.                   o  sessionInfo.i.user_flags 
  6304.  
  6305.                      The manner in which the user established the session. The 
  6306.                      bit mask for user_flags is defined as follows: 
  6307.  
  6308.                                           Value  What
  6309.                                           -----  ----------------------------------------------
  6310.                                            1     Established the session using a GUEST account
  6311.                                            2     Established the session without using password encryption
  6312.  
  6313.                   o  sessionInfo.i.cltype_name 
  6314.  
  6315.                      The type of client that established the session 
  6316.  
  6317.                                           Type          What
  6318.                                           -----------   ------------------------------------------------
  6319.                                           Down Level    Old clients; for example, LAN Server 1.0 clients
  6320.                                           DLR 2.0       DLR 2.0 clients
  6321.                                           OS/2 LS 1.3   OS/2 LAN Server 1.3 clients
  6322.                                           OS/2 LS 3.0   OS/2 LAN Server 3.0 clients
  6323.                                           OS/2 LS 4.0   OS/2 LAN Server 4.0 clients
  6324.  
  6325.  SrvName        The server computer name 
  6326.  
  6327.  Note 
  6328.  
  6329.  The server computer name can be specified as '' for a local server. 
  6330.  
  6331.  Example 
  6332.  
  6333.  
  6334.   /* List computer names having a session to a server */
  6335.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6336.   call LoadLsRxutFuncs
  6337.  
  6338.   NETSESSION = 180
  6339.   SrvName    = '\\DOMAIN_CONTRLR'
  6340.  
  6341.   myRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
  6342.  
  6343.   if myRc <> '0' then do
  6344.    say 'Got error from NetEnumerate() ' myRc
  6345.    call DropLsRxutFuncs
  6346.    exit 9
  6347.   end
  6348.  
  6349.   if sessionInfo.0 = 0 then do
  6350.    say 'No session established on server'
  6351.    call DropLsRxutFuncs
  6352.    exit 0
  6353.   end
  6354.  
  6355.   say 'Number of computers having a session to server: ' sessionInfo.0
  6356.   say
  6357.  
  6358.   do i=1 to sessionInfo.0
  6359.    say sessionInfo.i
  6360.    say sessionInfo.i.username
  6361.    say sessionInfo.i.num_conns
  6362.    say sessionInfo.i.num_opens
  6363.    say sessionInfo.i.num_users
  6364.    say sessionInfo.i.time
  6365.    say sessionInfo.i.idle_time
  6366.    say sessionInfo.i.user_flags
  6367.    say sessionInfo.i.cltype_name
  6368.    say
  6369.   end
  6370.  
  6371.   call DropLsRxutFuncs
  6372.   call RxFuncDrop 'LoadLsRxutFuncs'
  6373.  
  6374.   exit 0
  6375.  
  6376.  Example Output 
  6377.  
  6378.  
  6379.   Number of computers having a session to server:  1
  6380.  
  6381.   ITSCWK21
  6382.   ADMIN04
  6383.   4
  6384.   2
  6385.   1
  6386.   14956
  6387.   0
  6388.   0
  6389.   OS/2 LS 3.0
  6390.  
  6391.  
  6392. ΓòÉΓòÉΓòÉ 11.23. NETSHARE Enumerate ΓòÉΓòÉΓòÉ
  6393.  
  6394. The function retrieves a list of current shares on a server. 
  6395.  
  6396. Syntax 
  6397.  
  6398.  
  6399. MyRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  6400.  
  6401. Parameters 
  6402.  
  6403. The parameters specified are: 
  6404.  
  6405.  'shareInfo'       The REXX variable receiving the result. The variable is 
  6406.                    divided into: 
  6407.  
  6408.                      o  shareInfo.0 
  6409.  
  6410.                         The number of netnames shared 
  6411.  
  6412.                      o  shareInfo.i 
  6413.  
  6414.                         The netname entry i, where the variable i has a value 
  6415.                         from 1 to shareInfo.0 
  6416.  
  6417.  SrvName           The server computer name 
  6418.  
  6419.  Note 
  6420.  
  6421.  The server computer name can be specified as '' for a local server. 
  6422.  
  6423.  Example 
  6424.  
  6425.  
  6426.   /* List shared netnames on a server */
  6427.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6428.   call LoadLsRxutFuncs
  6429.  
  6430.   NETSHARE = 190
  6431.   SrvName  = '\\DOMAIN_CONTRLR'
  6432.  
  6433.   myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  6434.  
  6435.   if myRc <> '0' then do
  6436.    say 'Got error from NetEnumerate() ' myRc
  6437.    call DropLsRxutFuncs
  6438.    exit 9
  6439.   end
  6440.  
  6441.   if shareInfo.1 = 0 then do
  6442.    say 'Server does not share a resource'
  6443.    call DropLsRxutFuncs
  6444.    exit 0
  6445.   end
  6446.  
  6447.   say 'Number of shared netnames: ' shareInfo.0
  6448.   say
  6449.  
  6450.   do i=1 to shareInfo.0
  6451.    say shareInfo.i
  6452.   end
  6453.  
  6454.   call DropLsRxutFuncs
  6455.   call RxFuncDrop 'LoadLsRxutFuncs'
  6456.  
  6457.   exit 0
  6458.  
  6459.  Example Output 
  6460.  
  6461.  
  6462.   Number of shared netnames:  19
  6463.  
  6464.   IPC$
  6465.   ADMIN$
  6466.   A$
  6467.   B$
  6468.   C$
  6469.   D$
  6470.   E$
  6471.   F$
  6472.   G$
  6473.   NETLOGON
  6474.   IBMLAN$
  6475.   BIGTREE
  6476.   EDRIVE
  6477.   MO
  6478.   COM1Q
  6479.   VXREXX
  6480.   TOOLKIT
  6481.   LPT1Q
  6482.   USER300
  6483.  
  6484.  
  6485. ΓòÉΓòÉΓòÉ 11.24. NETUSE Enumerate ΓòÉΓòÉΓòÉ
  6486.  
  6487. The function lists all current connections between the local computer and 
  6488. resources on a remote server. 
  6489.  
  6490. Syntax 
  6491.  
  6492.  
  6493. MyRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
  6494.  
  6495. Parameters 
  6496.  
  6497. The parameters specified are: 
  6498.  
  6499.  'useInfo'     The REXX variable receiving the result. The variable is divided 
  6500.                into: 
  6501.  
  6502.                  o  useInfo.count 
  6503.  
  6504.                     The number of net uses. The same information is stored in 
  6505.                     the variable useInfo.0 
  6506.  
  6507.                  o  useInfo.i.local 
  6508.  
  6509.                     The local device entry i, where the variable i has a value 
  6510.                     from 1 to useInfo.count 
  6511.  
  6512.                  o  useInfo.i.remote 
  6513.  
  6514.                     The UNC name entry i, where the variable i has a value from 
  6515.                     1 to useInfo.count 
  6516.  
  6517.                  o  useInfo.i.status 
  6518.  
  6519.                     Tthe status of the connection entry i where the variable i 
  6520.                     has a value from 1 to useInfo.count 
  6521.  
  6522.                  o  useInfo.i.asg_type 
  6523.  
  6524.                     The type of remote resource being accessed entry i, where 
  6525.                     the variable i has a value from 1 to useInfo.count 
  6526.  
  6527.                  o  useInfo.i.refcount 
  6528.  
  6529.                     The number of files, directories, and other processes that 
  6530.                     are open on the remote resource for entry i 
  6531.  
  6532.                  o  useInfo.i.usecount 
  6533.  
  6534.                     The number of explicit connections (redirection of a local 
  6535.                     device name) or implicit UNC connections (redirection of a 
  6536.                     null local device name) that are established with the 
  6537.                     resource for entry i 
  6538.  
  6539.  SrvName       The server computer name 
  6540.  
  6541.  Note 
  6542.  
  6543.  The server computer name can be specified as '' for a local server. 
  6544.  
  6545.  Example 
  6546.  
  6547.  
  6548.   /* List net uses */
  6549.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6550.   call LoadLsRxutFuncs
  6551.  
  6552.   NETUSE  = 270
  6553.   SrvName = '' /* On this local computer */
  6554.   /* SrvName  = '\\DOMAIN_CONTRLR' */
  6555.  
  6556.   myRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
  6557.  
  6558.   if myRc <> '0' then do
  6559.    say 'Got error from NetEnumerate() ' myRc
  6560.    call DropLsRxutFuncs
  6561.    exit 9
  6562.   end
  6563.  
  6564.   if useInfo.count = 0 then do
  6565.    say 'No net uses are active'
  6566.    call DropLsRxutFuncs
  6567.    exit 0
  6568.   end
  6569.  
  6570.   say 'Number of net uses: ' useInfo.count
  6571.  
  6572.   do i=1 to useInfo.count
  6573.    say
  6574.    say useInfo.i.local
  6575.    say useInfo.i.remote
  6576.   end
  6577.  
  6578.   call DropLsRxutFuncs
  6579.   call RxFuncDrop 'LoadLsRxutFuncs'
  6580.  
  6581.   exit 0
  6582.  
  6583.  Example Output 
  6584.  
  6585.  
  6586.   Number of net uses:  3
  6587.  
  6588.   Y:
  6589.   \\DOMAIN_CONTRLR\C$
  6590.  
  6591.   LPT2
  6592.   \\DOMAIN_CONTRLR\LPT1Q
  6593.  
  6594.   UNC connection
  6595.   \\DOMAIN_CONTRLR\IPC$
  6596.  
  6597.  
  6598. ΓòÉΓòÉΓòÉ 11.25. NETUSER Enumerate ΓòÉΓòÉΓòÉ
  6599.  
  6600. The function retrieves a list of defined user accounts on a server. 
  6601.  
  6602. Syntax 
  6603.  
  6604.  
  6605. MyRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
  6606.  
  6607. Parameters 
  6608.  
  6609. The parameters specified are: 
  6610.  
  6611.  'userInfo'        The REXX variable receiving the result. The variable is 
  6612.                    divided into: 
  6613.  
  6614.                      o  userInfo.0 
  6615.  
  6616.                         The number of users 
  6617.  
  6618.                      o  userInfo.i 
  6619.  
  6620.                         User name entry i, where the variable i has a value 
  6621.                         from 1 to userInfo.0 
  6622.  
  6623.  SrvName           The server computer name of the domain controller 
  6624.  
  6625.  Note 
  6626.  
  6627.  The server computer name can be specified as '' for a local domain controller. 
  6628.  
  6629.  Example 
  6630.  
  6631.  
  6632.   /* List defined user accounts in the UAS */
  6633.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6634.   call LoadLsRxutFuncs
  6635.  
  6636.   NETUSER = 280
  6637.   SrvName = '\\DOMAIN_CONTRLR'
  6638.  
  6639.   myRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
  6640.  
  6641.   if myRc <> '0' then do
  6642.    say 'Got error from NetEnumerate() ' myRc
  6643.    call DropLsRxutFuncs
  6644.    exit 9
  6645.   end
  6646.  
  6647.   if userInfo.0 = 0 then do
  6648.    say 'No user accounts defined'
  6649.    call DropLsRxutFuncs
  6650.    exit 0
  6651.   end
  6652.  
  6653.   say 'Number of users defined: ' userInfo.0
  6654.   say
  6655.  
  6656.   do i=1 to userInfo.0
  6657.    say userInfo.i
  6658.   end
  6659.  
  6660.   call DropLsRxutFuncs
  6661.   call RxFuncDrop 'LoadLsRxutFuncs'
  6662.  
  6663.   exit 0
  6664.  
  6665.  Example Output 
  6666.  
  6667.  
  6668.   Number of users defined:  12
  6669.  
  6670.   GUEST
  6671.   ADDITIONAL_SRV
  6672.   DOMAIN_CONTRLR
  6673.   A948R11
  6674.   USERID
  6675.   ADMIN04
  6676.   A948R9
  6677.   DIESEISTEINSEHRLANGE
  6678.   A948R1
  6679.   USER04
  6680.   ADMIN
  6681.   DOSUSER
  6682.  
  6683.  
  6684. ΓòÉΓòÉΓòÉ 11.26. NETUSERGROUPS Enumerate ΓòÉΓòÉΓòÉ
  6685.  
  6686. The function lists the names of all groups in the user accounts subsystem (UAS) 
  6687. database to which a particular user account belongs. This function is identical 
  6688. to NetGetInfo(NETUSERGROUPS). 
  6689.  
  6690. Syntax 
  6691.  
  6692.  
  6693. MyRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  6694.  
  6695. Parameters 
  6696.  
  6697. The parameters specified are: 
  6698.  
  6699.  'userGroups'  The REXX variable receiving the result. The variable is divided 
  6700.                into: 
  6701.  
  6702.                  o  userGroups.0 
  6703.  
  6704.                     The number of groups in which the user account has a entry 
  6705.  
  6706.                  o  userGroups.i 
  6707.  
  6708.                     The actual group names 
  6709.  
  6710.  SrvName       The server computer name 
  6711.  
  6712.  UserId        The userid 
  6713.  
  6714.  Note 
  6715.  
  6716.  The server computer name can be specified as '' for a local server or 
  6717.  computer. 
  6718.  
  6719.  Example 
  6720.  
  6721.  
  6722.   /* Get the groups in which a user account is defined */
  6723.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6724.   call LoadLsRxutFuncs
  6725.  
  6726.   NETUSERGROUPS = 330
  6727.   SrvName       = '\\DOMAIN_CONTRLR'
  6728.   UserId        = 'USERID'
  6729.  
  6730.   myRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  6731.  
  6732.   if myRc <> '0' then do
  6733.    say 'Got error from NetEnumerate() ' myRc
  6734.    call DropLsRxutFuncs
  6735.    exit 9
  6736.   end
  6737.  
  6738.   if userGroups.0 = 0 then do
  6739.    say 'User account belongs to no group'
  6740.    call DropLsRxutFuncs
  6741.    exit 0
  6742.   end
  6743.  
  6744.   say 'Number of entries: ' userGroups.0
  6745.   say
  6746.  
  6747.   do i=1 to userGroups.0
  6748.    say 'Group Name: ' userGroups.i
  6749.   end
  6750.  
  6751.   call DropLsRxutFuncs
  6752.   call RxFuncDrop 'LoadLsRxutFuncs'
  6753.  
  6754.   exit 0
  6755.  
  6756.  Example Output 
  6757.  
  6758.  
  6759.   Number of entries:  1
  6760.  
  6761.   Group Name:  ADMINS
  6762.  
  6763.  
  6764. ΓòÉΓòÉΓòÉ 12. NetGetInfo ΓòÉΓòÉΓòÉ
  6765.  
  6766. The Net Get Information functions are a family of functions that can be called 
  6767. with a number of parameters. The use of the NetGetInfo has two to five 
  6768. different parameters. The generic syntax is: 
  6769.  
  6770.  
  6771. MyRc = NetGetInfo(option, 'StemVar', parm1, parm2, parm3)
  6772.  
  6773. The option parameter contains a value to determine the type or option 
  6774. information is obtained from. An example would be the information of a user 
  6775. account. 
  6776.  
  6777. The StemVar parameter is specified in quotes. It will contain the resulting 
  6778. information from the NetGetInfo function. 
  6779.  
  6780. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  6781.  
  6782. The MyRc parameter is the return code that will have an value from the 
  6783. NetGetInfo() function. If the call is successful the character '0' will be 
  6784. returned. Otherwise an error code and descriptive text are inserted by 
  6785. NetGetInfo() function. 
  6786.  
  6787. The option parameter values are defined in Option parameter values. 
  6788.  
  6789.  
  6790. ΓòÉΓòÉΓòÉ 12.1. NETACCESS GetInfo ΓòÉΓòÉΓòÉ
  6791.  
  6792. NETACCESS GetInfo function retrieves information about the access control 
  6793. profile for a resource. The resource can either be a directory, a file, a pipe, 
  6794. a spooler queue or a serial device queue. 
  6795.  
  6796. Syntax 
  6797.  
  6798.  
  6799. MyRc = NetGetInfo(NETACCESS, 'Access', ServerName, ResourceName)
  6800.  
  6801. Parameters 
  6802.  
  6803. The parameters specified are: 
  6804.  
  6805.  'Access'  The REXX variable receiving the result. The variable is divided 
  6806.            into: 
  6807.  
  6808.              o  Access.count 
  6809.  
  6810.                 The number of access controls profiles available for the 
  6811.                 resource 
  6812.  
  6813.              o  Access.audit 
  6814.  
  6815.                 The auditing flags. The flags are defined as: 
  6816.  
  6817.                   -  A  Audit all. When this bit is set, all access attempts 
  6818.                      will be audited. 
  6819.  
  6820.                   -  O  If O, audit successful file opens. 
  6821.  
  6822.                   -  W  If W, audit successful file writes and successful 
  6823.                      directory creates. 
  6824.  
  6825.                   -  D  If D, audit successful file deletes or truncates and 
  6826.                      successful directory deletes. 
  6827.  
  6828.                   -  P  If P, audit successful file and directory access 
  6829.                      control profile change. 
  6830.  
  6831.                   -  o  If o, audit failed file opens. 
  6832.  
  6833.                   -  w  If w, audit failed file writes and failed directory 
  6834.                      creates. 
  6835.  
  6836.                   -  d  If d, audit failed file deletes or truncates and failed 
  6837.                      directory deletes. 
  6838.  
  6839.                   -  p  If d, audit failed file and directory access control 
  6840.                      profile change. 
  6841.  
  6842.                   -  -none- or N  Do not perform any auditing 
  6843.  
  6844.              o  Access.i.ugname 
  6845.  
  6846.                 The user account or group name. The variable i has a value from 
  6847.                 1 to Access.count 
  6848.  
  6849.              o  Access.i.access 
  6850.  
  6851.                 The access profile. The variable i is specified as above. The 
  6852.                 access control flags are as follows: 
  6853.  
  6854.                   -  N None 
  6855.  
  6856.                   -  A Attribute 
  6857.  
  6858.                   -  R Read 
  6859.  
  6860.                   -  W Write 
  6861.  
  6862.                   -  C Create 
  6863.  
  6864.                   -  X Execute 
  6865.  
  6866.                   -  D Delete 
  6867.  
  6868.                   -  P Permissions 
  6869.  
  6870.                   -  G This is a Group permission 
  6871.  
  6872.  ServerName The server computer name 
  6873.  
  6874.  Resource Name The name of the resource 
  6875.  
  6876.  Note 
  6877.  
  6878.  The serverName parameter can be specified as '' for a local server. 
  6879.  
  6880.  Example 
  6881.  
  6882.   /* Add a access control profile for a resource */
  6883.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6884.   call LoadLsRxutFuncs
  6885.  
  6886.   NETACCESS = 10
  6887.   SrvName    = '\\FSC30DCR'
  6888.   ResourceName = 'D:\APPS\NETPROG'
  6889.  
  6890.   myRc = NetGetInfo(NETACCESS, 'Access', SrvName, ResourceName)
  6891.  
  6892.   if myRc <> '0' then do
  6893.    say 'Got error from NetGetInfo() ' myRc
  6894.    call DropLsRxutFuncs
  6895.    exit 9
  6896.   end
  6897.  
  6898.   say
  6899.   say 'Count:   ' Access.count
  6900.   say 'Audit:   ' Access.audit
  6901.  
  6902.   do i=1 to Access.count
  6903.    say
  6904.    say Access.i.ugname
  6905.    say Access.i.access
  6906.   end
  6907.  
  6908.   call DropLsRxutFuncs
  6909.   call RxFuncDrop 'LoadLsRxutFuncs'
  6910.  
  6911.   exit 0
  6912.  
  6913.  Example Output 
  6914.  
  6915.   Count:    2
  6916.   Audit:    owdp
  6917.  
  6918.   USERS
  6919.   RG
  6920.  
  6921.   GUESTS
  6922.   RG
  6923.  
  6924.  
  6925. ΓòÉΓòÉΓòÉ 12.2. NETACCESSUSERPERMS Get Info ΓòÉΓòÉΓòÉ
  6926.  
  6927. The function obtains for a specified userid or group the permission to a 
  6928. resource. The resource can be a file, directory, drive, pipe, queue or logical 
  6929. resource and can be specified remotely by a UNC path. 
  6930.  
  6931. Syntax 
  6932.  
  6933.  
  6934. MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
  6935.  
  6936. Parameters 
  6937.  
  6938. The parameters specified are 
  6939.  
  6940.  'UsrPerms'    The REXX variable receiving the result. The variable is divided 
  6941.                into: 
  6942.  
  6943.                  o  UsrPerms.perms 
  6944.  
  6945.                     The access control profile available for the resource. The 
  6946.                     access control flags are as follows: 
  6947.  
  6948.                       -  N None 
  6949.  
  6950.                       -  A Attribute 
  6951.  
  6952.                       -  R Read 
  6953.  
  6954.                       -  W Write 
  6955.  
  6956.                       -  C Create 
  6957.  
  6958.                       -  X Execute 
  6959.  
  6960.                       -  D Delete 
  6961.  
  6962.                       -  P Permissions 
  6963.  
  6964.  SrvName       The server computer name 
  6965.  
  6966.  NetResName    The name of the resource 
  6967.  
  6968.  UgName        User account or group name 
  6969.  
  6970.  Note 
  6971.  
  6972.  The server computer name can be specified as '' for a local server. 
  6973.  
  6974.  Example 
  6975.  
  6976.   /* Get access control profile for a resource and a user or group */
  6977.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  6978.   call LoadLsRxutFuncs
  6979.  
  6980.   NETACCESSUSERPERMS = 12
  6981.   SrvName            = '\\FSC30DCR'
  6982.   NetResName         = 'C:\IBMLAN\NETPROG'
  6983.   UgName             = 'USERS'
  6984.  
  6985.   MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
  6986.  
  6987.   if myRc <> '0' then do
  6988.    say 'Got error from NetGetInfo() ' myRc
  6989.    call DropLsRxutFuncs
  6990.    exit 9
  6991.   end
  6992.  
  6993.   say
  6994.   say 'Access Perms: ' UsrPerms.perms
  6995.  
  6996.   call DropLsRxutFuncs
  6997.   call RxFuncDrop 'LoadLsRxutFuncs'
  6998.  
  6999.   exit 0
  7000.  
  7001.  Example Output 
  7002.  
  7003.  
  7004.   Access Perms:  R
  7005.  
  7006.  
  7007. ΓòÉΓòÉΓòÉ 12.3. NETALIAS Get Info ΓòÉΓòÉΓòÉ
  7008.  
  7009. The function retrieves information about the specified alias. 
  7010.  
  7011. Syntax 
  7012.  
  7013.  
  7014. MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
  7015.  
  7016. Parameters 
  7017.  
  7018. The parameters specified are: 
  7019.  
  7020.  'AliasInfo'  The REXX variable receiving the result. The variable is divided 
  7021.               into: 
  7022.  
  7023.                 o  AliasInfo.name 
  7024.  
  7025.                    The alias name 
  7026.  
  7027.                 o  AliasInfo.remark 
  7028.  
  7029.                    The alias remark 
  7030.  
  7031.                 o  AliasInfo.server 
  7032.  
  7033.                    The computer name of the server where the resource described 
  7034.                    by this alias resides 
  7035.  
  7036.                 o  AliasInfo.netname 
  7037.  
  7038.                    The alias name for files aliases, and the queue name for 
  7039.                    printer and serial device aliases 
  7040.  
  7041.                 o  AliasInfo.location 
  7042.  
  7043.                    The alias location 
  7044.  
  7045.                 o  AliasInfo.mode 
  7046.  
  7047.                    When the alias is shared 
  7048.  
  7049.                 o  AliasInfo.maxuses 
  7050.  
  7051.                    The maximum number of users who can have redirection to the 
  7052.                    resource identified by this alias 
  7053.  
  7054.                 o  AliasInfo.type 
  7055.  
  7056.                    The alias type 
  7057.  
  7058.                 o  AliasInfo.queue 
  7059.  
  7060.                    The queue name for serial or printer alias only 
  7061.  
  7062.                 o  AliasInfo.path 
  7063.  
  7064.                    The path for files alias only 
  7065.  
  7066.                 o  AliasInfo.priority 
  7067.  
  7068.                    The serial device priority 
  7069.  
  7070.                 o  AliasInfo.device_pool 
  7071.  
  7072.                    The serial device pool 
  7073.  
  7074.  SrvName      The server computer name 
  7075.  
  7076.  Alias        The alias name 
  7077.  
  7078.  Note 
  7079.  
  7080.  The server computer name can be specified as '' for a local server. 
  7081.  
  7082.  Example 
  7083.  
  7084.   /* Get alias information */
  7085.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7086.   call LoadLsRxutFuncs
  7087.  
  7088.   NETALIAS = 20
  7089.   SrvName  = '\\FSC30DCR'
  7090.   Alias    = 'FORALL'
  7091.  
  7092.   MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
  7093.  
  7094.   if myRc <> '0' then do
  7095.    say 'Got error from NetGetInfo() ' myRc
  7096.    call DropLsRxutFuncs
  7097.    exit 9
  7098.   end
  7099.  
  7100.   say
  7101.   say 'Alias Name:        ' aliasInfo.name
  7102.   say 'Alias Remark:      ' aliasInfo.remark
  7103.   say 'Alias Server:      ' aliasInfo.server
  7104.   say 'Alias NetName:     ' aliasInfo.netname
  7105.   say 'Alias Location:    ' aliasInfo.location
  7106.   say 'Alias Mode:        ' aliasInfo.mode
  7107.   say 'Alias Max uses:    ' aliasInfo.maxuses
  7108.   say 'Alias Type:        ' aliasInfo.type
  7109.   say 'Alias Queue:       ' aliasInfo.queue
  7110.   say 'Alias path:        ' aliasInfo.path
  7111.   say 'Alias priority:    ' aliasInfo.priority
  7112.   say 'Alias device pool: ' aliasInfo.device_pool
  7113.  
  7114.   call DropLsRxutFuncs
  7115.   call RxFuncDrop 'LoadLsRxutFuncs'
  7116.  
  7117.   exit 0
  7118.  
  7119.  Example Output 
  7120.  
  7121.  
  7122.   Alias Name:         FORALL
  7123.   Alias Remark:       For all users
  7124.   Alias Server:       \\FSC30DCR
  7125.   Alias NetName:      FORALL
  7126.   Alias Location:     Within Domain
  7127.   Alias Mode:         At Requester use
  7128.   Alias Max uses:     45
  7129.   Alias Type:         Files
  7130.   Alias Queue:        Unknown
  7131.   Alias path:         D:\APPS\BOOKS
  7132.   Alias priority:     Unknown
  7133.   Alias device pool:  Unknown
  7134.  
  7135.  
  7136. ΓòÉΓòÉΓòÉ 12.4. NETAPP Get Info ΓòÉΓòÉΓòÉ
  7137.  
  7138. The function retrieves information about an application. 
  7139.  
  7140. Syntax 
  7141.  
  7142.  
  7143. MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
  7144. MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application, UserId)
  7145.  
  7146. Parameters 
  7147.  
  7148. The function call can be either with four or five parameters. 
  7149.  
  7150. The parameters specified are: 
  7151.  
  7152.  'AppInfo'   The REXX variable receiving the result. The variable is divided 
  7153.              into: 
  7154.  
  7155.                o  AppInfo.name 
  7156.  
  7157.                   The application name 
  7158.  
  7159.                o  AppInfo.remark 
  7160.  
  7161.                   The application remark 
  7162.  
  7163.                o  AppInfo.command 
  7164.  
  7165.                   The command that starts the application 
  7166.  
  7167.                o  AppInfo.command_parms 
  7168.  
  7169.                   The application start parameters 
  7170.  
  7171.                o  AppInfo.app_alias_or_drv 
  7172.  
  7173.                   The alias or drive where the application resides. It 
  7174.                   specifies a drive letter, followed by a colon (:), if the 
  7175.                   application resides on the user's local machine or it 
  7176.                   specifies an existing alias if the application resides on a 
  7177.                   server 
  7178.  
  7179.                o  AppInfo.app_drive 
  7180.  
  7181.                   Applies to DOS public applications only. It is used to 
  7182.                   specify the drive that is current when the application runs. 
  7183.                   A value of * indicates that the system should choose a drive 
  7184.                   letter 
  7185.  
  7186.                o  AppInfo.app_path_to_dir 
  7187.  
  7188.                   The remaining path to the application 
  7189.  
  7190.                o  AppInfo.wrkdir_alias_or_drv 
  7191.  
  7192.                   Specifies the directory that is made current when the 
  7193.                   application runs. If the working directory is on the local 
  7194.                   machine, it specifies the drive, where the directory is 
  7195.                   located. If the working directory is remote, it specifies an 
  7196.                   existing alias where the directory is located 
  7197.  
  7198.                o  AppInfo.wrkdir_drive 
  7199.  
  7200.                   Specifies the drive that the working directory is to be 
  7201.                   assigned to when the application is started. A value of * 
  7202.                   indicates that the system should choose a drive when the 
  7203.                   application is started 
  7204.  
  7205.                o  AppInfo.wrkdir_path_to_dir 
  7206.  
  7207.                   The remaining path to the working directory 
  7208.  
  7209.                o  AppInfo.prompt 
  7210.  
  7211.                   Prompt for parameters 
  7212.  
  7213.                o  AppInfo.interface 
  7214.  
  7215.                   The interface type 
  7216.  
  7217.                o  AppInfo.type 
  7218.  
  7219.                   The application type 
  7220.  
  7221.                o  AppInfo.res_count 
  7222.  
  7223.                   The number of application resource list that follows. A value 
  7224.                   of zero indicates that the application does not require any 
  7225.                   redirected devices when it runs 
  7226.  
  7227.                o  AppInfo.i.arl_alias 
  7228.  
  7229.                   The alias for the resource required by the application. The 
  7230.                   variable i has a value from 1 to AppInfo.res_count 
  7231.  
  7232.                o  AppInfo.i.arl_device 
  7233.  
  7234.                   The device assigned to the resource specified. The variable i 
  7235.                   has a value from 1 to AppInfo.res_count 
  7236.  
  7237.  SrvName     The server computer name 
  7238.  
  7239.  Application The application name 
  7240.  
  7241.  UserId      The userid. The userid must be specified for private applications 
  7242.  
  7243.  Note 
  7244.  
  7245.  The server computer name can be specified as '' for a local server. 
  7246.  
  7247.  Using UserId = '' is identical to calling NetGetInfo(NETAPP) without the 
  7248.  UserId parameter. 
  7249.  
  7250.  Example 
  7251.  
  7252.  
  7253.   /* Get application information */
  7254.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7255.   call LoadLsRxutFuncs
  7256.  
  7257.   NETAPP      = 30
  7258.   SrvName     = '\\ILIDC'
  7259.   Application = 'THENEW'
  7260.  
  7261.   MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
  7262.  
  7263.   if myRc <> '0' then do
  7264.    say 'Got error from NetGetInfo() ' myRc
  7265.    call DropLsRxutFuncs
  7266.    exit 9
  7267.   end
  7268.  
  7269.   say 'App Name:                ' AppInfo.name
  7270.   say 'App Remark:              ' AppInfo.remark
  7271.   say 'App Command:             ' AppInfo.command
  7272.   say 'App Command parms:       ' AppInfo.command_parms
  7273.   say 'App alias or drive:      ' AppInfo.app_alias_or_drv
  7274.   say 'App drive:               ' AppInfo.app_drive
  7275.   say 'App path to dir:         ' AppInfo.app_path_to_dir
  7276.   say 'App wrkdir alias or drv: ' AppInfo.wrkdir_alias_or_drv
  7277.   say 'App wrkdir drive:        ' AppInfo.wrkdir_drive
  7278.   say 'App wrkdir path to dir:  ' AppInfo.wrkdir_path_to_dir
  7279.   say 'App prompt:              ' AppInfo.prompt
  7280.   say 'App interface type:      ' AppInfo.interface
  7281.   say 'App type:                ' AppInfo.apptype
  7282.   say 'App resource count:      ' AppInfo.res_count
  7283.  
  7284.   if AppInfo.res_count <> 0 then do
  7285.  
  7286.    do i=1 to AppInfo.res_count
  7287.     say
  7288.     say "Alias: " AppInfo.i.arl_alias
  7289.     say "Device:" AppInfo.i.arl_device
  7290.    end
  7291.  
  7292.   end
  7293.  
  7294.   call DropLsRxutFuncs
  7295.   call RxFuncDrop 'LoadLsRxutFuncs'
  7296.  
  7297.   exit 0
  7298.  
  7299.  Example Output 
  7300.  
  7301.  
  7302.   App Name:                 THENEW
  7303.   App Remark:               The New application
  7304.   App Command:              myapp.exe
  7305.   App Command parms:
  7306.   App alias or drive:       C:
  7307.   App drive:                N/A
  7308.   App path to dir:          \
  7309.   App wrkdir alias or drv:  D:
  7310.   App wrkdir drive:         Local
  7311.   App wrkdir path to dir:   \
  7312.   App prompt:               Prompt user for parameters
  7313.   App interface type:       Presentation Manager
  7314.   App type:                 Public OS/2 application
  7315.   App resource count:       2
  7316.  
  7317.   Alias:  BOOKS
  7318.   Device: *
  7319.  
  7320.   Alias:  MYDEMO
  7321.   Device: U
  7322.  
  7323.  
  7324. ΓòÉΓòÉΓòÉ 12.5. NETAPPSEL Get Info ΓòÉΓòÉΓòÉ
  7325.  
  7326. The function retrieves information about all types of applications contained in 
  7327. the specified userid desktop application folders. 
  7328.  
  7329. Syntax 
  7330.  
  7331.  
  7332. MyRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
  7333.  
  7334. Parameters 
  7335.  
  7336. The parameters specified are: 
  7337.  
  7338.  'appSelInfo'      The REXX variable receiving the result. The variable is 
  7339.                    divided into: 
  7340.  
  7341.                      o  appSelInfo.count 
  7342.  
  7343.                         The count of application selector entries returned 
  7344.  
  7345.                      o  appSelInfo.i.appname 
  7346.  
  7347.                         The application name. The variable i has a value 1 to 
  7348.                         appSelInfo.count 
  7349.  
  7350.                      o  appSelInfo.i.apptype  The application type. The 
  7351.                         variable i, see above 
  7352.  
  7353.  SrvName           The server computer name of the domain controller 
  7354.  
  7355.  UserId            The name of the userid 
  7356.  
  7357.  Note 
  7358.  
  7359.  The server computer name can be specified as '' for a local domain controller. 
  7360.  
  7361.  Example 
  7362.  
  7363.  
  7364.   /* Get application selector information */
  7365.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7366.   call LoadLsRxutFuncs
  7367.  
  7368.   NETAPPSEL = 32
  7369.   SrvName   = '\\ILIDC'
  7370.   UserId    = 'FMAM'
  7371.  
  7372.   myRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
  7373.  
  7374.   if myRc <> '0' then do
  7375.    say 'Got error from NetGetInfo() ' myRc
  7376.    call DropLsRxutFuncs
  7377.    exit 9
  7378.   end
  7379.  
  7380.   if appSelInfo.count <> 0 then do
  7381.    say 'Number of entries: ' appSelInfo.count
  7382.  
  7383.    do i=1 to appSelInfo.count
  7384.     say
  7385.     say 'Application entry: ' i
  7386.     say 'Application Name:  ' appSelInfo.i.appname
  7387.     say 'Application type:  ' appSelInfo.i.apptype
  7388.    end
  7389.  
  7390.   end
  7391.  
  7392.   call DropLsRxutFuncs
  7393.   call RxFuncDrop 'LoadLsRxutFuncs'
  7394.  
  7395.   exit 0
  7396.  
  7397.  Example Output 
  7398.  
  7399.  
  7400.   Number of entries:  2
  7401.  
  7402.   Application entry:  1
  7403.   Application Name:   ALLAPPS
  7404.   Application type:   Public OS/2 application
  7405.  
  7406.   Application entry:  2
  7407.   Application Name:   THENEW
  7408.   Application type:   Public OS/2 application
  7409.  
  7410.  
  7411. ΓòÉΓòÉΓòÉ 12.6. NETBIOS Get Info ΓòÉΓòÉΓòÉ
  7412.  
  7413. The function returns information about a particular network device driver 
  7414. installed on a computer. 
  7415.  
  7416. Syntax 
  7417.  
  7418.  
  7419. MyRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
  7420.  
  7421. Parameters 
  7422.  
  7423. The parameters specified are: 
  7424.  
  7425.  'netBiosInfo'  The REXX variable receiving the result. The variable is divided 
  7426.                 into: 
  7427.  
  7428.                   o  netBiosInfo.name 
  7429.  
  7430.                      The name of the network. For example 'NET1' or 'NETLB' 
  7431.  
  7432.                   o  netBiosInfo.driver_name 
  7433.  
  7434.                      The network device driver name that the LAN Server 
  7435.                      software uses 
  7436.  
  7437.                   o  netBiosInfo.lana_num 
  7438.  
  7439.                      The LAN adapter number 
  7440.  
  7441.                   o  netBiosInfo.driver_type 
  7442.  
  7443.                      The device driver protocol type 
  7444.  
  7445.                   o  netBiosInfo.net_status 
  7446.  
  7447.                      The status of the device driver 
  7448.  
  7449.                   o  netBiosInfo.net_bandwidth 
  7450.  
  7451.                      The number of bytes per second that the network hardware 
  7452.                      accommodates 
  7453.  
  7454.                   o  netBiosInfo.max_sess 
  7455.  
  7456.                      The maximum number of concurrent sessions that the device 
  7457.                      driver can establish 
  7458.  
  7459.                   o  netBiosInfo.max_ncbs 
  7460.  
  7461.                      The maximum number of NCBs that can be outstanding at any 
  7462.                      time 
  7463.  
  7464.                   o  netBiosInfo.max_names 
  7465.  
  7466.                      The maximum number of network names that a network 
  7467.                      (netBiosInfo.name) can establish 
  7468.  
  7469.  SrvName        The server computer name 
  7470.  
  7471.  NetName        The network name 
  7472.  
  7473.  Note 
  7474.  
  7475.  The server computer name can be specified as '' for a local server or 
  7476.  computer. 
  7477.  
  7478.  Example 
  7479.  
  7480.  
  7481.   /* Get NetBios information for NET1 */
  7482.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7483.   call LoadLsRxutFuncs
  7484.  
  7485.   NETBIOS = 90
  7486.   SrvName = '\\FSC30DCR'
  7487.   NetName = 'NET1'
  7488.  
  7489.   myRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
  7490.  
  7491.   if myRc <> '0' then do
  7492.    say 'Got error from NetGetInfo() ' myRc
  7493.    call DropLsRxutFuncs
  7494.    exit 9
  7495.   end
  7496.  
  7497.   say
  7498.   say "Netbios net_name:     " netBiosInfo.net_name
  7499.   say "Netbios driver_name:  " netBiosInfo.driver_name
  7500.   say "Netbios lana num:     " netBiosInfo.lana_num
  7501.   say "Netbios driver_type:  " netBiosInfo.driver_type
  7502.   say "Netbios net status:   " netBiosInfo.net_status
  7503.   say "Netbios net bandwidth:" netBiosInfo.net_bandwidth
  7504.   say "Netbios max sessions: " netBiosInfo.max_sess
  7505.   say "Netbios max ncbs:     " netBiosInfo.max_ncbs
  7506.   say "Netbios max names:    " netBiosInfo.max_names
  7507.  
  7508.   call DropLsRxutFuncs
  7509.   call RxFuncDrop 'LoadLsRxutFuncs'
  7510.  
  7511.   exit 0
  7512.  
  7513.  Example Output 
  7514.  
  7515.  
  7516.   Netbios net_name:      NET1
  7517.   Netbios driver_name:   NETBEUI$
  7518.   Netbios lana num:      0
  7519.   Netbios driver_type:   Network Control Block Protocol
  7520.   Netbios net status:    The network software is started.
  7521.   Netbios net bandwidth: 524288
  7522.   Netbios max sessions:  32
  7523.   Netbios max ncbs:      50
  7524.   Netbios max names:     14
  7525.  
  7526.  
  7527. ΓòÉΓòÉΓòÉ 12.7. NETCHARDEV Get Info ΓòÉΓòÉΓòÉ
  7528.  
  7529. The function retrieves information about a particular serial device in a shared 
  7530. serial device queue on a server. 
  7531.  
  7532. Syntax 
  7533.  
  7534.  
  7535. MyRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
  7536.  
  7537. Parameters 
  7538.  
  7539. The parameters specified are: 
  7540.  
  7541.  'charDevInfo'  The REXX variable receiving the result. The variable is divided 
  7542.                 into: 
  7543.  
  7544.                   o  charDevInfo.dev 
  7545.  
  7546.                      The device name 
  7547.  
  7548.                   o  charDevInfo.status 
  7549.  
  7550.                      The status of the device 
  7551.  
  7552.                   o  charDevInfo.username 
  7553.  
  7554.                      The current user name of the device 
  7555.  
  7556.                   o  charDevInfo.time 
  7557.  
  7558.                      The number of seconds the current application has been 
  7559.                      connected to the serial device 
  7560.  
  7561.  SrvName        The server computer name 
  7562.  
  7563.  DeviceName     The name of the device 
  7564.  
  7565.  Note 
  7566.  
  7567.  The server computer name can be specified as '' for a local server or 
  7568.  computer. 
  7569.  
  7570.  Example 
  7571.  
  7572.  
  7573.   /* Get the serial device information */
  7574.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7575.   call LoadLsRxutFuncs
  7576.  
  7577.   NETCHARDEV = 130
  7578.   SrvName    = '\\ILIDC'
  7579.   DeviceName = 'COM1'
  7580.  
  7581.   myRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
  7582.  
  7583.   if myRc <> '0' then do
  7584.    say 'Got error from NetGetInfo() ' myRc
  7585.    call DropLsRxutFuncs
  7586.    exit 9
  7587.   end
  7588.  
  7589.   say
  7590.   say 'The device name:   ' charDevInfo.dev
  7591.   say 'Device status:     ' charDevInfo.status
  7592.   say 'Current user name: ' charDevInfo.username
  7593.   say 'Time in use:       ' charDevInfo.time
  7594.  
  7595.   call DropLsRxutFuncs
  7596.   call RxFuncDrop 'LoadLsRxutFuncs'
  7597.  
  7598.   exit 0
  7599.  
  7600.  Example Output 
  7601.  
  7602.  
  7603.   The device name:    COM1
  7604.   Device status:      Idle
  7605.   Current user name:  -none-
  7606.   Time in use:        0
  7607.  
  7608.  
  7609. ΓòÉΓòÉΓòÉ 12.8. NETCHARDEVQ Get Info ΓòÉΓòÉΓòÉ
  7610.  
  7611. The function retrieves information about a particular serial device queue on a 
  7612. server. 
  7613.  
  7614. Syntax 
  7615.  
  7616.  
  7617. MyRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
  7618.  
  7619. Parameters 
  7620.  
  7621. The parameters specified are: 
  7622.  
  7623.  'charQInfo'   The REXX variable receiving the result. The variable is divided 
  7624.                into: 
  7625.  
  7626.                  o  charQInfo.dev 
  7627.  
  7628.                     The name of the serial device queue for which information 
  7629.                     is returned 
  7630.  
  7631.                  o  charQInfo.priority 
  7632.  
  7633.                     The queue priority 
  7634.  
  7635.                  o  charQInfo.devs 
  7636.  
  7637.                     The names of the local devices in the pool 
  7638.  
  7639.                  o  charQInfo.numusers 
  7640.  
  7641.                     The number of users waiting in the device queue 
  7642.  
  7643.                  o  charQInfo.numahead 
  7644.  
  7645.                     The number of users ahead of the UserId specified in the 
  7646.                     call the NetGetInfo(CHARDEVQ) 
  7647.  
  7648.  SrvName       The server computer name 
  7649.  
  7650.  QueueName     The name of the queue. This name is identical to the netname 
  7651.  
  7652.  UserId        The name of the userid 
  7653.  
  7654.  Note 
  7655.  
  7656.  The server computer name can be specified as '' for a local server. 
  7657.  
  7658.  Example 
  7659.  
  7660.  
  7661.   /* Get queue information for a serial device */
  7662.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7663.   call LoadLsRxutFuncs
  7664.  
  7665.   NETCHARDEVQ = 140
  7666.   SrvName     = '\\ILIDC'
  7667.   QueueName   = 'SRVCOM'
  7668.   UserId      = 'LINDBERG'
  7669.  
  7670.   myRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
  7671.  
  7672.   if myRc <> '0' then do
  7673.    say 'Got error from NetGetInfo() ' myRc
  7674.    call DropLsRxutFuncs
  7675.    exit 9
  7676.   end
  7677.  
  7678.   say
  7679.   say 'Device name:           ' charQInfo.dev
  7680.   say 'Queue Priority:        ' charQInfo.priority
  7681.   say 'Queue server devices:  ' charQInfo.devs
  7682.   say 'Numbers users waiting: ' charQInfo.numusers
  7683.   say 'Number users ahead of ' UserId ':' charQInfo.numahead
  7684.  
  7685.   call DropLsRxutFuncs
  7686.   call RxFuncDrop 'LoadLsRxutFuncs'
  7687.  
  7688.   exit 0
  7689.  
  7690.  Example Output 
  7691.  
  7692.  
  7693.   Device name:            SRVCOM
  7694.   Queue Priority:         3
  7695.   Queue server devices:   COM1
  7696.   Numbers users waiting:  0
  7697.   Number users ahead of  LINDBERG : Userid has no requests in the queue
  7698.  
  7699.  
  7700. ΓòÉΓòÉΓòÉ 12.9. NETCONNECTION Get Info ΓòÉΓòÉΓòÉ
  7701.  
  7702. The function returns a list of connections made to a shared resource of a 
  7703. server, or a list of all connections established from a particular computer to 
  7704. a server. This function is identical identical to NetEnumerate(NETCONNECTION). 
  7705.  
  7706. Syntax 
  7707.  
  7708.  
  7709. MyRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  7710.  
  7711. Parameters 
  7712.  
  7713. The parameters specified are: 
  7714.  
  7715.  'connInfo'    The REXX variable receiving the result. The variable is divided 
  7716.                into: 
  7717.  
  7718.                  o  connInfo.num_entries 
  7719.  
  7720.                     The number of connection information entries. Each entry is 
  7721.                     obtained by the index i, which has a value from 1 to 
  7722.                     connInfo.num_entries 
  7723.  
  7724.                  o  connInfo.i.id 
  7725.  
  7726.                     The connection id 
  7727.  
  7728.                  o  connInfo.i.type 
  7729.  
  7730.                     The type of connection made from the local device name to 
  7731.                     the shared resource 
  7732.  
  7733.                  o  connInfo.i.num_opens 
  7734.  
  7735.                     The number of files that are currently open as a result of 
  7736.                     the connection 
  7737.  
  7738.                  o  connInfo.i.num_users 
  7739.  
  7740.                     The number of users on the connection 
  7741.  
  7742.                  o  connInfo.i.time 
  7743.  
  7744.                     The number of seconds the connection has been established 
  7745.  
  7746.                  o  connInfo.i.username 
  7747.  
  7748.                     The name of the user that made the connection 
  7749.  
  7750.                  o  connInfo.i.netname 
  7751.  
  7752.                     A string indicating either the netname of the shared 
  7753.                     resource of the server or the computer name of the 
  7754.                     requester, depending on which name was specified as the 
  7755.                     Qualifier parameter 
  7756.  
  7757.  SrvName       The server computer name 
  7758.  
  7759.  Qualifier     A string specifying either the netname of the shared resource 
  7760.                whose connections will be listed or the client name of the 
  7761.                requester whose connections to the shared resource will be 
  7762.                listed 
  7763.  
  7764.  Note 
  7765.  
  7766.  The server computer name can be specified as '' for a local server. 
  7767.  
  7768.  Example 
  7769.  
  7770.  
  7771.   /* Get connection information */
  7772.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7773.   call LoadLsRxutFuncs
  7774.  
  7775.   NETCONNECTION = 40
  7776.   SrvName       = '\\DOMAIN_CONTRLR'
  7777.   Qualifier     = '\\ITSCWK21'
  7778.  
  7779.   myRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  7780.  
  7781.   if myRc <> '0' then do
  7782.    say 'Got error from NetGetInfo() ' myRc
  7783.    call DropLsRxutFuncs
  7784.    exit 9
  7785.   end
  7786.  
  7787.   if connInfo.0 = 0 then do
  7788.    say 'No connections established'
  7789.    call DropLsRxutFuncs
  7790.    exit 0
  7791.   end
  7792.  
  7793.   if connInfo.num_entries <> 0 then do
  7794.    say "Number of entries: " connInfo.num_entries
  7795.  
  7796.    do i=1 to connInfo.num_entries
  7797.     say
  7798.     say "Connection id:        " connInfo.i.id
  7799.     say "Connection type:      " connInfo.i.type
  7800.     say "Connection num opens: " connInfo.i.num_opens
  7801.     say "Connection num users: " connInfo.i.num_users
  7802.     say "Connection time:      " connInfo.i.time
  7803.     say "Connection user name: " connInfo.i.username
  7804.     say "Connection net name:  " connInfo.i.netname
  7805.    end
  7806.  
  7807.   end
  7808.  
  7809.   call DropLsRxutFuncs
  7810.   call RxFuncDrop 'LoadLsRxutFuncs'
  7811.  
  7812.   exit 0
  7813.  
  7814.  Example Output 
  7815.  
  7816.  
  7817.   Number of entries:  2
  7818.  
  7819.   Connection id:         6145
  7820.   Connection type:       Interprocess Communication Connection
  7821.   Connection num opens:  0
  7822.   Connection num users:  1
  7823.   Connection time:       411
  7824.   Connection user name:  ADMIN04
  7825.   Connection net name:   IPC$
  7826.  
  7827.   Connection id:         59393
  7828.   Connection type:       Disk Connection
  7829.   Connection num opens:  1
  7830.   Connection num users:  1
  7831.   Connection time:       367
  7832.   Connection user name:  ADMIN04
  7833.   Connection net name:   C$
  7834.  
  7835.  
  7836. ΓòÉΓòÉΓòÉ 12.10. NETDASD Get Info (LS40) ΓòÉΓòÉΓòÉ
  7837.  
  7838. The function retrieves directory limits information for a particular directory 
  7839. resource. Before this function can be used successfully, directory limits must 
  7840. be enabled on the 386-HPFS drive. (See the NetMisc(NETDASDCONTROL) function) 
  7841.  
  7842. Syntax 
  7843.  
  7844.  
  7845. MyRc = NetGetInfo(NETDASD, 'DASDInfo', SrvName)
  7846.  
  7847. Parameters 
  7848.  
  7849. The parameters required and returned are: 
  7850.  
  7851.  'DASDInfo'  The directory limits information variable, which is divided into: 
  7852.  
  7853.                o  DASDInfo.DirPath 
  7854.  
  7855.                   A string containing the directory path. The string must be 
  7856.                   directory path, beginning with the drive letter, and only 
  7857.                   ending with a backslash when a root directory is specified. 
  7858.  
  7859.                   If a redirected drive is specified for DASDInfo.DirPath, the 
  7860.                   SrvName parameter must be '' 
  7861.  
  7862.                o  DASDInfo.resource_name 
  7863.  
  7864.                   The name of the directory having a directory limit. 
  7865.  
  7866.                o  DASDInfo.max 
  7867.  
  7868.                   The amount of disk space allotted to this directory by 
  7869.                   directory limits. Specified in KB, this field can be set from 
  7870.                   1 to 67108863. 
  7871.  
  7872.                o  DASDInfo.use 
  7873.  
  7874.                   The amount (in KB) of disk space already occupied within the 
  7875.                   specified directory resource 
  7876.  
  7877.                o  DASDInfo.thresh 
  7878.  
  7879.                   The initial alert threshold as a percentage of the total 
  7880.                   directory limit space allotted, with values ranging from 0 to 
  7881.                   99. Zero specifies that no threshold alert is to be 
  7882.                   generated, and 99 specifies that an alert is generated when 
  7883.                   99% of the allotted directory limit for this directory has 
  7884.                   been reached. 
  7885.  
  7886.                o  DASDInfo.delta 
  7887.  
  7888.                   The increment in which alerts are to be generated after the 
  7889.                   DASDInfo.thresh threshold has been crossed, but before all of 
  7890.                   the allotted disk space has been used. 
  7891.  
  7892.  SrvName     The computer name of the server to enumerate the directory limits 
  7893.              on 
  7894.  
  7895.  Note 
  7896.  
  7897.  The server computer name can be specified as '' for a local server. 
  7898.  
  7899.  Example 
  7900.  
  7901.  
  7902.   /* DASD directory limit get information */
  7903.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7904.   call LoadLsRxutFuncs
  7905.  
  7906.   NETDASD             = 750
  7907.   DASDInfo.DirPath    = 'D:\APPS\DATA'
  7908.   SrvName             = '\\DOMAIN_CONTRLR'
  7909.  
  7910.   myRc = NetGetInfo(NETDASD, 'DASDInfo', SrvName)
  7911.  
  7912.   if myRc <> '0' then do
  7913.    say 'Got error from NetGetInfo() ' myRc
  7914.    exitRc = 9
  7915.   end
  7916.   else do
  7917.    say 'Directory path   ' DASDInfo.resource_name
  7918.    say 'Directory limit  ' DASDInfo.max
  7919.    say 'Current Usage    ' DASDInfo.use
  7920.    say 'Threshold        ' DASDInfo.thresh
  7921.    say 'Delta            ' DASDInfo.delta
  7922.  
  7923.    exitRc = 0
  7924.   end
  7925.  
  7926.   call DropLsRxutFuncs
  7927.   call RxFuncDrop 'LoadLsRxutFuncs'
  7928.  
  7929.   exit exitRc
  7930.  
  7931.  Example Output 
  7932.  
  7933.  
  7934.   Directory path     D:\APPS\DATA
  7935.   Directory limit    512
  7936.   Current Usage      102
  7937.   Threshold          90
  7938.   Delta              5
  7939.  
  7940.  
  7941. ΓòÉΓòÉΓòÉ 12.11. NETLOGON Get Info ΓòÉΓòÉΓòÉ
  7942.  
  7943. Retrieves information about logged-on users. 
  7944.  
  7945. Syntax 
  7946.  
  7947.  
  7948. MyRc = NetGetInfo(NETLOGON, 'logonInfo')
  7949. MyRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
  7950.  
  7951. Parameters 
  7952.  
  7953. The NetGetInfo(NETLOGON) function has two different forms. The first form with 
  7954. no SrvName parameter is identical to the second form with the SrvName parameter 
  7955. value set to ''. 
  7956.  
  7957. The parameters specified are: 
  7958.  
  7959.  'logonInfo'       The REXX variable receiving the result. The variable is 
  7960.                    divided into: 
  7961.  
  7962.                      o  logonInfo.num_entries 
  7963.  
  7964.                         The number of logon information entries. Each entry is 
  7965.                         obtained by the index i, which has a value from 1 to 
  7966.                         logonInfo.num_entries 
  7967.  
  7968.                      o  logonInfo.i.eff_name 
  7969.  
  7970.                         The name of the account to which the user was logged on 
  7971.  
  7972.                      o  logonInfo.i.computer 
  7973.  
  7974.                         The computer name 
  7975.  
  7976.                      o  logonInfo.i.full_name 
  7977.  
  7978.                         The fullname value specified in the user account 
  7979.  
  7980.                      o  logonInfo.i.usrcomment 
  7981.  
  7982.                         The user settable value for user comments 
  7983.  
  7984.                      o  logonInfo.i.logon_time 
  7985.  
  7986.                         The time and date when the user logged on 
  7987.  
  7988.  SrvName           The server computer name 
  7989.  
  7990.  Note 
  7991.  
  7992.  The server computer name can be specified as '' for a local server. 
  7993.  
  7994.  Example 
  7995.  
  7996.  
  7997.   /* Get information on logged on users on this server */
  7998.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  7999.   call LoadLsRxutFuncs
  8000.  
  8001.   NETLOGON = 50
  8002.   SrvName  = '\\FSCDC'
  8003.  
  8004.   myRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
  8005.  
  8006.   if myRc <> '0' then do
  8007.    say 'Got error from NetGetInfo() ' myRc
  8008.    call DropLsRxutFuncs
  8009.    exit 9
  8010.   end
  8011.  
  8012.   if logonInfo.num_entries <> 0 then do
  8013.    say "Number of entries: " logonInfo.num_entries
  8014.  
  8015.    do i=1 to logonInfo.num_entries
  8016.     say
  8017.     say "Logon eff_name:     " logonInfo.i.eff_name
  8018.     say "Logon computer:     " logonInfo.i.computer
  8019.     say "Logon full name:    " logonInfo.i.full_name
  8020.     say "Logon user comment: " logonInfo.i.usrcomment
  8021.     say "Logon time:         " logonInfo.i.logon_time
  8022.    end
  8023.  
  8024.   end
  8025.  
  8026.   call DropLsRxutFuncs
  8027.   call RxFuncDrop 'LoadLsRxutFuncs'
  8028.  
  8029.   exit 0
  8030.  
  8031.  Example Output 
  8032.  
  8033.  
  8034.   Number of entries:  1
  8035.  
  8036.   Logon eff_name:      LINDBERG
  8037.   Logon computer:      FSC30DCR
  8038.   Logon full name:     Ingolf Lindberg, OS/2 Competency Center
  8039.   Logon user comment:  Ingolf Lindberg in N91-3161
  8040.   Logon time:          Tue May  4 07:44:26 1993
  8041.  
  8042.  
  8043. ΓòÉΓòÉΓòÉ 12.12. NETFILE Get Info ΓòÉΓòÉΓòÉ
  8044.  
  8045. The function retrieves information about a particular opened file on a server. 
  8046.  
  8047. Syntax 
  8048.  
  8049.  
  8050. MyRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
  8051.  
  8052. Parameters 
  8053.  
  8054. The parameters specified are: 
  8055.  
  8056.  'fileInfo'    The REXX variable receiving the result. The variable is divided 
  8057.                into: 
  8058.  
  8059.                  o  fileInfo.id 
  8060.  
  8061.                     The file identifier 
  8062.  
  8063.                  o  fileInfo.permissions 
  8064.  
  8065.                     The access permissions of the opening application. 
  8066.  
  8067.                  o  fileInfo.num_locks 
  8068.  
  8069.                     The number of file locks on the file, device, or pipe 
  8070.  
  8071.                  o  fileInfo.pathname 
  8072.  
  8073.                     The path name of the opened resource 
  8074.  
  8075.                  o  fileInfo.username 
  8076.  
  8077.                     The name of the userid that first opened the file 
  8078.  
  8079.  SrvName       The server computer name 
  8080.  
  8081.  fileId        The file identifier. This value must be supplied 
  8082.  
  8083.  Note 
  8084.  
  8085.  The server computer name can be specified as '' for a local server. 
  8086.  
  8087.  Example 
  8088.  
  8089.  
  8090.   /* Get opened file information */
  8091.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8092.   call LoadLsRxutFuncs
  8093.  
  8094.   NETFILE = 60
  8095.   SrvName = '\\FSCDC'
  8096.   fileId  = 167273
  8097.  
  8098.   myRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
  8099.  
  8100.   if myRc <> '0' then do
  8101.    say 'Got error from NetGetInfo() ' myRc
  8102.    call DropLsRxutFuncs
  8103.    exit 9
  8104.   end
  8105.  
  8106.   say
  8107.   say "File id:           " fileInfo.id
  8108.   say "File permissions:  " fileInfo.permissions
  8109.   say "File number locks: " fileInfo.num_locks
  8110.   say "File path:         " fileInfo.pathname
  8111.   say "File user name:    " fileInfo.username
  8112.  
  8113.   call DropLsRxutFuncs
  8114.   call RxFuncDrop 'LoadLsRxutFuncs'
  8115.  
  8116.   exit 0
  8117.  
  8118.  Example Output 
  8119.  
  8120.  
  8121.   File id:            167273
  8122.   File permissions:   R
  8123.   File number locks:  0
  8124.   File path:          D:\BOOKS\GG243783.BOO
  8125.   File user name:     FSCADMIN
  8126.  
  8127.  
  8128. ΓòÉΓòÉΓòÉ 12.13. NETFINDADDRESS ΓòÉΓòÉΓòÉ
  8129.  
  8130. The function performs a "NCB.FIND.NAME" and finds one or more LAN addresses 
  8131. from a specified NetBIOS name. 
  8132.  
  8133. Syntax 
  8134.  
  8135.  
  8136. MyRc = NetGetInfo(NETFINDADDRESS, addressList, NetbiosName, type2Find)
  8137.  
  8138. Parameters 
  8139.  
  8140. The parameters specified are: 
  8141.  
  8142.  addressList    The REXX variable receiving the result. The variable is divided 
  8143.                 into: 
  8144.  
  8145.                   o  addressList.count 
  8146.  
  8147.                      The count of LAN addresses found 
  8148.  
  8149.                   o  addressList.i.address 
  8150.  
  8151.                      The adapter address of the adapter having the searched 
  8152.                      NetBIOS name registered. The variable i has a value from 1 
  8153.                      to addressList.count 
  8154.  
  8155.                   o  addressList.i.route The routing information from the 
  8156.                      machine issuing the call to the adapter found. The 
  8157.                      variable i has a value from 1 to addressList.count 
  8158.  
  8159.  NetBiosName    The NetBIOS name to find 
  8160.  
  8161.  type2Find      The type of the NetBIOS name to find. OS/2 LAN Requester and 
  8162.                 OS/2 LAN Server encodes the NetBIOS names used in different 
  8163.                 formats. The following name type vaules can be used: 
  8164.  
  8165.  
  8166.                                 Value What to find
  8167.                                 ----- ------------
  8168.                                 0     A NetBIOS name
  8169.                                 1     A LAN Server/Requester 3.0 Message name or Userid
  8170.                                 2     A LAN Server/Requester 3.0 Computer name
  8171.                                 3     LAN Server/Requester 3.0 domain group name
  8172.  
  8173.  
  8174.  Notes 
  8175.  
  8176.  The information obtained is formatted for Token-Ring networks. 
  8177.  
  8178.  If the return code has a value, it is either a return code from a call to the 
  8179.  NetBIOS submit interface or a NetBIOS Network Control Block return code. 
  8180.  
  8181.  There is no guarantee that all nodes will respond within the NetBIOS interface 
  8182.  timeout values specified on the executing workstation. 
  8183.  
  8184.  Example 
  8185.  
  8186.  
  8187.   /* Get adapter addresses of current connected workstations */
  8188.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8189.   call LoadLsRxutFuncs
  8190.  
  8191.   NETFINDADDRESS = 410
  8192.   NetbiosName    = 'FSC'
  8193.   type2Find      = 3
  8194.  
  8195.   myRc = NetGetInfo(NETFINDADDRESS, addressList, NetbiosName, type2Find)
  8196.  
  8197.   if myRc <> '0' then do
  8198.    say 'Got error from NetGetInfo() ' myRc
  8199.    call DropLsRxutFuncs
  8200.    exit 9
  8201.   end
  8202.  
  8203.   say
  8204.   say 'Count:   ' addressList.count
  8205.  
  8206.   do i=1 to addressList.count
  8207.    say addressList.i.address
  8208.    say addressList.i.route
  8209.    say
  8210.   end
  8211.  
  8212.   call DropLsRxutFuncs
  8213.   call RxFuncDrop 'LoadLsRxutFuncs'
  8214.  
  8215.   exit 0
  8216.  
  8217.  Example Output 
  8218.  
  8219.   Count:  2
  8220.   10005AF78491
  8221.   -none-
  8222.  
  8223.   4000100C1240
  8224.   S504 B1 S50B B1 S501
  8225.  
  8226.  
  8227. ΓòÉΓòÉΓòÉ 12.14. NETGROUP Get Info ΓòÉΓòÉΓòÉ
  8228.  
  8229. The function retrieves group related information. 
  8230.  
  8231. Syntax 
  8232.  
  8233.  
  8234. MyRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
  8235.  
  8236. Parameters 
  8237.  
  8238. The parameters specified are: 
  8239.  
  8240.  'groupInfo'       The REXX variable receiving the result. The variable is 
  8241.                    divided into: 
  8242.  
  8243.                      o  groupInfo.name 
  8244.  
  8245.                         The group name 
  8246.  
  8247.                      o  groupInfo.comment 
  8248.  
  8249.                         The group comment 
  8250.  
  8251.  SrvName           The server computer name 
  8252.  
  8253.  GroupName         The name of the group. This value must be supplied 
  8254.  
  8255.  Note 
  8256.  
  8257.  The server computer name can be specified as '' for a local server. 
  8258.  
  8259.  Example 
  8260.  
  8261.  
  8262.   /* Get group comment */
  8263.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8264.   call LoadLsRxutFuncs
  8265.  
  8266.   NETGROUP  = 70
  8267.   SrvName   = '\\ILIDC'
  8268.   GroupName = 'CSUSERS'
  8269.  
  8270.   myRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
  8271.  
  8272.   if myRc <> '0' then do
  8273.    say 'Got error from NetGetInfo() ' myRc
  8274.    call DropLsRxutFuncs
  8275.    exit 9
  8276.   end
  8277.  
  8278.   say
  8279.   say "Group Name:    " groupInfo.name
  8280.   say "Group Comment: " groupInfo.comment
  8281.  
  8282.   call DropLsRxutFuncs
  8283.   call RxFuncDrop 'LoadLsRxutFuncs'
  8284.  
  8285.   exit 0
  8286.  
  8287.  Example Output 
  8288.  
  8289.  
  8290.   Group Name:     CSUSERS
  8291.   Group Comment:  The Client/Server users group
  8292.  
  8293.  
  8294. ΓòÉΓòÉΓòÉ 12.15. NETGROUPUSERS Get Info ΓòÉΓòÉΓòÉ
  8295.  
  8296. The function returns a list of members of a particular group. 
  8297.  
  8298. Syntax 
  8299.  
  8300.  
  8301. MyRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  8302.  
  8303. Parameters 
  8304.  
  8305. The parameters specified are: 
  8306.  
  8307.  'groupInfo'       The REXX variable receiving the result. The variable is 
  8308.                    divided into: 
  8309.  
  8310.                      o  groupInfo.0 
  8311.  
  8312.                         Counts the number of user accounts defined in the group 
  8313.  
  8314.                      o  groupInfo.i 
  8315.  
  8316.                         The user account number i defined in the group. The 
  8317.                         variable i has a value from 1 to groupInfo.0 
  8318.  
  8319.  SrvName           The computer name of the domain controller 
  8320.  
  8321.  GroupName         The group name. The group name must be supplied 
  8322.  
  8323.  Note 
  8324.  
  8325.  The server computer name can be specified as '' for a local domain controller. 
  8326.  
  8327.  Example 
  8328.  
  8329.  
  8330.   /* Get group users */
  8331.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8332.   call LoadLsRxutFuncs
  8333.  
  8334.   NETGROUPUSERS = 340
  8335.   SrvName       = '\\ILIDC'
  8336.   GroupName     = 'CSUSERS'
  8337.  
  8338.   myRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  8339.  
  8340.   if myRc <> '0' then do
  8341.    say 'Got error from NetGetInfo() ' myRc
  8342.    call DropLsRxutFuncs
  8343.    exit 9
  8344.   end
  8345.  
  8346.   say
  8347.  
  8348.   do i=1 to groupInfo.0
  8349.     say "UserId:        " groupInfo.i
  8350.   end
  8351.  
  8352.   call DropLsRxutFuncs
  8353.   call RxFuncDrop 'LoadLsRxutFuncs'
  8354.  
  8355.   exit 0
  8356.  
  8357.  Example Output 
  8358.  
  8359.  
  8360.   UserId:         LINDBERG
  8361.   UserId:         BRUGERID
  8362.   UserId:         USERID
  8363.  
  8364.  
  8365. ΓòÉΓòÉΓòÉ 12.16. NETLOGONASN Get Info ΓòÉΓòÉΓòÉ
  8366.  
  8367. The function retrieves information about logon assignments for a specified 
  8368. userid. 
  8369.  
  8370. Syntax 
  8371.  
  8372.  
  8373. MyRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
  8374.  
  8375. Parameters 
  8376.  
  8377. The parameters specified are: 
  8378.  
  8379.  'logonAsnInfo'    The REXX variable receiving the result. The variable is 
  8380.                    divided into: 
  8381.  
  8382.                      o  logonAsnInfo.count 
  8383.  
  8384.                         The count of logon assignments. If this value is equal 
  8385.                         or large than 1 then the following values are assigned: 
  8386.  
  8387.                      o  logonAsnInfo.i.alias 
  8388.  
  8389.                         The alias name assigned. The variable i has a value 
  8390.                         from 1 to logonAsnInfo.count 
  8391.  
  8392.                      o  logonAsnInfo.i.type 
  8393.  
  8394.                         The alias type. The variable i has a value from 1 to 
  8395.                         logonAsnInfo.count 
  8396.  
  8397.                      o  logonAsnInfo.i.device 
  8398.  
  8399.                         The local device. The variable i has a value from 1 to 
  8400.                         logonAsnInfo.count 
  8401.  
  8402.  SrvName           The server computer name of the domain controller 
  8403.  
  8404.  UserId            The userid 
  8405.  
  8406.  Note 
  8407.  
  8408.  The server computer name can be specified as '' for a local domain controller. 
  8409.  
  8410.  Example 
  8411.  
  8412.  
  8413.   /* Get the user logon assignments information */
  8414.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8415.   call LoadLsRxutFuncs
  8416.  
  8417.   NETLOGONASN = 52
  8418.   SrvName     = '\\ILIDC'
  8419.   UserId      = 'FMAM'
  8420.  
  8421.   myRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
  8422.  
  8423.   if myRc <> '0' then do
  8424.    say 'Got error from NetGetInfo() ' myRc
  8425.    call DropLsRxutFuncs
  8426.    exit 9
  8427.   end
  8428.  
  8429.   if logonAsnInfo.count = 0 then do
  8430.    say 'No logon assignments'
  8431.    call DropLsRxutFuncs
  8432.    exit 0
  8433.   end
  8434.  
  8435.   say 'The number of logon assignments are: ' logonAsnInfo.count
  8436.  
  8437.   do i=1 to logonAsnInfo.count
  8438.    say
  8439.    say 'The Alias assigned: ' logonAsnInfo.i.alias
  8440.    say 'Alias type:         ' logonAsnInfo.i.type
  8441.    say 'Device assigned:    ' logonAsnInfo.i.device
  8442.   end
  8443.  
  8444.   call DropLsRxutFuncs
  8445.   call RxFuncDrop 'LoadLsRxutFuncs'
  8446.  
  8447.   exit 0
  8448.  
  8449.  Example Output 
  8450.  
  8451.  
  8452.   The number of logon assignments are:  3
  8453.  
  8454.   The Alias assigned:  BOOKS
  8455.   Alias type:          Files alias
  8456.   Device assigned:     O
  8457.  
  8458.   The Alias assigned:  MYDEMO
  8459.   Alias type:          Files alias
  8460.   Device assigned:     P
  8461.  
  8462.   The Alias assigned:  SRVCOM
  8463.   Alias type:          Serial device alias
  8464.   Device assigned:     COM3
  8465.  
  8466.  
  8467. ΓòÉΓòÉΓòÉ 12.17. NETMESSAGENAME Get Info ΓòÉΓòÉΓòÉ
  8468.  
  8469. The function retrieves information about a userid entry in the message name 
  8470. table. 
  8471.  
  8472. Syntax 
  8473.  
  8474.  
  8475. MyRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
  8476.  
  8477. Parameters 
  8478.  
  8479. The parameters specified are: 
  8480.  
  8481.  'msgNameInfo'     The REXX variable receiving the result. The variable is 
  8482.                    divided into: 
  8483.  
  8484.                      o  msgNameInfo.name 
  8485.  
  8486.                         The messaging name 
  8487.  
  8488.                      o  msgNameInfo.forward_flag 
  8489.  
  8490.                         The value specifies whether messages will be sent to a 
  8491.                         user or application on the local computer, or forwarded 
  8492.                         to a user or application on a remote computer 
  8493.  
  8494.                      o  msgNameInfo.forward 
  8495.  
  8496.                         The value will specify the user name to which the 
  8497.                         message will be sent, if messages are to be forwarded 
  8498.  
  8499.  SrvName           The server or requester computer name 
  8500.  
  8501.  MsgName           The message name 
  8502.  
  8503.  Note 
  8504.  
  8505.  The server or requester computer name can be specified as '' for a local 
  8506.  server or computer. 
  8507.  
  8508.  Example 
  8509.  
  8510.  
  8511.   /* Get message name information */
  8512.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8513.   call LoadLsRxutFuncs
  8514.  
  8515.   NETMESSAGENAME = 80
  8516.   SrvName = '\\ILIDC'
  8517.   MsgName = 'LINDBERG'
  8518.  
  8519.   myRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
  8520.  
  8521.   if myRc <> '0' then do
  8522.    say 'Got error from NetGetInfo() ' myRc
  8523.    call DropLsRxutFuncs
  8524.    exit 9
  8525.   end
  8526.  
  8527.   say
  8528.   say "Message Name: " msgNameInfo.name
  8529.   say "Forward flag: " msgNameInfo.forward_flag
  8530.   say "Forward to:   " msgNameInfo.forward
  8531.  
  8532.   call DropLsRxutFuncs
  8533.   call RxFuncDrop 'LoadLsRxutFuncs'
  8534.  
  8535.   exit 0
  8536.  
  8537.  Example Output 
  8538.  
  8539.  
  8540.   Message Name:  LINDBERG
  8541.   Forward flag:  Not forwarded
  8542.   Forward to:    N/A
  8543.  
  8544.  
  8545. ΓòÉΓòÉΓòÉ 12.18. NETMESSAGELOGFILE Get Info ΓòÉΓòÉΓòÉ
  8546.  
  8547. The function retrieves the name of the message log file and the current logging 
  8548. status (on or off). 
  8549.  
  8550. Syntax 
  8551.  
  8552.  
  8553. MyRc = NetGetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  8554.  
  8555. Parameters 
  8556.  
  8557. The parameters specified are: 
  8558.  
  8559.  'msgLogFileInfo'  The REXX variable receiving the result. The variable is 
  8560.                    divided into: 
  8561.  
  8562.                      o  msgLogFileInfo.filename 
  8563.  
  8564.                         A string containing the complete path and file name, 
  8565.                         beginning with the drive letter of the message log file 
  8566.  
  8567.                      o  msgLogFileInfo.logswitch 
  8568.  
  8569.                         A integer specifying whether logging is enabled. If 0, 
  8570.                         message logging is disabled; otherwise, message logging 
  8571.                         is enabled 
  8572.  
  8573.  SrvName           The server computer name 
  8574.  
  8575.  Note 
  8576.  
  8577.  The server computer name can be specified as '' for a local server or 
  8578.  computer. 
  8579.  
  8580.  Example 
  8581.  
  8582.  
  8583.   /* Get the message log file and logging state */
  8584.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8585.   call LoadLsRxutFuncs
  8586.  
  8587.   NETMESSAGELOGFILE = 550
  8588.   SrvName           = '\\ANYSRV01'
  8589.  
  8590.   myRc = NetGetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  8591.  
  8592.   if myRc <> '0' then do
  8593.    say 'Got error from NetGetInfo() ' myRc
  8594.    exitRc = 9
  8595.   end
  8596.   else do
  8597.    say 'Message log file information'
  8598.    say
  8599.    say 'State ' msgLogFileInfo.logswitch
  8600.    say 'File  ' msgLogFileInfo.filename
  8601.   end
  8602.  
  8603.   call DropLsRxutFuncs
  8604.   call RxFuncDrop 'LoadLsRxutFuncs'
  8605.  
  8606.   exit exitRc
  8607.  
  8608.  Example Output 
  8609.  
  8610.  
  8611.   State  0
  8612.   File   C:\IBMLAN\LOGS\MESSAGES.LOG
  8613.  
  8614.  
  8615. ΓòÉΓòÉΓòÉ 12.19. NETPRINTDEST Get Info ΓòÉΓòÉΓòÉ
  8616.  
  8617. The function returns information about a particular printer destination. 
  8618.  
  8619. Syntax 
  8620.  
  8621.  
  8622. MyRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
  8623.  
  8624. Parameters 
  8625.  
  8626. The parameters specified are: 
  8627.  
  8628.  'prtDestInfo'     The REXX variable receiving the result. The variable is 
  8629.                    divided into: 
  8630.  
  8631.                      o  prtDestInfo.PrinterName 
  8632.  
  8633.                         The printer device name 
  8634.  
  8635.                      o  prtDestInfo.UserName 
  8636.  
  8637.                         The user that submitted the current job, if a job is 
  8638.                         printing. If a local job is printing the value 'Local 
  8639.                         User' is used. If no jobs are printing the value of 
  8640.                         '-none-' is used 
  8641.  
  8642.                      o  prtDestInfo.LogAddr 
  8643.  
  8644.                         The printer logical address (LPT1 for example) 
  8645.  
  8646.                      o  prtDestInfo.JobId 
  8647.  
  8648.                         The current printing job id. If the returned value is 
  8649.                         0, no jobs are printing 
  8650.  
  8651.                      o  prtDestInfo.Status 
  8652.  
  8653.                         The printer device status 
  8654.  
  8655.                      o  prtDestInfo.StatusComment 
  8656.  
  8657.                         Print device comment while printing 
  8658.  
  8659.                      o  prtDestInfo.Comment 
  8660.  
  8661.                         Print device description 
  8662.  
  8663.                      o  prtDestInfo.Drivers 
  8664.  
  8665.                         Print driver supported by this device 
  8666.  
  8667.                      o  prtDestInfo.time 
  8668.  
  8669.                         Time (in minutes) current print job has been printing 
  8670.  
  8671.                      o  prtDestInfo.TimeOut 
  8672.  
  8673.                         Print device Time Out (in seconds) 
  8674.  
  8675.  SrvName           The server computer name 
  8676.  
  8677.  DevName           The printer device name 
  8678.  
  8679.  Note 
  8680.  
  8681.  The server computer name can be specified as '' for a local server or 
  8682.  computer. 
  8683.  
  8684.  Example 
  8685.  
  8686.  
  8687.   /* Get Print destination information */
  8688.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8689.   call LoadLsRxutFuncs
  8690.  
  8691.   NETPRINTDEST = 100
  8692.   SrvName = '\\FSC30DCR'
  8693.   DevName = 'IBM40191'
  8694.  
  8695.   myRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
  8696.  
  8697.   if myRc <> '0' then do
  8698.    say 'Got error from NetGetInfo() ' myRc
  8699.    call DropLsRxutFuncs
  8700.    exit 9
  8701.   end
  8702.  
  8703.   say
  8704.   say 'Printer device name:       ' prtDestInfo.PrinterName
  8705.   say 'Current user job printing: ' prtDestInfo.UserName
  8706.   say 'Printer logical address:   ' prtDestInfo.LogAddr
  8707.   say 'Current job id printing:   ' prtDestInfo.JobId
  8708.   say 'Print device status:       ' prtDestInfo.Status
  8709.   say 'Job Comment:               ' prtDestInfo.StatusComment
  8710.   say 'Device describtion:        ' prtDestInfo.Comment
  8711.   say 'Supported drivers:         ' prtDestInfo.Drivers
  8712.   say 'Time current job printing: ' prtDestInfo.time
  8713.   say 'Print device timeout:      ' prtDestInfo.TimeOut
  8714.  
  8715.   call DropLsRxutFuncs
  8716.   call RxFuncDrop 'LoadLsRxutFuncs'
  8717.  
  8718.   exit 0
  8719.  
  8720.  Example Output 
  8721.  
  8722.  
  8723.   Printer device name:        IBM40191
  8724.   Current user job printing:  -none-
  8725.   Printer logical address:    LPT3
  8726.   Current job id printing:    0
  8727.   Print device status:        Processing
  8728.   Job Comment:                -none-
  8729.   Device describtion:         IBM 4019 LaserPrinter
  8730.   Supported drivers:          IBM4019.IBM 4019 LaserPrinter
  8731.   Time current job printing:  -none-
  8732.   Print device timeout:       45
  8733.  
  8734.  
  8735. ΓòÉΓòÉΓòÉ 12.20. NETPRINTJOB Get Info ΓòÉΓòÉΓòÉ
  8736.  
  8737. The function returns information about a print job. 
  8738.  
  8739. Syntax 
  8740.  
  8741.  
  8742. MyRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
  8743.  
  8744. Parameters 
  8745.  
  8746. The parameters specified are: 
  8747.  
  8748.  'prtJobInfo'  The REXX variable receiving the result. The variable is divided 
  8749.                into: 
  8750.  
  8751.                  o  prtJobInfo.JobId 
  8752.  
  8753.                     The print job identifier 
  8754.  
  8755.                  o  prtJobInfo.Priority 
  8756.  
  8757.                     The print job priority 
  8758.  
  8759.                  o  prtJobInfo.UserName 
  8760.  
  8761.                     The userid of the job submitting the job 
  8762.  
  8763.                  o  prtJobInfo.Position 
  8764.  
  8765.                     The job position in the print queue 
  8766.  
  8767.                  o  prtJobInfo.Status 
  8768.  
  8769.                     The status of the print job 
  8770.  
  8771.                  o  prtJobInfo.Submitted 
  8772.  
  8773.                     The time when the job was submitted 
  8774.  
  8775.                  o  prtJobInfo.Size 
  8776.  
  8777.                     The print job size 
  8778.  
  8779.                  o  prtJobInfo.Comment 
  8780.  
  8781.                     The print job comment 
  8782.  
  8783.                  o  prtJobInfo.Document 
  8784.  
  8785.                     The document name 
  8786.  
  8787.                  o  prtJobInfo.NotifyName 
  8788.  
  8789.                     Messaging alias for print alert 
  8790.  
  8791.                  o  prtJobInfo.DataType 
  8792.  
  8793.                     The data type of the submitted file 
  8794.  
  8795.                  o  prtJobInfo.Parms 
  8796.  
  8797.                     The parameters related to the print job 
  8798.  
  8799.                  o  prtJobInfo.StatusComment 
  8800.  
  8801.                     The status comment 
  8802.  
  8803.                  o  prtJobInfo.Queue 
  8804.  
  8805.                     The queue name 
  8806.  
  8807.                  o  prtJobInfo.QProcName 
  8808.  
  8809.                     The queue processor name 
  8810.  
  8811.                  o  prtJobInfo.QProcParms 
  8812.  
  8813.                     The queue processor parameters 
  8814.  
  8815.                  o  prtJobInfo.PrinterName 
  8816.  
  8817.                     The printer name 
  8818.  
  8819.                  o  prtJobInfo.Version 
  8820.  
  8821.                     The printer driver version 
  8822.  
  8823.                  o  prtJobInfo.DeviceName 
  8824.  
  8825.                     The device name 
  8826.  
  8827.  SrvName       The server computer name 
  8828.  
  8829.  QueueName     The Queue name 
  8830.  
  8831.  PrtJobId      The Printer Job Id 
  8832.  
  8833.  Note 
  8834.  
  8835.  The server computer name can be specified as '' for a local server or 
  8836.  computer. 
  8837.  
  8838.  Example 
  8839.  
  8840.  
  8841.   /* Get Print job information */
  8842.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  8843.   call LoadLsRxutFuncs
  8844.  
  8845.   NETPRINTJOB = 110
  8846.   SrvName     = '\\FSC30DCR'
  8847.   QueueName   = 'IBM4019L'
  8848.   PrtJobId    = 5
  8849.  
  8850.   myRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
  8851.  
  8852.   if myRc <> '0' then do
  8853.    say 'Got error from NetGetInfo() ' myRc
  8854.    call DropLsRxutFuncs
  8855.    exit 9
  8856.   end
  8857.  
  8858.   say
  8859.   say 'Job id:                     ' prtJobInfo.JobId
  8860.   say 'Job priority:               ' prtJobInfo.Priority
  8861.   say 'Userid who submitted job:   ' prtJobInfo.UserName
  8862.   say 'Job position in Queue:      ' prtJobInfo.Position
  8863.   say 'Job status:                 ' prtJobInfo.Status
  8864.   say 'Submitted at:               ' prtJobInfo.Submitted
  8865.   say 'Job size:                   ' prtJobInfo.Size
  8866.   say 'Job comment:                ' prtJobInfo.Comment
  8867.   say 'Document name:              ' prtJobInfo.Document
  8868.   say 'Notify:                     ' prtJobInfo.NotifyName
  8869.   say 'Data type:                  ' prtJobInfo.DataType
  8870.   say 'Job parameters:             ' prtJobInfo.Parms
  8871.   say 'Job status comment:         ' prtJobInfo.StatusComment
  8872.   say 'Queue name:                 ' prtJobInfo.Queue
  8873.   say 'Queue processor:            ' prtJobInfo.QProcName
  8874.   say 'Queue processor parameters: ' prtJobInfo.QProcParms
  8875.   say 'The printer name:           ' prtJobInfo.PrinterName
  8876.   say 'Printer Driver version:     ' prtJobInfo.Version
  8877.   say 'Device Name:                ' prtJobInfo.DeviceName
  8878.  
  8879.   call DropLsRxutFuncs
  8880.   call RxFuncDrop 'LoadLsRxutFuncs'
  8881.  
  8882.   exit 0
  8883.  
  8884.  Example Output 
  8885.  
  8886.  
  8887.   Job id:                      5
  8888.   Job priority:                50
  8889.   Userid who submitted job:
  8890.   Job position in Queue:       Next
  8891.   Job status:                  Queued
  8892.   Submitted at:                Wed May  5 19:45:06 1993
  8893.  
  8894.   Job size:                    109320
  8895.   Job comment:                 System
  8896.   Document name:               LS30BAS2.C
  8897.   Notify:
  8898.   Data type:                   PM_Q_RAW
  8899.   Job parameters:
  8900.   Job status comment:
  8901.   Queue name:                  IBM4019L
  8902.   Queue processor:             PMPRINT
  8903.   Queue processor parameters:  CDP=850
  8904.   The printer name:
  8905.   Printer Driver version:      777
  8906.   Device Name:                 IBM 4019 LaserPrinter
  8907.  
  8908.  
  8909. ΓòÉΓòÉΓòÉ 12.21. NETPRINTQUEUE Get Info ΓòÉΓòÉΓòÉ
  8910.  
  8911. The function returns information about a print queue. 
  8912.  
  8913. Syntax 
  8914.  
  8915.  
  8916. MyRc = NetGetInfo(NETPRINTQUEUE, 'prtQInfo', SrvName, QueueName)
  8917.  
  8918. Parameters 
  8919.  
  8920. The parameters specified are 
  8921.  
  8922.  'prtQInfo'    The REXX variable receiving the result. The variable is divided 
  8923.                into: 
  8924.  
  8925.                  o  prtQInfo.Priority 
  8926.  
  8927.                     The queue priority 
  8928.  
  8929.                  o  prtQInfo.StartTime 
  8930.  
  8931.                     The queue start time 
  8932.  
  8933.                  o  prtQInfo.UntilTime 
  8934.  
  8935.                     The queue until time 
  8936.  
  8937.                  o  prtQInfo.Type 
  8938.  
  8939.                     The queue type. A hexadecimal value, which is not 
  8940.                     interpreted 
  8941.  
  8942.                  o  prtQInfo.SepFile 
  8943.  
  8944.                     The queue separator file if any 
  8945.  
  8946.                  o  prtQInfo.PrProc 
  8947.  
  8948.                     The queue default queue processor 
  8949.  
  8950.                  o  prtQInfo.Parms 
  8951.  
  8952.                     The queue parameters 
  8953.  
  8954.                  o  prtQInfo.Comment 
  8955.  
  8956.                     The queue comment or description 
  8957.  
  8958.                  o  prtQInfo.Status 
  8959.  
  8960.                     The queue status. A hexadecimal value, which is not 
  8961.                     interpreted 
  8962.  
  8963.                  o  prtQInfo.Jobs 
  8964.  
  8965.                     The number of jobs in the queue 
  8966.  
  8967.                  o  prtQInfo.Printers 
  8968.  
  8969.                     The print device connected to the queue 
  8970.  
  8971.                  o  prtQInfo.DriverName 
  8972.  
  8973.                     The default print driver 
  8974.  
  8975.                  o  prtQInfo.RemoteComputerName 
  8976.  
  8977.                     The remote computer name 
  8978.  
  8979.                  o  prtQInfo.RemoteQueueName 
  8980.  
  8981.                     The remote queue name 
  8982.  
  8983.                  o  prtQInfo.Version 
  8984.  
  8985.                     The printer driver version 
  8986.  
  8987.                  o  prtQInfo.DeviceName 
  8988.  
  8989.                     The device name 
  8990.  
  8991.  SrvName       The server computer name 
  8992.  
  8993.  QueueName     The Queue name 
  8994.  
  8995.  Note 
  8996.  
  8997.  The server computer name can be specified as '' for a local server or 
  8998.  computer. 
  8999.  
  9000.  Example 
  9001.  
  9002.  
  9003.   /* Get Print queue information */
  9004.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9005.   call LoadLsRxutFuncs
  9006.  
  9007.   NETPRINTQUEUE = 120
  9008.   SrvName       = '\\FSC30DCR'
  9009.   QueueName     = 'IBM4019L'
  9010.  
  9011.   myRc = NetGetInfo(NETPRINTQUEUE, 'prtQInfo', SrvName, QueueName)
  9012.  
  9013.   if myRc <> '0' then do
  9014.    say 'Got error from NetGetInfo() ' myRc
  9015.    call DropLsRxutFuncs
  9016.    exit 9
  9017.   end
  9018.  
  9019.   say
  9020.   say 'Queue Priority:            ' prtQInfo.Priority
  9021.   say 'Queue start time:          ' prtQInfo.StartTime
  9022.   say 'Queue until time:          ' prtQInfo.UntilTime
  9023.   say 'Queue type:                ' prtQInfo.Type
  9024.   say 'Separator File:            ' prtQInfo.SepFile
  9025.   say 'Default Queue processor:   ' prtQInfo.PrProc
  9026.   say 'Queue parameters:          ' prtQInfo.Parms
  9027.   say 'Queue description:         ' prtQInfo.Comment
  9028.   say 'Queue status:              ' prtQInfo.Status
  9029.   say 'Number of jobs in queue:   ' prtQInfo.Jobs
  9030.   say 'Printer connected:         ' prtQInfo.Printers
  9031.   say 'Default printer driver:    ' prtQInfo.DriverName
  9032.   say 'Computer Name at location: ' prtQInfo.RemoteComputerName
  9033.   say 'Queue name at location:    ' prtQInfo.RemoteQueueName
  9034.   say 'Printer Driver version:    ' prtQInfo.Version
  9035.   say 'Device Name:               ' prtQInfo.DeviceName
  9036.  
  9037.   call DropLsRxutFuncs
  9038.   call RxFuncDrop 'LoadLsRxutFuncs'
  9039.  
  9040.   exit 0
  9041.  
  9042.  Example Output 
  9043.  
  9044.  
  9045.   Queue Priority:             5
  9046.   Queue start time:           No Restriction
  9047.   Queue until time:           No Restriction
  9048.   Queue type:                 0002
  9049.   Separator File:
  9050.   Default Queue processor:    PMPRINT
  9051.   Queue parameters:
  9052.   Queue description:          IBM 4019 LaserPrinter
  9053.   Queue status:               0001
  9054.   Number of jobs in queue:    0
  9055.   Printer connected:          IBM40191
  9056.   Default printer driver:     IBM4019.IBM 4019 LaserPrinter
  9057.   Computer Name at location:
  9058.   Queue name at location:
  9059.   Printer Driver version:     777
  9060.   Device Name:                IBM 4019 LaserPrinter
  9061.  
  9062.  
  9063. ΓòÉΓòÉΓòÉ 12.22. NETSERVER Get Info ΓòÉΓòÉΓòÉ
  9064.  
  9065. The function retrieves information about a particular server. 
  9066.  
  9067. Syntax 
  9068.  
  9069.  
  9070. MyRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
  9071.  
  9072. Parameters 
  9073.  
  9074. The parameters specified are: 
  9075.  
  9076.  'serverInfo'  The REXX variable receiving the result. The variable is divided 
  9077.                into: 
  9078.  
  9079.                  o  serverInfo.name 
  9080.  
  9081.                     The server computer name 
  9082.  
  9083.                  o  serverInfo.version_major 
  9084.  
  9085.                     The major version number (Version) 
  9086.  
  9087.                  o  serverInfo.version_minor 
  9088.  
  9089.                     The minor version number (Release) 
  9090.  
  9091.                  o  serverInfo.type 
  9092.  
  9093.                     The server type. This information is a hexadecimal value 
  9094.                     and is not interpreted 
  9095.  
  9096.                  o  serverInfo.comment 
  9097.  
  9098.                     The server comment 
  9099.  
  9100.                  o  serverInfo.ulist_mtime 
  9101.  
  9102.                     The last time the users list was modified 
  9103.  
  9104.                  o  serverInfo.glist_mtime 
  9105.  
  9106.                     The last time the group list was modified 
  9107.  
  9108.                  o  serverInfo.alist_mtime 
  9109.  
  9110.                     The last time the access control list was modified 
  9111.  
  9112.                  o  serverInfo.users 
  9113.  
  9114.                     The maximum of users on the server 
  9115.  
  9116.                  o  serverInfo.disc 
  9117.  
  9118.                     The auto-disconnet value 
  9119.  
  9120.                  o  serverInfo.alerts 
  9121.  
  9122.                     The server alerts receiver table. The table can be empty 
  9123.  
  9124.                  o  serverInfo.security 
  9125.  
  9126.                     The security type of the server 
  9127.  
  9128.                  o  serverInfo.auditing 
  9129.  
  9130.                     The auditing setting 
  9131.  
  9132.                  o  serverInfo.numadmin 
  9133.  
  9134.                     The maximum allowed number of administrators 
  9135.  
  9136.                  o  serverInfo.lanmask 
  9137.  
  9138.                     The order in which the network device drivers are served. 
  9139.                     The value is uninterpreted 
  9140.  
  9141.                  o  serverInfo.hidden 
  9142.  
  9143.                     The server hidden attribute setting 
  9144.  
  9145.                  o  serverInfo.announce 
  9146.  
  9147.                     The network announce delta (in seconds), which determines 
  9148.                     how often the server will be announced to other computers 
  9149.                     on the network 
  9150.  
  9151.                  o  serverInfo.anndelta 
  9152.  
  9153.                     The random announce rate (in milliseconds) 
  9154.  
  9155.                  o  serverInfo.guestacct 
  9156.  
  9157.                     The guest account name 
  9158.  
  9159.                  o  serverInfo.userpath 
  9160.  
  9161.                     The path name to user directories 
  9162.  
  9163.                  o  serverInfo.chdevs 
  9164.  
  9165.                     The number of serial devices that can be shared on the 
  9166.                     server 
  9167.  
  9168.                  o  serverInfo.chdevq 
  9169.  
  9170.                     The number of serial device queues that can coexist on the 
  9171.                     server 
  9172.  
  9173.                  o  serverInfo.chdevjobs 
  9174.  
  9175.                     The number of serial device jobs that can be pending on a 
  9176.                     server 
  9177.  
  9178.                  o  serverInfo.connections 
  9179.  
  9180.                     The maximum number of connections to netnames that are 
  9181.                     allowed 
  9182.  
  9183.                  o  serverInfo.shares 
  9184.  
  9185.                     The maximum number of netnames a server can accommodate 
  9186.  
  9187.                  o  serverInfo.openfiles 
  9188.  
  9189.                     The number of files  (file handles to for example files or 
  9190.                     pipes) that can be opened at once 
  9191.  
  9192.                  o  serverInfo.sessopens 
  9193.  
  9194.                     The number of files that can be opened in one session 
  9195.  
  9196.                  o  serverInfo.sessvcs 
  9197.  
  9198.                     The maximum number of virtual circuits per client 
  9199.  
  9200.                  o  serverInfo.sessreqs 
  9201.  
  9202.                     The number of simultaneous requests that a client can make 
  9203.                     on any virtual circuit 
  9204.  
  9205.                  o  serverInfo.opensearch 
  9206.  
  9207.                     The number of searches that can be opened at once 
  9208.  
  9209.                  o  serverInfo.activelocks 
  9210.  
  9211.                     The number of file locks that can be active 
  9212.  
  9213.                  o  serverInfo.numreqbuf 
  9214.  
  9215.                     The number of server buffers that are provided 
  9216.  
  9217.                  o  serverInfo.sizreqbuf 
  9218.  
  9219.                     The size (in bytes) of each server buffer 
  9220.  
  9221.                  o  serverInfo.numbigbuf 
  9222.  
  9223.                     Number of 64KB server buffers that are provided 
  9224.  
  9225.                  o  serverInfo.numfiletasks 
  9226.  
  9227.                     Number of processes that can access the operating system at 
  9228.                     one time 
  9229.  
  9230.                  o  serverInfo.alertsched 
  9231.  
  9232.                     The alert interval for notifying an administrator of a 
  9233.                     network event 
  9234.  
  9235.                  o  serverInfo.erroralert 
  9236.  
  9237.                     The number of entries that can be written to the error log 
  9238.                     file during a interval before notifying an administrator 
  9239.  
  9240.                  o  serverInfo.logonalert 
  9241.  
  9242.                     The number of failed logon attempts to allow a user before 
  9243.                     notifying an administrator 
  9244.  
  9245.                  o  serverInfo.accessalert 
  9246.  
  9247.                     The number of failed file accesses to allow before issuing 
  9248.                     an administrative alert 
  9249.  
  9250.                  o  serverInfo.diskalert 
  9251.  
  9252.                     The number of kilobytes of free disk space, at which, an 
  9253.                     administrator must be notified that the free space is low 
  9254.  
  9255.                  o  serverInfo.netioalert 
  9256.  
  9257.                     The Network I/O error ratio in one tenth of a percent to 
  9258.                     allow before the administrator is notified 
  9259.  
  9260.                  o  serverInfo.maxauditsz 
  9261.  
  9262.                     Maximum audit file size 
  9263.  
  9264.                  o  serverInfo.srvheuristics 
  9265.  
  9266.                     The server heuristics settings 
  9267.  
  9268.                  o  serverInfo.auditedevents 
  9269.  
  9270.                     The audit events setting. This value is unformatted and is 
  9271.                     presented hexadecimal 
  9272.  
  9273.                  o  serverInfo.autoprofile 
  9274.  
  9275.                     The server auto profile setting 
  9276.  
  9277.                  o  serverInfo.autopath 
  9278.  
  9279.                     The server autoprofile location 
  9280.  
  9281.  SrvName       The server computer name 
  9282.  
  9283.  Note 
  9284.  
  9285.  The server computer name can be specified as '' for a local server. 
  9286.  
  9287.  Example 
  9288.  
  9289.  
  9290.   /* Get server information */
  9291.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9292.   call LoadLsRxutFuncs
  9293.  
  9294.   NETSERVER = 160
  9295.   SrvName   = '\\ILIDC'
  9296.  
  9297.   myRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
  9298.  
  9299.   if myRc <> '0' then do
  9300.    say 'Got error from NetGetInfo() ' myRc
  9301.    call DropLsRxutFuncs
  9302.    exit 9
  9303.   end
  9304.  
  9305.   say
  9306.   say 'Server name:                         ' serverInfo.name
  9307.   say 'Major version (Version):             ' serverInfo.version_major
  9308.   say 'Minor version (Release):             ' serverInfo.version_minor
  9309.   say 'Server type:                         ' serverInfo.type
  9310.   say 'Comment:                             ' serverInfo.comment
  9311.   say 'Users list last changed:             ' serverInfo.ulist_mtime
  9312.   say 'Group list last changed:             ' serverInfo.glist_mtime
  9313.   say 'Access Control list last changed:    ' serverInfo.alist_mtime
  9314.   say 'Maximum number of users:             ' serverInfo.users
  9315.   say 'Auto-disconnect value:               ' serverInfo.disc
  9316.   say 'Send server alerts to:               ' serverInfo.alerts
  9317.   say 'Server security type:                ' serverInfo.security
  9318.   say 'Auditing setting:                    ' serverInfo.auditing
  9319.   say 'Maximum number administrators:       ' serverInfo.numadmin
  9320.   say 'LAN mask setting:                    ' serverInfo.lanmask
  9321.   say 'Server hidden attribute setting:     ' serverInfo.hidden
  9322.   say 'Server network announce:             ' serverInfo.announce
  9323.   say 'Random announce rate delta:          ' serverInfo.anndelta
  9324.   say 'Guest account name:                  ' serverInfo.guestacct
  9325.   say 'Path to user directories:            ' serverInfo.userpath
  9326.   say 'Maximum shared serial devices:       ' serverInfo.chdevs
  9327.   say 'Maximum serial device queues:        ' serverInfo.chdevq
  9328.   say 'Maximum pending serial jobs:         ' serverInfo.chdevjobs
  9329.   say 'Maximum connections:                 ' serverInfo.connections
  9330.   say 'Maximum shares:                      ' serverInfo.shares
  9331.   say 'Maximum open file handles:           ' serverInfo.openfiles
  9332.   say 'Maximum session opens:               ' serverInfo.sessopens
  9333.   say 'Per Client maximum virtual circuits: ' serverInfo.sessvcs
  9334.   say 'Maximum requests:                    ' serverInfo.sessreqs
  9335.   say 'Maximum searches:                    ' serverInfo.opensearch
  9336.   say 'Maximum locks:                       ' serverInfo.activelocks
  9337.   say 'Number requester buffers:            ' serverInfo.numreqbuf
  9338.   say 'Requester buffer size:               ' serverInfo.sizreqbuf
  9339.   say 'Number big buffers:                  ' serverInfo.numbigbuf
  9340.   say 'Number file tasks:                   ' serverInfo.numfiletasks
  9341.   say 'alertsched value:                    ' serverInfo.alertsched
  9342.   say 'erroralert value:                    ' serverInfo.erroralert
  9343.   say 'logonalert value:                    ' serverInfo.logonalert
  9344.   say 'accessalert value:                   ' serverInfo.accessalert
  9345.   say 'diskalert value:                     ' serverInfo.diskalert
  9346.   say 'Maximum auditing log file size:      ' serverInfo.maxauditsz
  9347.   say 'srvheuristics:                       ' serverInfo.srvheuristics
  9348.   say 'Audit events flags:                  ' serverInfo.auditedevents
  9349.   say 'Server auto profile setting:         ' serverInfo.autoprofile
  9350.   say 'Server autoprofile location:         ' serverInfo.autopath
  9351.  
  9352.   call DropLsRxutFuncs
  9353.   call RxFuncDrop 'LoadLsRxutFuncs'
  9354.  
  9355.   exit 0
  9356.  
  9357.  Example Output 
  9358.  
  9359.  
  9360.   Server name:                          ILIDC
  9361.   Major version (Version):              3
  9362.   Minor version (Release):              0
  9363.   Server type:                          0000002B
  9364.   Comment:                              ILI netvork group Domain Controller
  9365.   Users list last changed:              Never modified or unknown
  9366.   Group list last changed:              Never modified or unknown
  9367.   Access Control list last changed:     Wed May  5 18:30:24 1993
  9368.  
  9369.   Maximum number of users:              32
  9370.   Auto-disconnect value:                120
  9371.   Send server alerts to:                -none-
  9372.   Server security type:                 User-level
  9373.   Auditing setting:                     Disabled
  9374.   Maximum number administrators:        65535
  9375.   LAN mask setting:                     1
  9376.   Server hidden attribute setting:      Visible
  9377.   Server network announce:              60
  9378.   Random announce rate delta:           3000
  9379.   Guest account name:                   GUEST
  9380.   Path to user directories:             -none-
  9381.   Maximum shared serial devices:        2
  9382.   Maximum serial device queues:         2
  9383.   Maximum pending serial jobs:          6
  9384.   Maximum connections:                  128
  9385.   Maximum shares:                       24
  9386.   Maximum open file handles:            250
  9387.   Maximum session opens:                80
  9388.   Per Client maximum virtual circuits:  1
  9389.   Maximum requests:                     50
  9390.   Maximum searches:                     50
  9391.   Maximum locks:                        64
  9392.   Number requester buffers:             36
  9393.   Requester buffer size:                4096
  9394.   Number big buffers:                   12
  9395.   Number file tasks:                    1
  9396.   alertsched value:                     5
  9397.   erroralert value:                     5
  9398.   logonalert value:                     5
  9399.   accessalert value:                    5
  9400.   diskalert value:                      5000
  9401.   Maximum auditing log file size:       100
  9402.   srvheuristics:                        11110141111311001331
  9403.   Audit events flags:                   0
  9404.   Server auto profile setting:          Unknown
  9405.   Server autoprofile location:          SRVAUTO.PRO
  9406.  
  9407.  
  9408. ΓòÉΓòÉΓòÉ 12.23. NETSERVERMODALS Get Info ΓòÉΓòÉΓòÉ
  9409.  
  9410. The function gets server modals related information. 
  9411.  
  9412. Syntax 
  9413.  
  9414.  
  9415. MyRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
  9416.  
  9417. Parameters 
  9418.  
  9419. The parameters specified are: 
  9420.  
  9421.  'serverModalsInfo' The REXX variable receiving the result. The variable is 
  9422.                    divided into: 
  9423.  
  9424.                      o  serModalsInfo.role 
  9425.  
  9426.                         The server role. The following will be returned: 
  9427.  
  9428.                                                 String returned
  9429.                                                 ---------------
  9430.                                                 Standalone server
  9431.                                                 Member server in the domain
  9432.                                                 Backup server in the domain
  9433.                                                 Primary server in the domain
  9434.  
  9435.                      o  serModalsInfo.primary 
  9436.  
  9437.                         The name of the primary domain controller to which the 
  9438.                         server belongs 
  9439.  
  9440.  SrvName           The server computer name. 
  9441.  
  9442.  Note 
  9443.  
  9444.  The server computer name can be specified as '' for a local server. 
  9445.  
  9446.  Example 
  9447.  
  9448.  
  9449.   /* Get server modals information */
  9450.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9451.   call LoadLsRxutFuncs
  9452.  
  9453.   NETSERVERMODALS = 370
  9454.   SrvName         = '\\ILIDC'
  9455.  
  9456.   myRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
  9457.  
  9458.   if myRc <> '0' then do
  9459.    say 'Got error from NetGetInfo() ' myRc
  9460.    call DropLsRxutFuncs
  9461.    exit 9
  9462.   end
  9463.  
  9464.   say
  9465.   say 'Server role:            ' serverModalsInfo.role
  9466.   say 'Domain Controller name: ' serverModalsInfo.primary
  9467.  
  9468.   call DropLsRxutFuncs
  9469.   call RxFuncDrop 'LoadLsRxutFuncs'
  9470.  
  9471.   exit 0
  9472.  
  9473.  Example Output 
  9474.  
  9475.  
  9476.   Server role:             Primary server in the domain
  9477.   Domain Controller name:  ILIDC
  9478.  
  9479.  
  9480. ΓòÉΓòÉΓòÉ 12.24. NETSERVICE Get Info ΓòÉΓòÉΓòÉ
  9481.  
  9482. The function retrieves information about a particular network service that is 
  9483. started. 
  9484.  
  9485. Syntax 
  9486.  
  9487.  
  9488. MyRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
  9489.  
  9490. Parameters 
  9491.  
  9492. The parameters specified are: 
  9493.  
  9494.  'serviceInfo'  The REXX variable receiving the result. The variable is divided 
  9495.                 into: 
  9496.  
  9497.                   o  serviceInfo.name 
  9498.  
  9499.                      The service name 
  9500.  
  9501.                   o  serviceInfo.status 
  9502.  
  9503.                      The service status. This is a uninterpreted hexadecimal 
  9504.                      value 
  9505.  
  9506.                   o  serviceInfo.code 
  9507.  
  9508.                      The error codes when a service stops or fails to start 
  9509.                      properly.  The values are a primary and secondary code 
  9510.  
  9511.                   o  serviceInfo.pid 
  9512.  
  9513.                      The service process id 
  9514.  
  9515.                   o  serviceInfo.text 
  9516.  
  9517.                      The service text 
  9518.  
  9519.  SrvName        The server computer name 
  9520.  
  9521.  ServiceName    The service name 
  9522.  
  9523.  Note 
  9524.  
  9525.  The server computer name can be specified as '' for a local server. 
  9526.  
  9527.  Example 
  9528.  
  9529.  
  9530.   /* Get service information */
  9531.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9532.   call LoadLsRxutFuncs
  9533.  
  9534.   NETSERVICE  = 170
  9535.   SrvName     = '\\FSC30DCR'
  9536.   ServiceName = 'ALERTER'
  9537.  
  9538.   myRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
  9539.  
  9540.   if myRc <> '0' then do
  9541.    say 'Got error from NetGetInfo() ' myRc
  9542.    call DropLsRxutFuncs
  9543.    exit 9
  9544.   end
  9545.  
  9546.   say
  9547.   say 'The service name: ' serviceInfo.name
  9548.   say 'Service status:   ' serviceInfo.status
  9549.   say 'Service code:     ' serviceInfo.code
  9550.   say 'Process id:       ' serviceInfo.pid
  9551.   say 'Service text:     ' serviceInfo.text
  9552.  
  9553.   call DropLsRxutFuncs
  9554.   call RxFuncDrop 'LoadLsRxutFuncs'
  9555.  
  9556.   exit 0
  9557.  
  9558.  Example Output 
  9559.  
  9560.  
  9561.   The service name:  ALERTER
  9562.   Service status:    13
  9563.   Service code:      0
  9564.   Process id:        67
  9565.   Service text:      -none-
  9566.  
  9567.  
  9568. ΓòÉΓòÉΓòÉ 12.25. NETSESSION Get Info ΓòÉΓòÉΓòÉ
  9569.  
  9570. The function retrieves information about a particular session. 
  9571.  
  9572. Syntax 
  9573.  
  9574.  
  9575. MyRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
  9576.  
  9577. Parameters 
  9578.  
  9579. The parameters specified are: 
  9580.  
  9581.  'sessionInfo'   The REXX variable receiving the result. The variable is 
  9582.                  divided into: 
  9583.  
  9584.                    o  sessionInfo.cname 
  9585.  
  9586.                       The computer name 
  9587.  
  9588.                    o  sessionInfo.username 
  9589.  
  9590.                       The user name (Userid) 
  9591.  
  9592.                    o  sessionInfo.num_conns 
  9593.  
  9594.                       The number of connections that have been made during the 
  9595.                       session 
  9596.  
  9597.                    o  sessionInfo.num_opens 
  9598.  
  9599.                       The number of opens that have been made during the 
  9600.                       session 
  9601.  
  9602.                    o  sessionInfo.num_users 
  9603.  
  9604.                       The number of sessions that are established between the 
  9605.                       server and req 
  9606.  
  9607.                    o  sessionInfo.time 
  9608.  
  9609.                       The number of seconds a session has been active 
  9610.  
  9611.                    o  sessionInfo.idle_time 
  9612.  
  9613.                       The number of seconds a session has been idle 
  9614.  
  9615.                    o  sessionInfo.user_flags 
  9616.  
  9617.                       The user flags 
  9618.  
  9619.                    o  sessionInfo.cltype_name 
  9620.  
  9621.                       Set the name of the client types 
  9622.  
  9623.  SrvName         The server computer name 
  9624.  
  9625.  ComputerName    The computer name 
  9626.  
  9627.  Note 
  9628.  
  9629.  The server computer name can be specified as '' for a local server. 
  9630.  
  9631.  Example 
  9632.  
  9633.  
  9634.   /* Get session information */
  9635.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9636.   call LoadLsRxutFuncs
  9637.  
  9638.   NETSESSION   = 180
  9639.   SrvName      = '\\FSCDC'
  9640.   ComputerName = '\\FSC30DCR'
  9641.  
  9642.   myRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
  9643.  
  9644.   if myRc <> '0' then do
  9645.    say 'Got error from NetGetInfo() ' myRc
  9646.    call DropLsRxutFuncs
  9647.    exit 9
  9648.   end
  9649.  
  9650.   say
  9651.   say 'The computer name:    ' sessionInfo.cname
  9652.   say 'Userid:               ' sessionInfo.username
  9653.   say 'Connections made:     ' sessionInfo.num_conns
  9654.   say 'Number opens:         ' sessionInfo.num_opens
  9655.   say 'Sessions established: ' sessionInfo.num_users
  9656.   say 'Session time:         ' sessionInfo.time
  9657.   say 'Idle time:            ' sessionInfo.idle_time
  9658.   say 'User flags:           ' sessionInfo.user_flags
  9659.   say 'Client type:          ' sessionInfo.cltype_name
  9660.  
  9661.   call DropLsRxutFuncs
  9662.   call RxFuncDrop 'LoadLsRxutFuncs'
  9663.  
  9664.   exit 0
  9665.  
  9666.  Example Output 
  9667.  
  9668.  
  9669.   The computer name:     FSC30DCR
  9670.   Userid:                FSCADMIN
  9671.   Connections made:      3
  9672.   Number opens:          1
  9673.   Sessions established:  1
  9674.   Session time:          176
  9675.   Idle time:             0
  9676.   User flags:            Unknown
  9677.   Client type:           OS/2 LS 1.2
  9678.  
  9679.  
  9680. ΓòÉΓòÉΓòÉ 12.26. NETSHARE Get Info ΓòÉΓòÉΓòÉ
  9681.  
  9682. The function retrieves information about a particular shared resource on a 
  9683. server. 
  9684.  
  9685. Syntax 
  9686.  
  9687.  
  9688. MyRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
  9689.  
  9690. Parameters 
  9691.  
  9692. The parameters specified are: 
  9693.  
  9694.  'shareInfo'       The REXX variable receiving the result. The variable is 
  9695.                    divided into: 
  9696.  
  9697.                      o  shareInfo.netname 
  9698.  
  9699.                         The network name of the resource 
  9700.  
  9701.                      o  shareInfo.type 
  9702.  
  9703.                         The share type (For example Serial Device) 
  9704.  
  9705.                      o  shareInfo.remark 
  9706.  
  9707.                         The share remark 
  9708.  
  9709.                      o  shareInfo.permissions 
  9710.  
  9711.                         The shareInfo.permissions is used only for DLS and DLR 
  9712.                         applications and ignored for OS/2 applications. The 
  9713.                         meaning of this field depends on which type of resource 
  9714.                         is in query. 
  9715.  
  9716.                         If shareInfo.type is "Disk Drive", this field can be 
  9717.                         any combination of the following permissions, except 
  9718.                         for ACCESS_READ + ACCESS_CREATE. These are defined as 
  9719.                         follows: 
  9720.  
  9721.                                                 Value Meaning
  9722.                                                 ----- -------
  9723.                                                  1    Permission to read data from a resource.
  9724.  
  9725.                                                  2    Permission to write data to a resource.
  9726.  
  9727.                                                  4    Permission to create an instance of the resource
  9728.                                                       (such as a file).  Data can be written to the
  9729.                                                       resource as the resource is created.
  9730.  
  9731.                         If shareInfo.type is "Spooler Queue", the 
  9732.                         shareInfo.permissions parameter specifies the form 
  9733.                         control at the end of a print job. These are defined as 
  9734.                         follows: 
  9735.  
  9736.                                                 Value Meaning
  9737.                                                 ----- -------
  9738.                                                  2    The printer will not be sent a command at the
  9739.                                                       end of any print job to position to the top of
  9740.                                                       the page.
  9741.  
  9742.                                                  4    An attempt is made to determine whether a form
  9743.                                                       feed is needed for a print job.  If the last 64
  9744.                                                       bytes of the file contain no form feed command
  9745.                                                       or follow a form feed command with printable
  9746.                                                       characters, a form feed command is issued to the
  9747.                                                       printer.
  9748.  
  9749.                                                 32    A form feed command is issued to the printer at
  9750.                                                       the end of each print job to position to the top
  9751.                                                       of the next form (default).
  9752.  
  9753.                         Note: 
  9754.  
  9755.                         DLS and DLR does not support sharing of serial devices. 
  9756.                         In some circumstances, however, COM devices, such as 
  9757.                         COM1, can be shared as print devices; for example, if 
  9758.                         operating in synchronous communication mode, such as 
  9759.                         with a serial printer 
  9760.  
  9761.                      o  shareInfo.max_uses 
  9762.  
  9763.                         The maximum number of concurrent connections that the 
  9764.                         shared resource can accommodate 
  9765.  
  9766.                      o  shareInfo.current_uses 
  9767.  
  9768.                         The number of connections that are currently made to 
  9769.                         the resource 
  9770.  
  9771.                      o  shareInfo.path 
  9772.  
  9773.                         The local path name of the shared resource. For disks, 
  9774.                         it is the path being shared. For spooler queues, it is 
  9775.                         the name of the spooler queue being shared. For serial 
  9776.                         device queues, it is a string of one or more 
  9777.                         communication device names separated by spaces (For 
  9778.                         example, COM1 COM2) 
  9779.  
  9780.  SrvName           The server computer name 
  9781.  
  9782.  NetName           The network name 
  9783.  
  9784.  Note 
  9785.  
  9786.  The server computer name can be specified as '' for a local server. 
  9787.  
  9788.  Example 
  9789.  
  9790.  
  9791.   /* Get share information */
  9792.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9793.   call LoadLsRxutFuncs
  9794.  
  9795.   NETSHARE    = 190
  9796.   SrvName     = '\\FSC30DCR'
  9797.   NetworkName = 'FORALL'
  9798.  
  9799.   myRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
  9800.  
  9801.   if myRc <> '0' then do
  9802.    say 'Got error from NetGetInfo() ' myRc
  9803.    call DropLsRxutFuncs
  9804.    exit 9
  9805.   end
  9806.  
  9807.   say
  9808.   say 'Network name:        ' shareInfo.netname
  9809.   say 'Share type:          ' shareInfo.type
  9810.   say 'Comment:             ' shareInfo.remark
  9811.   say 'Maximum uses:        ' shareInfo.max_uses
  9812.   say 'Current uses:        ' shareInfo.current_uses
  9813.   say 'Local resource path: ' shareInfo.path
  9814.  
  9815.   call DropLsRxutFuncs
  9816.   call RxFuncDrop 'LoadLsRxutFuncs'
  9817.  
  9818.   exit 0
  9819.  
  9820.  Example Output 
  9821.  
  9822.  
  9823.   Network name:         FORALL
  9824.   Share type:           Disk Drive
  9825.   Comment:              For all users
  9826.   Maximum uses:         45
  9827.   Current uses:         1
  9828.   Local resource path:  D:\APPS\BOOKS
  9829.  
  9830.  
  9831. ΓòÉΓòÉΓòÉ 12.27. NETSHARECHECK Get Info ΓòÉΓòÉΓòÉ
  9832.  
  9833. The function retrieves information about a particular shared resource on a 
  9834. server. 
  9835.  
  9836. Syntax 
  9837.  
  9838.  
  9839. MyRc = NetGetInfo(NETSHARECHECK, 'checkInfo', SrvName)
  9840.  
  9841. Parameters 
  9842.  
  9843. The parameters specified are: 
  9844.  
  9845.  'checkInfo'       The REXX variable required and receiving the result. The 
  9846.                    variable is divided into: 
  9847.  
  9848.                      o  shareInfo.devicename 
  9849.  
  9850.                         The device name to query 
  9851.  
  9852.                      o  shareInfo.type 
  9853.  
  9854.                         The returned share type, if the device is shared 
  9855.  
  9856.  SrvName           The server computer name 
  9857.  
  9858.  Note 
  9859.  
  9860.  The server computer name can be specified as '' for a local server. 
  9861.  
  9862.  Example 
  9863.  
  9864.  
  9865.   /* Net share check */
  9866.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  9867.   call LoadLsRxutFuncs
  9868.  
  9869.   NETSHARECHECK        = 210
  9870.   ComputerName         = '\\KING_BALU'
  9871.   checkInfo.devicename = 'Q:'
  9872.  
  9873.   myRc = NetGetInfo(NETSHARECHECK, 'checkInfo', ComputerName)
  9874.  
  9875.   if myRc <> '0' then do
  9876.    say 'Got error from NetGetInfo() ' myRc
  9877.    rcCode = 9
  9878.   end
  9879.   else do
  9880.    say "Share type" checkInfo.type
  9881.    rcCode = 0
  9882.   end
  9883.  
  9884.   call DropLsRxutFuncs
  9885.   call RxFuncDrop 'LoadLsRxutFuncs'
  9886.  
  9887.   exit rcCode
  9888.  
  9889.   exit 0
  9890.  
  9891.  Example Output 
  9892.  
  9893.  
  9894.   Share type  Disk Drive
  9895.  
  9896.  
  9897. ΓòÉΓòÉΓòÉ 12.28. NETSTATISTICS ΓòÉΓòÉΓòÉ
  9898.  
  9899. The function retrieves operating statistics for a service. 
  9900.  
  9901. Syntax 
  9902.  
  9903.  
  9904. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName)
  9905. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType)
  9906. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType, ClearIt)
  9907.  
  9908. Parameters 
  9909.  
  9910. The parameters specified are 
  9911.  
  9912.  'statisticsInfo'  The REXX variable receiving the result. The variable is 
  9913.                    divided into two ways depending of the StatType parameter. 
  9914.                    If StatType = 0 then the requester statistics are provided. 
  9915.                    If StatType = 1 then the server statistics are provided. The 
  9916.                    returned values for requester statistics are: 
  9917.  
  9918.                      o  statisticsInfo.start 
  9919.  
  9920.                         The time that statistics collection started or the date 
  9921.                         or time that the statistics were last cleared 
  9922.  
  9923.                      o  statisticsInfo.numNCB_r 
  9924.  
  9925.                         The number of NCBs issued (redirector) 
  9926.  
  9927.                      o  statisticsInfo.numNCB_s 
  9928.  
  9929.                         The number of NCBs issued (server) 
  9930.  
  9931.                      o  statisticsInfo.numNCB_a 
  9932.  
  9933.                         The number of NCBs issued (application) 
  9934.  
  9935.                      o  statisticsInfo.fiNCB_r 
  9936.  
  9937.                         The number of NCBs that failed issue (redirector) 
  9938.  
  9939.                      o  statisticsInfo.fiNCB_s 
  9940.  
  9941.                         The number of NCBs that failed issue (server) 
  9942.  
  9943.                      o  statisticsInfo.fiNCB_a 
  9944.  
  9945.                         The number of NCBs that failed issue (application) 
  9946.  
  9947.                      o  statisticsInfo.fcNCB_r 
  9948.  
  9949.                         The number of NCBs that failed completion (redirector) 
  9950.  
  9951.                      o  statisticsInfo.fcNCB_s 
  9952.  
  9953.                         The number of NCBs that failed completion (server) 
  9954.  
  9955.                      o  statisticsInfo.fcNCB_a 
  9956.  
  9957.                         The number of NCBs that failed completion (application) 
  9958.  
  9959.                      o  statisticsInfo.sesstart 
  9960.  
  9961.                         The number of requester sessions started 
  9962.  
  9963.                      o  statisticsInfo.sessfailcon 
  9964.  
  9965.                         The number of requester session failures to connect 
  9966.  
  9967.                      o  statisticsInfo.sessbroke 
  9968.  
  9969.                         The number of failures of requester sessions 
  9970.  
  9971.                      o  statisticsInfo.uses 
  9972.  
  9973.                         The number of requester uses 
  9974.  
  9975.                      o  statisticsInfo.usefail 
  9976.  
  9977.                         The number of requester use failures 
  9978.  
  9979.                      o  statisticsInfo.autorec 
  9980.  
  9981.                         The number of requester autoconnects 
  9982.  
  9983.                      o  statisticsInfo.bytessent_r 
  9984.  
  9985.                         The number of requester bytes sent to the network. The 
  9986.                         representation will be floating point if the bytes send 
  9987.                         exceeds 0xFFFFFFFF 
  9988.  
  9989.                      o  statisticsInfo.bytesrcvd_r 
  9990.  
  9991.                         The number of requester bytes received from the 
  9992.                         network. The representation will be floating point if 
  9993.                         the bytes received exceeds 0xFFFFFFFF 
  9994.  
  9995.                      o  statisticsInfo.bytessent_s 
  9996.  
  9997.                         The number of server bytes sent to the network. The 
  9998.                         representation will be floating point if the bytes send 
  9999.                         exceeds 0xFFFFFFFF 
  10000.  
  10001.                      o  statisticsInfo.bytesrcvd_s 
  10002.  
  10003.                         The number of server bytes received from the network. 
  10004.                         The representation will be floating point if the bytes 
  10005.                         received exceeds 0xFFFFFFFF 
  10006.  
  10007.                      o  statisticsInfo.bytessent_a 
  10008.  
  10009.                         The number of application bytes sent to the network. 
  10010.                         The representation will be floating point if the bytes 
  10011.                         send exceeds 0xFFFFFFFF 
  10012.  
  10013.                      o  statisticsInfo.bytesrcvd_a 
  10014.  
  10015.                         The number of application bytes received from the 
  10016.                         network. The representation will be floating point if 
  10017.                         the bytes received exceeds 0xFFFFFFFF 
  10018.  
  10019.                      o  statisticsInfo.reqbufneed 
  10020.  
  10021.                         The number of times the requester required a request 
  10022.                         buffer but failed 
  10023.  
  10024.                      o  statisticsInfo.bigbufneed 
  10025.  
  10026.                         The number of times the requester required a big buffer 
  10027.                         but failed 
  10028.  
  10029.                    The returned values for server statistics are: 
  10030.  
  10031.                      o  statisticsInfo.start 
  10032.  
  10033.                         The time that statistics collection started or the date 
  10034.                         or time that the statistics were last cleared 
  10035.  
  10036.                      o  statisticsInfo.fopens 
  10037.  
  10038.                         The number of server file opens.  This includes opens 
  10039.                         of named pipes 
  10040.  
  10041.                      o  statisticsInfo.devopens 
  10042.  
  10043.                         The number of server device opens 
  10044.  
  10045.                      o  statisticsInfo.jobsqueued 
  10046.  
  10047.                         The number of server print jobs spooled 
  10048.  
  10049.                      o  statisticsInfo.sopens 
  10050.  
  10051.                         The number of server session starts 
  10052.  
  10053.                      o  statisticsInfo.stimedout 
  10054.  
  10055.                         The number of server session autodisconnects 
  10056.  
  10057.                      o  statisticsInfo.serrorout 
  10058.  
  10059.                         The number of server sessions errored out 
  10060.  
  10061.                      o  statisticsInfo.pwerrors 
  10062.  
  10063.                         The number of server password violations 
  10064.  
  10065.                      o  statisticsInfo.permerrors 
  10066.  
  10067.                         The number of server access permission errors 
  10068.  
  10069.                      o  statisticsInfo.syserrors 
  10070.  
  10071.                         The number of server system errors 
  10072.  
  10073.                      o  statisticsInfo.bytessent 
  10074.  
  10075.                         The number of server bytes sent to the network. The 
  10076.                         representation will be floating point if the bytes send 
  10077.                         exceeds 0xFFFFFFFF 
  10078.  
  10079.                      o  statisticsInfo.bytesrcvd 
  10080.  
  10081.                         The number of server bytes received from the network. 
  10082.                         The representation will be floating point if the bytes 
  10083.                         received exceeds 0xFFFFFFFF 
  10084.  
  10085.                      o  statisticsInfo.avresponse 
  10086.  
  10087.                         The average server response time in milliseconds 
  10088.  
  10089.                      o  statisticsInfo.reqbufneed 
  10090.  
  10091.                         The number of times the server required a request 
  10092.                         buffer but failed 
  10093.  
  10094.                      o  statisticsInfo.bigbufneed 
  10095.  
  10096.                         The number of times the server required a big buffer 
  10097.                         but failed 
  10098.  
  10099.  ComputerName      The server computer name 
  10100.  
  10101.  StatType          Using value 0 gives requester statistics. A value 1 gives 
  10102.                    server statistics 
  10103.  
  10104.  ClearIt           Using value 1 clears the statistics, otherwise no clear is 
  10105.                    done. A call to NetGetInfo(NETSTATISTICS) with 4 parameters, 
  10106.                    no clear will be done 
  10107.  
  10108.                    A call to NetGetInfo(NETSTATISTICS) with 3 parameters, no 
  10109.                    clear and a call to retrieve requester information will be 
  10110.                    done 
  10111.  
  10112.  Note 
  10113.  
  10114.  The server computer name can be specified as '' for a local server or 
  10115.  computer. 
  10116.  
  10117.  Example 
  10118.  
  10119.  
  10120.   /* Get statistics information */
  10121.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10122.   call LoadLsRxutFuncs
  10123.  
  10124.   SrvName = '\\FSC30DCR'
  10125.   NETSTATISTICS        = 195
  10126.   REQ_STAT             = 0
  10127.   SRV_STAT             = 1
  10128.  
  10129.   /* Get the requester statistics */
  10130.   myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, REQ_STAT, 10)
  10131.  
  10132.   if myRc <> '0' then do
  10133.    say 'Got error from NetGetInfo() ' myRc
  10134.    call DropLsRxutFuncs
  10135.    exit 9
  10136.   end
  10137.  
  10138.   say
  10139.   say "Statistics req start:       " statisticsInfo.start
  10140.   say "Statistics req numNCB_r:    " statisticsInfo.numNCB_r
  10141.   say "Net Statistics numNCB_s:    " statisticsInfo.numNCB_s
  10142.   say "Net Statistics numNCB_a:    " statisticsInfo.numNCB_a
  10143.   say "Net Statistics fiNCB_r:     " statisticsInfo.fiNCB_r
  10144.   say "Net Statistics fiNCB_s:     " statisticsInfo.fiNCB_s
  10145.   say "Net Statistics fiNCB_a:     " statisticsInfo.fiNCB_a
  10146.   say "Net Statistics fcNCB_r:     " statisticsInfo.fcNCB_r
  10147.   say "Net Statistics fcNCB_s:     " statisticsInfo.fcNCB_s
  10148.   say "Net Statistics fcNCB_a:     " statisticsInfo.fcNCB_a
  10149.   say "Net Statistics sesstart:    " statisticsInfo.sesstart
  10150.   say "Net Statistics sessfailcon: " statisticsInfo.sessfailcon
  10151.   say "Net Statistics sessbroke:   " statisticsInfo.sessbroke
  10152.   say "Net Statistics uses:        " statisticsInfo.uses
  10153.   say "Net Statistics usefail:     " statisticsInfo.usefail
  10154.   say "Net Statistics autorec:     " statisticsInfo.autorec
  10155.   say "Net Statistics bytessent_r: " statisticsInfo.bytessent_r
  10156.   say "Net Statistics bytesrcvd_r: " statisticsInfo.bytesrcvd_r
  10157.   say "Net Statistics bytessent_s: " statisticsInfo.bytessent_s
  10158.   say "Net Statistics bytesrcvd_s: " statisticsInfo.bytesrcvd_s
  10159.   say "Net Statistics bytessent_a: " statisticsInfo.bytessent_a
  10160.   say "Net Statistics bytesrcvd_a: " statisticsInfo.bytesrcvd_a
  10161.   say "Net Statistics reqbufneed:  " statisticsInfo.reqbufneed
  10162.   say "Net Statistics bigbufneed:  " statisticsInfo.bigbufneed
  10163.  
  10164.   /* The server statistics */
  10165.   myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, SRV_STAT, 10)
  10166.  
  10167.   if myRc <> '0' then do
  10168.    say 'Got error from NetGetInfo() ' myRc
  10169.    call DropLsRxutFuncs
  10170.    exit 9
  10171.   end
  10172.  
  10173.   say
  10174.   say "Statistics srv start:      " statisticsInfo.start
  10175.   say "Statistics srv fopens:     " statisticsInfo.fopens
  10176.   say "Statistics srv devopens:   " statisticsInfo.devopens
  10177.   say "Statistics srv jobsqueued: " statisticsInfo.jobsqueued
  10178.   say "Statistics srv sopens:     " statisticsInfo.sopens
  10179.   say "Statistics srv stimedout:  " statisticsInfo.stimedout
  10180.   say "Statistics srv serrorout:  " statisticsInfo.serrorout
  10181.   say "Statistics srv pwerrors:   " statisticsInfo.pwerrors
  10182.   say "Statistics srv permerrors: " statisticsInfo.permerrors
  10183.   say "Statistics srv syserrors:  " statisticsInfo.syserrors
  10184.   say "Statistics srv bytessent:  " statisticsInfo.bytessent
  10185.   say "Statistics srv bytesrcvd:  " statisticsInfo.bytesrcvd
  10186.   say "Statistics srv avresponse: " statisticsInfo.avresponse
  10187.   say "Statistics srv reqbufneed: " statisticsInfo.reqbufneed
  10188.   say "Statistics srv bigbufneed: " statisticsInfo.bigbufneed
  10189.  
  10190.   call DropLsRxutFuncs
  10191.   call RxFuncDrop 'LoadLsRxutFuncs'
  10192.  
  10193.   exit 0
  10194.  
  10195.  Example Output 
  10196.  
  10197.  
  10198.   Statistics req start:        Thu May  6 18:19:15 1993
  10199.  
  10200.   Statistics req numNCB_r:     2213
  10201.   Net Statistics numNCB_s:     31
  10202.   Net Statistics numNCB_a:     1410
  10203.   Net Statistics fiNCB_r:      0
  10204.   Net Statistics fiNCB_s:      0
  10205.   Net Statistics fiNCB_a:      0
  10206.   Net Statistics fcNCB_r:      0
  10207.   Net Statistics fcNCB_s:      0
  10208.   Net Statistics fcNCB_a:      0
  10209.   Net Statistics sesstart:     7
  10210.   Net Statistics sessfailcon:  0
  10211.   Net Statistics sessbroke:    3
  10212.   Net Statistics uses:         23
  10213.   Net Statistics usefail:      0
  10214.   Net Statistics autorec:      0
  10215.   Net Statistics bytessent_r:  2430724
  10216.   Net Statistics bytesrcvd_r:  263720
  10217.   Net Statistics bytessent_s:  320
  10218.   Net Statistics bytesrcvd_s:  1019
  10219.   Net Statistics bytessent_a:  73113
  10220.   Net Statistics bytesrcvd_a:  90194
  10221.   Net Statistics reqbufneed:   0
  10222.   Net Statistics bigbufneed:   0
  10223.  
  10224.   Statistics srv start:       Thu May  6 20:19:21 1993
  10225.  
  10226.   Statistics srv fopens:      0
  10227.   Statistics srv devopens:    0
  10228.   Statistics srv jobsqueued:  0
  10229.   Statistics srv sopens:      2
  10230.   Statistics srv stimedout:   0
  10231.   Statistics srv serrorout:   0
  10232.   Statistics srv pwerrors:    0
  10233.   Statistics srv permerrors:  0
  10234.   Statistics srv syserrors:   0
  10235.   Statistics srv bytessent:   160
  10236.   Statistics srv bytesrcvd:   5121
  10237.   Statistics srv avresponse:  157
  10238.   Statistics srv reqbufneed:  0
  10239.   Statistics srv bigbufneed:  0
  10240.  
  10241.  
  10242. ΓòÉΓòÉΓòÉ 12.29. NETUSE Get Info ΓòÉΓòÉΓòÉ
  10243.  
  10244. The function retrieves information about a connection to a shared resource. 
  10245.  
  10246. Syntax 
  10247.  
  10248.  
  10249. MyRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
  10250.  
  10251. Parameters 
  10252.  
  10253. The parameters specified are: 
  10254.  
  10255.  'useInfo'         The REXX variable receiving the result. The variable is 
  10256.                    divided into: 
  10257.  
  10258.                      o  useInfo.local 
  10259.  
  10260.                         The local device name being redirected to the shared 
  10261.                         resource 
  10262.  
  10263.                      o  useInfo.remote 
  10264.  
  10265.                         The UNC name of the remote resource being accessed The 
  10266.                         string has the following form \\servername\netname 
  10267.  
  10268.                      o  useInfo.password 
  10269.  
  10270.                         This value is not available (N/A) 
  10271.  
  10272.                      o  useInfo.status 
  10273.  
  10274.                         The status of the connection 
  10275.  
  10276.                      o  useInfo.asg_type 
  10277.  
  10278.                         The resource type 
  10279.  
  10280.                      o  useInfo.refcount 
  10281.  
  10282.                         The number of files, directories, and other processes 
  10283.                         that are open on the remote resource 
  10284.  
  10285.                      o  useInfo.usecount 
  10286.  
  10287.                         The number of uses 
  10288.  
  10289.  SrvName           The server computer name 
  10290.  
  10291.  NetworkName       The network name 
  10292.  
  10293.                      o  If the connection is a device name connection, then the 
  10294.                         name specified must be the name of the local device 
  10295.  
  10296.                      o  If the connection is a UNC connection, then the name 
  10297.                         specified must be the UNC name 
  10298.  
  10299.  Note 
  10300.  
  10301.  The server computer name can be specified as '' for a local server or 
  10302.  computer. 
  10303.  
  10304.  Example 
  10305.  
  10306.  
  10307.   /* Get net use information */
  10308.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10309.   call LoadLsRxutFuncs
  10310.  
  10311.   NETUSE      = 270
  10312.   SrvName     = '\\FSC30DCR'
  10313.   NetworkName = 'T:'
  10314.  
  10315.   myRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
  10316.  
  10317.   if myRc <> '0' then do
  10318.    say 'Got error from NetGetInfo() ' myRc
  10319.    call DropLsRxutFuncs
  10320.    exit 9
  10321.   end
  10322.  
  10323.   say
  10324.   say 'Local device name: ' useInfo.local
  10325.   say 'UNC name:          ' useInfo.remote
  10326.   say 'Password:          ' useInfo.password
  10327.   say 'Connection status: ' useInfo.status
  10328.   say 'Resource type:     ' useInfo.asg_type
  10329.   say 'Open count:        ' useInfo.refcount
  10330.   say 'Number uses:       ' useInfo.usecount
  10331.  
  10332.   call DropLsRxutFuncs
  10333.   call RxFuncDrop 'LoadLsRxutFuncs'
  10334.  
  10335.   exit 0
  10336.  
  10337.  Example Output 
  10338.  
  10339.  
  10340.   Local device name:  T:
  10341.   UNC name:           \\FSC30DCR\FORALL
  10342.   Password:           N/A
  10343.   Connection status:  Connection valid
  10344.   Resource type:      Disk device
  10345.   Open count:         1
  10346.   Number uses:        1
  10347.  
  10348.  
  10349. ΓòÉΓòÉΓòÉ 12.30. NETUSER Get Info ΓòÉΓòÉΓòÉ
  10350.  
  10351. The function retrieves information about a particular user account on a server. 
  10352.  
  10353. Syntax 
  10354.  
  10355.  
  10356. MyRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
  10357.  
  10358. Parameters 
  10359.  
  10360. The parameters specified are: 
  10361.  
  10362.  'userInfo'  The REXX variable receiving the result. The variable is divided 
  10363.              into: 
  10364.  
  10365.                o  userInfo.name 
  10366.  
  10367.                   The user account name 
  10368.  
  10369.                o  userInfo.password_age 
  10370.  
  10371.                   The password age in seconds 
  10372.  
  10373.                o  userInfo.priv 
  10374.  
  10375.                   The user account privilege level. The following values are 
  10376.                   returned: 
  10377.  
  10378.                                     Account type                     Value
  10379.                                     ------------                     -----
  10380.                                     Guest                            'Guest'
  10381.                                     User                             'User'
  10382.                                     Administrator                    'Admin'
  10383.  
  10384.                o  userInfo.home_dir 
  10385.  
  10386.                   The user home directory, if one is specified 
  10387.  
  10388.                o  userInfo.comment 
  10389.  
  10390.                   The user account comment 
  10391.  
  10392.                o  userInfo.flags 
  10393.  
  10394.                   User account flags. See below for the numeric values 
  10395.                   returned: 
  10396.  
  10397.                                     Manifest           Value  Meaning
  10398.                                     --------           -----  --------------------------------------
  10399.                                     SCRIPT               1    Must be 1.  Logon script enabled
  10400.                                     ACCOUNTDISABLE       2    If 2, user's account disabled
  10401.                                     DELETE_PROHIBITED    4    If 4, user's account cannot be deleted
  10402.                                     HOMEDIR_REQUIRED     8    If 8, home directory required
  10403.                                     PASSWD_NOTREQD      32    If 32, password not required
  10404.                                     PASSWD_CANT_CHANGE  64    If 64, user cannot change password
  10405.  
  10406.                   Use bitwise and to retrieve the actual settings 
  10407.  
  10408.                o  userInfo.script_path 
  10409.  
  10410.                   The name of the logon script together with the path 
  10411.                   specification relative to the NETLOGON SCRIPT parameter 
  10412.  
  10413.                o  userInfo.auth_flags 
  10414.  
  10415.                   The operator privileges granted to the user.  These 
  10416.                   privileges include accounts, print, comm, and server.  See 
  10417.                   below for the character values returned: 
  10418.  
  10419.                                     Value  Meaning
  10420.                                     -----  -------------------------------
  10421.                                       P    Print operator privilege is enabled.
  10422.                                       C    Comm operator privilege is enabled.
  10423.                                       S    Server operator privilege is enabled.
  10424.                                       A    Accounts operator privilege is enabled.
  10425.  
  10426.                   A value of PC is equal to print and comm operator privilige 
  10427.  
  10428.                o  userInfo.full_name 
  10429.  
  10430.                   The full name of the user 
  10431.  
  10432.                o  userInfo.usr_comment 
  10433.  
  10434.                   The account comment which is a user-settable comment 
  10435.  
  10436.                o  userInfo.parms 
  10437.  
  10438.                   The user account parameters 
  10439.  
  10440.                o  userInfo.workstations 
  10441.  
  10442.                   The workstation restriction for the user 
  10443.  
  10444.                o  userInfo.last_logon 
  10445.  
  10446.                   The last logon time 
  10447.  
  10448.                o  userInfo.last_logoff 
  10449.  
  10450.                   The last logoff time 
  10451.  
  10452.                o  userInfo.acct_expires 
  10453.  
  10454.                   The time the user account expires 
  10455.  
  10456.                o  userInfo.max_storage 
  10457.  
  10458.                   The maximum storage allotted for the home directory 
  10459.  
  10460.                o  userInfo.unit_per_week 
  10461.  
  10462.                   The number of hours within a week (7 * 24 = 168) 
  10463.  
  10464.                o  userInfo.restricted_hours 
  10465.  
  10466.                   Logon restriction on certain hours 
  10467.  
  10468.                o  userInfo.i.logon_hours 
  10469.  
  10470.                   The logon hours allowed. 0 means 0 to 0:59, 1 1:00 to 1:59. 
  10471.                   The variable i has a value from 1 to 7, where 1 is Sunday, 2 
  10472.                   Monday etc.. The logon_hours are only valid if 
  10473.                   userInfo.restricted_hours differs from the value '-none-' 
  10474.  
  10475.                o  userInfo.bad_pw_count 
  10476.  
  10477.                   The number of attempts to validate a bad password 
  10478.  
  10479.                o  userInfo.num_logons 
  10480.  
  10481.                   The number of successful logons 
  10482.  
  10483.                o  userInfo.logon_server 
  10484.  
  10485.                   The computer to handle logon requests for a user account 
  10486.  
  10487.                o  userInfo.country_code 
  10488.  
  10489.                   The country code for the user 
  10490.  
  10491.                o  userInfo.code_page 
  10492.  
  10493.                   The country code page for the user 
  10494.  
  10495.  SrvName     The server compter name of the domain controller 
  10496.  
  10497.  UserId      The name of the userid 
  10498.  
  10499.  Note 
  10500.  
  10501.  The server computer name can be specified as '' for a local domain controller 
  10502.  
  10503.  Example 
  10504.  
  10505.  
  10506.   /* Get the user account information */
  10507.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10508.   call LoadLsRxutFuncs
  10509.  
  10510.   NETUSER = 280
  10511.   SrvName = '\\ILIDC'
  10512.   UserId  = 'FMAM'
  10513.  
  10514.   myRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
  10515.  
  10516.   if myRc <> '0' then do
  10517.    say 'Got error from NetGetInfo() ' myRc
  10518.    call DropLsRxutFuncs
  10519.    exit 9
  10520.   end
  10521.  
  10522.   say
  10523.   say 'The account name:     ' userInfo.name
  10524.   say 'Comment:              ' userInfo.comment
  10525.   say 'User comment:         ' userInfo.usr_comment
  10526.   say 'Full name:            ' userInfo.full_name
  10527.   say 'Account privilege:    ' userInfo.priv
  10528.   say 'Password age:         ' userInfo.password_age
  10529.   say 'Home directory:       ' userInfo.home_dir
  10530.   say 'User parameters:      ' userInfo.parms
  10531.   say 'Last logon:           ' userInfo.last_logon
  10532.   say 'Last logoff:          ' userInfo.last_logoff
  10533.   say 'Bad password count:   ' userInfo.bad_pw_count
  10534.   say 'Number logons:        ' userInfo.num_logons
  10535.   say 'Logon Server:         ' userInfo.logon_server
  10536.   say 'Country Code:         ' userInfo.country_code
  10537.   say 'Code page:            ' userInfo.code_page
  10538.   say 'Workstations allowed: ' userInfo.workstations
  10539.   say 'Auth_flags:           ' userInfo.auth_flags
  10540.   say 'Account Flags:        ' userInfo.flags
  10541.   say 'Max. disk storage:    ' userInfo.max_storage
  10542.   say 'Hours per week:       ' userInfo.units_per_week
  10543.  
  10544.   if userInfo.restricted_hours <> '-none-' then do
  10545.    say
  10546.    say 'Logon hours from Sunday = 1 to Saterday = 7'
  10547.    say
  10548.  
  10549.    do i=1 to 7
  10550.     say 'Day: ' i 'Hours: ' userInfo.i.logon_hours
  10551.    end
  10552.  
  10553.   end
  10554.  
  10555.   call DropLsRxutFuncs
  10556.   call RxFuncDrop 'LoadLsRxutFuncs'
  10557.  
  10558.   exit 0
  10559.  
  10560.  Example Output 
  10561.  
  10562.  
  10563.   The account name:      FMAM
  10564.   Comment:               Section Manager in N91
  10565.   User comment:          -none-
  10566.   Full name:             Section A Manager Mr Fm Am
  10567.   Account privilege:     User
  10568.   Password age:          7445
  10569.   Home directory:        -none-
  10570.   User parameters:       -none-
  10571.   Last logon:            Unknown
  10572.   Last logoff:           Unknown
  10573.   Bad password count:    1
  10574.   Number logons:         Unknown
  10575.   Logon Server:          \\*
  10576.   Country Code:          000
  10577.   Code page:             0
  10578.   Workstations allowed:  No Restriction
  10579.   Auth_flags:            P
  10580.   Account Flags:         S
  10581.   Max. disk storage:     No Limit
  10582.   Hours per week:        168
  10583.  
  10584.   Logon hours from Sunday = 1 to Saterday = 7
  10585.  
  10586.   Day:  1 Hours:
  10587.   Day:  2 Hours:   8 9 10 11 12 13 14 15 16 17
  10588.   Day:  3 Hours:   8 9 10 11 12 13 14 15 16 17
  10589.   Day:  4 Hours:   8 9 10 11 12 13 14 15 16 17
  10590.   Day:  5 Hours:   8 9 10 11 12 13 14 15 16 17
  10591.   Day:  6 Hours:   8 9 10 11 12 13 14 15 16 17
  10592.   Day:  7 Hours:
  10593.  
  10594.  
  10595. ΓòÉΓòÉΓòÉ 12.31. NETUSERGROUPS Get Info ΓòÉΓòÉΓòÉ
  10596.  
  10597. The function lists the names of all groups in the user accounts subsystem (UAS) 
  10598. database to which a particular user account belongs. This function is identical 
  10599. to NetEnumerate(NETUSERGROUPS). 
  10600.  
  10601. Syntax 
  10602.  
  10603.  
  10604. MyRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  10605.  
  10606. Parameters 
  10607.  
  10608. The parameters specified are: 
  10609.  
  10610.  'userGroups'      The REXX variable receiving the result. The variable is 
  10611.                    divided into: 
  10612.  
  10613.                      o  userGroups.0 
  10614.  
  10615.                         The number of groups in which the user account has a 
  10616.                         entry 
  10617.  
  10618.                      o  userGroups.i 
  10619.  
  10620.                         The actual group name 
  10621.  
  10622.  SrvName           The server computer name of the domain controller 
  10623.  
  10624.  UserId            The name of the userid 
  10625.  
  10626.  Note 
  10627.  
  10628.  The server computer name can be specified as '' for a local domain controller 
  10629.  
  10630.  Example 
  10631.  
  10632.  
  10633.   /* Get the groups in which a user is defined */
  10634.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10635.   call LoadLsRxutFuncs
  10636.  
  10637.   NETUSERGROUPS = 330
  10638.   SrvName = '\\ILIDC'
  10639.   UserId = 'FMAM'
  10640.  
  10641.   myRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  10642.  
  10643.   if myRc <> '0' then do
  10644.    say 'Got error from NetGetInfo() ' myRc
  10645.    call DropLsRxutFuncs
  10646.    exit 9
  10647.   end
  10648.  
  10649.   if userGroups.0 = 0 then do
  10650.    say 'User account belongs to no group'
  10651.    call DropLsRxutFuncs
  10652.    exit 0
  10653.   end
  10654.  
  10655.   say 'Number of entries: ' userGroups.0
  10656.   say
  10657.  
  10658.   do i=1 to userGroups.0
  10659.    say 'Group Name: ' userGroups.i
  10660.   end
  10661.  
  10662.   call DropLsRxutFuncs
  10663.   call RxFuncDrop 'LoadLsRxutFuncs'
  10664.  
  10665.   exit 0
  10666.  
  10667.  Example Output 
  10668.  
  10669.  
  10670.   Number of entries:  3
  10671.  
  10672.   Group Name:  MANAGERS
  10673.   Group Name:  HR_PRINT
  10674.   Group Name:  USERS
  10675.  
  10676.  
  10677. ΓòÉΓòÉΓòÉ 12.32. NETUSERMODALS Get Info ΓòÉΓòÉΓòÉ
  10678.  
  10679. The function gets global modals related information for all user accounts and 
  10680. groups in the user accounts subsystem (UAS) database. 
  10681.  
  10682. Syntax 
  10683.  
  10684.  
  10685. MyRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
  10686.  
  10687. Parameters 
  10688.  
  10689. The parameters specified are: 
  10690.  
  10691.  'userModalsInfo'  The REXX variable receiving the result. The variable is 
  10692.                    divided into: 
  10693.  
  10694.                      o  userModalsInfo.min_passwd_len 
  10695.  
  10696.                         The minimum password length 
  10697.  
  10698.                      o  userModalsInfo.max_passwd_age 
  10699.  
  10700.                         The maximum password age in days 
  10701.  
  10702.                      o  userModalsInfo.min_passwd_age 
  10703.  
  10704.                         The minimum password age in days 
  10705.  
  10706.                      o  userModalsInfo.force_logoff 
  10707.  
  10708.                         The length of time (in seconds) after the valid logon 
  10709.                         hours that the user should be forced off the network 
  10710.  
  10711.                      o  userModalsInfo.password_hist_len 
  10712.  
  10713.                         The length of the password history, that is, the number 
  10714.                         of passwords in the history buffer that are scanned 
  10715.                         versus the new password in a password change attempt 
  10716.  
  10717.  SrvName           The server computer name of the domain controller 
  10718.  
  10719.  Note 
  10720.  
  10721.  The server computer name can be specified as '' for a local domain controller. 
  10722.  
  10723.  Example 
  10724.  
  10725.  
  10726.   /* Get user modals information */
  10727.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10728.   call LoadLsRxutFuncs
  10729.  
  10730.   NETUSERMODALS = 360
  10731.   SrvName       = '\\ILIDC'
  10732.  
  10733.   myRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
  10734.  
  10735.   if myRc <> '0' then do
  10736.    say 'Got error from NetGetInfo() ' myRc
  10737.    call DropLsRxutFuncs
  10738.    exit 9
  10739.   end
  10740.  
  10741.   say
  10742.   say 'Minimum password length: ' userModalsInfo.min_passwd_len
  10743.   say 'Maximum password age:    ' userModalsInfo.max_passwd_age
  10744.   say 'Minimum password age:    ' userModalsInfo.min_passwd_age
  10745.   say 'Forced logoff time:      ' userModalsInfo.force_logoff
  10746.   say 'Password history length: ' userModalsInfo.password_hist_len
  10747.  
  10748.   call DropLsRxutFuncs
  10749.   call RxFuncDrop 'LoadLsRxutFuncs'
  10750.  
  10751.   exit 0
  10752.  
  10753.  Example Output 
  10754.  
  10755.  
  10756.   Minimum password length:  4
  10757.   Maximum password age:     Unlimited
  10758.   Minimum password age:     No delay required
  10759.   Forced logoff time:       Never
  10760.   Password history length:  8
  10761.  
  10762.  
  10763. ΓòÉΓòÉΓòÉ 12.33. NETWKSTA Get Info ΓòÉΓòÉΓòÉ
  10764.  
  10765. The function returns information about the configuration components of the LAN 
  10766. requester component. 
  10767.  
  10768. Syntax 
  10769.  
  10770.  
  10771. MyRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
  10772.  
  10773. Parameters 
  10774.  
  10775. The parameters specified are: 
  10776.  
  10777.  'wkstaInfo'   The REXX variable receiving the result. The variable is divided 
  10778.                into: 
  10779.  
  10780.                  o  wkstaInfo.root 
  10781.  
  10782.                     A string containing the path to the IBMLAN directory of the 
  10783.                     computer 
  10784.  
  10785.                  o  wkstaInfo.computername 
  10786.  
  10787.                     The computer name of the requester being queried 
  10788.  
  10789.                  o  wkstaInfo.username 
  10790.  
  10791.                     A string containing the name of the user who is logged on 
  10792.                     to the requester 
  10793.  
  10794.                  o  wkstaInfo.langroup 
  10795.  
  10796.                     A string containing the name of the domain to which the 
  10797.                     requester belongs 
  10798.  
  10799.                  o  wkstaInfo.ver_major 
  10800.  
  10801.                     The major software version (Version) 
  10802.  
  10803.                  o  wkstaInfo.ver_minor 
  10804.  
  10805.                     The minor software version (Release) 
  10806.  
  10807.                  o  wkstaInfo.charwait 
  10808.  
  10809.                     The number of seconds the requester waits for a remote 
  10810.                     serial or communication device to become available 
  10811.  
  10812.                  o  wkstaInfo.chartime 
  10813.  
  10814.                     The number of milliseconds the requester waits to collect 
  10815.                     data to send to a remote serial or communication device 
  10816.  
  10817.                  o  wkstaInfo.charcount 
  10818.  
  10819.                     The number of bytes of information the requester sends to a 
  10820.                     remote serial or communication device 
  10821.  
  10822.                  o  wkstaInfo.keepconn 
  10823.  
  10824.                     The number of seconds an inactive connection from the 
  10825.                     requester to a resource of a server is maintained 
  10826.  
  10827.                  o  wkstaInfo.keepsearch 
  10828.  
  10829.                     The number of seconds an inactive search continues 
  10830.  
  10831.                  o  wkstaInfo.maxthreads 
  10832.  
  10833.                     The number of threads the requester can dedicate to the 
  10834.                     network 
  10835.  
  10836.                  o  wkstaInfo.maxcmds 
  10837.  
  10838.                     The number of simultaneous network device driver commands 
  10839.                     that can be sent to the network 
  10840.  
  10841.                  o  wkstaInfo.numworkbuf 
  10842.  
  10843.                     The number of internal buffers the requester has 
  10844.  
  10845.                  o  wkstaInfo.sizworkbuf 
  10846.  
  10847.                     The size (in bytes) of each internal buffer 
  10848.  
  10849.                  o  wkstaInfo.maxwrkcache 
  10850.  
  10851.                     The maximum size (in bytes) of an internal cache buffer 
  10852.  
  10853.                  o  wkstaInfo.sesstimeout 
  10854.  
  10855.                     The number of seconds before an inactive session between a 
  10856.                     requester and a server is discontinued 
  10857.  
  10858.                  o  wkstaInfo.sizerror 
  10859.  
  10860.                     The size (in bytes) of an internal error buffer 
  10861.  
  10862.                  o  wkstaInfo.numalerts 
  10863.  
  10864.                     The maximum number of clients that can receive alert 
  10865.                     messages 
  10866.  
  10867.                  o  wkstaInfo.numservices 
  10868.  
  10869.                     The number of services that can be started on the requester 
  10870.                     at any time 
  10871.  
  10872.                  o  wkstaInfo.errlogsz 
  10873.  
  10874.                     The maximum size (in KB) of the error log file of the 
  10875.                     requester 
  10876.  
  10877.                  o  wkstaInfo.printbuftime 
  10878.  
  10879.                     The number of seconds closing print jobs are closed 
  10880.  
  10881.                  o  wkstaInfo.numcharbuf 
  10882.  
  10883.                     The number of character pipe buffers and device buffers the 
  10884.                     requester can have 
  10885.  
  10886.                  o  wkstaInfo.sizcharbuf 
  10887.  
  10888.                     The maximum size (in bytes) of a character pipe buffer and 
  10889.                     device buffer 
  10890.  
  10891.                  o  wkstaInfo.logon_server 
  10892.  
  10893.                     A string containing the name of the preferred server, which 
  10894.                     validates user logon requests for this userid 
  10895.  
  10896.                  o  wkstaInfo.wrkheuristics 
  10897.  
  10898.                     A string of flags used to control a requesters operation 
  10899.  
  10900.                  o  wkstaInfo.mailslots 
  10901.  
  10902.                     Specifies whether mailslots are allowed. If the value is 0, 
  10903.                     mailslots are not supported on this machine, and Netlogon 
  10904.                     service will not start 
  10905.  
  10906.                  o  wkstaInfo.logon_domain 
  10907.  
  10908.                     Names the domain to which the user is logged on. If no one 
  10909.                     is logged on, it is returned as -none- 
  10910.  
  10911.                  o  wkstaInfo.oth_domains 
  10912.  
  10913.                     A string listing all domains on which the machine currently 
  10914.                     is listed 
  10915.  
  10916.                  o  wkstaInfo.numdgrambuf 
  10917.  
  10918.                     The number of buffers allocated for receiving datagrams 
  10919.  
  10920.  SrvName       The server computer name 
  10921.  
  10922.  Note 
  10923.  
  10924.  The server computer name can be specified as '' for a local server or 
  10925.  requester. 
  10926.  
  10927.  Example 
  10928.  
  10929.  
  10930.   /* Get wksta information */
  10931.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  10932.   call LoadLsRxutFuncs
  10933.  
  10934.   NETWKSTA = 350
  10935.   SrvName  = '\\ILIDC'
  10936.  
  10937.   myRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
  10938.  
  10939.   if myRc <> '0' then do
  10940.    say 'Got error from NetGetInfo() ' myRc
  10941.    call DropLsRxutFuncs
  10942.    exit 9
  10943.   end
  10944.  
  10945.   say
  10946.   say 'Computer Name:        ' wkstaInfo.computername
  10947.   say 'User Id logged on:    ' wkstaInfo.username
  10948.   say 'LAN Group:            ' wkstaInfo.langroup
  10949.   say 'Major version number: ' wkstaInfo.ver_major
  10950.   say 'Minor version number: ' wkstaInfo.ver_minor
  10951.   say 'Logon domain:         ' wkstaInfo.logon_domain
  10952.   say 'Other domains:        ' wkstaInfo.oth_domains
  10953.  
  10954.   call DropLsRxutFuncs
  10955.   call RxFuncDrop 'LoadLsRxutFuncs'
  10956.  
  10957.   exit 0
  10958.  
  10959.  Example Output 
  10960.  
  10961.  
  10962.   Computer Name:         \\ILIDC
  10963.   User Id logged on:     LINDBERG
  10964.   LAN Group:             ILI
  10965.   Major version number:  3
  10966.   Minor version number:  0
  10967.   Logon domain:          ILI
  10968.   Other domains:         -none-
  10969.  
  10970.  
  10971. ΓòÉΓòÉΓòÉ 13. NetMisc ΓòÉΓòÉΓòÉ
  10972.  
  10973. The NetMisc() function contains a set of functions that are outsite the normal 
  10974. add, delete, enumerate, get and get operations. 
  10975.  
  10976. The Net Misc functions are family of functions that can be called with a number 
  10977. of parameters. The use of the function NetMisc() has a minimum of two different 
  10978. parameters. The generic syntax is: 
  10979.  
  10980.  
  10981. MyRc = NetMisc(option, 'stemvar', parm1, parm2, parm3)
  10982. MyRc = NetMisc(option, parm1, parm2, parm3)
  10983.  
  10984. The option parameter contains a value to determine what type or option has to 
  10985. be handled. 
  10986.  
  10987. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  10988.  
  10989. The MyRc parameter is the return code that will have an value from the 
  10990. NetMisc() function. If the call is successful the character '0' will be 
  10991. returned. Otherwise an error code and descriptive text are inserted by the 
  10992. NetMisc() function. 
  10993.  
  10994. The option parameter values are defined in Option parameter values. 
  10995.  
  10996.  
  10997. ΓòÉΓòÉΓòÉ 13.1. NetMisc(NETACCESSCHECK) ΓòÉΓòÉΓòÉ
  10998.  
  10999. The function verifies that a userid has the proper access permission for a 
  11000. particular resource. 
  11001.  
  11002. A successful call to this function can be issued only from an OS/2 application 
  11003. to the local computer. If you are using a redirected drive as parameter, the 
  11004. return code of the function will be 2222. 
  11005.  
  11006. Syntax 
  11007.  
  11008.  
  11009. MyRc = NetMisc(NETACCESSCHECK, 'aclInfo', UserId, Resource)
  11010.  
  11011. Parameters 
  11012.  
  11013. The parameters required and returned are: 
  11014.  
  11015.  'aclInfo'         The access control profile information variable, which is 
  11016.                    divided into: 
  11017.  
  11018.                      o  aclInfo.access 
  11019.  
  11020.                         The access rights to query. The access control flags 
  11021.                         are as defined follows: 
  11022.  
  11023.                           -  N None 
  11024.  
  11025.                           -  A Attribute 
  11026.  
  11027.                           -  R Read 
  11028.  
  11029.                           -  W Write 
  11030.  
  11031.                           -  C Create 
  11032.  
  11033.                           -  X Execute 
  11034.  
  11035.                           -  D Delete 
  11036.  
  11037.                           -  P Permissions 
  11038.  
  11039.                           -  G This is a Group permission 
  11040.  
  11041.                      o  aclInfo.return 
  11042.  
  11043.                         The returned value from the function call. If the value 
  11044.                         is  0, the access is granted as specified, otherwise 
  11045.                         the access will not be granted (return = 5, Access 
  11046.                         Denied) 
  11047.  
  11048.  UserId            The user account name 
  11049.  
  11050.  Resource          The resource specification 
  11051.  
  11052.  Example 
  11053.  
  11054.  
  11055.   /* Check access to a resource for a userid */
  11056.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11057.   call LoadLsRxutFuncs
  11058.  
  11059.   NETACCESSCHECK = 420
  11060.   Resource       = 'C:\IBMLAN\DCDB'
  11061.   UserId         = 'TEST1'
  11062.   aclInfo.access = 'RWC'  /* Not 0 in return */
  11063.  
  11064.   /* aclInfo.access = 'R' Should return 0 */
  11065.  
  11066.   myRc = NetMisc(NETACCESSCHECK, 'aclInfo', UserId, Resource)
  11067.  
  11068.   if myRc <> '0' then do
  11069.    say 'Got error from NetMisc() ' myRc
  11070.    exitRc = 9
  11071.   end
  11072.   else do
  11073.    say 'User access checked successfully'
  11074.    say '0 ok, otherwise bad. Access is'  aclInfo.return
  11075.   end
  11076.  
  11077.   call DropLsRxutFuncs
  11078.   call RxFuncDrop 'LoadLsRxutFuncs'
  11079.  
  11080.   exit exitRc
  11081.  
  11082.  Example Output 
  11083.  
  11084.  
  11085.   User access checked successfully
  11086.   0 ok, otherwise bad. Access is  0
  11087.  
  11088.  
  11089. ΓòÉΓòÉΓòÉ 13.2. NetMisc(NETACCESSAPPLY) (LS40) ΓòÉΓòÉΓòÉ
  11090.  
  11091. The function replicates a defined permission record, applying it to all 
  11092. subdirectories under the directory specified. 
  11093.  
  11094. The function updates the access permission for any file within the directory 
  11095. tree that already has an access permission record. It does not create a record 
  11096. for a file that does not already have one. 
  11097.  
  11098. This function does not replace existing audit trail settings, but it does apply 
  11099. the audit settings of the specified directory to any of its subdirectories that 
  11100. have no audit settings. 
  11101.  
  11102. This function will not apply an access permission record to any of the 
  11103. following OS/2 LAN Server system subdirectories: 
  11104.  
  11105. \IBMLAN
  11106. \IBMLAN\DCDB and its subdirectories
  11107. \IBMLAN\NETPROG and its subdirectories
  11108. \IBMLAN\DOSLAN and its subdirectories
  11109.  
  11110. Syntax 
  11111.  
  11112.  
  11113. MyRc = NetMisc(NETACCESSAPPLY, 'applyInfo', SrvName, DirResource)
  11114.  
  11115. Parameters 
  11116.  
  11117. The parameters required and returned are: 
  11118.  
  11119.  'applyInfo'       The access control profile error information variable, which 
  11120.                    is valid only in case of apply errors 
  11121.  
  11122.                      o  applyInfo.error_buf 
  11123.  
  11124.                         A string specifying the complete path name of the 
  11125.                         resource that contributed to the failure of the apply 
  11126.                         function 
  11127.  
  11128.                      o  applyInfo.error_code 
  11129.  
  11130.                         The error code returned when the ACL for resource 
  11131.                         specified in applyInfo.error_buf was changed 
  11132.  
  11133.  SrvName           The computer name of the server where the directory resource 
  11134.                    resides 
  11135.  
  11136.  DirResource       The directory resource specification 
  11137.  
  11138.  Example 
  11139.  
  11140.  
  11141.   /* Apply access control profile to resource */
  11142.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11143.   call LoadLsRxutFuncs
  11144.  
  11145.   NETACCESSAPPLY = 520
  11146.   SrvName        = '\\DOMAIN_CONTRLR'
  11147.   DirResource    = 'C:\TEST'        /* Resource on the server */
  11148.  
  11149.   myRc = NetMisc(NETACCESSAPPLY, 'applyInfo', SrvName, DirResource)
  11150.  
  11151.   if myRc <> '0' then do
  11152.    say 'Got error from NetMisc() ' myRc
  11153.    say 'Error Code from Apply' applyInfo.error_code
  11154.    say 'Apply function failed at'
  11155.    say applyInfo.error_buf
  11156.    exitRc = 9
  11157.   end
  11158.   else do
  11159.    say 'Apply function was successfull'
  11160.   end
  11161.  
  11162.   call DropLsRxutFuncs
  11163.   call RxFuncDrop 'LoadLsRxutFuncs'
  11164.  
  11165.   exit exitRc
  11166.  
  11167.  Example Output 
  11168.  
  11169.  
  11170.   Apply function was successfull
  11171.  
  11172.  
  11173. ΓòÉΓòÉΓòÉ 13.3. NetMisc(NETAUDITLOGCLEAR) ΓòÉΓòÉΓòÉ
  11174.  
  11175. The function clears and optionally saves the audit log file of a computer. 
  11176.  
  11177. Syntax 
  11178.  
  11179.  
  11180. MyRc = NetMisc(NETAUDITLOGCLEAR, SrvName, save2File)
  11181.  
  11182. Parameters 
  11183.  
  11184. The parameters required and returned are: 
  11185.  
  11186.  SrvName     The computer name of the server to perform the operation on. If 
  11187.              the computer is local use '' as the value for the server name 
  11188.  
  11189.  save2File   A string assigning a name for an optional backup file. The calling 
  11190.              application must have write privileges for the path specified by 
  11191.              this parameter. If the path name is relative, it is assumed to be 
  11192.              relative to the IBMLAN\LOGS directory 
  11193.  
  11194.  Example 
  11195.  
  11196.  
  11197.   /* Clear the audit log file and make a backup copy of it */
  11198.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11199.   call LoadLsRxutFuncs
  11200.  
  11201.   NETERRORLOGCLEAR = 580
  11202.   SrvName          = '\\DOMAIN_CONTRLR'
  11203.   save2File        = 'AUDITLOG.001'
  11204.  
  11205.   myRc = NetMisc(NETAUDITLOGCLEAR, SrvName, save2File)
  11206.  
  11207.   if myRc <> '0' then do
  11208.    say 'Got error from NetMisc() ' myRc
  11209.    exitRc = 9
  11210.   end
  11211.   else do
  11212.    say 'The operation completed successfully'
  11213.    exitRc = 0
  11214.   end
  11215.  
  11216.   call DropLsRxutFuncs
  11217.   call RxFuncDrop 'LoadLsRxutFuncs'
  11218.  
  11219.   exit exitRc
  11220.  
  11221.  Example Output 
  11222.  
  11223.  
  11224.   The operation completed successfully
  11225.  
  11226.  
  11227. ΓòÉΓòÉΓòÉ 13.4. NetMisc(NETDASDCHECK) (LS40) ΓòÉΓòÉΓòÉ
  11228.  
  11229. The function returns the amount of disk space available and the amount already 
  11230. taken in a specified directory tree. Before this function can be invoked 
  11231. successfully, directory limits must be enabled on the 386-HPFS drive. (See the 
  11232. NetMisc(NETDASDCONTROL) function) 
  11233.  
  11234. Syntax 
  11235.  
  11236.  
  11237. MyRc = NetMisc(NETDASDCHECK, 'DASDInfo', SrvName)
  11238.  
  11239. Parameters 
  11240.  
  11241. The parameters required and returned are: 
  11242.  
  11243.  'DASDInfo'  The directory limits information variable, which is divided into: 
  11244.  
  11245.                o  DASDInfo.DirPath 
  11246.  
  11247.                   The directory path to check. If a redirected drive is 
  11248.                   specified for DASDInfo.DirPath, the server name parameter 
  11249.                   value must be '' 
  11250.  
  11251.                   This parameter must be specified 
  11252.  
  11253.                o  DASDInfo.path 
  11254.  
  11255.                   The directory that limits the space available, beginning with 
  11256.                   the drive letter 
  11257.  
  11258.                o  DASDInfo.avail 
  11259.  
  11260.                   The available disk space (in KB) remaining in the entire tree 
  11261.                   of the specified directory 
  11262.  
  11263.                o  DASDInfo.usage 
  11264.  
  11265.                   The amount of disk space (in KB) already occupied in the 
  11266.                   directory indicated by DASDInfo.path 
  11267.  
  11268.  SrvName     The computer name of the server to perform the check on. If a 
  11269.              redirected drive is specified for DASDInfo.DirPath, the server 
  11270.              name parameter value must be '' 
  11271.  
  11272.  Example 
  11273.  
  11274.  
  11275.   /* Check DASD directory limits on server */
  11276.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11277.   call LoadLsRxutFuncs
  11278.  
  11279.   NETDASDCHECK     = 730
  11280.   DASDInfo.DirPath = 'D:\APPS\DATA'
  11281.   SrvName          = '\\DOMAIN_CONTRLR'
  11282.  
  11283.   myRc = NetMisc(NETDASDCHECK, 'DASDInfo', SrvName)
  11284.  
  11285.   if myRc <> '0' then do
  11286.    say 'Got error from NetMisc() ' myRc
  11287.    exitRc = 9
  11288.   end
  11289.   else do
  11290.    say 'The Directory limits are'
  11291.    say 'Path           ' DASDInfo.path
  11292.    say 'Available Space' DASDInfo.avail
  11293.    say 'In use         ' DASDInfo.usage
  11294.    exitRc = 0
  11295.   end
  11296.  
  11297.   call DropLsRxutFuncs
  11298.   call RxFuncDrop 'LoadLsRxutFuncs'
  11299.  
  11300.   exit exitRc
  11301.  
  11302.  Example Output 
  11303.  
  11304.  
  11305.   The Directory limits are'
  11306.   Path            D:\APPS\DATA
  11307.   Available Space 512
  11308.   In use          201
  11309.  
  11310.  
  11311. ΓòÉΓòÉΓòÉ 13.5. NetMisc(NETDASDCONTROL) (LS40) ΓòÉΓòÉΓòÉ
  11312.  
  11313. The function prepares a 386-HPFS drive for directory limits. Before any other 
  11314. directory limits functions can be used on a drive, that drive must be enabled 
  11315. (only once) for directory limits by using either this function, the NET DASD 
  11316. command, or the OS/2 LAN Server Administration Graphical User Interface. 
  11317.  
  11318. Syntax 
  11319.  
  11320.  
  11321. MyRc = NetMisc(NETDASDCONTROL, 'DASDControl', SrvName)
  11322.  
  11323. Parameters 
  11324.  
  11325. The parameters required and returned are: 
  11326.  
  11327.  'DASDControl'  The directory limits control variable, which is divided into: 
  11328.  
  11329.                   o  DASDControl.CtlFlag 
  11330.  
  11331.                      The control function to be performed on the 386-HPFS 
  11332.                      drive. Available values for this control flag are: 
  11333.  
  11334.                                           Value Meaning
  11335.                                           ----- -------
  11336.                                            1    Enables directory limits support on the
  11337.                                                 specified drive
  11338.  
  11339.                                            2    Disables directory limits support on the
  11340.                                                 specified drive
  11341.  
  11342.                                            3    Recalculates the space used in all of the
  11343.                                                 directories of the drive specified that have
  11344.                                                 directory limits placed upon them
  11345.  
  11346.                      The default value is 1 (Enable directory limits) 
  11347.  
  11348.                   o  DASDControl.Drive 
  11349.  
  11350.                      The letter of the drive upon which the DASD control 
  11351.                      function is to operate. This drive must reside on the 
  11352.                      server specified by the SrvName parameter. The default 
  11353.                      drive value is 'C' 
  11354.  
  11355.  SrvName        The computer name of the server to perform the control on. The 
  11356.                 server name specified can be '' for a local server 
  11357.  
  11358.  Remark 
  11359.  
  11360.  If the call is executed on a remote server a timeout code might be returned if 
  11361.  no response is received from the server. This function might take up to 
  11362.  several minutes to complete execution, especially on a large drive. Therefore, 
  11363.  it can return a nonzero return code, while the remote function is still 
  11364.  running. If one of the following error codes is returned by a call to 
  11365.  NetMisc(NETDASDCONTROL), a timeout probably has occurred: 
  11366.  
  11367.   Value Meaning
  11368.   ----- -------
  11369.     64  The network name was deleted
  11370.     67  This network name cannot be found
  11371.    240  The session was canceled
  11372.   2141  The server is not configured for transactions
  11373.  
  11374.  These error codes do not mean necessarily that the NetMisc(NETDASDCONTROL) 
  11375.  function failed. The function might still be running remotely. 
  11376.  
  11377.  You can execute the function on the server in question to avoid this problem. 
  11378.  
  11379.  Example 
  11380.  
  11381.  
  11382.   /* Activate DASD directory limits on server */
  11383.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11384.   call LoadLsRxutFuncs
  11385.  
  11386.   NETDASDCONTROL      = 740
  11387.   DASDControl.CtlFlag = 1
  11388.   DASDControl.Drive   = 'C'
  11389.   SrvName             = '\\DOMAIN_CONTRLR'
  11390.  
  11391.   myRc = NetMisc(NETDASDCONTROL, 'DASDControl', SrvName)
  11392.  
  11393.   if myRc <> '0' then do
  11394.    say 'Got error from NetMisc() ' myRc
  11395.    exitRc = 9
  11396.   end
  11397.   else do
  11398.    say 'DASD Directory Limits enabled successfully'
  11399.    exitRc = 0
  11400.   end
  11401.  
  11402.   call DropLsRxutFuncs
  11403.   call RxFuncDrop 'LoadLsRxutFuncs'
  11404.  
  11405.   exit exitRc
  11406.  
  11407.  Example Output 
  11408.  
  11409.  
  11410.   DASD Directory Limits enabled successfully
  11411.  
  11412.  
  11413. ΓòÉΓòÉΓòÉ 13.6. NetMisc(NETERRORLOGCLEAR) ΓòÉΓòÉΓòÉ
  11414.  
  11415. The function clears and optionally saves the error log file of a computer. 
  11416.  
  11417. Syntax 
  11418.  
  11419.  
  11420. MyRc = NetMisc(NETERRORLOGCLEAR, SrvName, save2File)
  11421.  
  11422. Parameters 
  11423.  
  11424. The parameters required and returned are: 
  11425.  
  11426.  SrvName     The computer name of the server to perform the operation on. If 
  11427.              the computer is local use '' as the value for the server name 
  11428.  
  11429.  save2File   A string assigning a name for an optional backup file. The calling 
  11430.              application must have write privileges for the path specified by 
  11431.              this parameter. If the path name is relative, it is assumed to be 
  11432.              relative to the IBMLAN\LOGS directory 
  11433.  
  11434.  Example 
  11435.  
  11436.  
  11437.   /* Clear the error log file and make a backup copy of it */
  11438.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11439.   call LoadLsRxutFuncs
  11440.  
  11441.   NETERRORLOGCLEAR = 640
  11442.   SrvName          = '\\DOMAIN_CONTRLR'
  11443.   save2File        = 'ERRORLOG.001'
  11444.  
  11445.   myRc = NetMisc(NETERRORLOGCLEAR, SrvName, save2File)
  11446.  
  11447.   if myRc <> '0' then do
  11448.    say 'Got error from NetMisc() ' myRc
  11449.    exitRc = 9
  11450.   end
  11451.   else do
  11452.    say 'The operation completed successfully'
  11453.    exitRc = 0
  11454.   end
  11455.  
  11456.   call DropLsRxutFuncs
  11457.   call RxFuncDrop 'LoadLsRxutFuncs'
  11458.  
  11459.   exit exitRc
  11460.  
  11461.  Example Output 
  11462.  
  11463.  
  11464.   The operation completed successfully
  11465.  
  11466.  
  11467. ΓòÉΓòÉΓòÉ 13.7. NetMisc(NETERRORLOGREAD) ΓòÉΓòÉΓòÉ
  11468.  
  11469. The function returns read enries from the error log. 
  11470.  
  11471. Syntax 
  11472.  
  11473.  
  11474. MyRc = NetMisc(NETERRORLOGREAD, 'errInfo', SrvName)
  11475.  
  11476. Parameters 
  11477.  
  11478. The parameters required and returned are: 
  11479.  
  11480.  'errInfo'   The error information and control variable, which is divided into: 
  11481.  
  11482.                o  errInfo.openflags 
  11483.  
  11484.                   The read operation control flags. The values controlling the 
  11485.                   read operation are: 
  11486.  
  11487.                                     Value Read direction
  11488.                                     ----- --------------
  11489.                                       0   Read the oldest records in the error log first
  11490.  
  11491.                                       1   Read the newest records first
  11492.  
  11493.  
  11494.                                     Value Record read options
  11495.                                     ----- -------------------
  11496.                                       0   Read sequentially from the beginning
  11497.  
  11498.                                       2   Read from the nth. record specified
  11499.                                           in the errInfo.offset parameter
  11500.  
  11501.                   A value of 3 for this variable is identical to read the 
  11502.                   newest records first and read from the record number as 
  11503.                   specified in the errInfo.offset parameter errInfo.openflags 
  11504.  
  11505.                   The default value is 0 which is identical to read the oldest 
  11506.                   records first and read sequentially 
  11507.  
  11508.                o  errInfo.offset 
  11509.  
  11510.                   This parameter specifies the record number the read operation 
  11511.                   should be starting from. It requires that the 
  11512.                   errInfo.openflags has the value 2 included 
  11513.  
  11514.                o  errInfo.buffer 
  11515.  
  11516.                   The size of the internal working buffer. The value has a 
  11517.                   maximum of 64KB. The default value is 4KB. 
  11518.  
  11519.                o  errInfo.resume 
  11520.  
  11521.                   The error log can be processed in multiple steps. Specify 
  11522.                   'INITRESUME' first time and 'RESUME' in next following calls 
  11523.                   to the procedure. See also errInfo.bytesavail 
  11524.  
  11525.                   The default operation is to neglect this parameter 
  11526.  
  11527.                o  errInfo.bytesavail 
  11528.  
  11529.                   The errInfo.bytesavail variable returns information about the 
  11530.                   amount if data available. It is only valid if errInfo.resume 
  11531.                   is specified. 
  11532.  
  11533.                   If errInfo.bytesavail is not 0, then more data is available 
  11534.                   in the error log. Continue to call the function with 
  11535.                   errInfo.resume equal to 'RESUME' until the parameter 
  11536.                   errInfo.bytesavail returns a 0 value 
  11537.  
  11538.                o  errInfo.count 
  11539.  
  11540.                   The number of error log entries returned. The value can be 0 
  11541.  
  11542.                o  errInfo.i.time 
  11543.  
  11544.                   The time as the error log entry i was inserted to the log 
  11545.                   file 
  11546.  
  11547.                o  errInfo.i.errcode 
  11548.  
  11549.                   The error code reported in the log file 
  11550.  
  11551.                o  errInfo.i.component 
  11552.  
  11553.                   The reporting component 
  11554.  
  11555.                o  errInfo.i.nstrings 
  11556.  
  11557.                   The number of text strings related to the error log entry i 
  11558.  
  11559.                o  errInfo.i.string.n 
  11560.  
  11561.                   The nth text string for the error log entry i 
  11562.  
  11563.                o  errInfo.i.rawlength 
  11564.  
  11565.                   The associated raw data length. This value will be 0 is now 
  11566.                   raw data is associated to the error log entry i 
  11567.  
  11568.                o  errInfo.i.rawdata 
  11569.  
  11570.                   The raw data available. This variable is valid only if 
  11571.                   errInfo.i.rawlength is different from 0 
  11572.  
  11573.  SrvName     The computer name of the server to perform the operation on. Use 
  11574.              the value '' for a local computer 
  11575.  
  11576.  Example 
  11577.  
  11578.  
  11579.   /* Read error log entries on server */
  11580.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11581.   call LoadLsRxutFuncs
  11582.  
  11583.   NETERRORLOGREAD = 650
  11584.   SrvName         = '\\DOMAIN_CONTRLR'
  11585.  
  11586.   myRc = NetMisc(NETERRORLOGREAD, 'errInfo', SrvName)
  11587.  
  11588.   if myRc <> '0' then do
  11589.    say 'Got error from NetMisc() ' myRc
  11590.    exitRc = 9
  11591.   end
  11592.   else do
  11593.    say 'Bytes available:  ' errInfo.bytesavail
  11594.    say 'Number of entries:' errInfo.count
  11595.  
  11596.    do i = 1 to errInfo.count
  11597.     say
  11598.     say 'Time:           ' errInfo.i.time
  11599.     say 'Error Code:     ' errInfo.i.errcode
  11600.     say 'Component:      ' errInfo.i.component
  11601.     say 'Text strings:   ' errInfo.i.nstrings
  11602.     if errInfo.i.nstrings <> 0 then do
  11603.      do j = 1 to errInfo.i.nstrings
  11604.       say 'String text:    ' errInfo.i.string.j
  11605.      end
  11606.     end
  11607.     say
  11608.     say 'Raw data length:' errInfo.i.rawlength
  11609.     if errInfo.i.rawlength <> 0 then do
  11610.      do j = 1 to 5
  11611.       say C2X(substr(errInfo.i.rawdata,j,1))
  11612.      end
  11613.     end
  11614.    end
  11615.  
  11616.    exitRc = 0
  11617.   end
  11618.  
  11619.   call DropLsRxutFuncs
  11620.   call RxFuncDrop 'LoadLsRxutFuncs'
  11621.  
  11622.   exit exitRc
  11623.  
  11624.  Example Output 
  11625.  
  11626.  
  11627.   Bytes available:   0
  11628.   Number of entries: 1
  11629.  
  11630.   Time:            Mon Sep  5 13:14:01 1994
  11631.  
  11632.   Error Code:      99
  11633.   Component:       MY_PROC_1
  11634.   Text strings:    2
  11635.   String text:     Error occurred in function error handler
  11636.   String text:     The server computer name was not specified
  11637.  
  11638.   Raw data length: 32
  11639.   00
  11640.   01
  11641.   02
  11642.   03
  11643.   04
  11644.  
  11645.  Example using RESUME operation and record offset 
  11646.  
  11647.  
  11648.   /* Read error log entries on server using RESUME operation */
  11649.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11650.   call LoadLsRxutFuncs
  11651.  
  11652.   NETERRORLOGREAD = 650
  11653.   SrvName = ''
  11654.  
  11655.   entries = 0
  11656.   errInfo.resume    = 'INITRESUME'
  11657.   errInfo.buffer    = 512
  11658.   errInfo.openflags = 2
  11659.   errInfo.offset    = 145
  11660.   SrvName           = '\\DOMAIN_CONTRLR'
  11661.  
  11662.   call theProc
  11663.  
  11664.   if errInfo.bytesavail <> 0 then do
  11665.  
  11666.    errInfo.resume    = 'RESUME'
  11667.    errInfo.openflags = 0  /* This must be 0 or myRc=2440 */
  11668.  
  11669.    do while errInfo.bytesavail <> 0
  11670.     call theProc
  11671.    end
  11672.  
  11673.   end
  11674.  
  11675.   call DropLsRxutFuncs
  11676.   call RxFuncDrop 'LoadLsRxutFuncs'
  11677.  
  11678.   exit exitRc
  11679.  
  11680.   /*************************/
  11681.   /* Get error log entries */
  11682.   /*************************/
  11683.   theProc:
  11684.  
  11685.   myRc = NetMisc(NETERRORLOGREAD, 'errInfo', SrvName)
  11686.  
  11687.   if myRc <> '0' then do
  11688.    say 'Got error from NetMisc() ' myRc
  11689.    exitRc = 9
  11690.    call DropLsRxutFuncs
  11691.    call RxFuncDrop 'LoadLsRxutFuncs'
  11692.    exit exitRc
  11693.   end
  11694.   else do
  11695.    say 'Bytes available:  ' errInfo.bytesavail
  11696.    say 'Number of entries:' errInfo.count
  11697.  
  11698.    do i = 1 to errInfo.count
  11699.     say
  11700.     say 'Time:           ' errInfo.i.time
  11701.     say 'Error Code:     ' errInfo.i.errcode
  11702.     say 'Component:      ' errInfo.i.component
  11703.     say 'Text strings:   ' errInfo.i.nstrings
  11704.     if errInfo.i.nstrings <> 0 then do
  11705.      do j = 1 to errInfo.i.nstrings
  11706.       say 'String text:    ' errInfo.i.string.j
  11707.      end
  11708.     end
  11709.     say
  11710.     say 'Raw data length:' errInfo.i.rawlength
  11711.     if errInfo.i.rawlength <> 0 then do
  11712.      do j = 1 to 5
  11713.       say C2X(substr(errInfo.i.rawdata,j,1))
  11714.      end
  11715.     end
  11716.    end
  11717.  
  11718.    exitRc = 0
  11719.   end
  11720.  
  11721.   return
  11722.  
  11723.  
  11724. ΓòÉΓòÉΓòÉ 13.8. NetMisc(NETERRORLOGWRITE) ΓòÉΓòÉΓòÉ
  11725.  
  11726. The function writes a entry into the error log. The function is only supported 
  11727. on a local computer. 
  11728.  
  11729. To correctly read the entries, use the NetMisc(NETERRORLOGREAD) function. The 
  11730. NET command line interface makes use of the OS/2 system and OS/2 LAN Server 
  11731. messages while formatting error log entries. The may cause log entries to 
  11732. appear differently from the actual content of the values inserted by this 
  11733. function. 
  11734.  
  11735. Syntax 
  11736.  
  11737.  
  11738. MyRc = NetMisc(NETERRORLOGWRITE, 'errInfo')
  11739.  
  11740. Parameters 
  11741.  
  11742. The parameters required and returned are: 
  11743.  
  11744.  'errInfo'   The error information control variable, which is divided into: 
  11745.  
  11746.                o  errInfo.errcode 
  11747.  
  11748.                   The error code. The error code will be limited to 2 bytes (16 
  11749.                   bit) The default error code is 87 (invalid parameter) 
  11750.  
  11751.                o  errInfo.component 
  11752.  
  11753.                   The name of the component reporting the error. If no value is 
  11754.                   specified the string 'REXX_PROCEDURE' will be used. The 
  11755.                   maximum length of this parameter is 15 characters 
  11756.  
  11757.                o  errInfo.nstrings 
  11758.  
  11759.                   The number of text string to insert into the error message. 
  11760.                   The default is to insert 0 strings 
  11761.  
  11762.                o  errInfo.string.n 
  11763.  
  11764.                   Error text message string number n, where variable n has a 
  11765.                   value from 1 to errInfo.nstrings. The maximum string length 
  11766.                   is limited to 260 bytes for each entry 
  11767.  
  11768.                   If errInfo.nstrings is specified, but no string is supplied 
  11769.                   the default text string 'REXX' will be inserted 
  11770.  
  11771.                o  errInfo.rawdata 
  11772.  
  11773.                   The raw data available from the REXX procedure. It can 
  11774.                   contains a string of values that includes non printable 
  11775.                   characters 
  11776.  
  11777.                o  errInfo.rawlength 
  11778.  
  11779.                   The length of the hexadecimal raw data. The default value is 
  11780.                   0 and the maximum length is 256 bytes 
  11781.  
  11782.  Example 
  11783.  
  11784.  
  11785.   /* Write error log entry on local computer */
  11786.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11787.   call LoadLsRxutFuncs
  11788.  
  11789.   NETERRORLOGWRITE  = 660
  11790.   errInfo.errcode   = 99
  11791.   errInfo.component = 'MY_PROC_1'
  11792.   errInfo.nstrings  = 2
  11793.   errInfo.string.1  = 'Error occurred in the function error handler'
  11794.   errInfo.string.2  = 'The server computer name was not specified'
  11795.   errInfo.rawdata   = ''
  11796.  
  11797.   do i=0 to 32
  11798.    errInfo.rawdata = errInfo.rawdata || D2C(i)
  11799.   end
  11800.  
  11801.   errInfo.rawlength = 32
  11802.  
  11803.   myRc = NetMisc(NETERRORLOGWRITE, 'errInfo')
  11804.  
  11805.   if myRc <> '0' then do
  11806.    say 'Got error from NetMisc() ' myRc
  11807.    exitRc = 9
  11808.   end
  11809.   else do
  11810.    say 'Log entry inserted to error log'
  11811.    exitRc = 0
  11812.   end
  11813.  
  11814.   call DropLsRxutFuncs
  11815.   call RxFuncDrop 'LoadLsRxutFuncs'
  11816.  
  11817.   exit exitRc
  11818.  
  11819.  Example Output 
  11820.  
  11821.  
  11822.   Log entry inserted to error log
  11823.  
  11824.  
  11825. ΓòÉΓòÉΓòÉ 13.9. NetMisc(NETMESSAGEBUFFERSEND) ΓòÉΓòÉΓòÉ
  11826.  
  11827. The functions sends a buffer of information to a registered messaging name. 
  11828.  
  11829. Syntax 
  11830.  
  11831.  
  11832. MyRc = NetMisc(NETMESSAGEBUFFERSEND, Message, toName, SrvName)
  11833.  
  11834. Parameters 
  11835.  
  11836. The parameters required are: 
  11837.  
  11838.  Message           The message string to be send 
  11839.  
  11840.                    For broadcast messages to the physical network, where toName 
  11841.                    points to "*" or to "domain (*)", the message can be no 
  11842.                    longer than 128 bytes (and is not guaranteed to be 
  11843.                    delivered). For messages sent to all message names on a 
  11844.                    domain, the limit is 128 bytes. 
  11845.  
  11846.                    Otherwise, the message can be any length, provided it does 
  11847.                    not exceed the maximum receivable message size for that 
  11848.                    computer, which is set with the 'sizmessbuf' parameter in 
  11849.                    IBMLAN.INI. The total size of 'sizmessbuf' can be divided 
  11850.                    among different messages, if messages are arriving at the 
  11851.                    same time. This reduces the actual size of any single 
  11852.                    message that can be received. In addition, the sizmessbuf 
  11853.                    parameter can accept only limited values. 
  11854.  
  11855.                    The function does not require the Messenger service to be 
  11856.                    started on a local computer. 
  11857.  
  11858.  toName            A string containing the name of the userid or application to 
  11859.                    receive the message. To broadcast a message to all 
  11860.                    requesters on the LAN, have the value of toName be an 
  11861.                    asterisk (*) wildcard. 
  11862.  
  11863.                    To broadcast a message to all users on a domain, have the 
  11864.                    value of toName be the domain name followed by an asterisk 
  11865.                    (*). 
  11866.  
  11867.                    A value must be supplied 
  11868.  
  11869.  SrvName           A remote server computer name if remote, otherwise '' 
  11870.  
  11871.  Example 
  11872.  
  11873.  
  11874.   /* Send a message */
  11875.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11876.   call LoadLsRxutFuncs
  11877.  
  11878.   NETMESSAGEBUFFERSEND = 530
  11879.   Message              = 'Server backup of user data has completed'
  11880.   toName               = 'ADMIN04'
  11881.   SrvName              = '\\ANYSRV01'
  11882.  
  11883.   myRc = NetMisc(NETMESSAGEBUFFERSEND, Message, toName, SrvName)
  11884.  
  11885.   if myRc <> '0' then do
  11886.    say 'Got error from NetMisc() ' myRc
  11887.    exitRc = 9
  11888.   end
  11889.   else do
  11890.    say 'Message sent successfully'
  11891.   end
  11892.  
  11893.   call DropLsRxutFuncs
  11894.   call RxFuncDrop 'LoadLsRxutFuncs'
  11895.  
  11896.   exit exitRc
  11897.  
  11898.  Example Output 
  11899.  
  11900.  
  11901.   Message sent successfully
  11902.  
  11903.  
  11904. ΓòÉΓòÉΓòÉ 13.10. NetMisc(NETMESSAGEFILESEND) ΓòÉΓòÉΓòÉ
  11905.  
  11906. The functions sends a file of information to a registered messaging name. 
  11907.  
  11908. Syntax 
  11909.  
  11910.  
  11911. MyRc = NetMisc(NETMESSAGEFILESEND, MessageFile, toName, SrvName)
  11912.  
  11913. Parameters 
  11914.  
  11915. The parameters required are: 
  11916.  
  11917.  MessageFile       The file to sent 
  11918.  
  11919.                    The value is a string containing the full path and the file 
  11920.                    name of the file to be sent. 
  11921.  
  11922.                    For broadcast messages to the physical network, where toName 
  11923.                    points to "*" or to "domain (*)", the messageFile can be no 
  11924.                    longer than 128 bytes (and is not guaranteed to be 
  11925.                    delivered). For messages sent to all message names on a 
  11926.                    domain, the limit is 128 bytes. 
  11927.  
  11928.                    Otherwise, the messageFile can be any length, provided it 
  11929.                    does not exceed the maximum receivable message size for that 
  11930.                    computer, which is set with the sizmessbuf parameter in 
  11931.                    IBMLAN.INI. The total size of sizmessbuf can be divided 
  11932.                    among different messages, if messages are arriving at the 
  11933.                    same time. This reduces the actual size of any single 
  11934.                    message that can be received. In addition, the sizmessbuf 
  11935.                    parameter can accept only limited values. 
  11936.  
  11937.                    The function does not require the Messenger service to be 
  11938.                    started on a local computer. 
  11939.  
  11940.  toName            A string containing the name of the userid or application to 
  11941.                    receive the message. To broadcast a message to all 
  11942.                    requesters on the LAN, have the value of toName be an 
  11943.                    asterisk (*) wildcard. 
  11944.  
  11945.                    To broadcast a message to all users on a domain, have the 
  11946.                    value of toName be the domain name followed by an asterisk 
  11947.                    (*). 
  11948.  
  11949.                    A value must be supplied 
  11950.  
  11951.  SrvName           A server computer name if remote, otherwise '' 
  11952.  
  11953.  Example 
  11954.  
  11955.  
  11956.   /* Sent a message from a file */
  11957.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  11958.   call LoadLsRxutFuncs
  11959.  
  11960.   NETMESSAGEFILESEND = 540
  11961.   MessageFile        = 'C:\BACKUP.OK'
  11962.   toName             = 'ADMIN04'
  11963.   SrvName            = '\\ANYSRV01'
  11964.  
  11965.   myRc = NetMisc(NETMESSAGEFILESEND, MessageFile, toName, SrvName)
  11966.  
  11967.   if myRc <> '0' then do
  11968.    say 'Got error from NetMisc() ' myRc
  11969.    exitRc = 9
  11970.   end
  11971.   else do
  11972.    say 'Message from file sent successfully'
  11973.   end
  11974.  
  11975.   call DropLsRxutFuncs
  11976.   call RxFuncDrop 'LoadLsRxutFuncs'
  11977.  
  11978.   exit exitRc
  11979.  
  11980.  Example Output 
  11981.  
  11982.  
  11983.   Message from file sent successfully
  11984.  
  11985.  
  11986. ΓòÉΓòÉΓòÉ 13.11. NetMisc(NETMESSAGENAMEFWD) ΓòÉΓòÉΓòÉ
  11987.  
  11988. The function changes the message name table to forward messages to another 
  11989. messaging name. 
  11990.  
  11991. Syntax 
  11992.  
  11993.  
  11994. MyRc = NetMisc(NETMESSAGENAMEFWD, msgName, fwdAction, fwdName, SrvName)
  11995.  
  11996. Parameters 
  11997.  
  11998. The parameters required are: 
  11999.  
  12000.  msgName           A string specifying the name receiving messages 
  12001.  
  12002.  fwdAction         A integer specifying the action to take if name forwards 
  12003.                    messages to another name. If the value is nonzero, any 
  12004.                    previous forwarded name is deleted; if 0, any previous 
  12005.                    forwarded name is not deleted and an error is returned 
  12006.  
  12007.                    The default value is 0 
  12008.  
  12009.  fwdName           A string specifying the name to receive msgName forwarded 
  12010.                    messages 
  12011.  
  12012.  SrvName           A server computer name if remote otherwise '' 
  12013.  
  12014.  Example 
  12015.  
  12016.  
  12017.   /* Forward a message name */
  12018.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12019.   call LoadLsRxutFuncs
  12020.  
  12021.   NETMESSAGENAMEFWD = 560
  12022.   msgName           = 'ADMIN04'
  12023.   fwdAction         = 0
  12024.   fwdName           = 'USERID'
  12025.   SrvName           = ''  /* This local computer */
  12026.  
  12027.   myRc = NetMisc(NETMESSAGENAMEFWD, msgName, fwdAction, fwdName, SrvName)
  12028.  
  12029.   if myRc <> '0' then do
  12030.    say 'Got error from NetMisc() ' myRc
  12031.    exitRc = 9
  12032.   end
  12033.   else do
  12034.    say 'Message name forwarded successfully'
  12035.   end
  12036.  
  12037.   call DropLsRxutFuncs
  12038.   call RxFuncDrop 'LoadLsRxutFuncs'
  12039.  
  12040.   exit exitRc
  12041.  
  12042.  Example Output 
  12043.  
  12044.  
  12045.   Message name forwarded successfully
  12046.  
  12047.  
  12048. ΓòÉΓòÉΓòÉ 13.12. NetMisc(NETMESSAGENAMEUNFWD) ΓòÉΓòÉΓòÉ
  12049.  
  12050. The function stops forwarding of messages. 
  12051.  
  12052. Syntax 
  12053.  
  12054.  
  12055. MyRc = NetMisc(NETMESSAGENAMEUNFWD, msgName, SrvName)
  12056.  
  12057. Parameters 
  12058.  
  12059. The parameters required are: 
  12060.  
  12061.  msgName           The string specifying the userid name whose message 
  12062.                    forwarding is to be canceled. A value must be specified 
  12063.  
  12064.  SrvName           A server computer name if remote otherwise '' 
  12065.  
  12066.  Example 
  12067.  
  12068.  
  12069.   /* Un-Forward a message name */
  12070.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12071.   call LoadLsRxutFuncs
  12072.  
  12073.   NETMESSAGENAMEUNFWD = 570
  12074.   msgName             = 'ADMIN04'
  12075.   SrvName             = ''
  12076.  
  12077.   myRc = NetMisc(NETMESSAGENAMEUNFWD, msgName, SrvName)
  12078.  
  12079.   if myRc <> '0' then do
  12080.    say 'Got error from NetMisc() ' myRc
  12081.    exitRc = 9
  12082.   end
  12083.   else do
  12084.    say 'Message name un-forwarded successfully'
  12085.   end
  12086.  
  12087.   call DropLsRxutFuncs
  12088.   call RxFuncDrop 'LoadLsRxutFuncs'
  12089.  
  12090.   exit exitRc
  12091.  
  12092.  Example Output 
  12093.  
  12094.  
  12095.   Message name un-forwarded successfully
  12096.  
  12097.  
  12098. ΓòÉΓòÉΓòÉ 13.13. NetMisc(NETREMOTECOPY) ΓòÉΓòÉΓòÉ
  12099.  
  12100. Performs a remote file copy on a server. 
  12101.  
  12102. Syntax 
  12103.  
  12104.  
  12105. MyRc = NetMisc(NETREMOTECOPY, SrcPath, DestPath, 'VarInfo')
  12106.  
  12107. Parameters 
  12108.  
  12109. The parameters required and returned are: 
  12110.  
  12111.  SrcPath   The redirected source path 
  12112.  
  12113.  DestPath  The redirected destination path 
  12114.  
  12115.  'VarInfo' which is divided into: 
  12116.  
  12117.              o  VarInfo.openflags 
  12118.  
  12119.                 Controls the file open (a decimal value). 
  12120.  
  12121.                 The file open options defined as follows: 
  12122.  
  12123.                                  Bit   Meaning
  12124.                                  ---   -------
  12125.                                  0-1   Used if destpath exists.  If 0, the open fails; if 1,
  12126.                                        the file is appended; and if 2, the file is overwritten
  12127.  
  12128.                                  2-3   Reserved, with a value of 0.
  12129.  
  12130.                                  4     Used if destpath does not exist.  If 0, the open fails;
  12131.                                        if 1, the file is created
  12132.  
  12133.                                  5-15  Reserved, with a value of 0.
  12134.  
  12135.                 The value must be converted to decimal before the function 
  12136.                 call. The default value is 0x0012 which is equal to 18 in 
  12137.                 decimal 
  12138.  
  12139.              o  VarInfo.copyflags 
  12140.  
  12141.                 Controls the copy options expressed in decimal. 
  12142.  
  12143.                 File copy options defined as follows: 
  12144.  
  12145.                                  Bit   Meaning
  12146.                                  ---   -------
  12147.                                  0     If 1, destpath must be a file. If bit 0 is set to 1,
  12148.                                        bit 1 must be 0
  12149.  
  12150.                                  1     If 1, destpath must be a directory. If bit 1
  12151.                                        is set to 1, bit 0 must be 0
  12152.  
  12153.                                  2     If 0, destpath is opened in binary mode.  If 1,
  12154.                                        destpath is opened in text mode
  12155.  
  12156.                                  3     If 0, sourcepath is opened in binary mode.  If 1,
  12157.                                        sourcepath is opened in text mode
  12158.  
  12159.                                  4     If 1, all writes are verified
  12160.  
  12161.                                  5-15  Reserved.
  12162.  
  12163.                 The value must be converted to decimal before the function 
  12164.                 call. The default value is 0x0011 which is equal to 17 in 
  12165.                 decimal 
  12166.  
  12167.              o  VarInfo.ci_num_copied 
  12168.  
  12169.                 The number of files copied 
  12170.  
  12171.              o  VarInfo.ci_err_buf 
  12172.  
  12173.                 The string buffer containing error information of the copy 
  12174.                 operation 
  12175.  
  12176.  Example 
  12177.  
  12178.  
  12179.   /* Perform Net remote copy  */
  12180.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12181.   call LoadLsRxutFuncs
  12182.  
  12183.   NETREMOTECOPY = 670
  12184.   SrvName       = '\\KING_BALU'
  12185.   SrcPath       = 'Y:\CONFIG.SYL'
  12186.   DestPath      = 'Y:\CONFIG.BAC'
  12187.  
  12188.   VarInfo.openflags = x2d('0012')
  12189.   VarInfo.copyflags = x2d('0011')
  12190.  
  12191.   myRc = NetMisc(NETREMOTECOPY, SrcPath, DestPath, 'VarInfo', SrvName)
  12192.  
  12193.   if myRc <> '0' then do
  12194.    say 'Got error from NetMisc() ' myRc
  12195.    rcCode = 9
  12196.   end
  12197.   else do
  12198.    say 'Number files copied ' VarInfo.ci_num_copied
  12199.    say 'Error Information   ' VarInfo.ci_err_buf
  12200.    rcCode = 0
  12201.   end
  12202.  
  12203.   call DropLsRxutFuncs
  12204.   call RxFuncDrop 'LoadLsRxutFuncs'
  12205.  
  12206.   exit rcCode
  12207.  
  12208.  Example Output 
  12209.  
  12210.  
  12211.   Number files copied  1
  12212.   Error Information
  12213.  
  12214.  
  12215. ΓòÉΓòÉΓòÉ 13.14. NetMisc(NETREMOTEMOVE) ΓòÉΓòÉΓòÉ
  12216.  
  12217. Performs a remote file move on a server. 
  12218.  
  12219. Syntax 
  12220.  
  12221.  
  12222. MyRc = NetMisc(NETREMOTEMOVE, SrcPath, DestPath, 'VarInfo')
  12223.  
  12224. Parameters 
  12225.  
  12226. The parameters required and returned are: 
  12227.  
  12228.  SrcPath   The redirected source path 
  12229.  
  12230.  DestPath  The redirected destination path 
  12231.  
  12232.  'VarInfo' which is divided into: 
  12233.  
  12234.              o  VarInfo.openflags 
  12235.  
  12236.                 Controls the file open. The file open options are defined as 
  12237.                 follows: 
  12238.  
  12239.                                  Bit   Meaning
  12240.                                  ---   -------
  12241.                                  0-1   Used if destpath exists.  If 0, the open fails; if 1,
  12242.                                        the file is appended; and if 2, the file is overwritten.
  12243.  
  12244.                                  2-3   Reserved, with a value of 0.
  12245.  
  12246.                                  4     Used if destpath does not exist.  If 0, the open fails;
  12247.                                        if 1, the file is created.
  12248.  
  12249.                                  5-15  Reserved, with a value of 0.
  12250.  
  12251.                 The value must be converted to decimal before the function 
  12252.                 call. The default value is 0x0012 which is equal to 18 in 
  12253.                 decimal 
  12254.  
  12255.              o  VarInfo.moveflags 
  12256.  
  12257.                 Controls the move options, expressed in decimal. 
  12258.  
  12259.                 File move options defined as follows: 
  12260.  
  12261.                                  Bit   Meaning
  12262.                                  ---   -------
  12263.                                  0     If 1, destpath must be a file, and bit 1 must be 0.
  12264.  
  12265.                                  1     If 1, destpath must be a directory, and bit 0 must be 0.
  12266.  
  12267.                                  2-15  Reserved; the value of these bits must be 0.
  12268.  
  12269.                 The value must be converted to decimal before the function 
  12270.                 call. The default value is 0x0002 which is equal to 2 in 
  12271.                 decimal 
  12272.  
  12273.              o  VarInfo.mi_num_moved 
  12274.  
  12275.                 The number of files moved 
  12276.  
  12277.              o  VarInfo.mi_err_buf 
  12278.  
  12279.                 The string buffer containing error information of the move 
  12280.                 operation 
  12281.  
  12282.  Example 
  12283.  
  12284.  
  12285.   /* Some */
  12286.   /* Perform Net remote move  */
  12287.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12288.   call LoadLsRxutFuncs
  12289.  
  12290.   NETREMOTEMOVE = 690
  12291.   SrvName       = '\\KING_BALU'
  12292.   SrcPath       = 'Y:\CONFIG.ORG'
  12293.   DestPath      = 'Y:\OS2'
  12294.  
  12295.   VarInfo.openflags = x2d('0012')
  12296.   VarInfo.moveflags = x2d('0002')
  12297.  
  12298.   myRc = NetMisc(NETREMOTEMOVE, SrcPath, DestPath, 'VarInfo')
  12299.  
  12300.   if myRc <> '0' then do
  12301.    say 'Got error from NetMisc() ' myRc
  12302.    rcCode = 9
  12303.   end
  12304.   else do
  12305.    say 'Number files moved ' VarInfo.mi_num_moved
  12306.    say 'Error Information  ' VarInfo.mi_err_buf
  12307.    rcCode = 0
  12308.   end
  12309.  
  12310.   call DropLsRxutFuncs
  12311.   call RxFuncDrop 'LoadLsRxutFuncs'
  12312.  
  12313.   exit rcCode
  12314.  
  12315.  Example Output 
  12316.  
  12317.   /* some */
  12318.   Number files moved  1
  12319.   Error Information
  12320.  
  12321.  
  12322. ΓòÉΓòÉΓòÉ 13.15. NetMisc(NETREMOTETOD) ΓòÉΓòÉΓòÉ
  12323.  
  12324. Retrieves the remote time of the day from a remote server. 
  12325.  
  12326. Syntax 
  12327.  
  12328.  
  12329. MyRc = NetMisc(NETREMOTETOD, 'VarRet', SrvName)
  12330.  
  12331. Parameters 
  12332.  
  12333. The parameters required are: 
  12334.  
  12335.  'VarRet' variable, which is divided into: 
  12336.  
  12337.                      o  VarRet.tod_elapsedt 
  12338.  
  12339.                         The number of seconds that have elapsed since 1 January 
  12340.                         1970 
  12341.  
  12342.                      o  VarRet.tod_hours 
  12343.  
  12344.                         The current hour 
  12345.  
  12346.                      o  VarRet.tod_mins 
  12347.  
  12348.                         The current minute 
  12349.  
  12350.                      o  VarRet.tod_secs 
  12351.  
  12352.                         The current second 
  12353.  
  12354.                      o  VarRet.tod_hunds 
  12355.  
  12356.                         The current hundredths of a second 
  12357.  
  12358.                      o  VarRet.tod_msecs 
  12359.  
  12360.                         The current millisecond 
  12361.  
  12362.                      o  VarRet.tod_timezone 
  12363.  
  12364.                         The time zone of the server, calculated (in minutes) 
  12365.                         from the Greenwich mean time (GMT) zone 
  12366.  
  12367.                      o  VarRet.tod_tinterval 
  12368.  
  12369.                         The time interval for each tick of the clock 
  12370.                         represneted in 0.0001 seconds 
  12371.  
  12372.                      o  VarRet.tod_day 
  12373.  
  12374.                         The day of the month (1-31) 
  12375.  
  12376.                      o  VarRet.tod_month 
  12377.  
  12378.                         The month (1-12) 
  12379.  
  12380.                      o  VarRet.tod_year 
  12381.  
  12382.                         The year, starting with 0 
  12383.  
  12384.                      o  VarRet.tod_weekday 
  12385.  
  12386.                         The day of the week (0 means Sunday; 6 means Saturday) 
  12387.  
  12388.  SrvName           The server computer name 
  12389.  
  12390.  Example 
  12391.  
  12392.  
  12393.   /* Perform Net remote TOD  */
  12394.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12395.   call LoadLsRxutFuncs
  12396.  
  12397.   NETREMOTETOD = 700
  12398.   SrvName      = '\\KING_BALU'
  12399.  
  12400.   myRc = NetMisc(NETREMOTETOD, 'VarRet', SrvName)
  12401.  
  12402.   if myRc <> '0' then do
  12403.    say 'Got error from NetMisc() ' myRc
  12404.    rcCode = 9
  12405.   end
  12406.   else do
  12407.    say 'Seconds elaps            ' VarRet.tod_elapsedt
  12408.    say 'Current Hour             ' VarRet.tod_hours
  12409.    say 'Current Minute           ' VarRet.tod_mins
  12410.    say 'Current Second           ' VarRet.tod_secs
  12411.    say 'Current 1/100 sec        ' VarRet.tod_hunds
  12412.    say 'Current mSec             ' VarRet.tod_msecs
  12413.    say 'Timezone in minutes      ' VarRet.tod_timezone
  12414.    say 'Timer Tic in 1/10000 Secs' VarRet.tod_tinterval
  12415.    say 'Day                      ' VarRet.tod_day
  12416.    say 'Month                    ' VarRet.tod_month
  12417.    say 'Year                     ' VarRet.tod_year
  12418.    say 'Day of week              ' VarRet.tod_weekday
  12419.    rcCode = 0
  12420.   end
  12421.  
  12422.   call DropLsRxutFuncs
  12423.   call RxFuncDrop 'LoadLsRxutFuncs'
  12424.  
  12425.   exit rcCode
  12426.  
  12427.  Example Output 
  12428.  
  12429.  
  12430.   Seconds elaps             777749783
  12431.   Current Hour              17
  12432.   Current Minute            36
  12433.   Current Second            23
  12434.   Current 1/100 sec         66
  12435.   Current mSec              96781561
  12436.   Timezone in minutes       65535
  12437.   Timer Tic in 1/10000 Secs 310
  12438.   Day                       24
  12439.   Month                     8
  12440.   Year                      1994
  12441.   Day of week               3
  12442.  
  12443.  
  12444. ΓòÉΓòÉΓòÉ 13.16. NetMisc(NETSERVERADMINCMD) ΓòÉΓòÉΓòÉ
  12445.  
  12446. The function executes a program on a remote server. 
  12447.  
  12448. Syntax 
  12449.  
  12450.  
  12451. MyRc = NetMisc(NETSERVERADMINCMD, RunCommand, SrvName, 'ReturnValue')
  12452.  
  12453. Parameters 
  12454.  
  12455. The parameters required and returned are: 
  12456.  
  12457.  RunCommand        The command to be executed at the remote server 
  12458.  
  12459.  SrvName           The server computer name 
  12460.  
  12461.  'ReturnValue' which is divided into: 
  12462.  
  12463.                      o  ReturnValue.exitCode 
  12464.  
  12465.                         The program exit code 
  12466.  
  12467.                      o  ReturnValue.available 
  12468.  
  12469.                         The number of bytes available at the remote location 
  12470.  
  12471.                      o  ReturnValue.returned 
  12472.  
  12473.                         The number of bytes in the program output. This is 
  12474.                         limited to 4KB using the NetMisc(NETSERVERADMINCMD) 
  12475.                         function 
  12476.  
  12477.                      o  ReturnValue.output 
  12478.  
  12479.                         The program output. This is limited to 4KB in the 
  12480.                         NetMisc(NETSERVERADMINCMD) function 
  12481.  
  12482.  Example 
  12483.  
  12484.  
  12485.   /* Perform Net remote admin cmd  */
  12486.  
  12487.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12488.   call LoadLsRxutFuncs
  12489.  
  12490.   NETSERVERADMINCMD = 710
  12491.  
  12492.   RunCommand = 'DIR C:\'
  12493.   SrvName    = '\\KING_BALU'
  12494.  
  12495.   myRc = NetMisc(NETSERVERADMINCMD, RunCommand, SrvName, 'ReturnValue')
  12496.  
  12497.   if myRc <> '0' then do
  12498.    say 'Got error from NetMisc() ' myRc
  12499.    rcCode = 9
  12500.   end
  12501.   else do
  12502.    say 'Remote Exit code was           ' ReturnValue.exitCode
  12503.    say 'Returned Bytes are             ' ReturnValue.returned
  12504.    say 'Number bytes at remote location' ReturnValue.available
  12505.    say 'OutPut was'
  12506.    say  ReturnValue.output
  12507.    rcCode = 0
  12508.   end
  12509.  
  12510.   call DropLsRxutFuncs
  12511.   call RxFuncDrop 'LoadLsRxutFuncs'
  12512.  
  12513.   exit rcCode
  12514.  
  12515.  Example Output 
  12516.  
  12517.  
  12518.   Remote Exit code was            0
  12519.   Returned Bytes are              1159
  12520.   Number bytes at remote location 1159
  12521.   OutPut was
  12522.  
  12523.    The volume label in drive C is OS2.
  12524.    The Volume Serial Number is A69B:F814
  12525.    Directory of C:\
  12526.  
  12527.    8-24-94   1:39p     <DIR>           0  .
  12528.    8-24-94   1:39p     <DIR>           0  ..
  12529.    8-23-94  10:33a       311           0  AUTOEXEC.BAT
  12530.  
  12531.    and many more lines
  12532.  
  12533.  
  12534. ΓòÉΓòÉΓòÉ 13.17. NetMisc(NETUSERDCDBINIT) ΓòÉΓòÉΓòÉ
  12535.  
  12536. The function initializes the domain control database for the specified userid 
  12537. and replaces any existing userid specific domain controller database files with 
  12538. empty database files. 
  12539.  
  12540. Syntax 
  12541.  
  12542.  
  12543. MyRc = NetMisc(NETUSERDCDBINIT, Userid, SrvName)
  12544.  
  12545. Parameters 
  12546.  
  12547. The parameters required and returned are: 
  12548.  
  12549.  Userid            The userid name 
  12550.  
  12551.  SrvName           The computer name of the Domain Controller 
  12552.  
  12553.  Example 
  12554.  
  12555.  
  12556.   /* Some */
  12557.   /* Reset DCDB information for a userid */
  12558.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12559.   call LoadLsRxutFuncs
  12560.  
  12561.   NETUSERDCDBINIT = 720
  12562.   UserID          = 'THE_USER_ID'
  12563.   SrvName         = '\\KING_BALU'
  12564.  
  12565.   myRc = NetMisc(NETUSERDCDBINIT, Userid, SrvName)
  12566.  
  12567.   if myRc <> '0' then do
  12568.    say 'Got error from NetMisc() ' myRc
  12569.    exitRc = 9
  12570.   end
  12571.   else do
  12572.    say 'DCDB initialized successfully'
  12573.    say
  12574.    exitRc = 0
  12575.   end
  12576.  
  12577.   call DropLsRxutFuncs
  12578.   call RxFuncDrop 'LoadLsRxutFuncs'
  12579.  
  12580.   exit exitRc
  12581.  
  12582.  Example Output 
  12583.  
  12584.  
  12585.   DCDB initialized successfully
  12586.  
  12587.  
  12588. ΓòÉΓòÉΓòÉ 13.18. NetMisc(NETUSERVALIDATE2) ΓòÉΓòÉΓòÉ
  12589.  
  12590. The function validates a user account with its password, and checks whether 
  12591. there are any logon restrictions for this user account. If the specified user 
  12592. account is not found, this function attempts to validate the guest account, 
  12593. instead. If this happens, all verification checks will be based only on the 
  12594. guest account. 
  12595.  
  12596. Syntax 
  12597.  
  12598.  
  12599. MyRc = NetMisc(NETUSERVALIDATE2, 'userInfo', userId, passWord, DcName)
  12600.  
  12601. Parameters 
  12602.  
  12603. The parameters returned are: 
  12604.  
  12605.  'userInfo'        The REXX variable receiving the result. The variable is 
  12606.                    divided into: 
  12607.  
  12608.                      o  userInfo.code 
  12609.  
  12610.                         The response from the function call, according to the 
  12611.                         following values: 
  12612.  
  12613.                                                 Value Meaning
  12614.                                                 ----- -------
  12615.                                                 0     No errors were encountered
  12616.  
  12617.                                                 5     The username and password do not
  12618.                                                       correspond to an active account
  12619.  
  12620.                                                 2217  The logon server could not validate
  12621.                                                       the logon
  12622.  
  12623.                                                 2240  The user is not allowed to log on from
  12624.                                                       this requester
  12625.  
  12626.                                                 2241  The user is not allowed to log on at
  12627.                                                       this time
  12628.  
  12629.                                                 2242  The password has expired
  12630.  
  12631.                      o  userInfo.priv 
  12632.  
  12633.                         The user account privilege level. The following values 
  12634.                         are returned: 
  12635.  
  12636.                                                 Value Meaning
  12637.                                                 ----- -------
  12638.                                                  0    Guest
  12639.  
  12640.                                                  1    User
  12641.  
  12642.                                                  2    Administrator
  12643.  
  12644.  userId            The user account name 
  12645.  
  12646.  passWord          The password for the user account 
  12647.  
  12648.  DcName            The computer name of a domain controller 
  12649.  
  12650.  Example 
  12651.  
  12652.  
  12653.   /* Net User Validate2 */
  12654.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12655.   call LoadLsRxutFuncs
  12656.  
  12657.   NETUSERVALIDATE2 = 500
  12658.   UserId          = 'USER04'
  12659.   passWord        = 'PASSWORD'
  12660.   DcName          = '\\ANYSRV01'
  12661.  
  12662.   myRc = NetMisc(NETUSERVALIDATE2, 'userInfo', Userid, passWord, DcName)
  12663.  
  12664.   if myRc <> '0' then do
  12665.    say 'Got error from NetMisc() ' myRc
  12666.    exitRc = 9
  12667.   end
  12668.   else do
  12669.    say 'Userid validated successfully'
  12670.    say 'Function code' userInfo.code
  12671.    say 'Privilege    ' userInfo.priv
  12672.    exitRc = 0
  12673.   end
  12674.  
  12675.   call DropLsRxutFuncs
  12676.   call RxFuncDrop 'LoadLsRxutFuncs'
  12677.  
  12678.   exit exitRc
  12679.  
  12680.  Example Output 
  12681.  
  12682.  
  12683.   Userid validated successfully
  12684.   Function code  0
  12685.   Privilege      1
  12686.  
  12687.  
  12688. ΓòÉΓòÉΓòÉ 14. NetSetInfo ΓòÉΓòÉΓòÉ
  12689.  
  12690. The Net Set Information functions are a family of functions that can be called 
  12691. with a number of parameters. The use of the NetSetInfo() has minimum of two 
  12692. different parameters. The generic syntax is: 
  12693.  
  12694.  
  12695. MyRc = NetSetInfo(option, stemvar, parm1, parm2, parm3)
  12696. MyRc = NetSetInfo(option, parm1, parm2, parm3)
  12697.  
  12698. The option parameter contains a value to determine what type or option has to 
  12699. be set. 
  12700.  
  12701. The parm1, parm2, parm3 parameters are dependent on the performed option. 
  12702.  
  12703. The MyRc parameter is the return code that will have an value from the 
  12704. NetSetInfo() function. If the call is successful the character '0' will be 
  12705. returned. Otherwise an error code and descriptive text are inserted by 
  12706. NetSetInfo() function. 
  12707.  
  12708. The option parameter values are defined in Option parameter values. 
  12709.  
  12710.  
  12711. ΓòÉΓòÉΓòÉ 14.1. NETACCESS Set Info ΓòÉΓòÉΓòÉ
  12712.  
  12713. The function modifies one or more access control profiles for an existing 
  12714. access control list for a resource. 
  12715.  
  12716. Syntax 
  12717.  
  12718.  
  12719. MyRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
  12720.  
  12721. Parameters 
  12722.  
  12723. The parameters required are: 
  12724.  
  12725.  'ModifyACL'    The REXX variable holding the values. The variable is divided 
  12726.                 into: 
  12727.  
  12728.                   o  ModifyACL.audit 
  12729.  
  12730.                      The auditing flags. The flags are defined as follows: 
  12731.  
  12732.                        -  A  Audit all. When this bit is set, all access 
  12733.                           attempts will be audited. 
  12734.  
  12735.                        -  O  If O, audit successful file opens. 
  12736.  
  12737.                        -  W  If W, audit successful file writes and successful 
  12738.                           directory creates. 
  12739.  
  12740.                        -  D  If D, audit successful file deletes or truncates 
  12741.                           and successful directory deletes. 
  12742.  
  12743.                        -  P  If P, audit successful file and directory access 
  12744.                           control profile change. 
  12745.  
  12746.                        -  o  If o, audit failed file opens. 
  12747.  
  12748.                        -  w  If w, audit failed file writes and failed 
  12749.                           directory creates. 
  12750.  
  12751.                        -  d  If d, audit failed file deletes or truncates and 
  12752.                           failed directory deletes. 
  12753.  
  12754.                        -  p  If d, audit failed file and directory access 
  12755.                           control profile change. 
  12756.  
  12757.                        -  N or -none-  No auditing is performed. 
  12758.  
  12759.                      If no value is specied or ModifyACL.audit is not defined, 
  12760.                      existing auditing flags are not modified 
  12761.  
  12762.                   o  ModifyACL.count 
  12763.  
  12764.                      The number of access controls available for the resource. 
  12765.                      The value can be 0 or undefined. In this case access 
  12766.                      control profiles are not modified 
  12767.  
  12768.                   o  ModifyACL.i.ugname 
  12769.  
  12770.                      The user account or group name. The variable i has a value 
  12771.                      from 1 to ModifyACL.count 
  12772.  
  12773.                   o  ModifyACL.i.access 
  12774.  
  12775.                      The access control profile. The variable i is specified as 
  12776.                      above. The access control flags are as follows: 
  12777.  
  12778.                        -  N None 
  12779.  
  12780.                        -  A Attribute 
  12781.  
  12782.                        -  R Read 
  12783.  
  12784.                        -  W Write 
  12785.  
  12786.                        -  C Create 
  12787.  
  12788.                        -  X Execute 
  12789.  
  12790.                        -  D Delete 
  12791.  
  12792.                        -  P Permissions 
  12793.  
  12794.                        -  G This is a Group permission. The G parameter is not 
  12795.                           required to be specified 
  12796.  
  12797.  SrvName        The server computer name 
  12798.  
  12799.  resourceName   The resource name must be specified in the name format as 
  12800.                 described below: 
  12801.  
  12802.                                 Resource Type                 Name Format
  12803.                                 -------------                 -----------
  12804.                                 Drive                         drive:
  12805.                                 Path                          \path
  12806.                                 Directory                     drive:pathname
  12807.                                 File                          drive:pathname
  12808.                                 UNC                           \\server\sharename\path
  12809.                                 Pipe                          \pipe\pipename
  12810.                                 Spooler Queue                 \print\queuename
  12811.                                 Serial Device Queue           \comm\chardevqueue
  12812.  
  12813.  Note 
  12814.  
  12815.  The server computer name can be specified as '' for a local server. 
  12816.  
  12817.  Example 
  12818.  
  12819.  
  12820.   /* Modify existing Access Control Entry */
  12821.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12822.   call LoadLsRxutFuncs
  12823.  
  12824.   NETACCESS = 10
  12825.   SrvName = '\\ILIDC'
  12826.   resourceName = 'D:\APPS\TEMP'
  12827.   ModifyACL.count = 1
  12828.   ModifyACL.1.ugname = 'CSUSERS'
  12829.   ModifyACL.1.access = 'RWCD'
  12830.  
  12831.   myRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
  12832.  
  12833.   if myRc <> '0' then do
  12834.    say 'Got error from NetSetInfo() ' myRc
  12835.    call DropLsRxutFuncs
  12836.    exit 9
  12837.   end
  12838.   else do
  12839.    say
  12840.    say "Access Control Profile modified successfully"
  12841.   end
  12842.  
  12843.   call DropLsRxutFuncs
  12844.   call RxFuncDrop 'LoadLsRxutFuncs'
  12845.  
  12846.   exit 0
  12847.  
  12848.  Example Output 
  12849.  
  12850.  
  12851.   Access Control Profile modified successfully
  12852.  
  12853.  
  12854. ΓòÉΓòÉΓòÉ 14.2. NETALIAS Set Info ΓòÉΓòÉΓòÉ
  12855.  
  12856. The function modifies a certain alias definition parameter value. 
  12857.  
  12858. Syntax 
  12859.  
  12860.  
  12861. MyRc = NetSetInfo(NETALIAS, 'PARAMETER', parmValue, SrvName, AliasName)
  12862.  
  12863. Parameters 
  12864.  
  12865. The parameters required are: 
  12866.  
  12867.  'PARAMETER'       The parameter name of the alias value to be modified. The 
  12868.                    parameter values that causes a change of the alias 
  12869.                    definitions are specified below. Only one parameter value 
  12870.                    can be changed at a time. If the parameter is invalid or the 
  12871.                    parameter value is unknown or in error no changes will 
  12872.                    occur. 
  12873.  
  12874.                      o  remark 
  12875.  
  12876.                         The alias comment or remark 
  12877.  
  12878.                      o  server 
  12879.  
  12880.                         The location where the resource described by this alias 
  12881.                         resides. This parameter is only valid from the version 
  12882.                         4.0 of the LSRXUT.DLL 
  12883.  
  12884.                      o  mode 
  12885.  
  12886.                         When the alias is shared. Accepted values are: 
  12887.  
  12888.                                                 When shared                   Shared mode name
  12889.                                                 -----------                   ----------------
  12890.                                                 At server startup             'At server startup'
  12891.                                                                               'STARTUP'
  12892.  
  12893.                                                 Shared by adminstrator        'By administrator'
  12894.                                                                               'BYADMIN'
  12895.  
  12896.                                                 Shared by request to use      'At Requester use'
  12897.                                                                               'DYNAMIC'
  12898.  
  12899.                      o  maxuses 
  12900.  
  12901.                         The maximum number of users who can have redirection to 
  12902.                         the resource identified by this alias 
  12903.  
  12904.                      o  path 
  12905.  
  12906.                         The path for files alias only 
  12907.  
  12908.                      o  priority 
  12909.  
  12910.                         The serial device priority 
  12911.  
  12912.                      o  device_pool 
  12913.  
  12914.                         The serial device pool 
  12915.  
  12916.  parmValue         The value of the parameter that is being modified 
  12917.  
  12918.  SrvName           The server computer name. In this case the computer name of 
  12919.                    the domain controller 
  12920.  
  12921.  AliasName         The name of the alias 
  12922.  
  12923.  Note 
  12924.  
  12925.  The server computer name can be specified as '' for a local domain controller. 
  12926.  
  12927.  Example 
  12928.  
  12929.  
  12930.   /* Modify existing Alias remark, maxuses and share mode */
  12931.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  12932.   call LoadLsRxutFuncs
  12933.  
  12934.   NETALIAS  = 20
  12935.   SrvName   = '\\ILIDC'
  12936.   AliasName = 'BOOKS'
  12937.   aliasInfo.remark  = 'Modified Alias for more uses'
  12938.   aliasInfo.maxuses = 280
  12939.   aliasInfo.mode    = 'At Requester use'
  12940.  
  12941.   myRc = NetSetInfo(NETALIAS, 'remark', aliasInfo.remark, SrvName, AliasName)
  12942.  
  12943.   if myRc <> '0' then do
  12944.    say 'Got error from NetSetInfo() ' myRc
  12945.    call DropLsRxutFuncs
  12946.    exit 9
  12947.   end
  12948.  
  12949.   myRc = NetSetInfo(NETALIAS, 'maxuses', aliasInfo.maxuses, SrvName, AliasName)
  12950.  
  12951.   if myRc <> '0' then do
  12952.    say 'Got error from NetSetInfo() ' myRc
  12953.    call DropLsRxutFuncs
  12954.    exit 9
  12955.   end
  12956.  
  12957.   myRc = NetSetInfo(NETALIAS, 'mode', aliasInfo.mode, SrvName, AliasName)
  12958.  
  12959.   if myRc <> '0' then do
  12960.    say 'Got error from NetSetInfo() ' myRc
  12961.    call DropLsRxutFuncs
  12962.    exit 9
  12963.   end
  12964.   else do
  12965.    say
  12966.    say "Alias definition modified successfully"
  12967.   end
  12968.  
  12969.   call DropLsRxutFuncs
  12970.   call RxFuncDrop 'LoadLsRxutFuncs'
  12971.  
  12972.   exit 0
  12973.  
  12974.  Example Output 
  12975.  
  12976.  
  12977.   Alias definition modified successfully
  12978.  
  12979.  
  12980. ΓòÉΓòÉΓòÉ 14.3. NETAPP Set Info ΓòÉΓòÉΓòÉ
  12981.  
  12982. The function modifies one of the application definition parameter values. 
  12983.  
  12984. Syntax 
  12985.  
  12986.  
  12987. MyRc = NetSetInfo(NETAPP, 'PARAMETER', parmValue, SrvName, AppName, UserId)
  12988.  
  12989. Parameters 
  12990.  
  12991. The parameters required are: 
  12992.  
  12993.  'PARAMETER'       The parameter name of the application value to be modified. 
  12994.                    The parameter values that causes a change of the alias 
  12995.                    definitions are specified below. Only one parameter value 
  12996.                    can be changed at a time. If the parameter is invalid or the 
  12997.                    parameter value is unknown or in error no changes will 
  12998.                    occour. 
  12999.  
  13000.                      o  remark 
  13001.  
  13002.                         The application remark 
  13003.  
  13004.                      o  command 
  13005.  
  13006.                         The command that starts the application 
  13007.  
  13008.                      o  command_parms 
  13009.  
  13010.                         The application start parameters 
  13011.  
  13012.  parmValue         The value of the parameter that is being modified 
  13013.  
  13014.  SrvName           The server computer name. In this case the computer name of 
  13015.                    the domain controller 
  13016.  
  13017.  AppName           The name of the application 
  13018.  
  13019.  UserId            The Userid must be specified for private application. For 
  13020.                    public applications use the value '' 
  13021.  
  13022.  Note 
  13023.  
  13024.  The server computer name can be specified as '' for a local domain controller. 
  13025.  
  13026.  Example 
  13027.  
  13028.  
  13029.   /* Modify existing Public application remark */
  13030.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13031.   call LoadLsRxutFuncs
  13032.  
  13033.   NETAPP  = 30
  13034.   SrvName = '\\ILIDC'
  13035.   AppName = 'BOOKREAD'
  13036.   UserId  = ''
  13037.   appInfo.remark  = 'IBM BookManager Read/2 1.2.1'
  13038.  
  13039.   myRc = NetSetInfo(NETAPP, 'remark', appInfo.remark, SrvName, AppName, UserId)
  13040.  
  13041.   if myRc <> '0' then do
  13042.    say 'Got error from NetSetInfo() ' myRc
  13043.    call DropLsRxutFuncs
  13044.    exit 9
  13045.   end
  13046.   else do
  13047.    say
  13048.    say "Application remark modified successfully"
  13049.   end
  13050.  
  13051.   call DropLsRxutFuncs
  13052.   call RxFuncDrop 'LoadLsRxutFuncs'
  13053.  
  13054.   exit 0
  13055.  
  13056.  Example Output 
  13057.  
  13058.  
  13059.   Application remark modified successfully
  13060.  
  13061.  
  13062. ΓòÉΓòÉΓòÉ 14.4. NETDASD Set Info (LS40) ΓòÉΓòÉΓòÉ
  13063.  
  13064. The function modifies a directory limit parameter. 
  13065.  
  13066. Syntax 
  13067.  
  13068.  
  13069. MyRc = NetSetInfo(NETDASD, 'PARAMETER', parmValue, SrvName, DirPath, Flag)
  13070.  
  13071. Parameters 
  13072.  
  13073. The parameters required are: 
  13074.  
  13075.  'PARAMETER'   The parameter name of the directory limit value to be modified. 
  13076.                The parameter values that causes a change of the directory limit 
  13077.                definitions are specified below. Only one parameter value can be 
  13078.                changed at a time. If the parameter is invalid or the parameter 
  13079.                value is unknown or in error no changes will occour. 
  13080.  
  13081.                  o  max 
  13082.  
  13083.                     The amount of disk space allotted to this directory by 
  13084.                     directory limits. Specified in KB, this field can be set 
  13085.                     from 1 to 67108863. Note however, that subsequent access to 
  13086.                     the directory specified is functionally limited to the 
  13087.                     smaller of the following: 
  13088.  
  13089.                       1. Any directory limits restrictions on any parent 
  13090.                          directory 
  13091.  
  13092.                       2. The total free space on the drive 
  13093.  
  13094.                  o  thresh 
  13095.  
  13096.                     The initial alert threshold as a percentage of the total 
  13097.                     directory limit space allotted, with values ranging from 0 
  13098.                     to 99. Zero specifies that no threshold alert is to be 
  13099.                     generated, and 99 specifies that an alert is generated when 
  13100.                     99% of the allotted directory limit for this directory has 
  13101.                     been reached. Note that a minimum of 1KB of disk space must 
  13102.                     be allotted to a threshold; the value obtained by 
  13103.                     multiplying the DASDInfo.thresh decimal-point value (where 
  13104.                     5% is equal to 0.05) by DASDInfo.max must be at least 1KB. 
  13105.  
  13106.                     This threshold setting generates only 1 alert when this 
  13107.                     boundary is crossed. Subsequent alerts (generated 
  13108.                     incrementally after this threshold has been reached but 
  13109.                     before the entire limit is reached) are specified according 
  13110.                     to the DASDInfo.delta parameter 
  13111.  
  13112.                  o  delta 
  13113.  
  13114.                     The increment in which alerts are to be generated after the 
  13115.                     DASDInfo.thresh threshold has been crossed, but before all 
  13116.                     of the allotted disk space has been used. This parameter 
  13117.                     also is specified as a percentage of the total allotted 
  13118.                     directory limit space and can range from 0 upward, as long 
  13119.                     as its value is less than 99 - DASDInfo.thresh. 
  13120.  
  13121.                     Note that a minimum of 1KB of disk space must be allotted 
  13122.                     to an increment; the value obtained by multiplying the 
  13123.                     DASDInfo.delta decimal-point value (where 5% is equal to 
  13124.                     0.05) by DASDInfo.max must be at least 1KB 
  13125.  
  13126.  parmValue     The value of the parameter that is being modified 
  13127.  
  13128.  SrvName       The server computer name 
  13129.  
  13130.  DirPath       The directory path specification 
  13131.  
  13132.  Flag          A flag controlling the operations when a directory limit is 
  13133.                added The following values are valid: 
  13134.  
  13135.                               Value Meaning
  13136.                               ----- -------
  13137.                                0    Compares a newly specified limit to the amount
  13138.                                     of disk space already taken by the directory.
  13139.                                     If the directory tree size exceeds the new limit,
  13140.                                     NERR_MaxValidationFailed (2304) is returned
  13141.  
  13142.                                1    Sets the new limit regardless of the present
  13143.                                     size of the directory tree
  13144.  
  13145.  Note 
  13146.  
  13147.  The server computer name can be specified as '' for a local server. 
  13148.  
  13149.  Example 
  13150.  
  13151.  
  13152.   /* Set new DASD directory limit maximum size */
  13153.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13154.   call LoadLsRxutFuncs
  13155.  
  13156.   NETDASD             = 750
  13157.   parameter           = 'max'
  13158.   parmValue           = 512
  13159.   SrvName             = '\\DOMAIN_CONTRLR'
  13160.   DirPath             = 'D:\APPS\DATA'
  13161.   Flag                = 1
  13162.  
  13163.   myRc = NetSetInfo(NETDASD, parameter, parmValue, SrvName, DirPath, Flag)
  13164.  
  13165.   if myRc <> '0' then do
  13166.    say 'Got error from NetSetInfo() ' myRc
  13167.    exitRc = 9
  13168.   end
  13169.   else do
  13170.    say 'Directory Limit set successfully'
  13171.    exitRc = 0
  13172.   end
  13173.  
  13174.   call DropLsRxutFuncs
  13175.   call RxFuncDrop 'LoadLsRxutFuncs'
  13176.  
  13177.   exit exitRc
  13178.  
  13179.  Example Output 
  13180.  
  13181.  
  13182.   Directory Limit set successfully
  13183.  
  13184.  
  13185. ΓòÉΓòÉΓòÉ 14.5. NETEXPIREPASSWORD Expire password ΓòÉΓòÉΓòÉ
  13186.  
  13187. The function expires a password for a userid. 
  13188.  
  13189. Syntax 
  13190.  
  13191.  
  13192. MyRc = NetSetInfo(NETEXPIREPASSWORD, SrvName, UserId)
  13193.  
  13194. Parameters 
  13195.  
  13196. The parameters specified are: 
  13197.  
  13198.  SrvName           The computer name of the domain controller 
  13199.  
  13200.  UserId            The userid to expire password on 
  13201.  
  13202.  Note 
  13203.  
  13204.  The server computer name can be specified as '' for a local domain controller. 
  13205.  
  13206.  Example 
  13207.  
  13208.  
  13209.   /* Expire password for a userid */
  13210.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13211.   call LoadLsRxutFuncs
  13212.  
  13213.   NETEXPIREPASSWORD = 400
  13214.   DcName            = '\\ILIDC'
  13215.   Userid            = 'DEPT001'
  13216.  
  13217.   myRc = NetSetInfo(NETEXPIREPASSWORD, DcName, Userid)
  13218.  
  13219.   if myRc <> '0' then do
  13220.    say 'Got error from NetSetInfo() ' myRc
  13221.    call DropLsRxutFuncs
  13222.    exit 9
  13223.   end
  13224.  
  13225.   say 'Password expired successfully for ' Userid
  13226.  
  13227.   call DropLsRxutFuncs
  13228.   call RxFuncDrop 'LoadLsRxutFuncs'
  13229.  
  13230.   exit 0
  13231.  
  13232.  Example Output 
  13233.  
  13234.  
  13235.   Password expired successfully for  DEPT001
  13236.  
  13237.  
  13238. ΓòÉΓòÉΓòÉ 14.6. NETGROUP Set Info ΓòÉΓòÉΓòÉ
  13239.  
  13240. The function modifies the comment field of a group definition. 
  13241.  
  13242. Syntax 
  13243.  
  13244.  
  13245. MyRc = NetSetInfo(NETGROUP, 'PARAMETER', parmValue, SrvName, GroupName)
  13246.  
  13247. Parameters 
  13248.  
  13249. The parameters required are: 
  13250.  
  13251.  'PARAMETER'       The parameter name of the group definition to be modified. 
  13252.                    If the parameter is invalid or the parameter value is 
  13253.                    unknown or in error no changes will occour. 
  13254.  
  13255.                      o  comment 
  13256.  
  13257.                         The group comment 
  13258.  
  13259.  parmValue         The value of the parameter that is being modified 
  13260.  
  13261.  SrvName           The server computer name. In this case the computer name of 
  13262.                    the domain controller 
  13263.  
  13264.  GroupName         The name of the group 
  13265.  
  13266.  Note 
  13267.  
  13268.  The server computer name can be specified as '' for a local domain controller. 
  13269.  
  13270.  Example 
  13271.  
  13272.  
  13273.   /* Modify a Group comment */
  13274.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13275.   call LoadLsRxutFuncs
  13276.  
  13277.   NETGROUP  = 70
  13278.   SrvName   = '\\FSC30DC0'
  13279.   GroupName = 'ALLGROUP'
  13280.   grpInfo.comment  = 'The New Group for Department Managers'
  13281.  
  13282.   myRc = NetSetInfo(NETGROUP, 'comment', grpInfo.comment, SrvName, GroupName)
  13283.  
  13284.   if myRc <> '0' then do
  13285.    say 'Got error from NetSetInfo() ' myRc
  13286.    call DropLsRxutFuncs
  13287.    exit 9
  13288.   end
  13289.   else do
  13290.    say
  13291.    say "Group comment modified successfully"
  13292.   end
  13293.  
  13294.   call DropLsRxutFuncs
  13295.   call RxFuncDrop 'LoadLsRxutFuncs'
  13296.  
  13297.   exit 0
  13298.  
  13299.  Example Output 
  13300.  
  13301.  
  13302.   Group comment modified successfully
  13303.  
  13304.  
  13305. ΓòÉΓòÉΓòÉ 14.7. NETGROUPUSERS Set Info ΓòÉΓòÉΓòÉ
  13306.  
  13307. The function sets the user accounts belonging to a group. 
  13308.  
  13309. Syntax 
  13310.  
  13311.  
  13312. MyRc = NetSetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  13313.  
  13314. Parameters 
  13315.  
  13316. The parameters required are: 
  13317.  
  13318.  'groupInfo'       The REXX variable describing the userids belonging to a 
  13319.                    group 
  13320.  
  13321.                      o  groupInfo.count 
  13322.  
  13323.                         The number of the user accounts 
  13324.  
  13325.                      o  groupInfo.i.userid 
  13326.  
  13327.                         The user account name entry i 
  13328.  
  13329.  SrvName           The computer name of the domain controller 
  13330.  
  13331.  GroupName         The name of the group 
  13332.  
  13333.  Note 
  13334.  
  13335.  The server computer name can be specified as '' for a local domain controller. 
  13336.  
  13337.  Example 
  13338.  
  13339.  
  13340.   /* Set user accounts into a group */
  13341.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13342.   call LoadLsRxutFuncs
  13343.  
  13344.   NETGROUPUSERS = 340
  13345.   SrvName  = '\\DOMAIN_CONTRLR'
  13346.   groupName= 'GROUPA'
  13347.  
  13348.   groupInfo.count = 3
  13349.   groupInfo.1.userid = 'USERID'
  13350.   groupInfo.2.userid = 'ADMINISTRATOR'
  13351.   groupInfo.3.userid = 'THE2'
  13352.  
  13353.   myRc = NetSetInfo(NETGROUPUSERS, 'groupInfo', SrvName, groupName)
  13354.  
  13355.   if myRc <> '0' then do
  13356.    say 'Got error from NetSetInfo() ' myRc
  13357.    exitRc = 9
  13358.   end
  13359.   else do
  13360.    say 'User accounts successfully added to group'
  13361.   end
  13362.  
  13363.   call DropLsRxutFuncs
  13364.   call RxFuncDrop 'LoadLsRxutFuncs'
  13365.  
  13366.   exit exitRc
  13367.  
  13368.  Example Output 
  13369.  
  13370.  
  13371.   User accounts successfully added to group
  13372.  
  13373.  
  13374. ΓòÉΓòÉΓòÉ 14.8. NETHOMEDIR Set Info ΓòÉΓòÉΓòÉ
  13375.  
  13376. The function modifies a home directory definition. 
  13377.  
  13378. Syntax 
  13379.  
  13380.  
  13381. MyRc = NetSetInfo(NETHOMEDIR, dcName, userId, homeDir)
  13382.  
  13383. Parameters 
  13384.  
  13385. The parameters required are: 
  13386.  
  13387.  dcName            The computer name of the domain controller 
  13388.  
  13389.  userId            The name of the userid 
  13390.  
  13391.  homeDir           The home directory specification. It must respect one of the 
  13392.                    following rules: 
  13393.  
  13394.                      1. homeDir is set to a none value, the home directory is 
  13395.                         removed 
  13396.  
  13397.                      2. a drive assignment is required, the homeDir value must 
  13398.                         include: 
  13399.  
  13400.  
  13401.                                                   x:\machineID\Y$\pathname
  13402.                                                   !  !         !  !
  13403.                                                   !  !         !  The path to the home directory
  13404.                                                   !  !         The drive on the server holding the home directory
  13405.                                                   !  The computer name of the server
  13406.                                                   The drive to be assigned
  13407.  
  13408.                         For example, the userid home directory has to be 
  13409.                         located on the server FILESRV on drive D and directory 
  13410.                         \FILES\USERID. The userid will have the home directory 
  13411.                         assigned as the Y drive. This requires the following 
  13412.                         definition of the home directory: 
  13413.  
  13414.                                                 Y:\FILESRV\D$\FILES\USERID
  13415.  
  13416.                      3. a drive assignment is not required, the homeDir value 
  13417.                         must include: 
  13418.  
  13419.  
  13420.                                                   \\machineID\Y$\pathname
  13421.                                                     !         !  !
  13422.                                                     !         !  The path to the home directory
  13423.                                                     !         The drive on the server holding the home directory
  13424.                                                     The computer name of the server
  13425.  
  13426.                         For example, the userid home directory has to be 
  13427.                         located on the server THESRV on drive F and directory 
  13428.                         \FILES\USERS\SHARED. The userid will have the home 
  13429.                         directory assigned as the first free drive. This 
  13430.                         requires the following definition of the home 
  13431.                         directory: 
  13432.  
  13433.                                                 \\THESRV\F$\FILES\USERS\SHARED
  13434.  
  13435.  Note 
  13436.  
  13437.  The dcName can be specified as '' for a local domain controller. 
  13438.  
  13439.  The administrator is responsible for the following: 
  13440.  
  13441.    1. Making sure the home directory exist 
  13442.  
  13443.    2. Creating required access to the directory 
  13444.  
  13445.    3. Removing a home directory if required 
  13446.  
  13447.  Example 
  13448.  
  13449.  
  13450.   /* Set a home director for a userid */
  13451.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13452.   call LoadLsRxutFuncs
  13453.  
  13454.   NETHOMEDIR = 230
  13455.   dcName     = '\\ILIDC'
  13456.   userId     = 'WS222B'
  13457.   homeDir    = 'Y:\ILIDC\D$\SHARED\FILES'
  13458.  
  13459.   /* Remove home directory parameter */
  13460.   /* homeDir    = '' */
  13461.  
  13462.   MyRc = NetSetInfo(NETHOMEDIR, dcName, userId, homeDir)
  13463.  
  13464.   if myRc <> '0' then do
  13465.    say 'Got error from NetSetInfo() ' myRc
  13466.    call DropLsRxutFuncs
  13467.    call RxFuncDrop 'LoadLsRxutFuncs'
  13468.    exit 9
  13469.   end
  13470.   else do
  13471.    say
  13472.    say "Home directory definition modified successfully"
  13473.   end
  13474.  
  13475.   call DropLsRxutFuncs
  13476.   call RxFuncDrop 'LoadLsRxutFuncs'
  13477.  
  13478.   exit 0
  13479.  
  13480.  Example Output 
  13481.  
  13482.  
  13483.   Home directory definition modified successfully
  13484.  
  13485.  
  13486. ΓòÉΓòÉΓòÉ 14.9. NETMESSAGELOGFILE Set Info ΓòÉΓòÉΓòÉ
  13487.  
  13488. The function sets the name of the message log file and the current logging 
  13489. status (on or off). 
  13490.  
  13491. Syntax 
  13492.  
  13493.  
  13494. MyRc = NetSetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  13495.  
  13496. Parameters 
  13497.  
  13498. The parameters specified are: 
  13499.  
  13500.  'msgLogFileInfo'  The REXX variable controlling the operation. The variable is 
  13501.                    divided into: 
  13502.  
  13503.                      o  msgLogFileInfo.filename 
  13504.  
  13505.                         A string containing the complete path and file name, 
  13506.                         beginning with the drive letter of the message log file 
  13507.  
  13508.                      o  msgLogFileInfo.logswitch 
  13509.  
  13510.                         A integer value specifying whether logging is enabled. 
  13511.                         If 0, message logging is disabled; otherwise, message 
  13512.                         logging is enabled. The default is to disable message 
  13513.                         logging 
  13514.  
  13515.  SrvName           The server or requester computer name 
  13516.  
  13517.  Note 
  13518.  
  13519.  The server or requester computer name can be specified as '' for a local 
  13520.  server or computer. 
  13521.  
  13522.  Example 
  13523.  
  13524.  
  13525.   /* Set the message log file and logging state */
  13526.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13527.   call LoadLsRxutFuncs
  13528.  
  13529.   NETMESSAGELOGFILE = 550
  13530.   SrvName           = '\\ANYSRV01'
  13531.   msgLogFileInfo.logswitch = 0 /* turn of logging */
  13532.   msgLogFileInfo.filename  = 'C:\IBMLAN\LOGS\MESSAGES.LOG'
  13533.  
  13534.   myRc = NetSetInfo(NETMESSAGELOGFILE, 'msgLogFileInfo', SrvName)
  13535.  
  13536.   if myRc <> '0' then do
  13537.    say 'Got error from NetSetInfo() ' myRc
  13538.    exitRc = 9
  13539.   end
  13540.   else do
  13541.    say 'Message log file information changed successfully'
  13542.   end
  13543.  
  13544.   call DropLsRxutFuncs
  13545.   call RxFuncDrop 'LoadLsRxutFuncs'
  13546.  
  13547.   exit exitRc
  13548.  
  13549.  Example Output 
  13550.  
  13551.  
  13552.   Message log file information changed successfully
  13553.  
  13554.  
  13555. ΓòÉΓòÉΓòÉ 14.10. NETSERVER Set Info ΓòÉΓòÉΓòÉ
  13556.  
  13557. The function modifies a control parameter of a server. 
  13558.  
  13559. Syntax 
  13560.  
  13561.  
  13562. MyRc = NetSetInfo(NETSERVER, 'PARAMETER', parmValue, SrvName)
  13563.  
  13564. Parameters 
  13565.  
  13566. The parameters required are: 
  13567.  
  13568.  'PARAMETER'       The parameter name of the server parameter to be modified. 
  13569.                    The parameter values that causes a change of the server 
  13570.                    control definitions are specified below. Only one parameter 
  13571.                    value can be changed at a time. If the parameter is invalid 
  13572.                    or the parameter value is unknown or in error, no changes 
  13573.                    will occur. 
  13574.  
  13575.                      o  comment 
  13576.  
  13577.                         A string containing a comment describing the server 
  13578.  
  13579.                      o  disc 
  13580.  
  13581.                         The autodisconnect time (in minutes).  A session is 
  13582.                         disconnected if it is idle longer than the time 
  13583.                         specified by the parameter disc 
  13584.  
  13585.                      o  alerts 
  13586.  
  13587.                         A string containing the list of user names on the alert 
  13588.                         table of the server. Spaces separate the names 
  13589.  
  13590.                      o  hidden 
  13591.  
  13592.                         The parameter determines whether the server is visible 
  13593.                         to other computers in the same domain. The following 
  13594.                         values are defined: 
  13595.  
  13596.  
  13597.                                                 VALUE     MEANING
  13598.                                                 -----     -------
  13599.                                                 0         Visible server
  13600.                                                 1         Hidden server, not visible
  13601.  
  13602.                      o  announce 
  13603.  
  13604.                         The network announce delta (in seconds), which 
  13605.                         determines how often the server is to be announced to 
  13606.                         other computers on the network 
  13607.  
  13608.                      o  anndelta 
  13609.  
  13610.                         The random announce rate (in milliseconds) for the 
  13611.                         announce parameter. The announce interval (announce 
  13612.                         parameter) can vary by the amount specified in the 
  13613.                         anndelta parameter 
  13614.  
  13615.                      o  alertsched 
  13616.  
  13617.                         The alert interval (in seconds) for notifying an 
  13618.                         administrator of a network event 
  13619.  
  13620.                      o  erroralert 
  13621.  
  13622.                         The number of entries that can be written to the error 
  13623.                         log file during the alertsched parameter interval 
  13624.                         before notifying an administrator 
  13625.  
  13626.                      o  logonalert 
  13627.  
  13628.                         The number of failed logon attempts to allow a user 
  13629.                         before notifying an administrator 
  13630.  
  13631.                      o  accessalert 
  13632.  
  13633.                         The number of failed file accesses to allow before 
  13634.                         issuing an administrative alert 
  13635.  
  13636.                      o  diskalert 
  13637.  
  13638.                         The number of kilobytes of free disk space at which an 
  13639.                         administrator must be notified that the free space is 
  13640.                         low 
  13641.  
  13642.                      o  netioalert 
  13643.  
  13644.                         The network I/O error ratio (in tenths of a percent) to 
  13645.                         allow before notifying an administrator 
  13646.  
  13647.                      o  maxauditsz 
  13648.  
  13649.                         The maximum audit file size (in KB) 
  13650.  
  13651.  parmValue         The value of the parameter that is being modified 
  13652.  
  13653.  SrvName           The server computer name 
  13654.  
  13655.  Note 
  13656.  
  13657.  The server computer name can be specified as '' for a local server. 
  13658.  
  13659.  Example 
  13660.  
  13661.  
  13662.   /* Net server set info */
  13663.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13664.   call LoadLsRxutFuncs
  13665.  
  13666.   NETSERVER  = 160
  13667.   parameter  = 'maxauditsz'
  13668.   parmValue  =  512
  13669.   SrvName    = '\\KING_BALU'
  13670.  
  13671.   myRc = NetSetInfo(NETSERVER, parameter, parmValue, SrvName)
  13672.  
  13673.   if myRc <> '0' then do
  13674.    say 'Got error from NetSetInfo() ' myRc
  13675.    rcCode = 9
  13676.   end
  13677.   else do
  13678.    say "Done"
  13679.    rcCode = 0
  13680.   end
  13681.  
  13682.   call DropLsRxutFuncs
  13683.   call RxFuncDrop 'LoadLsRxutFuncs'
  13684.  
  13685.   exit rcCode
  13686.  
  13687.  Example Output 
  13688.  
  13689.  
  13690.   Done
  13691.  
  13692.  The function modifies a parameter of a shared resource. 
  13693.  
  13694.  Syntax 
  13695.  
  13696.  
  13697.   MyRc = NetSetInfo(NETSHARE, 'PARAMETER', parmValue, netName, SrvName)
  13698.  
  13699.  Parameters 
  13700.  
  13701.  The parameters required are: 
  13702.  
  13703.  'PARAMETER'       The parameter name of the share parameter value to be 
  13704.                    modified. The parameter values that causes a change of the 
  13705.                    share definitions are specified below. Only one parameter 
  13706.                    value can be changed at a time. If the parameter is invalid 
  13707.                    or the parameter value is unknown or in error, no changes 
  13708.                    will occour. 
  13709.  
  13710.                      o  remark 
  13711.  
  13712.                         The remark set for the resource share 
  13713.  
  13714.                      o  max_uses 
  13715.  
  13716.                         The maximum of concurrent connections to the shared 
  13717.                         resource 
  13718.  
  13719.  parmValue         The value of the parameter that is being modified 
  13720.  
  13721.  netName           The network name of the shared resource 
  13722.  
  13723.  SrvName           The server computer name where the shared resource resides 
  13724.  
  13725.  Note 
  13726.  
  13727.  The server computer name can be specified as '' for a local server. 
  13728.  
  13729.  Example 
  13730.  
  13731.  
  13732.   /* Net share set info */
  13733.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13734.   call LoadLsRxutFuncs
  13735.  
  13736.   NETSHARE  = 190
  13737.   /* parmValue = 100 */
  13738.   parmValue = 'This is Book ManagerRead/2'
  13739.   netName   = 'BOOKMGR'
  13740.   SrvName   = '\\KING_BALU'
  13741.  
  13742.   /* myRc = NetSetInfo(NETSHARE, 'max_uses', parmValue, netName, SrvName) */
  13743.   myRc = NetSetInfo(NETSHARE, 'remark', parmValue, netName, SrvName)
  13744.  
  13745.   if myRc <> '0' then do
  13746.    say 'Got error from NetSetInfo() ' myRc
  13747.    rcCode = 9
  13748.   end
  13749.   else do
  13750.    say "Done"
  13751.    rcCode = 0
  13752.   end
  13753.  
  13754.   call DropLsRxutFuncs
  13755.   call RxFuncDrop 'LoadLsRxutFuncs'
  13756.  
  13757.   exit rcCode
  13758.  
  13759.  Example Output 
  13760.  
  13761.  
  13762.   Done
  13763.  
  13764.  
  13765. ΓòÉΓòÉΓòÉ 14.11. NETSERVERMODALS Set Info ΓòÉΓòÉΓòÉ
  13766.  
  13767. The function sets server related modals information in the user accounts 
  13768. subsystem (UAS) database. The NETLOGON service must be stopped to successfully 
  13769. set the parameter specified. 
  13770.  
  13771. Syntax 
  13772.  
  13773.  
  13774. MyRc = NetSetInfo(NETSERVERMODALS, 'PARAMETER', parmValue, SrvName)
  13775.  
  13776. Parameters 
  13777.  
  13778. The parameters required are: 
  13779.  
  13780.  'PARAMETER'       The parameter name of the server modals parameter value to 
  13781.                    be modified. The parameter values that causes a change of 
  13782.                    the server modals definitions are specified below. Only one 
  13783.                    parameter value can be changed at a time. If the parameter 
  13784.                    is invalid or the parameter value is unknown or in error, no 
  13785.                    changes will occur. 
  13786.  
  13787.                      o  role 
  13788.  
  13789.                         The server role. The following values are required to 
  13790.                         be specified: 
  13791.  
  13792.                                                 Value  Meaning
  13793.                                                 -----  -------
  13794.                                                  0     Standalone server
  13795.                                                  1     Member server in the domain
  13796.                                                  2     Backup server in the domain
  13797.                                                  3     Primary server in the domain
  13798.  
  13799.                      o  primary 
  13800.  
  13801.                         The computer name of the primary domain controller to 
  13802.                         which the server belongs 
  13803.  
  13804.  parmValue         The value of the parameter that is being modified 
  13805.  
  13806.  SrvName           The server computer name 
  13807.  
  13808.  Note 
  13809.  
  13810.  The server computer name can be specified as '' for a local server. 
  13811.  
  13812.  Example 
  13813.  
  13814.  
  13815.   /* Set server modals */
  13816.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  13817.   call LoadLsRxutFuncs
  13818.  
  13819.   NETSERVERMODALS = 370
  13820.   SrvName  = '\\DOMAIN_CONTRLR'
  13821.  
  13822.   parmValue = 3     /* Primary */
  13823.  
  13824.   myRc = NetSetInfo(NETSERVERMODALS, 'role', parmValue, SrvName)
  13825.  
  13826.   if myRc <> '0' then do
  13827.    say 'Got error from NetSetInfo() ' myRc
  13828.    exitRc = 9
  13829.   end
  13830.   else do
  13831.    say 'Done'
  13832.   end
  13833.  
  13834.   call DropLsRxutFuncs
  13835.   call RxFuncDrop 'LoadLsRxutFuncs'
  13836.  
  13837.   exit exitRc
  13838.  
  13839.  Example Output 
  13840.  
  13841.  
  13842.   Done
  13843.  
  13844.  
  13845. ΓòÉΓòÉΓòÉ 14.12. NETUSER Set Info ΓòÉΓòÉΓòÉ
  13846.  
  13847. The function modifies one of the userid definition parameter values. See also 
  13848. the additional userid account modification functions below: 
  13849.  
  13850.    o  NETUSERPASSWORD Set Info 
  13851.    o  NETEXPIREPASSWORD Expire password 
  13852.    o  NETHOMEDIR Set Info 
  13853.  
  13854.  Syntax 
  13855.  
  13856.  
  13857.   MyRc = NetSetInfo(NETUSER, 'PARAMETER', parmValue, SrvName, UserId)
  13858.  
  13859.  Parameters 
  13860.  
  13861.  The parameters required are: 
  13862.  
  13863.  'PARAMETER'       The parameter name of the application value to be modified. 
  13864.                    The parameter values that causes a change of the userid 
  13865.                    definitions are specified below. Only one parameter value 
  13866.                    can be changed at a time. If the parameter is invalid or the 
  13867.                    parameter value is unknown or in error, no changes will 
  13868.                    occur. 
  13869.  
  13870.                      o  name 
  13871.  
  13872.                         The user account name 
  13873.  
  13874.                      o  password 
  13875.  
  13876.                         The user account password 
  13877.  
  13878.                      o  priv 
  13879.  
  13880.                         The user account privilege level. The following values 
  13881.                         are allowed: 
  13882.  
  13883.                                                 Account type                     Value
  13884.                                                 ------------                     -----
  13885.                                                 Guest                            'Guest'
  13886.                                                 User                             'User'
  13887.                                                 Administrator                    'Admin'
  13888.  
  13889.                      o  home_dir 
  13890.  
  13891.                         If home_dir is set to a none value, the home directory 
  13892.                         is removed 
  13893.  
  13894.                         If a drive assignment is required, the home_dir value 
  13895.                         must include: 
  13896.  
  13897.  
  13898.                                                   x:\machineID\Y$\pathname
  13899.                                                   !  !         !  !
  13900.                                                   !  !         !  The path to the home directory
  13901.                                                   !  !         The drive on the server holding the home directory
  13902.                                                   !  The computer name of the server
  13903.                                                   The drive to be assigned
  13904.  
  13905.                         For example, the userid home directory has to be 
  13906.                         located on the server FILESRV on drive D and directory 
  13907.                         \FILES\USERID. The userid will have the home directory 
  13908.                         assigned as the Y drive. This requires the following 
  13909.                         definition of the home directory: 
  13910.  
  13911.                                                 Y:\FILESRV\D$\FILES\USERID
  13912.  
  13913.                         Another method is, when a drive assignment is not 
  13914.                         required, the home_dir value must include: 
  13915.  
  13916.  
  13917.                                                   \\machineID\Y$\pathname
  13918.                                                     !         !  !
  13919.                                                     !         !  The path to the home directory
  13920.                                                     !         The drive on the server holding the home directory
  13921.                                                     The computer name of the server
  13922.  
  13923.                         For example, the userid home directory has to be 
  13924.                         located on the server THESRV on drive F and directory 
  13925.                         \FILES\USERS\SHARED. The userid will have the home 
  13926.                         directory assigned as the first free drive. This 
  13927.                         requires the following definition of the home 
  13928.                         directory: 
  13929.  
  13930.                                                 \\THESRV\F$\FILES\USERS\SHARED
  13931.  
  13932.                      o  comment 
  13933.  
  13934.                         The user account comment string. Up to 48 characters 
  13935.                         can be specified 
  13936.  
  13937.                      o  flags 
  13938.  
  13939.                         User account flags. See below for the numeric values 
  13940.                         allowed: 
  13941.  
  13942.                                                 Value  Meaning
  13943.                                                 -----  ---------------------------------------------
  13944.                                                   1    Must be 1.  Logon script enabled
  13945.                                                   2    If 2, user's account disabled
  13946.                                                   4    If 4, user's account cannot be deleted
  13947.                                                   8    If 8, home directory required
  13948.                                                  32    If 32, password not required
  13949.                                                  64    If 64, user cannot change password
  13950.  
  13951.                         Use addition to set multiple values 
  13952.  
  13953.                      o  script_path 
  13954.  
  13955.                         The name of the logon script together with the path 
  13956.                         specification relative to the NETLOGON SCRIPT parameter 
  13957.  
  13958.                      o  auth_flags 
  13959.  
  13960.                         Grants operator privilege (accounts, print, comm, and 
  13961.                         server) to users. See below for the numeric values 
  13962.                         allowed: 
  13963.  
  13964.                                                  Bits   Meaning
  13965.                                                  -----  ---------------------------------------------
  13966.                                                  0      If 1, print operator privilege is enabled.
  13967.  
  13968.                                                  1      If 1, comm operator privilege is enabled.
  13969.  
  13970.                                                  2      If 1, server operator privilege is enabled.
  13971.  
  13972.                                                  3      If 1, accounts operator privilege is enabled.
  13973.  
  13974.                         A value of decimal 3 is equal to a print and comm 
  13975.                         operator privilege. 
  13976.  
  13977.                      o  full_name 
  13978.  
  13979.                         The full name of the user. Up to 48 characters can be 
  13980.                         specified 
  13981.  
  13982.                      o  usr_comment 
  13983.  
  13984.                         The account comment which is a user-settable comment. 
  13985.                         Up to 48 characters can be specified 
  13986.  
  13987.                      o  workstations 
  13988.  
  13989.                         A string containing a list of requesters from which a 
  13990.                         userid is permitted to log on. A null string means all 
  13991.                         requesters are allowed. (To disallow logon, the account 
  13992.                         disabled flag must be set.) Up to 8 requesters can be 
  13993.                         specified, where the names are separated by spaces 
  13994.  
  13995.                      o  max_storage 
  13996.  
  13997.                         The maximum storage allotted for the home directory in 
  13998.                         kilobytes. Use the value -1 to specify no limit 
  13999.  
  14000.                      o  logon_server 
  14001.  
  14002.                         The computer to handle logon requests for a user 
  14003.                         account 
  14004.  
  14005.  parmValue         The value of the parameter that is being modified 
  14006.  
  14007.  SrvName           The server computer name. In this case the computer name of 
  14008.                    the domain controller 
  14009.  
  14010.  UserId            The user account must be specified 
  14011.  
  14012.  Note 
  14013.  
  14014.  The server computer name can be specified as '' for a local domain controller. 
  14015.  
  14016.  Example 
  14017.  
  14018.  
  14019.   /* Modify the max_storage parameter for a userid */
  14020.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14021.   call LoadLsRxutFuncs
  14022.  
  14023.   NETUSER = 280
  14024.   SrvName = '\\ILIDC'
  14025.   UserId  = 'THEONE'
  14026.   usrInfo.max_storage = 1024
  14027.  
  14028.   myRc = NetSetInfo(NETUSER, 'max_storage', usrInfo.max_storage, SrvName, UserId)
  14029.  
  14030.   if myRc <> '0' then do
  14031.    say 'Got error from NetSetInfo() ' myRc
  14032.    call DropLsRxutFuncs
  14033.    exit 9
  14034.   end
  14035.   else do
  14036.    say
  14037.    say "Set home directory max storage parameter successfully"
  14038.   end
  14039.  
  14040.   call DropLsRxutFuncs
  14041.   call RxFuncDrop 'LoadLsRxutFuncs'
  14042.  
  14043.   exit 0
  14044.  
  14045.  Example Output 
  14046.  
  14047.  
  14048.   Set home directory max storage parameter successfully
  14049.  
  14050.  
  14051. ΓòÉΓòÉΓòÉ 14.13. NETUSERMODALS Set Info ΓòÉΓòÉΓòÉ
  14052.  
  14053. The function sets global modals related information for all user accounts and 
  14054. groups in the user accounts subsystem (UAS) database. 
  14055.  
  14056. Syntax 
  14057.  
  14058.  
  14059. MyRc = NetSetInfo(NETUSERMODALS, 'PARAMETER', parmValue, SrvName)
  14060.  
  14061. Parameters 
  14062.  
  14063. The parameters required are: 
  14064.  
  14065.  'PARAMETER'       The parameter name of the user modals to be modified. The 
  14066.                    parameter values that causes a change of the user modals 
  14067.                    definitions are specified below. Only one parameter value 
  14068.                    can be changed at a time. If the parameter is invalid or the 
  14069.                    parameter value is unknown or in error, no changes will 
  14070.                    occour. 
  14071.  
  14072.                      o  min_passwd_len 
  14073.  
  14074.                         The minimum password length 
  14075.  
  14076.                      o  max_passwd_age 
  14077.  
  14078.                         The maximum password age in days 
  14079.  
  14080.                      o  min_passwd_age 
  14081.  
  14082.                         The minimum password age in days 
  14083.  
  14084.                      o  force_logoff 
  14085.  
  14086.                         The length of time (in seconds) after the valid logon 
  14087.                         hours that the user account should be forced off the 
  14088.                         network 
  14089.  
  14090.                      o  password_hist_len 
  14091.  
  14092.                         The length of the password history, that is, the number 
  14093.                         of passwords in the history buffer that are scanned 
  14094.                         versus the new password in a password change attempt 
  14095.  
  14096.  parmValue         The value of the parameter that is being modified 
  14097.  
  14098.  SrvName           The domain controller computer name 
  14099.  
  14100.  Note 
  14101.  
  14102.  The server computer name can be specified as '' for a local domain controller. 
  14103.  
  14104.  Example 
  14105.  
  14106.  
  14107.   /* Set user modals */
  14108.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14109.   call LoadLsRxutFuncs
  14110.  
  14111.   NETUSERMODALS = 360
  14112.   SrvName       = '\\DOMAIN_CONTRLR'
  14113.  
  14114.   parmValue = 6 /* Minimum password length is 6 */
  14115.  
  14116.   myRc = NetSetInfo(NETUSERMODALS, 'min_passwd_len', parmValue, SrvName)
  14117.  
  14118.   if myRc <> '0' then do
  14119.    say 'Got error from NetSetInfo() ' myRc
  14120.    exitRc = 9
  14121.   end
  14122.   else do
  14123.    say 'Done'
  14124.   end
  14125.  
  14126.   call DropLsRxutFuncs
  14127.   call RxFuncDrop 'LoadLsRxutFuncs'
  14128.  
  14129.   exit exitRc
  14130.  
  14131.  Example Output 
  14132.  
  14133.  
  14134.   Done
  14135.  
  14136.  
  14137. ΓòÉΓòÉΓòÉ 14.14. NETUSERGROUPS Set Info ΓòÉΓòÉΓòÉ
  14138.  
  14139. The function sets the groups of which a user account is a member. 
  14140.  
  14141. Syntax 
  14142.  
  14143.  
  14144. MyRc = NetSetInfo(NETUSERGROUPS, 'GroupNames', SrvName, UserId)
  14145.  
  14146. Parameters 
  14147.  
  14148. The parameters required are: 
  14149.  
  14150.  'GroupNames'      The REXX variable describing the groups a userid is 
  14151.                    belonging to 
  14152.  
  14153.                      o  GroupNames.count 
  14154.  
  14155.                         The number of the groups 
  14156.  
  14157.                      o  GroupNames.i.groupname 
  14158.  
  14159.                         The group name entry i 
  14160.  
  14161.  SrvName           The computer name of the domain controller 
  14162.  
  14163.  UserId            The name of the user account 
  14164.  
  14165.  Note 
  14166.  
  14167.  The server computer name can be specified as '' for a local domain controller. 
  14168.  
  14169.  Example 
  14170.  
  14171.  
  14172.   /* Set userid group membership */
  14173.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14174.   call LoadLsRxutFuncs
  14175.  
  14176.   NETUSERGROUPS = 330
  14177.   SrvName  = '\\DOMAIN_CONTRLR'
  14178.   UserId   = 'WS2222'
  14179.  
  14180.   groupNames.count = 3
  14181.   groupNames.1.name = 'GROUPA'
  14182.   groupNames.2.name = 'GROUPB'
  14183.   groupNames.3.name = 'GROUPC'
  14184.  
  14185.   myRc = NetSetInfo(NETUSERGROUPS, 'groupNames', SrvName, UserId)
  14186.  
  14187.   if myRc <> '0' then do
  14188.    say 'Got error from NetSetInfo() ' myRc
  14189.    exitRc = 9
  14190.   end
  14191.   else do
  14192.    say 'Done'
  14193.   end
  14194.  
  14195.   call DropLsRxutFuncs
  14196.   call RxFuncDrop 'LoadLsRxutFuncs'
  14197.  
  14198.   exit exitRc
  14199.  
  14200.  Example Output 
  14201.  
  14202.  
  14203.   Done
  14204.  
  14205.  
  14206. ΓòÉΓòÉΓòÉ 14.15. NETUSERPASSWORD Set Info ΓòÉΓòÉΓòÉ
  14207.  
  14208. The function changes a user account password. 
  14209.  
  14210. Syntax 
  14211.  
  14212.  
  14213. MyRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
  14214.  
  14215. Parameters 
  14216.  
  14217. The parameters specified are: 
  14218.  
  14219.  SrvName           The server computer name 
  14220.  
  14221.  UserId            The name of the userid to change to password on 
  14222.  
  14223.  OldPw             The old password 
  14224.  
  14225.  NewPw             The new password 
  14226.  
  14227.  Note 
  14228.  
  14229.  The server computer name can be specified as '' for a local domain controller. 
  14230.  
  14231.  Example 
  14232.  
  14233.  
  14234.   /* Change a userid password */
  14235.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14236.   call LoadLsRxutFuncs
  14237.  
  14238.   NETUSERPASSWORD = 260
  14239.   SrvName         = '\\ILIDC'
  14240.   UserId          = 'WS12345'
  14241.   OldPw           = 'PASSWORD'
  14242.   NewPw           = 'NEWPASS'
  14243.  
  14244.   myRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
  14245.  
  14246.   if myRc <> '0' then do
  14247.    say 'Got error from NetSetInfo() ' myRc
  14248.    call DropLsRxutFuncs
  14249.    exit 9
  14250.   end
  14251.   else do
  14252.    say 'Changed Password successfully'
  14253.    say
  14254.   end
  14255.  
  14256.   call DropLsRxutFuncs
  14257.   call RxFuncDrop 'LoadLsRxutFuncs'
  14258.  
  14259.   exit 0
  14260.  
  14261.  Example Output 
  14262.  
  14263.  
  14264.   Changed Password successfully
  14265.  
  14266.  
  14267. ΓòÉΓòÉΓòÉ 14.16. NETWKSTA Set Info ΓòÉΓòÉΓòÉ
  14268.  
  14269. The function modifies a control parameter of a requester. 
  14270.  
  14271. Syntax 
  14272.  
  14273.  
  14274. MyRc = NetSetInfo(NETWKSTA, 'PARAMETER', parmValue, ReqName)
  14275.  
  14276. Parameters 
  14277.  
  14278. The parameters required are: 
  14279.  
  14280.  'PARAMETER'       The parameter name of the requester parameter value to be 
  14281.                    modified. The parameter values that causes a change of the 
  14282.                    requester definitions are specified below. Only one 
  14283.                    parameter value can be changed at a time. If the parameter 
  14284.                    is invalid or the parameter value is unknown or in error, no 
  14285.                    changes will occur. 
  14286.  
  14287.                      o  charwait 
  14288.  
  14289.                         The number of seconds the requester waits for a remote 
  14290.                         serial or communication device to become available 
  14291.  
  14292.                      o  chartime 
  14293.  
  14294.                         The number of milliseconds the requester waits to 
  14295.                         collect data to send to a remote serial or 
  14296.                         communication device 
  14297.  
  14298.                      o  charcount 
  14299.  
  14300.                         The number of bytes of information the requester sends 
  14301.                         to a remote serial or communication device 
  14302.  
  14303.                      o  errlogsz 
  14304.  
  14305.                         The maximum size (in KB) of the error log file of the 
  14306.                         requester 
  14307.  
  14308.                      o  printbuftime 
  14309.  
  14310.                         The number of seconds closing print jobs are closed 
  14311.  
  14312.                      o  wrkheuristics 
  14313.  
  14314.                         A string of flags used to control a requesters 
  14315.                         operation 
  14316.  
  14317.                      o  oth_domains 
  14318.  
  14319.                         A string listing all domains on which the machine 
  14320.                         currently is listed. The string is space-delimited list 
  14321.                         of domains 
  14322.  
  14323.  parmValue         The value of the parameter that is being modified 
  14324.  
  14325.  ReqName           The requester computer name 
  14326.  
  14327.  Note 
  14328.  
  14329.  The requester computer name can be specified as '' for a local requester. 
  14330.  
  14331.  Example 
  14332.  
  14333.  
  14334.   /* Perform Net Wksta Set info */
  14335.   call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14336.   call LoadLsRxutFuncs
  14337.  
  14338.   NETWKSTA = 350
  14339.   CpuName  = '\\KING_BALU'
  14340.  
  14341.   wkstaInfo.parm  = 'wrkheuristics'
  14342.   wkstaInfo.value = '11111111213111111100010111201112210012110'
  14343.  
  14344.   myRc = NetSetInfo(NETWKSTA, wkstaInfo.parm, wkstaInfo.value, CpuName)
  14345.  
  14346.   if myRc <> '0' then do
  14347.    say 'Got error from NetSetInfo() ' myRc
  14348.    exitCode = 9
  14349.   end
  14350.   else do
  14351.    say "Set parameter successfully"
  14352.    exitCode = 0
  14353.   end
  14354.  
  14355.   call DropLsRxutFuncs
  14356.   call RxFuncDrop 'LoadLsRxutFuncs'
  14357.  
  14358.   exit exitCode
  14359.  
  14360.  Example Output 
  14361.  
  14362.  
  14363.   Set parameter successfully
  14364.  
  14365.  
  14366. ΓòÉΓòÉΓòÉ 15. RxSpl functions ΓòÉΓòÉΓòÉ
  14367.  
  14368. The DOS Spooler functions provided in LSRXUT.DLL are listed below: 
  14369.  
  14370. RxSplControlDevice()            Control a printer port
  14371. RxSplCreateDevice()             Create a print device
  14372. RxSplCreateQueue()              Create a print queue
  14373. RxSplDeleteDevice()             Delete a print device
  14374. RxSplDeleteJob()                Delete a print job
  14375. RxSplDeleteQueue()              Delete a print queue
  14376. RxSplEnumDevice()               Enumerate print devices
  14377. RxSplEnumDriver()               Enumerate printer drivers
  14378. RxSplEnumJob()                  Enumerate print jobs
  14379. RxSplEnumPort()                 Enumerate printer ports
  14380. RxSplEnumPrinter()              Enumerate print destinations
  14381. RxSplEnumQueue()                Enumerate print queues
  14382. RxSplHoldJob()                  Hold (pause) a print job
  14383. RxSplHoldQueue()                Hold (pause) a printer queue
  14384. RxSplPurgeQueue()               Purge print jobs in a printer queue
  14385. RxSplQueryDevice()              Query print device information
  14386. RxSplQueryJob()                 Query print job information
  14387. RxSplQueryQueue()               Query print queue information
  14388. RxSplReleaseJob()               Release a paused print job
  14389. RxSplReleaseQueue()             Release a paused printer queue
  14390. RxSplSetJob()
  14391.  
  14392.  
  14393. ΓòÉΓòÉΓòÉ 15.1. Spooler Comments ΓòÉΓòÉΓòÉ
  14394.  
  14395. All of the functions are can be called on a local computer. But for some of the 
  14396. functions restrictions apply. 
  14397.  
  14398. A printer driver is divided into two components: The components are the printer 
  14399. driver name and the device name. For example: 
  14400.  
  14401.  
  14402.   PLOTTER.HP7475A
  14403.  
  14404.  
  14405.   PLOTTER is the printer driver name
  14406.  
  14407.   HP7475A is the device name
  14408.  
  14409.  
  14410. ΓòÉΓòÉΓòÉ 15.2. RxSplControlDevice() ΓòÉΓòÉΓòÉ
  14411.  
  14412. The function cancels, holds, continues, or restarts a print device. Use this 
  14413. function with care. 
  14414.  
  14415. Syntax 
  14416.  
  14417.  
  14418. MyRc = RxSplControlDevice(ComputerName, RxStem)
  14419.  
  14420. Parameters 
  14421.  
  14422. The required parameter values are: 
  14423.  
  14424.  ComputerName   Must be either be specified as '' for a local computer or 
  14425.                 '\\computername'. 
  14426.  
  14427.  'RxStem'       A REXX variable which is divided into: 
  14428.  
  14429.                   o  RxStem.PrintDeviceName 
  14430.  
  14431.                      The printer name 
  14432.  
  14433.                   o  RxStem.Control 
  14434.  
  14435.                      The control action. The following values are valid: 
  14436.  
  14437.                                           Value            What it does
  14438.                                           -----------      -------------------------
  14439.                                           PRD_DELETE       Delete current print job
  14440.                                           PRD_PAUSE        Pause printing
  14441.                                           PRD_CONT         Continue paused print job
  14442.                                           PRD_RESTART      Restart print job.
  14443.  
  14444.  
  14445.  Example use 
  14446.  
  14447.   /* Control a printer device */
  14448.   if RxFuncQuery('RxSplControlDevice') <> 0 then do
  14449.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14450.    call LoadLsRxutFuncs
  14451.   end
  14452.  
  14453.   ComputerName           = '\\ILIDC'
  14454.   RxStem.PrintDeviceName = 'LPT1'
  14455.   RxStem.Control         = 'PRD_PAUSE'
  14456.  
  14457.   MyRc = RxSplControlDevice(ComputerName, RxStem)
  14458.  
  14459.   if MyRc <> '0' then do
  14460.    say 'Error from RxSplControlDevice. RC =' MyRc
  14461.    exit 9
  14462.   end
  14463.   else do
  14464.    say 'Printer Device' RxStem.PrintDeviceName 'paused successfully'
  14465.   end
  14466.  
  14467.   exit 0
  14468.  
  14469.  
  14470. ΓòÉΓòÉΓòÉ 15.3. RxSplCreateDevice() ΓòÉΓòÉΓòÉ
  14471.  
  14472. The function creates a printer device. The printer drivers used must be 
  14473. installed before using this function. 
  14474.  
  14475. Syntax 
  14476.  
  14477.  
  14478. MyRc = RxSplCreateDevice(ComputerName, RxStem)
  14479.  
  14480. Parameters 
  14481.  
  14482. The required parameter values are: 
  14483.  
  14484.  ComputerName   Must be either be specified as '' for a local computer or 
  14485.                 '\\computername'. For the remote case, administrator authority 
  14486.                 is required 
  14487.  
  14488.  'RxStem'       A REXX variable which is divided into: 
  14489.  
  14490.                   o  RxStem.PrinterName 
  14491.  
  14492.                      The printer name 
  14493.  
  14494.                   o  RxStem.LogAddr 
  14495.  
  14496.                      The printer port logical address. (For example LPT2). The 
  14497.                      port address must exist 
  14498.  
  14499.                   o  RxStem.Comment 
  14500.  
  14501.                      The printer device description 
  14502.  
  14503.                   o  RxStem.Drivers 
  14504.  
  14505.                      The printer drivers supported by this print device. If 
  14506.                      more than one printer driver is specified, the ',' must be 
  14507.                      used as separator 
  14508.  
  14509.                   o  RxStem.TimeOut 
  14510.  
  14511.                      The printer device timeout value 
  14512.  
  14513.  Example use 
  14514.  
  14515.   /* Create a printer device */
  14516.   if RxFuncQuery('RxSplCreateDevice') <> 0 then do
  14517.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14518.    call LoadLsRxutFuncs
  14519.   end
  14520.  
  14521.   ComputerName       = '\\ILIDC'
  14522.   RxStem.PrinterName = 'TestDev'
  14523.   RxStem.LogAddr     = 'LPT3'
  14524.   RxStem.Comment     = 'Test of REXX Printer Device create'
  14525.   RxStem.Drivers     = 'IBMNULL,IBM4019.IBM 4019 LaserPrinter'
  14526.   RxStem.TimeOut     = 54
  14527.  
  14528.   MyRc = RxSplCreateDevice(ComputerName, RxStem)
  14529.  
  14530.   if MyRc <> '0' then do
  14531.    say 'Error from RxSplCreateDevice. RC =' MyRc
  14532.    exit 9
  14533.   end
  14534.   else do
  14535.    say 'Printer Device' RxStem.PrinterName 'created successfully'
  14536.   end
  14537.  
  14538.   exit 0
  14539.  
  14540.  
  14541. ΓòÉΓòÉΓòÉ 15.4. RxSplCreateQueue() ΓòÉΓòÉΓòÉ
  14542.  
  14543. The function creates a printer queue on a local computer. If this function is 
  14544. used to create a queue on a remote server, the workstation running this 
  14545. procedure must have the 100 percent identical printer driver installed as used 
  14546. for the default printer driver. The reason for this restriction is the use of 
  14547. required default printer driver information needed for queue creation. 
  14548.  
  14549. Syntax 
  14550.  
  14551.  
  14552. MyRc = RxSplCreateQueue(ComputerName, RxStem)
  14553.  
  14554. Parameters 
  14555.  
  14556. The required parameter values are: 
  14557.  
  14558.  ComputerName   Must be specified as '' or '\\computername' for a remote queue 
  14559.  
  14560.  'RxStem'       A REXX variable which is divided into: 
  14561.  
  14562.                   o  RxStem.Name 
  14563.  
  14564.                      The printer queue name 
  14565.  
  14566.                   o  RxStem.Priority 
  14567.  
  14568.                      The printer queue priority. (A value from 1 to 9) 
  14569.  
  14570.                   o  RxStem.StartTime 
  14571.  
  14572.                      The printer queue start time in minutes after midnight 
  14573.  
  14574.                   o  RxStem.UntilTime 
  14575.  
  14576.                      The printer queue until time in minutes after midnight 
  14577.  
  14578.                   o  RxStem.Type 
  14579.  
  14580.                      The printer queue type. The values are added together: 
  14581.  
  14582.                                           Value specified     ##  This is
  14583.                                           ------------------- --  ------------------------------------------
  14584.                                           PRQ3_TYPE_RAW        1  Data is always enqueued in the device
  14585.                                                                   specific format.
  14586.                                           PRQ3_TYPE_BYPASS     2  Allows the spooler to bypass the queue
  14587.                                                                   processor and send data directly to the
  14588.                                                                   Printer Driver. Setting this bit allows
  14589.                                                                   the spooler to print jobs of type PM_Q_RAW
  14590.                                                                   while they are still being spooled.
  14591.                                           PRQ3_TYPE_APPDEFAULT 4  This bit is set for the application
  14592.                                                                   default queue only.
  14593.  
  14594.                                           For example: Setting the new queue to print while spooling and
  14595.                                           set it to the default printer specify a value of 6 (2 + 4).
  14596.  
  14597.                   o  RxStem.SepFile 
  14598.  
  14599.                      The printer queue separator file name including the path. 
  14600.                      Both the path and separator file name must exist 
  14601.  
  14602.                   o  RxStem.PrProc 
  14603.  
  14604.                      The printer queue default queue processor. Normally 
  14605.                      'PMPRINT' 
  14606.  
  14607.                   o  RxStem.Parms 
  14608.  
  14609.                      The printer queue queue-processor parameters. Normally '' 
  14610.  
  14611.                   o  RxStem.Comment 
  14612.  
  14613.                      The printer queue description 
  14614.  
  14615.                   o  RxStem.Printers 
  14616.  
  14617.                      The printer devices connected to the printer queue. The 
  14618.                      devices must exist 
  14619.  
  14620.                   o  RxStem.DriverName 
  14621.  
  14622.                      The default printer driver name. For example IBMNULL or 
  14623.                      IBM4019 
  14624.  
  14625.                   o  RxStem.DeviceName 
  14626.  
  14627.                      The default printer device name. For example '' or 'IBM 
  14628.                      4019 LaserPrinter' 
  14629.  
  14630.                      The Printer Driver Name and Printer Device name are 
  14631.                      combined to the actual used default printer presentation 
  14632.                      driver name 
  14633.  
  14634.  Example use 
  14635.  
  14636.   /* Create a printer queue */
  14637.   if RxFuncQuery('RxSplCreateQueue') <> 0 then do
  14638.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14639.    call LoadLsRxutFuncs
  14640.   end
  14641.  
  14642.   ComputerName      = '\\ILIDC'
  14643.   RxStem.Name       = 'TestQue'
  14644.   RxStem.Priority   = 5
  14645.   RxStem.StartTime  = 0
  14646.   RxStem.UntilTime  = 0
  14647.   RxStem.Type       = 2
  14648.   RxStem.SepFile    = 'C:\SPOOL\TQ.SEP'
  14649.   RxStem.PrProc     = 'PMPRINT'
  14650.   RxStem.Parms      = ''
  14651.   RxStem.Comment    = 'Test Queue'
  14652.   RxStem.Printers   = 'TestDev'
  14653.   RxStem.DriverName = 'IBM4019'
  14654.   RxStem.DeviceName = 'IBM 4019 LaserPrinter'
  14655.  
  14656.   MyRc = RxSplCreateQueue(Computername, RxStem)
  14657.  
  14658.   if MyRc <> '0' then do
  14659.    say 'Error from RxSplCreateQueue. RC =' MyRc
  14660.    exit 9
  14661.   end
  14662.   else do
  14663.    say 'Printer Queue created successfully'
  14664.   end
  14665.  
  14666.   exit 0
  14667.  
  14668.  
  14669. ΓòÉΓòÉΓòÉ 15.5. RxSplDeleteDevice() ΓòÉΓòÉΓòÉ
  14670.  
  14671. The function deletes a printer device definition. 
  14672.  
  14673. Syntax 
  14674.  
  14675.  
  14676. MyRc = RxSplDeleteDevice(ComputerName, PrDevName)
  14677.  
  14678. Parameters 
  14679.  
  14680. The parameter values are: 
  14681.  
  14682.  MyRc           Return code from the function call 
  14683.  
  14684.  ComputerName   The name of the computer on which the Printer Device exist. Use 
  14685.                 '' for a local computer 
  14686.  
  14687.  PrDevName      The printer device name to delete 
  14688.  
  14689.  Example use 
  14690.  
  14691.   /* Delete printer device */
  14692.   if RxFuncQuery('RxSplDeleteDevice') <> 0 then do
  14693.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14694.    call LoadLsRxutFuncs
  14695.   end
  14696.  
  14697.   ComputerName = '\\ILIDC'
  14698.   PrDevName    = 'DelPrint'
  14699.  
  14700.   MyRc = RxSplDeleteDevice(ComputerName, PrDevName)
  14701.  
  14702.   if MyRc <> '0' then do
  14703.    say 'Error from RxSplDeleteDevice. RC =' MyRc
  14704.    exit 9
  14705.   end
  14706.  
  14707.   say 'Printer device deleted successfully'
  14708.  
  14709.   exit 0
  14710.  
  14711.  
  14712. ΓòÉΓòÉΓòÉ 15.6. RxSplDeleteJob() ΓòÉΓòÉΓòÉ
  14713.  
  14714. The function deletes a print job. 
  14715.  
  14716. Syntax 
  14717.  
  14718.  
  14719. MyRc = RxSplDeleteJob(ComputerName, QueueName, JobId)
  14720.  
  14721. Parameters 
  14722.  
  14723. The required parameter values are: 
  14724.  
  14725.  ComputerName   Must be either be specified as '' for a local computer or 
  14726.                 '\\computername'. 
  14727.  
  14728.  QueueName      The name of the queue where the print job resides 
  14729.  
  14730.  JobId          The print job Id (numeric value) 
  14731.  
  14732.  Example use 
  14733.  
  14734.   /* Delete a print job in specified printer queue */
  14735.   if RxFuncQuery('RxSplDeleteJob') <> 0 then do
  14736.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14737.    call LoadLsRxutFuncs
  14738.   end
  14739.  
  14740.   ComputerName = '\\ILIDC'
  14741.   QueueName    = 'IBM4019L'
  14742.   JobId        = 2
  14743.  
  14744.   MyRc = RxSplDeleteJob(ComputerName, QueueName, JobId)
  14745.  
  14746.   if MyRc <> '0' then do
  14747.    say 'Error from RxSplDeleteJob. RC =' MyRc
  14748.    exit 9
  14749.   end
  14750.   else do
  14751.    say 'Print job Id' JobId 'deleted successfully'
  14752.   end
  14753.  
  14754.   exit 0
  14755.  
  14756.  
  14757. ΓòÉΓòÉΓòÉ 15.7. RxSplDeleteQueue() ΓòÉΓòÉΓòÉ
  14758.  
  14759. The function deletes a printer queue. 
  14760.  
  14761. Syntax 
  14762.  
  14763.  
  14764. MyRc = RxSplDeleteQueue(ComputerName, PrQName)
  14765.  
  14766. Parameters 
  14767.  
  14768. The parameter values are: 
  14769.  
  14770.  MyRc           Return code from the function call 
  14771.  
  14772.  ComputerName   The name of the computer on which the Printer Queue exist. Use 
  14773.                 '' for a local computer 
  14774.  
  14775.  PrQName        The printer queue name to delete 
  14776.  
  14777.  Example use 
  14778.  
  14779.   /* Delete printer queue */
  14780.   if RxFuncQuery('RxSplDeleteQueue') <> 0 then do
  14781.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14782.    call LoadLsRxutFuncs
  14783.   end
  14784.  
  14785.   ComputerName = '\\ILIDC'
  14786.   PrQName      = 'DelPrint'
  14787.  
  14788.   MyRc = RxSplDeleteQueue(ComputerName, PrQName)
  14789.  
  14790.   if MyRc <> '0' then do
  14791.    say 'Error from RxSplDeleteQueue. RC =' MyRc
  14792.    exit 9
  14793.   end
  14794.  
  14795.   say 'Queue deleted successfully'
  14796.  
  14797.   exit 0
  14798.  
  14799.  
  14800. ΓòÉΓòÉΓòÉ 15.8. RxSplEnumDevice() ΓòÉΓòÉΓòÉ
  14801.  
  14802. The function enumerates printer devices on a local or remote computer. 
  14803.  
  14804. Syntax 
  14805.  
  14806.  
  14807. MyRc = RxSplEnumDevice(ComputerName, RxStem)
  14808.  
  14809. Parameters 
  14810.  
  14811.  ComputerName   The name of the computer to query. Use '' for a local computer 
  14812.  
  14813.  The returned parameter values are: 
  14814.  
  14815.  MyRc           Return code from the function call. It must be 0 otherwise all 
  14816.                 other returned values are invalid 
  14817.  
  14818.  'RxStem'       A REXX variable which is divided into: 
  14819.  
  14820.                   o  RxStem.count 
  14821.  
  14822.                      The number of printer devices. If 0, the following 
  14823.                      variables are invalid 
  14824.  
  14825.                   o  RxStem.n.PrinterName 
  14826.  
  14827.                      The printer device name for entry n. (n = 1 to 
  14828.                      RxStem.count) 
  14829.  
  14830.                   o  RxStem.n.LogAddr 
  14831.  
  14832.                      The printer device logical address for entry n. (n = 1 to 
  14833.                      RxStem.count) 
  14834.  
  14835.                   o  RxStem.n.Comment 
  14836.  
  14837.                      The printer device comment for entry n. (n = 1 to 
  14838.                      RxStem.count) 
  14839.  
  14840.                   o  RxStem.n.Drivers 
  14841.  
  14842.                      The printer drivers supported by device entry n. (n = 1 to 
  14843.                      RxStem.count) If more than one printer driver is 
  14844.                      specified, drivers are separated by a comma. The first 
  14845.                      printer driver specified is the default printer driver. 
  14846.  
  14847.  Example use 
  14848.  
  14849.   /* Enumerate printer devices */
  14850.   if RxFuncQuery('RxSplEnumDevice') <> 0 then do
  14851.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14852.    call LoadLsRxutFuncs
  14853.   end
  14854.  
  14855.   ComputerName = '\\ILIDC'
  14856.  
  14857.   MyRc = RxSplEnumDevice(ComputerName, RxStem)
  14858.  
  14859.   if MyRc <> '0' then do
  14860.    say 'Error from RxSplEnumDevice. RC =' MyRc
  14861.    exit 9
  14862.   end
  14863.  
  14864.   say 'Number of Printer Devices =' RxStem.count
  14865.  
  14866.   do i=1 to RxStem.count
  14867.    say
  14868.    say 'Printer device name   ' RxStem.i.PrinterName
  14869.    say 'Logical addresses     ' RxStem.i.LogAddr
  14870.    say 'Printer device comment' RxStem.i.Comment
  14871.    say 'Printer drivers       ' RxStem.i.Drivers
  14872.   end
  14873.  
  14874.   exit 0
  14875.  
  14876.  
  14877. ΓòÉΓòÉΓòÉ 15.9. RxSplEnumDriver() ΓòÉΓòÉΓòÉ
  14878.  
  14879. The function enumerates the printer presentation drivers. 
  14880.  
  14881. Syntax 
  14882.  
  14883.  
  14884. MyRc = RxSplEnumDriver(ComputerName, RxStem)
  14885.  
  14886. Parameters 
  14887.  
  14888.  ComputerName   The name of the computer to query. Use '' for a local computer 
  14889.  
  14890.  The returned parameter values are: 
  14891.  
  14892.  MyRc           Return code from the function call. It must be 0 otherwise all 
  14893.                 other returned values are invalid 
  14894.  
  14895.  'RxStem'       A REXX variable which is divided into: 
  14896.  
  14897.                   o  RxStem.count 
  14898.  
  14899.                      The number of printer presentation drivers available. If 
  14900.                      0, the following variables are invalid 
  14901.  
  14902.                   o  RxStem.n.DrivName 
  14903.  
  14904.                      The printer presentation driver name for entry n. (n = 1 
  14905.                      to RxStem.count) 
  14906.  
  14907.  Example use 
  14908.  
  14909.   /* Enumerate printer presentation driver names */
  14910.   if RxFuncQuery('RxSplEnumDriver') <> 0 then do
  14911.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  14912.    call LoadLsRxutFuncs
  14913.   end
  14914.  
  14915.   ComputerName = '\\ILIDC'
  14916.  
  14917.   MyRc = RxSplEnumDriver(ComputerName, RxStem)
  14918.  
  14919.   if MyRc <> '0' then do
  14920.    say 'Error from RxSplEnumDriver. RC =' MyRc
  14921.    exit 9
  14922.   end
  14923.  
  14924.   say 'Number of Printer Presentation Drivers =' RxStem.count
  14925.  
  14926.   do i=1 to RxStem.count
  14927.    say
  14928.    say 'Printer presentation driver name' RxStem.i.DrivName
  14929.   end
  14930.  
  14931.   exit 0
  14932.  
  14933.  
  14934. ΓòÉΓòÉΓòÉ 15.10. RxSplEnumJob() ΓòÉΓòÉΓòÉ
  14935.  
  14936. The function returns a list of jobs in a print queue. This function is 
  14937. identical to NetEnumerate(NETPRINTJOB). 
  14938.  
  14939. Syntax 
  14940.  
  14941.  
  14942. MyRc = RxSplEnumJob('printJobInfo', SrvName, QueueName)
  14943.  
  14944. Parameters 
  14945.  
  14946. The parameters specified are: 
  14947.  
  14948.  'printJobInfo'    The REXX variable receiving the result. The variable is 
  14949.                    divided into: 
  14950.  
  14951.                      o  printJobInfo.count 
  14952.  
  14953.                         The number of print jobs in the queue 
  14954.  
  14955.                      o  printJobInfo.i.JobId 
  14956.  
  14957.                         The print job identification entry i, where the 
  14958.                         variable i has a value from 1 to printJobInfo.count 
  14959.  
  14960.                      o  printJobInfo.i.Priority 
  14961.  
  14962.                         The print job priority entry i, where the variable i 
  14963.                         has a value from 1 to printJobInfo.count 
  14964.  
  14965.                      o  printJobInfo.i.Position 
  14966.  
  14967.                         The print job position in the queue entry i, where the 
  14968.                         variable i has a value from 1 to printJobInfo.count 
  14969.  
  14970.                      o  printJobInfo.i.Status 
  14971.  
  14972.                         The print job status in the queue entry i, where the 
  14973.                         variable i has a value from 1 to printJobInfo.count 
  14974.  
  14975.                      o  printJobInfo.i.Size 
  14976.  
  14977.                         The print job size entry i, where the variable i has a 
  14978.                         value from 1 to printJobInfo.count 
  14979.  
  14980.                      o  printJobInfo.i.UserName 
  14981.  
  14982.                         The userid entry i, where the variable i has a value 
  14983.                         from 1 to printJobInfo.count 
  14984.  
  14985.                      o  printJobInfo.i.Document 
  14986.  
  14987.                         The document name entry i, where the variable i has a 
  14988.                         value from 1 to printJobInfo.count 
  14989.  
  14990.                      o  printJobInfo.i.Comment 
  14991.  
  14992.                         The comment entry i, where the variable i has a value 
  14993.                         from 1 to printJobInfo.count 
  14994.  
  14995.  SrvName           The server name 
  14996.  
  14997.  QueueName         The queue name, which must be supplied 
  14998.  
  14999.  Note 
  15000.  
  15001.  The server name can be specified as '' for a local server or computer. 
  15002.  
  15003.  Example 
  15004.  
  15005.   /* List print jobs in a print queue */
  15006.   if RxFuncQuery('RxSplEnumJob') <> 0 then do
  15007.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15008.    call LoadLsRxutFuncs
  15009.   end
  15010.  
  15011.   SrvName   = '\\DOMAIN_CONTRLR'
  15012.   QueueName = 'LPT1Q'
  15013.  
  15014.   myRc = RxSplEnumJob('printJobInfo', SrvName, QueueName)
  15015.  
  15016.   if myRc <> '0' then do
  15017.    say 'Got error from RxSplEnumJob() ' myRc
  15018.    exit 9
  15019.   end
  15020.  
  15021.   if printJobInfo.count = 0 then do
  15022.    say 'No print jobs in printer queue'
  15023.    exit 0
  15024.   end
  15025.  
  15026.   say 'Number of print jobs: ' printJobInfo.count
  15027.  
  15028.   do i=1 to printJobInfo.count
  15029.    say
  15030.    say 'Job Id:        ' printJobInfo.i.JobId
  15031.    say 'Userid:        ' printJobInfo.i.UserName
  15032.    say 'Document name: ' printJobInfo.i.Document
  15033.   end
  15034.  
  15035.   exit 0
  15036.  
  15037.  
  15038. ΓòÉΓòÉΓòÉ 15.11. RxSplEnumPort() ΓòÉΓòÉΓòÉ
  15039.  
  15040. The function enumerates the printer port names on a local or remote computer. 
  15041.  
  15042. Syntax 
  15043.  
  15044.  
  15045. MyRc = RxSplEnumPort(ComputerName, RxStem)
  15046.  
  15047. Parameters 
  15048.  
  15049.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15050.  
  15051.  The returned parameter values are: 
  15052.  
  15053.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15054.                 other returned values are invalid 
  15055.  
  15056.  'RxStem'       A REXX variable which is divided into: 
  15057.  
  15058.                   o  RxStem.count 
  15059.  
  15060.                      The number of printer presentation drivers available. If 
  15061.                      0, the following variables are invalid 
  15062.  
  15063.                   o  RxStem.n.PortName 
  15064.  
  15065.                      The name of the port name for entry n. (n = 1 to 
  15066.                      RxStem.count) 
  15067.  
  15068.                   o  RxStem.n.PortDriverName 
  15069.  
  15070.                      The name of the port driver name for entry n. (n = 1 to 
  15071.                      RxStem.count) 
  15072.  
  15073.                   o  RxStem.n.PortDriverPathName 
  15074.  
  15075.                      The path to the port driver for entry n. (n = 1 to 
  15076.                      RxStem.count) 
  15077.  
  15078.  Example use 
  15079.  
  15080.   /* Enumerate printer port names */
  15081.   if RxFuncQuery('RxSplEnumPort') <> 0 then do
  15082.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15083.    call LoadLsRxutFuncs
  15084.   end
  15085.  
  15086.   ComputerName = '\\ILIDC'
  15087.  
  15088.   MyRc = RxSplEnumPort(ComputerName, RxStem)
  15089.  
  15090.   if MyRc <> '0' then do
  15091.    say 'Error from RxSplEnumPort. RC =' MyRc
  15092.    exit 9
  15093.   end
  15094.  
  15095.   say 'Number of Printer Ports =' RxStem.count
  15096.  
  15097.   do i=1 to RxStem.count
  15098.    say
  15099.    say 'Printer port name       ' RxStem.i.PortName
  15100.    say 'Printer port driver name' RxStem.i.PortDriverName
  15101.    say 'Printer port driver path' RxStem.i.PortDriverPathName
  15102.   end
  15103.  
  15104.   exit 0
  15105.  
  15106.  
  15107. ΓòÉΓòÉΓòÉ 15.12. RxSplEnumPrinter() ΓòÉΓòÉΓòÉ
  15108.  
  15109. The function enumerates print destinations available. 
  15110.  
  15111. Syntax 
  15112.  
  15113.  
  15114. MyRc = RxSplEnumPrinter(ComputerName, RxStem)
  15115.  
  15116. Parameters 
  15117.  
  15118.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15119.  
  15120.  The returned parameter values are: 
  15121.  
  15122.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15123.                 other returned values are invalid 
  15124.  
  15125.  'RxStem'       A REXX variable which is divided into: 
  15126.  
  15127.                   o  RxStem.count 
  15128.  
  15129.                      The number of printer destinations available. If 0, the 
  15130.                      following variables are invalid 
  15131.  
  15132.                   o  RxStem.n.Type 
  15133.  
  15134.                      The print destination type for entry n. (n = 1 to 
  15135.                      RxStem.count) The following values are returned: 
  15136.  
  15137.                                           Value returned        This is
  15138.                                           --------------------  ------------------------------------------
  15139.                                           SPL_PR_QUEUE          Print destination is a queue
  15140.                                           SPL_PR_DIRECT_DEVICE  Print destination is a direct print device
  15141.                                           SPL_PR_QUEUED_DEVICE  Print destination is a queued print device
  15142.                                           SPL_PR_UNKWOWN        Print destination is unkwown
  15143.  
  15144.                   o  RxStem.n.PrintDestinationName 
  15145.  
  15146.                      The print destination name for entry n. (n = 1 to 
  15147.                      RxStem.count) 
  15148.  
  15149.                   o  RxStem.n.Description 
  15150.  
  15151.                      The print destination description for entry n. (n = 1 to 
  15152.                      RxStem.count) 
  15153.  
  15154.                   o  RxStem.n.LocalName 
  15155.  
  15156.                      The local name of a remote print destination for entry n. 
  15157.                      (n = 1 to RxStem.count) 
  15158.  
  15159.  Example use 
  15160.  
  15161.   /* Enumerate printer destination information */
  15162.   if RxFuncQuery('RxSplEnumPrinter') <> 0 then do
  15163.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15164.    call LoadLsRxutFuncs
  15165.   end
  15166.  
  15167.   ComputerName = '\\ILIDC'
  15168.  
  15169.   MyRc = RxSplEnumPrinter(ComputerName, RxStem)
  15170.  
  15171.   if MyRc <> '0' then do
  15172.    say 'Error from RxSplEnumPrinter. RC =' MyRc
  15173.    exit 9
  15174.   end
  15175.  
  15176.   say 'Number of Printer Descriptions =' RxStem.count
  15177.  
  15178.   do i=1 to RxStem.count
  15179.    say
  15180.    say 'Printer Destination type       ' RxStem.i.Type
  15181.    say 'Printer Destination name       ' RxStem.i.PrintDestinationName
  15182.    say 'Printer Destination description' RxStem.i.Description
  15183.    say 'Printer Destination local name ' RxStem.i.LocalName
  15184.   end
  15185.  
  15186.   exit 0
  15187.  
  15188.  
  15189. ΓòÉΓòÉΓòÉ 15.13. RxSplEnumQueue() ΓòÉΓòÉΓòÉ
  15190.  
  15191. The function enumerates print queues available. 
  15192.  
  15193. Syntax 
  15194.  
  15195.  
  15196. MyRc = RxSplEnumQueue(ComputerName, RxStem)
  15197.  
  15198. Parameters 
  15199.  
  15200.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15201.  
  15202.  The returned parameter values are: 
  15203.  
  15204.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15205.                 other returned values are invalid 
  15206.  
  15207.  'RxStem'       A REXX variable which is divided into: 
  15208.  
  15209.                   o  RxStem.count 
  15210.  
  15211.                      The number of printer queues available. If 0, the 
  15212.                      following variables are invalid 
  15213.  
  15214.                   o  RxStem.n.Name 
  15215.  
  15216.                      The print queue name for entry n. (n = 1 to RxStem.count) 
  15217.  
  15218.                   o  RxStem.n.Priority 
  15219.  
  15220.                      The print queue priority for entry n. (n = 1 to 
  15221.                      RxStem.count) 
  15222.  
  15223.                   o  RxStem.n.StartTime 
  15224.  
  15225.                      The print queue starting time in minuttes after midnight 
  15226.                      for entry n. (n = 1 to RxStem.count) 
  15227.  
  15228.                   o  RxStem.n.UntilTime 
  15229.  
  15230.                      The print queue until time in minuttes after midnight for 
  15231.                      entry n. (n = 1 to RxStem.count) 
  15232.  
  15233.                   o  RxStem.n.Type 
  15234.  
  15235.                      The print queue type for entry n. (n = 1 to RxStem.count) 
  15236.                      The following values are returned together with the 
  15237.                      decimal Type value: 
  15238.  
  15239.                                           Value returned        This is
  15240.                                           --------------------  ------------------------------------------
  15241.                                           PRQ3_TYPE_RAW         Data is always enqueued in the device
  15242.                                                                 specific format.
  15243.                                           PRQ3_TYPE_BYPASS      Allows the spooler to bypass the queue
  15244.                                                                 processor and send data directly to the
  15245.                                                                 Printer Driver. Setting this bit allows
  15246.                                                                 the spooler to print jobs of type PM_Q_RAW
  15247.                                                                 while they are still being spooled.
  15248.                                           PRQ3_TYPE_APPDEFAULT  This bit is set for the application
  15249.                                                                 default queue only.
  15250.  
  15251.                   o  RxStem.n.Jobs 
  15252.  
  15253.                      The number of jobs in the queue 
  15254.  
  15255.                   o  RxStem.n.Status 
  15256.  
  15257.                      The printer queue status 
  15258.  
  15259.                                           Value  Meaning
  15260.                                           -----  -------
  15261.                                            0     Ok
  15262.                                            1     Print Queue is paused
  15263.                                            2     Delete pending
  15264.  
  15265.                   o  RxStem.n.SepFile 
  15266.  
  15267.                      The separator file for entry n. (n = 1 to RxStem.count) 
  15268.  
  15269.                   o  RxStem.n.PrProc 
  15270.  
  15271.                      The default queue processor for entry n. (n = 1 to 
  15272.                      RxStem.count) 
  15273.  
  15274.                   o  RxStem.n.Parms 
  15275.  
  15276.                      The default queue processor parameters for entry n. (n = 1 
  15277.                      to RxStem.count) 
  15278.  
  15279.                   o  RxStem.n.Comment 
  15280.  
  15281.                      The queue description for entry n. (n = 1 to RxStem.count) 
  15282.  
  15283.                   o  RxStem.n.Printers 
  15284.  
  15285.                      The printer devices connected to the queue for entry n. (n 
  15286.                      = 1 to RxStem.count) 
  15287.  
  15288.                   o  RxStem.n.DriverName 
  15289.  
  15290.                      The queue default printer driver name for entry n. (n = 1 
  15291.                      to RxStem.count) 
  15292.  
  15293.  Example use 
  15294.  
  15295.   /* Enumerate printer destination information */
  15296.   if RxFuncQuery('RxSplEnumQueue') <> 0 then do
  15297.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15298.    call LoadLsRxutFuncs
  15299.   end
  15300.  
  15301.   ComputerName = '\\ILIDC'
  15302.  
  15303.   MyRc = RxSplEnumQueue(ComputerName, RxStem)
  15304.  
  15305.   if MyRc <> '0' then do
  15306.    say 'Error from RxSplEnumQueue. RC =' MyRc
  15307.    exit 9
  15308.   end
  15309.  
  15310.   if RxStem.count <> 0 then do
  15311.    say 'Number of Queue Descriptions =' RxStem.count
  15312.  
  15313.    do i=1 to RxStem.count
  15314.     say
  15315.     say 'Printer Queue name          ' RxStem.i.Name
  15316.     say 'Printer Queue priority      ' RxStem.i.Priority
  15317.     say 'Printer Queue starting time ' RxStem.i.StartTime
  15318.     say 'Printer Queue until time    ' RxStem.i.UntilTime
  15319.     say 'Printer Queue type          ' RxStem.i.Type
  15320.     say 'Printer Queue seperator file' RxStem.i.SepFile
  15321.     say 'Default queue processor     ' RxStem.i.PrProc
  15322.     say 'Queue processor parameters  ' RxStem.i.Parms
  15323.     say 'Printer Queue description   ' RxStem.i.Comment
  15324.     say 'Printers connected to Queue ' RxStem.i.Printers
  15325.     say 'Default printer driver name ' RxStem.i.DriverName
  15326.    end
  15327.   end
  15328.   else do
  15329.    say 'No Printer Queues available'
  15330.   end
  15331.  
  15332.   call DropLsRxutFuncs
  15333.   call RxFuncDrop 'LoadLsRxutFuncs'
  15334.  
  15335.   exit 0
  15336.  
  15337.  
  15338. ΓòÉΓòÉΓòÉ 15.14. RxSplHoldJob() ΓòÉΓòÉΓòÉ
  15339.  
  15340. The function holds (pauses) a print job. 
  15341.  
  15342. Syntax 
  15343.  
  15344.  
  15345. MyRc = RxSplHoldJob(ComputerName, QueueName, JobId)
  15346.  
  15347. Parameters 
  15348.  
  15349. The required parameter values are: 
  15350.  
  15351.  ComputerName   Must be either be specified as '' for a local computer or 
  15352.                 '\\computername'. 
  15353.  
  15354.  QueueName      The name of the queue where the print job resides 
  15355.  
  15356.  JobId          The print job Id (numeric value) 
  15357.  
  15358.  Example use 
  15359.  
  15360.   /* Hold a print job in a specified printer queue */
  15361.   if RxFuncQuery('RxSplHoldJob') <> 0 then do
  15362.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15363.    call LoadLsRxutFuncs
  15364.   end
  15365.  
  15366.   ComputerName = '\\ILIDC'
  15367.   QueueName    = 'IBM4019L'
  15368.   JobId        = 2
  15369.  
  15370.   MyRc = RxSplHoldJob(ComputerName, QueueName, JobId)
  15371.  
  15372.   if MyRc <> '0' then do
  15373.    say 'Error from RxSplHoldJob. RC =' MyRc
  15374.    exit 9
  15375.   end
  15376.   else do
  15377.    say 'Print job Id' JobId 'is holding'
  15378.   end
  15379.  
  15380.   exit 0
  15381.  
  15382.  
  15383. ΓòÉΓòÉΓòÉ 15.15. RxSplHoldQueue() ΓòÉΓòÉΓòÉ
  15384.  
  15385. The function holds (pauses) a printer queue. 
  15386.  
  15387. Syntax 
  15388.  
  15389.  
  15390. MyRc = RxSplHoldQueue(ComputerName, QueueName)
  15391.  
  15392. Parameters 
  15393.  
  15394. The required parameter values are: 
  15395.  
  15396.  ComputerName   Must be either be specified as '' for a local computer or 
  15397.                 '\\computername'. 
  15398.  
  15399.  QueueName      The name of the queue where the print job resides 
  15400.  
  15401.  Example use 
  15402.  
  15403.   /* Hold a printer queue on a specified computer */
  15404.   if RxFuncQuery('RxSplHoldQueue') <> 0 then do
  15405.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15406.    call LoadLsRxutFuncs
  15407.   end
  15408.  
  15409.   ComputerName = '\\ILIDC'
  15410.   QueueName    = 'IBM4019L'
  15411.  
  15412.   MyRc = RxSplHoldQueue(ComputerName, QueueName)
  15413.  
  15414.   if MyRc <> '0' then do
  15415.    say 'Error from RxSplHoldQueue. RC =' MyRc
  15416.    exit 9
  15417.   end
  15418.   else do
  15419.    say 'Printer queue' QueueName 'is holding (paused)'
  15420.   end
  15421.  
  15422.   exit 0
  15423.  
  15424.  
  15425. ΓòÉΓòÉΓòÉ 15.16. RxSplPurgeQueue() ΓòÉΓòÉΓòÉ
  15426.  
  15427. The function removes all jobs, except any currently printing, from a print 
  15428. queue. 
  15429.  
  15430. Syntax 
  15431.  
  15432.  
  15433. MyRc = RxSplPurgeQueue(ComputerName, QueueName)
  15434.  
  15435. Parameters 
  15436.  
  15437. The required parameter values are: 
  15438.  
  15439.  ComputerName   Must be either be specified as '' for a local computer or 
  15440.                 '\\computername'. 
  15441.  
  15442.  QueueName      The name of the queue where the print jobs resides 
  15443.  
  15444.  Example use 
  15445.  
  15446.   /* Purge print jobs in a queue on a specified computer */
  15447.   if RxFuncQuery('RxSplPurgeQueue') <> 0 then do
  15448.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15449.    call LoadLsRxutFuncs
  15450.   end
  15451.  
  15452.   ComputerName = '\\ILIDC'
  15453.   QueueName    = 'IBM4019L'
  15454.  
  15455.   MyRc = RxSplPurgeQueue(ComputerName, QueueName)
  15456.  
  15457.   if MyRc <> '0' then do
  15458.    say 'Error from RxSplPurgeQueue. RC =' MyRc
  15459.    exit 9
  15460.   end
  15461.   else do
  15462.    say 'Print jobs purged in queue' QueueName
  15463.   end
  15464.  
  15465.   exit 0
  15466.  
  15467.  
  15468. ΓòÉΓòÉΓòÉ 15.17. RxSplQueryDevice() ΓòÉΓòÉΓòÉ
  15469.  
  15470. The function does a returns print device information. A print device name must 
  15471. be specified. 
  15472.  
  15473. Syntax 
  15474.  
  15475.  
  15476. MyRc = RxSplQueryDevice(ComputerName, RxStem, PrDevName)
  15477.  
  15478. Parameters 
  15479.  
  15480.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15481.  
  15482.  PrDevName      The print device name to do the query against 
  15483.  
  15484.  The returned parameter values are: 
  15485.  
  15486.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15487.                 other returned values are invalid 
  15488.  
  15489.  'RxStem'       A REXX variable which is divided into: 
  15490.  
  15491.                   o  RxStem.LogAddr 
  15492.  
  15493.                      The printer device logical address 
  15494.  
  15495.                   o  RxStem.Comment 
  15496.  
  15497.                      The printer device description 
  15498.  
  15499.                   o  RxStem.Drivers 
  15500.  
  15501.                      Printer Drivers supported by the printer device. If more 
  15502.                      printer drivers are connected, the printer drivers will be 
  15503.                      separated by a comma. 
  15504.  
  15505.                   o  RxStem.time 
  15506.  
  15507.                      Time the current job has been printing 
  15508.  
  15509.                   o  RxStem.Status 
  15510.  
  15511.                      The printer device status 
  15512.  
  15513.                   o  RxStem.JobId 
  15514.  
  15515.                      The id of the print job currently printing. A 0 indicates 
  15516.                      no print job is currently printing 
  15517.  
  15518.                   o  RxStem.TimeOut 
  15519.  
  15520.                      Printer device time out value 
  15521.  
  15522.  Example use 
  15523.  
  15524.   /* Get printer device information */
  15525.   if RxFuncQuery('RxSplQueryDevice') <> 0 then do
  15526.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15527.    call LoadLsRxutFuncs
  15528.   end
  15529.  
  15530.   ComputerName = '\\ILIDC'
  15531.   PrDevName = 'PRINTER1'
  15532.  
  15533.   MyRc = RxSplQueryDevice(ComputerName, RxStem, PrDevName)
  15534.  
  15535.   if MyRc <> '0' then do
  15536.    say 'Error from RxSplQueryDevice. RC =' MyRc
  15537.    exit 9
  15538.   end
  15539.  
  15540.   say
  15541.   say 'Printer Device name           ' PrDevName
  15542.   say 'Printer Device logical address' RxStem.LogAddr
  15543.   say 'Printer Device description    ' RxStem.Comment
  15544.   say 'Connected printer drivers     ' RxStem.Drivers
  15545.   say 'Printer Device time out value ' RxStem.TimeOut
  15546.  
  15547.   exit 0
  15548.  
  15549.  
  15550. ΓòÉΓòÉΓòÉ 15.18. RxSplQueryJob() ΓòÉΓòÉΓòÉ
  15551.  
  15552. The function returns information about a print job. This function is identical 
  15553. to NetGetInfo(NETPRINTJOB). 
  15554.  
  15555. Syntax 
  15556.  
  15557.  
  15558. MyRc = RxSplQueryJob('prtJobInfo', SrvName, QueueName, PrtJobId)
  15559.  
  15560. Parameters 
  15561.  
  15562. The parameters specified are 
  15563.  
  15564.  'prtJobInfo'      The REXX variable receiving the result. The variable is 
  15565.                    divided into: 
  15566.  
  15567.                      o  prtJobInfo.JobId 
  15568.  
  15569.                         The print job id 
  15570.  
  15571.                      o  prtJobInfo.Priority 
  15572.  
  15573.                         The print job priority 
  15574.  
  15575.                      o  prtJobInfo.UserName 
  15576.  
  15577.                         The userid of the job submitting the job 
  15578.  
  15579.                      o  prtJobInfo.Position 
  15580.  
  15581.                         The job position in the print queue 
  15582.  
  15583.                      o  prtJobInfo.Status 
  15584.  
  15585.                         The status of the print job 
  15586.  
  15587.                      o  prtJobInfo.Submitted 
  15588.  
  15589.                         The time when the job was submitted 
  15590.  
  15591.                      o  prtJobInfo.Size 
  15592.  
  15593.                         The print job size 
  15594.  
  15595.                      o  prtJobInfo.Comment 
  15596.  
  15597.                         The print job comment 
  15598.  
  15599.                      o  prtJobInfo.Document 
  15600.  
  15601.                         The document name 
  15602.  
  15603.                      o  prtJobInfo.NotifyName 
  15604.  
  15605.                         Messaging alias for print alert 
  15606.  
  15607.                      o  prtJobInfo.DataType 
  15608.  
  15609.                         The data type of the submitted file 
  15610.  
  15611.                      o  prtJobInfo.Parms 
  15612.  
  15613.                         The parameters related to the print job 
  15614.  
  15615.                      o  prtJobInfo.StatusComment 
  15616.  
  15617.                         The status comment 
  15618.  
  15619.                      o  prtJobInfo.Queue 
  15620.  
  15621.                         The queue name 
  15622.  
  15623.                      o  prtJobInfo.QProcName 
  15624.  
  15625.                         The queue processor name 
  15626.  
  15627.                      o  prtJobInfo.QProcParms 
  15628.  
  15629.                         The queue processor parameters 
  15630.  
  15631.                      o  prtJobInfo.PrinterName 
  15632.  
  15633.                         The printer name 
  15634.  
  15635.                      o  prtJobInfo.Version 
  15636.  
  15637.                         The printer driver version 
  15638.  
  15639.                      o  prtJobInfo.DeviceName 
  15640.  
  15641.                         The device name 
  15642.  
  15643.  SrvName           The server name 
  15644.  
  15645.  QueueName         The Queue name 
  15646.  
  15647.  PrtJobId          The Printer Job Id 
  15648.  
  15649.  Note 
  15650.  
  15651.  The server name can be specified as '' for a local server or computer. 
  15652.  
  15653.  Example 
  15654.  
  15655.  
  15656.   /* Get Print job information */
  15657.   if RxFuncQuery('RxSplQueryJob') <> 0 then do
  15658.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15659.    call LoadLsRxutFuncs
  15660.   end
  15661.  
  15662.   SrvName = '\\ILIDC'
  15663.   QueueName = 'IBM4019L'
  15664.   PrtJobId = 5
  15665.  
  15666.   myRc = RxSplQueryJob('prtJobInfo', SrvName, QueueName, PrtJobId)
  15667.  
  15668.   if myRc <> '0' then do
  15669.    say 'Got error from RxSplQueryJob() ' myRc
  15670.    exit 9
  15671.   end
  15672.  
  15673.   if prtJobInfo.1 = '-none-' then do
  15674.    say prtJobInfo.1
  15675.    exit 0
  15676.   end
  15677.  
  15678.   say
  15679.   say 'Job id:                     ' prtJobInfo.JobId
  15680.   say 'Job priority:               ' prtJobInfo.Priority
  15681.   say 'Userid who submitted job:   ' prtJobInfo.UserName
  15682.   say 'Job position in Queue:      ' prtJobInfo.Position
  15683.   say 'Job status:                 ' prtJobInfo.Status
  15684.   say 'Submitted at:               ' prtJobInfo.Submitted
  15685.   say 'Job size:                   ' prtJobInfo.Size
  15686.   say 'Job comment:                ' prtJobInfo.Comment
  15687.   say 'Document name:              ' prtJobInfo.Document
  15688.   say 'Notify:                     ' prtJobInfo.NotifyName
  15689.   say 'Data type:                  ' prtJobInfo.DataType
  15690.   say 'Job parameters:             ' prtJobInfo.Parms
  15691.   say 'Job status comment:         ' prtJobInfo.StatusComment
  15692.   say 'Queue name:                 ' prtJobInfo.Queue
  15693.   say 'Queue processor:            ' prtJobInfo.QProcName
  15694.   say 'Queue processor parameters: ' prtJobInfo.QProcParms
  15695.   say 'The printer name:           ' prtJobInfo.PrinterName
  15696.   say 'Printer Driver version:     ' prtJobInfo.Version
  15697.   say 'Device Name:                ' prtJobInfo.DeviceName
  15698.  
  15699.   exit 0
  15700.  
  15701.  
  15702. ΓòÉΓòÉΓòÉ 15.19. RxSplQueryQueue() ΓòÉΓòÉΓòÉ
  15703.  
  15704. The function returns information about a print queue. A print queue name must 
  15705. be specified. 
  15706.  
  15707. Syntax 
  15708.  
  15709.  
  15710. MyRc = RxSplQueryQueue(ComputerName, RxStem, PrQueueName)
  15711.  
  15712. Parameters 
  15713.  
  15714.  ComputerName   The name of the computer to query. Use '' for a local computer 
  15715.  
  15716.  PrQueueName    The print queue name to do the query against 
  15717.  
  15718.  The returned parameter values are: 
  15719.  
  15720.  MyRc           Return code from the function call. It must be 0 otherwise all 
  15721.                 other returned values are invalid 
  15722.  
  15723.  'RxStem'       A REXX variable which is divided into: 
  15724.  
  15725.                   o  RxStem.Priority 
  15726.  
  15727.                      The printer queue priority 
  15728.  
  15729.                   o  RxStem.StartTime 
  15730.  
  15731.                      The printer queue starttime in minutes after midnight 
  15732.  
  15733.                   o  RxStem.UntilTime 
  15734.  
  15735.                      The printer queue until time in minutes after midnight 
  15736.  
  15737.                   o  RxStem.Type 
  15738.  
  15739.                      The printer queue type value and text. The following 
  15740.                      values are returned together with the decimal Type value: 
  15741.  
  15742.                                           Value returned        This is
  15743.                                           --------------------  ------------------------------------------
  15744.                                           PRQ3_TYPE_RAW         Data is always enqueued in the device
  15745.                                                                 specific format.
  15746.                                           PRQ3_TYPE_BYPASS      Allows the spooler to bypass the queue
  15747.                                                                 processor and send data directly to the
  15748.                                                                 Printer Driver. Setting this bit allows
  15749.                                                                 the spooler to print jobs of type PM_Q_RAW
  15750.                                                                 while they are still being spooled.
  15751.                                           PRQ3_TYPE_APPDEFAULT  This bit is set for the application
  15752.                                                                 default queue only.
  15753.  
  15754.                   o  RxStem.Jobs 
  15755.  
  15756.                      The number of jobs in the queue 
  15757.  
  15758.                   o  RxStem.Status 
  15759.  
  15760.                      The printer queue status 
  15761.  
  15762.                                           Value  Meaning
  15763.                                           -----  -------
  15764.                                            0     Ok
  15765.                                            1     Print Queue is paused
  15766.                                            2     Delete pending
  15767.  
  15768.                   o  RxStem.SepFile 
  15769.  
  15770.                      The printer queue separator file path and name 
  15771.  
  15772.                   o  RxStem.PrProc 
  15773.  
  15774.                      The printer queue default queue processor 
  15775.  
  15776.                   o  RxStem.Parms 
  15777.  
  15778.                      The printer queue queue-processor parameters 
  15779.  
  15780.                   o  RxStem.Comment 
  15781.  
  15782.                      The printer queue description 
  15783.  
  15784.                   o  RxStem.Printers 
  15785.  
  15786.                      Printer drivers connected to the queue. If more printer 
  15787.                      drivers are specified, then they are separated by a comma 
  15788.  
  15789.                   o  RxStem.DriverName 
  15790.  
  15791.                      Default printer driver 
  15792.  
  15793.  Example use 
  15794.  
  15795.   /* Get printer queue information */
  15796.   if RxFuncQuery('RxSplQueryQueue') <> 0 then do
  15797.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15798.    call LoadLsRxutFuncs
  15799.   end
  15800.  
  15801.   ComputerName = '\\ILIDC'
  15802.   PrQueueName = 'HPLJ6'
  15803.  
  15804.   MyRc = RxSplQueryQueue(ComputerName, RxStem, PrQueueName)
  15805.  
  15806.   if MyRc <> '0' then do
  15807.    say 'Error from RxSplQueryQueue. RC =' MyRc
  15808.    exit 9
  15809.   end
  15810.  
  15811.   say
  15812.   say 'Printer Queue name          ' PrQueueName
  15813.   say 'Printer Queue priority      ' RxStem.Priority
  15814.   say 'Printer Queue start time    ' RxStem.StartTime
  15815.   say 'Printer Queue until time    ' RxStem.UntilTime
  15816.   say 'Printer Queue type          ' RxStem.Type
  15817.   say 'Printer Queue separator file' RxStem.SepFile
  15818.   say 'Default queue Processor     ' RxStem.PrProc
  15819.   say 'Queue processor parameters  ' RxStem.Parms
  15820.   say 'Printer Queue description   ' RxStem.Comment
  15821.   say 'Connected printer drivers   ' RxStem.Printers
  15822.   say 'Default printer driver      ' RxStem.DriverName
  15823.  
  15824.   exit 0
  15825.  
  15826.  
  15827. ΓòÉΓòÉΓòÉ 15.20. RxSplReleaseJob() ΓòÉΓòÉΓòÉ
  15828.  
  15829. The function releases a previously held (paused) print job. 
  15830.  
  15831. Syntax 
  15832.  
  15833.  
  15834. MyRc = RxSplReleaseJob(ComputerName, QueueName, JobId)
  15835.  
  15836. Parameters 
  15837.  
  15838. The required parameter values are: 
  15839.  
  15840.  ComputerName   Must be either be specified as '' for a local computer or 
  15841.                 '\\computername'. 
  15842.  
  15843.  QueueName      The name of the queue where the print job resides 
  15844.  
  15845.  JobId          The print job Id (numeric value) 
  15846.  
  15847.  Example use 
  15848.  
  15849.   /* Release a print job in a specified printer queue */
  15850.   if RxFuncQuery('RxSplReleaseJob') <> 0 then do
  15851.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15852.    call LoadLsRxutFuncs
  15853.   end
  15854.  
  15855.   ComputerName = '\\ILIDC'
  15856.   QueueName    = 'IBM4019L'
  15857.   JobId        = 6
  15858.  
  15859.   MyRc = RxSplReleaseJob(ComputerName, QueueName, JobId)
  15860.  
  15861.   if MyRc <> '0' then do
  15862.    say 'Error from RxSplReleaseJob. RC =' MyRc
  15863.    exit 9
  15864.   end
  15865.   else do
  15866.    say 'Print job Id' JobId 'is released for printing'
  15867.   end
  15868.  
  15869.   exit 0
  15870.  
  15871.  
  15872. ΓòÉΓòÉΓòÉ 15.21. RxSplReleaseQueue() ΓòÉΓòÉΓòÉ
  15873.  
  15874. The function releases a previously held (paused) printer queue. 
  15875.  
  15876. Syntax 
  15877.  
  15878.  
  15879. MyRc = RxSplReleaseQueue(ComputerName, QueueName)
  15880.  
  15881. Parameters 
  15882.  
  15883. The required parameter values are: 
  15884.  
  15885.  ComputerName   Must be either be specified as '' for a local computer or 
  15886.                 '\\computername'. 
  15887.  
  15888.  QueueName      The name of the queue where the print job resides 
  15889.  
  15890.  Example use 
  15891.  
  15892.   /* Release a held printer queue on a specified computer */
  15893.   if RxFuncQuery('RxSplReleaseQueue') <> 0 then do
  15894.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15895.    call LoadLsRxutFuncs
  15896.   end
  15897.  
  15898.   ComputerName = '\\ILIDC'
  15899.   QueueName    = 'IBM4019L'
  15900.  
  15901.   MyRc = RxSplReleaseQueue(ComputerName, QueueName)
  15902.  
  15903.   if MyRc <> '0' then do
  15904.    say 'Error from RxSplReleaseQueue. RC =' MyRc
  15905.    exit 9
  15906.   end
  15907.   else do
  15908.    say 'Printer queue' QueueName 'is released'
  15909.   end
  15910.  
  15911.   exit 0
  15912.  
  15913.  
  15914. ΓòÉΓòÉΓòÉ 15.22. RxSplSetJob() ΓòÉΓòÉΓòÉ
  15915.  
  15916. The function modifies a parameter value of a print job. 
  15917.  
  15918. Syntax 
  15919.  
  15920.  
  15921. MyRc = RxSplSetJob('PARAMETER', parmValue, SrvName, QueueName, JobId)
  15922.  
  15923. Parameters 
  15924.  
  15925. The parameters required are: 
  15926.  
  15927.  'PARAMETER'       The parameter name of the print job value to be modified. 
  15928.                    Only one parameter value can be changed at a time. If the 
  15929.                    parameter is invalid or the parameter value is unknown or in 
  15930.                    error no changes will occur. 
  15931.  
  15932.                      o  NotifyName 
  15933.  
  15934.                         Messaging alias for print alert. This value is either a 
  15935.                         computer name or a message name 
  15936.  
  15937.                      o  Comment 
  15938.  
  15939.                         A comment string for information about the print job. 
  15940.                         The maximum length of the string is 48 characters 
  15941.  
  15942.                      o  Document 
  15943.  
  15944.                         The document name of the print job (set by the 
  15945.                         application that submitted the print job). The maximum 
  15946.                         length of the string is 260 characters 
  15947.  
  15948.                      o  Position 
  15949.  
  15950.                         Must be given the appropriate value, as follows: 
  15951.  
  15952.                                                 Value  Change performed
  15953.                                                 -----  ----------------
  15954.                                                 0      No change
  15955.                                                 1      Move to first place
  15956.                                                 >1     Move to this position, or if the specified
  15957.                                                        value is greater than the number of jobs
  15958.                                                        in the queue, move to the end of the queue.
  15959.  
  15960.                      o  Priority 
  15961.  
  15962.                         The job-priority range is 1 through 99, with 99 the 
  15963.                         highest job priority. The job priority determines the 
  15964.                         order of jobs in the queue. If multiple queues print to 
  15965.                         the same printer, the job on the front of each queue is 
  15966.                         examined. The job with the highest priority is printed 
  15967.                         first. If there is more than one job with the highest 
  15968.                         priority, the oldest job with this highest priority is 
  15969.                         printed first. 
  15970.  
  15971.  parmValue         The value of the parameter that is being modified 
  15972.  
  15973.  SrvName           The server name on which the printer queue and print job 
  15974.                    resides 
  15975.  
  15976.  QueueName         The name of the printer queue 
  15977.  
  15978.  JobId             The numeric job identification number 
  15979.  
  15980.  Note 
  15981.  
  15982.  The server name can be specified as '' for a local server. 
  15983.  
  15984.  Example 
  15985.  
  15986.   /* Modify a number of print job values */
  15987.   if RxFuncQuery('RxSplSetJob') <> 0 then do
  15988.    call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  15989.    call LoadLsRxutFuncs
  15990.   end
  15991.  
  15992.   /* Set notify name */
  15993.   parmValue = '\\PRTMON'
  15994.   SrvName   = '\\ILIDC'
  15995.   QueueName = 'IBM4019L'
  15996.   JobId     = 6
  15997.  
  15998.   myRc = RxSplSetJob('NotifyName', parmValue, SrvName, QueueName, JobId)
  15999.  
  16000.   if myRc <> '0' then do
  16001.    say 'Got error from RxSplSetJob() ' myRc
  16002.    exit 9
  16003.   end
  16004.  
  16005.   /* Set comment */
  16006.   parmValue = 'This was a changed by REXX'
  16007.  
  16008.   myRc = RxSplSetJob('Comment', parmValue, SrvName, QueueName, JobId)
  16009.  
  16010.   if myRc <> '0' then do
  16011.    say 'Got error from RxSplSetJob() ' myRc
  16012.    exit 9
  16013.   end
  16014.  
  16015.   /* Set document name */
  16016.   parmValue = 'TheDoc'
  16017.  
  16018.   myRc = RxSplSetJob('Document', parmValue, SrvName, QueueName, JobId)
  16019.  
  16020.   if myRc <> '0' then do
  16021.    say 'Got error from RxSplSetJob() ' myRc
  16022.    exit 9
  16023.   end
  16024.  
  16025.   /* Set position */
  16026.   parmValue = 1
  16027.  
  16028.   myRc = RxSplSetJob('Position', parmValue, SrvName, QueueName, JobId)
  16029.  
  16030.   if myRc <> '0' then do
  16031.    say 'Got error from RxSplSetJob() ' myRc
  16032.    exit 9
  16033.   end
  16034.  
  16035.   /* Set priority */
  16036.   parmValue = 51
  16037.  
  16038.   myRc = RxSplSetJob('Priority', parmValue, SrvName, QueueName, JobId)
  16039.  
  16040.   if myRc <> '0' then do
  16041.    say 'Got error from RxSplSetJob() ' myRc
  16042.    exit 9
  16043.   end
  16044.   else do
  16045.    say
  16046.    say "Modified print job values successfully"
  16047.   end
  16048.  
  16049.   exit 0
  16050.  
  16051.  
  16052. ΓòÉΓòÉΓòÉ 16. Option Parameter Values ΓòÉΓòÉΓòÉ
  16053.  
  16054. The option parameter values used in most of the functions available in the 
  16055. LSRXUT.DLL are defined as follows: 
  16056.  
  16057. NETACCESS                10
  16058. NETACCESSUSERPERMS       12
  16059. NETALIAS                 20
  16060. NETAPP                   30
  16061. NETAPPSEL                32
  16062. NETCONNECTION            40
  16063. NETLOGON                 50
  16064. NETLOGONASN              52
  16065. NETFILE                  60
  16066. NETGROUP                 70
  16067. NETMESSAGENAME           80
  16068. NETBIOS                  90
  16069. NETPRINTDEST            100
  16070. NETPRINTJOB             110
  16071. NETPRINTQUEUE           120
  16072. NETCHARDEV              130
  16073. NETCHARDEVQ             140
  16074. NETSERVERDISK           150
  16075. NETSERVER               160
  16076. NETSERVICE              170
  16077. NETSESSION              180
  16078. NETSHARE                190
  16079. NETSTATISTICS           195
  16080. NETSHARECHECK           210
  16081. NETFILECLOSE            220
  16082. NETHOMEDIR              230
  16083. NETACCESSDEL            240
  16084. NETACCESSADD            250
  16085. NETUSERPASSWORD         260
  16086. NETUSE                  270
  16087. NETUSER                 280
  16088. NETUSER2                282
  16089. NETUSERINITDCDB         290
  16090. NETPRINTPORT            300
  16091. NETPRINTDRIVER          310
  16092. NETPRINTQPROC           320
  16093. NETUSERGROUPS           330
  16094. NETGROUPUSERS           340
  16095. NETWKSTA                350
  16096. NETUSERMODALS           360
  16097. NETSERVERMODALS         370
  16098. NETEXPIREPASSWORD       400
  16099. NETFINDADDRESS          410
  16100. NETACCESSCHECK          420
  16101. NETUSERVALIDATE2        500
  16102. NETGETDCNAME            510
  16103. NETACCESSAPPLY          520
  16104. NETMESSAGEBUFFERSEND    530
  16105. NETMESSAGEFILESEND      540
  16106. NETMESSAGELOGFILE       550
  16107. NETMESSAGENAMEFWD       560
  16108. NETMESSAGENAMEUNFWD     570
  16109. NETAUDITLOGCLEAR        580
  16110. NETERRORLOGCLEAR        640
  16111. NETERRORLOGREAD         650
  16112. NETERRORLOGWRITE        660
  16113. NETREMOTECOPY           670
  16114. NETREMOTEEXEC           680
  16115. NETREMOTEMOVE           690
  16116. NETREMOTETOD            700
  16117. NETSERVERADMINCMD       710
  16118. NETUSERDCDBINIT         720
  16119. NETDASDCHECK            730
  16120. NETDASDCONTROL          740
  16121. NETDASD                 750
  16122.  
  16123.  
  16124. ΓòÉΓòÉΓòÉ 17. Sample REXX Procedure ΓòÉΓòÉΓòÉ
  16125.  
  16126. This chapter describes a REXX procedure that combines a number of the 
  16127. LSRXUT.DLL functions into a work related procedure. 
  16128.  
  16129.  
  16130. ΓòÉΓòÉΓòÉ 17.1. Monitor Number Shares ΓòÉΓòÉΓòÉ
  16131.  
  16132. This function monitors the number of shares on a server. The administrator who 
  16133. wrote this procedure wanted to know if the MAXSHARES parameter was configured 
  16134. correctly. 
  16135.  
  16136. NUMSHARE Procedure 
  16137.  
  16138.  
  16139. /* Display number shares on a server */
  16140. call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs
  16141. call SysLoadFuncs
  16142. call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  16143. call LoadLsRxutFuncs
  16144.  
  16145. NETSHARE = 190
  16146. SrvName = '\\FSCDC'
  16147. '@CLS'
  16148.  
  16149. signal on error name error
  16150. signal on halt name error
  16151. signal on syntax name error
  16152. call SysCurState OFF
  16153.  
  16154. do forever
  16155.  myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  16156.  
  16157.  if myRc <> '0' then do
  16158.   say 'Got error from NetEnumerate() ' myRc
  16159.   call SysCurState ON
  16160.   call DropLsRxutFuncs
  16161.   call SysDropFuncs
  16162.   exit 9
  16163.  end
  16164.  
  16165.  if shareInfo.1 = '-none-' then do
  16166.   say shareInfo.1
  16167.   call SysCurState ON
  16168.   call DropLsRxutFuncs
  16169.   call SysDropFuncs
  16170.   exit 0
  16171.  end
  16172.  
  16173.  pos = SysCurPos(0,0)
  16174.  say 'Time:' TIME('N') 'Num shares: ' shareInfo.0
  16175.  call SysSleep 60
  16176.  
  16177. end
  16178.  
  16179. error:
  16180. call SysCurState ON
  16181. call DropLsRxutFuncs
  16182. call SysDropFuncs
  16183. call RxFuncDrop 'LoadLsRxutFuncs'
  16184.  
  16185. exit 0
  16186.  
  16187.