home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Collection - Online Library - January 1996 / CKITOS2196.ISO / diskette / gg244043.dsk / unc.dsk / LS30NEW / LS30UTIL.INF (.txt) < prev   
OS/2 Help File  |  1993-07-23  |  129KB  |  8,693 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. The IBM LAN Server 3.0 utility DLL described in IBM LAN Server 3.0 Recovery 
  5. Considerations, IBM Form number GG24-4043, has been extended with a number of 
  6. additional functions. This document describes the additional functions and 
  7. their intended use. 
  8.  
  9. Written by Ingolf Lindberg, IBM Denmark, OS/2 Competency Center 
  10.  
  11.  
  12. ΓòÉΓòÉΓòÉ 1.1. History ΓòÉΓòÉΓòÉ
  13.  
  14. The major changes in the different versions are: 
  15.  
  16. Version 1.0.0  Closed March 9th. 1993. All functions are described in 
  17.                GG24-4043. 
  18.  
  19. Version 1.0.1  Added Ls30utVer(), NetEnumerate() and NetGetInfo(). Added the 
  20.                LS30UT.INF file. It is a draft version. It contains spelling and 
  21.                wording errors. 
  22.  
  23. Version 1.0.2  Added NetAdd(), NetDelete() and NetSetInfo(). An additonal alert 
  24.                part was added using the IBM FASTService for OS/2, which of 
  25.                cource must be installed if used. A IBM LAN Server 3.0 
  26.                controlling workstation can now together with FASTService and 
  27.                the addition of Remote Operations from either Extended Services 
  28.                or CM/2 perform operations under control of NetView. The NetView 
  29.                control is intended to be triggered by an alert, which will 
  30.                trigger a NetView CLIST that performs a RUNCMD against the IBM 
  31.                LAN Server 3.0 controlling workstation. 
  32.  
  33.                The LS30UT.INF is still having spell and wording errors. 
  34.  
  35.  
  36. ΓòÉΓòÉΓòÉ 1.2. The Files ΓòÉΓòÉΓòÉ
  37.  
  38. The IBM LAN Server 3.0 Utility DLL package contains: 
  39.  
  40.  1. The LS30UT.INF file (This file) 
  41.  
  42.  2. An updated version of LS30UT.DLL 
  43.  
  44.  
  45. ΓòÉΓòÉΓòÉ 1.3. References ΓòÉΓòÉΓòÉ
  46.  
  47. The following documentation can be used for additional description of the 
  48. parameters and values used and provided in the LS30UT.DLL: 
  49.  
  50. o IBM LAN Server 3.0 Application Programming Reference 
  51.  
  52. o IBM LAN Server 2.0 Application Programming Reference, but not for alias and 
  53.   application related calls 
  54.  
  55. o IBM LAN Server 3.0 Recovery Considerations, IBM Form number GG24-4043 
  56.  
  57.  
  58. ΓòÉΓòÉΓòÉ 2. How to use ΓòÉΓòÉΓòÉ
  59.  
  60. The use of the LS30UT.DLL functions requires OS/2 2.0 and IBM LAN Server 3.0 or 
  61. IBM OS/2 LAN Requester 3.0. 
  62.  
  63. The LS30UT.DLL must be installed in any subdirectory that is mentioned in the 
  64. CONFIG.SYS LIBPATH= parameter. 
  65.  
  66. To validate the correct installation of the LS30UT.DLL the following REXX 
  67. procedure can be used: 
  68.  
  69. /************************************************/
  70. Say 'Testing LS30UT.DLL access'
  71.  
  72. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  73. call LoadLs30utFuncs
  74.  
  75. Say 'LoadLs30utFuncs is complete.'
  76.  
  77. version = Ls30utVer()
  78. say 'Version is ' version
  79.  
  80. call DropLs30utFuncs
  81.  
  82. exit 0
  83.  
  84. An output of the test function would be like: 
  85.  
  86. Testing LS30UT.DLL access
  87. LoadLs30utFuncs is complete.
  88. Version is  1.00.01
  89.  
  90.  
  91. ΓòÉΓòÉΓòÉ 3. LS30UT.DLL Load and Drop ΓòÉΓòÉΓòÉ
  92.  
  93. To active the functions of the LS30UT.DLL must a REXX call be made to make REXX 
  94. aware of the existence of the LS30UT.DLL functions. 
  95.  
  96. A similar  REXX call must be made to unload or drop the LS30UT.DLL. 
  97.  
  98. To provide this, two functions are implemented. They are: 
  99.  
  100. o LoadLs30utFuncs() 
  101.  
  102. o DropLs30utFuncs() 
  103.  
  104.  
  105. ΓòÉΓòÉΓòÉ 3.1. DropLs30utFuncs() ΓòÉΓòÉΓòÉ
  106.  
  107. Drop all functions in LS30UT.DLL 
  108.  
  109. Syntax 
  110.  
  111. call DropLs30utFuncs
  112.  
  113. Parameters 
  114.  
  115. none
  116.  
  117. Note 
  118.  
  119. The call to DropLs30utFuncs must be initiated after any use of the LS30UT.DLL 
  120. functions. 
  121.  
  122. Example 
  123.  
  124. /************************************************/
  125. Say 'Testing LS30UT.DLL access'
  126.  
  127. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  128. call LoadLs30utFuncs
  129.  
  130. Say 'LoadLs30utFuncs is complete.'
  131.  
  132. version = Ls30utVer()
  133. say 'Version is ' version
  134.  
  135. call DropLs30utFuncs
  136.  
  137. exit 0
  138.  
  139. Example output 
  140.  
  141. Testing LS30UT.DLL access
  142. LoadLs30utFuncs is complete.
  143. Version is  1.00.01
  144.  
  145.  
  146. ΓòÉΓòÉΓòÉ 3.2. LoadLs30utFuncs() ΓòÉΓòÉΓòÉ
  147.  
  148. Register all functions in LS30UT.DLL 
  149.  
  150. Syntax 
  151.  
  152. call LoadLs30utFuncs
  153.  
  154. Parameters 
  155.  
  156. none
  157.  
  158. Note 
  159.  
  160. The call to LoadLs30utFuncs must be combined with the RxFuncAdd. The correct 
  161. sequence is: 
  162.  
  163. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  164. call LoadLs30utFuncs
  165.  
  166. Example 
  167.  
  168. /************************************************/
  169. Say 'Testing LS30UT.DLL access'
  170.  
  171. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  172. call LoadLs30utFuncs
  173.  
  174. Say 'LoadLs30utFuncs is complete.'
  175.  
  176. version = Ls30utVer()
  177. say 'Version is ' version
  178.  
  179. call DropLs30utFuncs
  180.  
  181. exit 0
  182.  
  183. Example output 
  184.  
  185. Testing LS30UT.DLL access
  186. LoadLs30utFuncs is complete.
  187. Version is  1.00.01
  188.  
  189.  
  190. ΓòÉΓòÉΓòÉ 4. The Base Functions ΓòÉΓòÉΓòÉ
  191.  
  192. The base functions provided in the IBM LAN Server 3.0 utility DLL are described 
  193. in detail in the IBM LAN Server 3.0 Recovery Considerations, IBM Form number 
  194. GG24-4043. For completeness a short list of those functions is included here. 
  195.  
  196. GetDCName()            Get The Domain Controller Name 
  197.  
  198. CopyDirAcls()          Copy Directory Access Control Profiles specified in the 
  199.                        source location to the destination location. The source 
  200.                        directory will be created if it does not exist. Local 
  201.                        support only. 
  202.  
  203. DumpAllUsers()         Dump all users defined to a binary file. 
  204.  
  205. DumpUser()             Dump user specified to a binary file. 
  206.  
  207. InsertAllUsers()       From dump file reestablish all user definitions. A new 
  208.                        password must be supplied. 
  209.  
  210. QueryDirAliasPath()    Query the path of a directory alias 
  211.  
  212. MoveDirAlias()         Move a directory alias to a new location 
  213.  
  214. SetLogonAsn()          Set logon assignment for a user 
  215.  
  216. GetLogonAsn()          Get logon assignments for a user 
  217.  
  218. NetEnum()              Enumerate some NET provided information 
  219.  
  220. GetLogonAsnAcp()       Get logon assignment access control profiles 
  221.  
  222.  
  223. ΓòÉΓòÉΓòÉ 5. NetAdd ΓòÉΓòÉΓòÉ
  224.  
  225. The Net Add functions is a family of functions that can be called with a number 
  226. of parameters. The use of the NetAdd has minimum two different parameters. The 
  227. generic syntax is: 
  228.  
  229.  
  230. MyRc = NetAdd(option, 'stemvar', parm1, parm2, parm3)
  231. MyRc = NetAdd(option, parm1, parm2, parm3)
  232.  
  233. The option parameter contains a value to determine what type or option has to 
  234. be deleted. An example would be the deletion of a user. 
  235.  
  236. The parm1, parm2, parm3 parameters will be dependent on the performed option. 
  237.  
  238. The MyRc is the return code that will have an value from the NetAdd() function. 
  239. If the call is successful the character '0' will be returned. Otherwise an 
  240. error code and descriptive text will be inserted by NetAdd. 
  241.  
  242. The option parameter values are defined in Option parameter values. 
  243.  
  244.  
  245. ΓòÉΓòÉΓòÉ 5.1. NETACCESS Add ΓòÉΓòÉΓòÉ
  246.  
  247. The function creates the resource auditing entry and adds 0 or more entries in 
  248. the Access Control List for a resource. 
  249.  
  250. Syntax 
  251.  
  252.  
  253. MyRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
  254.  
  255. Parameters 
  256.  
  257. The parameters required are: 
  258.  
  259. 'Access'          The REXX variable holding the values. The variable is divided 
  260.                   into 
  261.  
  262.    o Access.count  The number of of access controls available for the resource. 
  263.      The value can be 0 or undefined. In this case access control profiles are 
  264.      not created 
  265.  
  266.    o Access.audit  The auditing flags. If the variable is undefined a default 
  267.      value of No auditing is used. The flags are defined as: 
  268.  
  269.       - A  Audit all. When this bit is set, all access attempts will be 
  270.         audited. 
  271.  
  272.       - O  If O, audit successful file opens. 
  273.  
  274.       - W  If W, audit successful file writes and successful directory creates. 
  275.  
  276.       - D  If D, audit successful file deletes or truncates and successful 
  277.         directory deletes. 
  278.  
  279.       - P  If P, audit successful file and directory access control profile 
  280.         change. 
  281.  
  282.       - o  If o, audit failed file opens. 
  283.  
  284.       - w  If w, audit failed file writes and failed directory creates. 
  285.  
  286.       - d  If d, audit failed file deletes or truncates and failed directory 
  287.         deletes. 
  288.  
  289.       - p  If d, audit failed file and directory access control profile change. 
  290.  
  291.       - N or -none-  No auditing is performed. 
  292.  
  293.    o Access.i.ugname  The user or group name. i is a value from 1 to 
  294.      Access.count 
  295.  
  296.      Use the group name USERS to create an access control profile for all users 
  297.  
  298.    o Access.i.access  The access profile. i is specified as above. The access 
  299.      control flags are as follows: 
  300.  
  301.       - N None 
  302.  
  303.       - R Read 
  304.  
  305.       - W Write 
  306.  
  307.       - C Create 
  308.  
  309.       - X Execute 
  310.  
  311.       - D Delete 
  312.  
  313.       - P Permissions 
  314.  
  315.       - G This is a Group permission. The G parameter is not required to be 
  316.         specified 
  317.  
  318. SrvName           The server name 
  319.  
  320. resourceName      The resource name must be specified in the name format as 
  321.                   described below: 
  322.  
  323.                                     Resource Type                 Name Format
  324.                                     -------------                 -----------
  325.                                     Drive                         drive:
  326.                                     Path                          \path
  327.                                     Directory                     drive:pathname
  328.                                     File                          drive:pathname
  329.                                     UNC                           \\server\sharename\path
  330.                                     Pipe                          \pipe\pipename
  331.                                     Spooler Queue                 \print\queuename
  332.                                     Serial Device Queue           \comm\chardevqueue
  333.  
  334. Note 
  335.  
  336. The server name can be specified as '' for a local server. 
  337.  
  338. Example 
  339.  
  340.  
  341. /* Create a access control profile for a resource */
  342. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  343. call LoadLs30utFuncs
  344.  
  345. NETACCESS = 10
  346. SrvName = '\\ILIDC'
  347. resourceName = 'D:\APPS\TEMP'
  348. Access.audit = 'A'
  349. Access.count = 2
  350. Access.1.ugname = 'CSUSERS'
  351. Access.1.access = 'RX'
  352. Access.2.ugname = 'FMAM'
  353. Access.2.access = 'RWCXDP'
  354.  
  355. myRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
  356.  
  357. if myRc <> '0' then do
  358.  say 'Got error from NetAdd() ' myRc
  359.  call DropLs30utFuncs
  360.  exit 9
  361. end
  362. else do
  363.  say
  364.  say 'Access Control Profile created successfully'
  365. end
  366.  
  367. call DropLs30utFuncs
  368. call RxFuncDrop 'LoadLs30utFuncs'
  369.  
  370. exit 0
  371.  
  372. Example Output 
  373.  
  374.  
  375. Access Control Profile created successfully
  376.  
  377.  
  378. ΓòÉΓòÉΓòÉ 5.2. NETACCESSADD ΓòÉΓòÉΓòÉ
  379.  
  380. The function adds one or more Access Control Profiles to the existing Access 
  381. Control List for a resource. 
  382.  
  383. Syntax 
  384.  
  385.  
  386. MyRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
  387.  
  388. Parameters 
  389.  
  390. The parameters required are: 
  391.  
  392. 'AddtoACL'        The REXX variable holding the values. The variable is divided 
  393.                   into 
  394.  
  395.    o AddtoACL.count  The number of of access controls available for the 
  396.      resource. The value can be 0 or undefined. In this case access control 
  397.      profiles are not created 
  398.  
  399.    o AddtoACL.i.ugname  The user or group name. i is a value from 1 to 
  400.      AddtoACL.count 
  401.  
  402.    o AddtoACL.i.access  The access profile. i is specified as above. The access 
  403.      control flags are as follows: 
  404.  
  405.       - N None 
  406.  
  407.       - R Read 
  408.  
  409.       - W Write 
  410.  
  411.       - C Create 
  412.  
  413.       - X Execute 
  414.  
  415.       - D Delete 
  416.  
  417.       - P Permissions 
  418.  
  419.       - G This is a Group permission. The G parameter is not required to be 
  420.         specified 
  421.  
  422. SrvName           The server name 
  423.  
  424. resourceName      The resource name must be specified in the name format as 
  425.                   described below: 
  426.  
  427.                                     Resource Type                 Name Format
  428.                                     -------------                 -----------
  429.                                     Drive                         drive:
  430.                                     Path                          \path
  431.                                     Directory                     drive:pathname
  432.                                     File                          drive:pathname
  433.                                     UNC                           \\server\sharename\path
  434.                                     Pipe                          \pipe\pipename
  435.                                     Spooler Queue                 \print\queuename
  436.                                     Serial Device Queue           \comm\chardevqueue
  437.  
  438. Note 
  439.  
  440. The server name can be specified as '' for a local server. 
  441.  
  442. Example 
  443.  
  444.  
  445. /* Add another Access Control Entry to existing Access Profile List */
  446. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  447. call LoadLs30utFuncs
  448.  
  449. NETACCESSADD = 250
  450. SrvName = '\\ILIDC'
  451. resourceName = 'D:\APPS\TEMP'
  452. AddtoACL.count = 1
  453. AddtoACL.1.ugname = 'CSUSERS'
  454. AddtoACL.1.access = 'RWC'
  455.  
  456. myRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
  457.  
  458. if myRc <> '0' then do
  459.  say 'Got error from NetAdd() ' myRc
  460.  call DropLs30utFuncs
  461.  exit 9
  462. end
  463. else do
  464.  say
  465.  say "Additional Access Control Profile added successfully"
  466. end
  467.  
  468. call DropLs30utFuncs
  469. call RxFuncDrop 'LoadLs30utFuncs'
  470.  
  471. exit 0
  472.  
  473. Example Output 
  474.  
  475.  
  476. Additional Access Control Profile added successfully
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 5.3. NETALIAS Add ΓòÉΓòÉΓòÉ
  480.  
  481. The function creates an alias definition for a resource. 
  482.  
  483. Syntax 
  484.  
  485.  
  486. MyRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
  487.  
  488. Parameters 
  489.  
  490. The parameters required are: 
  491.  
  492. 'AliasInfo'       The REXX variable holding the alias information values. The 
  493.                   variable is divided into: 
  494.  
  495.    o AliasInfo.name  The alias name 
  496.  
  497.    o AliasInfo.remark  The alias comment or remark 
  498.  
  499.    o AliasInfo.server  The name of the server where the resource described by 
  500.      this alias resides. The server name can be different from SrvName 
  501.  
  502.    o AliasInfo.netname The alias name for files aliases, and the queue name for 
  503.      printer and serial device aliases. This value is not used by the NetAdd() 
  504.      function 
  505.  
  506.    o AliasInfo.location  The alias location. The following values are valid: 
  507.  
  508.           Location                         location value
  509.           --------                         --------------
  510.           Within the domain                'Within Domain'
  511.                                            'INTERNAL'
  512.  
  513.           External, for DOS                'External, for DOS'
  514.                                            'EXTERNAL_DOS'
  515.  
  516.           External, for OS/2               'External, for OS/2'
  517.                                            'EXTERNAL_OS2'
  518.  
  519.           External, for DOS and OS/2       'External, for DOS and OS/2'
  520.                                            'EXTERNAL_BOTH'
  521.  
  522.      The default value is 'Within Domain' 
  523.  
  524.    o AliasInfo.mode  When the alias is shared. The following values are valid: 
  525.  
  526.           Sharing mode                     mode value
  527.           ------------                     ----------
  528.           At server startup                'At server startup'
  529.                                            'STARTUP'
  530.  
  531.           By administrator                 'By administrator'
  532.                                            'BYADMIN'
  533.  
  534.           At Requester use                 'At Requester use'
  535.                                            'DYNAMIC'
  536.  
  537.      The default value is 'At Requester use' 
  538.  
  539.    o AliasInfo.maxuses  The maximum number of users who can have redirection to 
  540.      the resource identified by this alias. The default value is 65535 
  541.  
  542.    o AliasInfo.type  The alias type. The following values are valid: 
  543.  
  544.           Type                             type value
  545.           ----                             ----------
  546.           Files alias                      'Files'
  547.  
  548.           Printer alias                    'Printer'
  549.  
  550.           Serial alias                     'Serial'
  551.  
  552.    o AliasInfo.queue  The queue name for serial or printer alias only 
  553.  
  554.    o AliasInfo.path  The path for files alias only 
  555.  
  556.    o AliasInfo.priority  The serial device priority. The value can be from 1 to 
  557.      9. 1 is the highest priority. The value of 9 will be used as default if no 
  558.      value is specified 
  559.  
  560.    o AliasInfo.device_pool  The serial device pool. LPT1 to LPT9 and COM1 to 
  561.      COM9 can be used. If specified the entries are separated by a space. For 
  562.      example 'COM1 COM4' 
  563.  
  564. SrvName           The server name (Domain controller name) 
  565.  
  566. Note 
  567.  
  568. The server name can be specified as '' for a local domain controller. 
  569.  
  570. Example 
  571.  
  572.  
  573. /* Add a alias */
  574. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  575. call LoadLs30utFuncs
  576.  
  577. NETALIAS           = 20
  578. SrvName            = '\\ILIDC'
  579. AliasInfo.name     = 'THEBOOK'
  580. AliasInfo.remark   = 'Temporary alias'
  581. AliasInfo.server   = '\\ILIDC'
  582. AliasInfo.location = 'Within Domain'
  583. AliasInfo.mode     = 'At Requester use'
  584. AliasInfo.type     = 'Files'
  585. AliasInfo.path     = 'D:\APPS\TEMP'
  586.  
  587. myRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
  588.  
  589. if myRc <> '0' then do
  590.  say 'Got error from NetAdd() ' myRc
  591.  call DropLs30utFuncs
  592.  exit 9
  593. end
  594. else do
  595.  say 'Alias added successfully'
  596.  say
  597. end
  598.  
  599. call DropLs30utFuncs
  600. call RxFuncDrop 'LoadLs30utFuncs'
  601.  
  602. exit 0
  603.  
  604. Example Output 
  605.  
  606.  
  607. Alias added successfully
  608.  
  609.  
  610. ΓòÉΓòÉΓòÉ 5.4. NETAPP Add ΓòÉΓòÉΓòÉ
  611.  
  612. The function creates a public or private application. 
  613.  
  614. Syntax 
  615.  
  616.  
  617. MyRc = NetAdd(NETAPP, 'AppInfo', SrvName)
  618. MyRc = NetAdd(NETAPP, 'AppInfo', SrvName, UserId)
  619.  
  620. Parameters 
  621.  
  622. The parameters required are: 
  623.  
  624. 'AppInfo'         The REXX variable holding the application information. The 
  625.                   variable is divided into: 
  626.  
  627.    o AppInfo.name  The application name 
  628.  
  629.    o AppInfo.remark  The application remark or description. A remark must be 
  630.      provided 
  631.  
  632.    o AppInfo.command  The command that starts the application 
  633.  
  634.    o AppInfo.command_parms  The application start parameters if required 
  635.  
  636.    o AppInfo.app_alias_or_drv  The alias or drive where the application 
  637.      resides. It specifies a drive letter, followed by a colon (:), if the 
  638.      application resides on the user's local machine or it specifies an 
  639.      existing alias if the application resides on a server. 
  640.  
  641.    o AppInfo.app_drive  Applies to DOS public applications only. It is used to 
  642.      specify the drive that is current when the application runs. Valid letters 
  643.      are A through X. A value of * indicates that the system should choose a 
  644.      drive letter. 
  645.  
  646.    o AppInfo.app_path_to_dir  The remaining path to the application. 
  647.  
  648.    o AppInfo.wrkdir_alias_or_drv  Specifies the directory that is made current 
  649.      when the application runs. If the working directory is on the local 
  650.      machine, it specifies the drive, where the directory is located. If the 
  651.      working directory is remote, it specifies an existing alias where the 
  652.      directory is located. 
  653.  
  654.    o AppInfo.wrkdir_drive  Specifies the drive that the working directory is to 
  655.      be assigned to when the application is started. For OS/2 applications, 
  656.      this can be any letter D through Z. For DOS applications, this can be any 
  657.      letter A through X. A value of * indicates that the system should choose a 
  658.      drive when the application is started. 
  659.  
  660.    o AppInfo.wrkdir_path_to_dir  The remaining path to the working directory 
  661.  
  662.    o AppInfo.prompt  Prompt for parameters. The following values can be used: 
  663.  
  664.           Prompt for parameters            Value
  665.           ---------------------            -----
  666.           Yes                              'Prompt user for parameters'
  667.                                            'Yes'
  668.  
  669.           No                               'Do not prompt user for parameters'
  670.                                            'No'
  671.  
  672.      The default value is 'No'. 
  673.  
  674.    o AppInfo.interface  The interface type. The values can be: 
  675.  
  676.           Interface type                   Value
  677.           --------------                   -----
  678.           Presentation Manager             'Presentation Manager'
  679.                                            'PM'
  680.  
  681.           OS/2 Fullscreen                  'Fullscreen'
  682.                                            'FS'
  683.  
  684.           OS/2 Windowed                    'Windowed'
  685.                                            'WIN'
  686.  
  687.      The default value is 'Presentation Manager'. 
  688.  
  689.    o AppInfo.type  The application type. The following values are used: 
  690.  
  691.           Application type                 Value
  692.           ----------------                 -----
  693.           Public DOS                       'Public DOS application'
  694.                                            'PUBLIC_DOS'
  695.  
  696.           Public OS/2                      'Public OS/2 application'
  697.                                            'PUBLIC_OS2'
  698.  
  699.           Private OS/2                     'Private OS/2 application'
  700.                                            'PRIVATE_OS2'
  701.  
  702.      The default value is 'Public OS/2 application'. 
  703.  
  704.    o AppInfo.res_count  The number of application resource list entries that 
  705.      follows. A value of zero indicates that the application does not require 
  706.      any redirected devices when it runs. 
  707.  
  708.    o AppInfo.i.arl_alias The alias for the resource required by the 
  709.      application. The variable i must have a value from 1 to AppInfo.res_count 
  710.  
  711.    o AppInfo.i.arl_device  The device assigned to the resource specified. If 
  712.      AppInfo.i.arl_alias specifies a files alias, AppInfo.i.arl_device must be 
  713.      a drive letter followed by a colon (:). Valid drive letters for OS/2 
  714.      applications are D: through Z:. Valid drive letters for DOS applications 
  715.      are A: through X:. If AppInfo.i.arl_alias specifies a print alias, valid 
  716.      values are LPT1 through LPT9. If AppInfo.i.arl_alias specifies a serial 
  717.      device alias, valid values for AppInfo.i.arl_device are LPT1 through LPT9 
  718.      and COM1 through COM9. Additionally, each application resource list entry 
  719.      must have a unique value for its AppInfo.i.arl_device field. For example, 
  720.      if AppInfo.i.arl_alias specifies a files alias, the drive letter specified 
  721.      in the AppInfo.i.arl_device field must be different from 
  722.      AppInfo.app_drive, AppInfo.wrkdir_drive, and any other 
  723.      AppInfo.i.arl_device fields for files aliases. The variable i must have a 
  724.      value from 1 to AppInfo.res_count 
  725.  
  726. SrvName           The server name 
  727.  
  728. Application       The application name 
  729.  
  730. UserId            The userid. The userid must be specified for private 
  731.                   applications 
  732.  
  733. Note 
  734.  
  735. The server name can be specified as '' for a local server. 
  736.  
  737. Example 
  738.  
  739.  
  740. /* Add a public application */
  741. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  742. call LoadLs30utFuncs
  743.  
  744. NETAPP  = 30
  745. SrvName = '\\ILIDC'
  746.  
  747. AppInfo.name                = 'BOOKREAD'
  748. AppInfo.remark              = 'Shared Bookmanager Read/2'
  749. AppInfo.command             = 'BOOKMGR.EXE'
  750. AppInfo.command_parms       = ''
  751. AppInfo.app_alias_or_drv    = 'BOOKMGR' /* Bookmanager programs alias */
  752.                                         /* AppInfo.app_drive not used */
  753. AppInfo.app_path_to_dir     = '\'
  754. AppInfo.wrkdir_alias_or_drv = 'BOOKMGR'
  755. AppInfo.wrkdir_drive        = 'R'       /* Make R: the working dir    */
  756. AppInfo.wrkdir_path_to_dir  = '\'       /* Remaining path             */
  757. AppInfo.prompt              = 'Do not prompt user for parameters'
  758. AppInfo.interface           = 'Presentation Manager'
  759. AppInfo.type                = 'Public OS/2 application'
  760.  
  761. /* The additional resources */
  762. AppInfo.res_count    = 3
  763. AppInfo.1.arl_alias  = 'SHAREDLL'
  764. AppInfo.1.arl_device = 'Y:'
  765. AppInfo.2.arl_alias  = 'THEBOOK'
  766. AppInfo.2.arl_device = 'Q:'
  767. AppInfo.3.arl_alias  = 'PRINTIT'
  768. AppInfo.3.arl_device = 'LPT4'
  769.  
  770. myRc = NetAdd(NETAPP, 'AppInfo', SrvName)
  771.  
  772. if myRc <> '0' then do
  773.  say 'Got error from NetAdd() ' myRc
  774.  call DropLs30utFuncs
  775.  exit 9
  776. end
  777. else do
  778.  say 'Application added successfully'
  779.  say
  780. end
  781.  
  782. call DropLs30utFuncs
  783. call RxFuncDrop 'LoadLs30utFuncs'
  784.  
  785. exit 0
  786.  
  787. Example Output 
  788.  
  789.  
  790. Application added successfully
  791.  
  792.  
  793. ΓòÉΓòÉΓòÉ 5.5. NETGROUP Add ΓòÉΓòÉΓòÉ
  794.  
  795. The function creates a group. 
  796.  
  797. Syntax 
  798.  
  799.  
  800. MyRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
  801.  
  802. Parameters 
  803.  
  804. The parameters required are: 
  805.  
  806. 'groupInfo'       The REXX variable holding the group information. The variable 
  807.                   is divided into 
  808.  
  809.    o groupInfo.name  The group name 
  810.  
  811.    o groupInfo.comment  The group comment or description. A default comment 
  812.      will be provided if groupInfo.comment does not hold a value. 
  813.  
  814. SrvName           The server name 
  815.  
  816. Note 
  817.  
  818. The server name can be specified as '' for a local server. 
  819.  
  820. Example 
  821.  
  822.  
  823. /* Create a new group with a comment */
  824. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  825. call LoadLs30utFuncs
  826.  
  827. NETGROUP = 70
  828. SrvName = '\\ILIDC'
  829. groupInfo.name = 'CSUSERS'
  830. groupInfo.comment = 'The Client/Server users group'
  831.  
  832. myRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
  833.  
  834. if myRc <> '0' then do
  835.  say 'Got error from NetAdd() ' myRc
  836.  call DropLs30utFuncs
  837.  exit 9
  838. end
  839. else do
  840.  say
  841.  say "Group created successfully"
  842. end
  843.  
  844. call DropLs30utFuncs
  845. call RxFuncDrop 'LoadLs30utFuncs'
  846.  
  847. exit 0
  848.  
  849. Example Output 
  850.  
  851.  
  852. Group created successfully
  853.  
  854.  
  855. ΓòÉΓòÉΓòÉ 5.6. NETGROUPUSERS Add ΓòÉΓòÉΓòÉ
  856.  
  857. The function adds a userid to a group. 
  858.  
  859. Syntax 
  860.  
  861.  
  862. MyRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
  863.  
  864. Parameters 
  865.  
  866. The parameters required are: 
  867.  
  868. SrvName           The server name 
  869.  
  870. GroupName         The group name 
  871.  
  872. UserId            The userid to add 
  873.  
  874. Note 
  875.  
  876. The server name can be specified as '' for a local server. 
  877.  
  878. Example 
  879.  
  880.  
  881. /* Add a userid to a group */
  882. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  883. call LoadLs30utFuncs
  884.  
  885. NETGROUPUSERS = 340
  886. SrvName       = '\\ILIDC'
  887. GroupName     = 'CS2USERS'
  888. UserId        = 'WS2332'
  889.  
  890. myRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
  891.  
  892. if myRc <> '0' then do
  893.  say 'Got error from NetAdd() ' myRc
  894.  call DropLs30utFuncs
  895.  exit 9
  896. end
  897. else do
  898.  say
  899.  say "Userid added to Group successfully"
  900. end
  901.  
  902. call DropLs30utFuncs
  903. call RxFuncDrop 'LoadLs30utFuncs'
  904.  
  905. exit 0
  906.  
  907. Example Output 
  908.  
  909.  
  910. Userid added to Group successfully
  911.  
  912.  
  913. ΓòÉΓòÉΓòÉ 5.7. NETSHARE Add ΓòÉΓòÉΓòÉ
  914.  
  915. The function adds a server share using either a alias or a shareInfo structure. 
  916.  
  917. Syntax 
  918.  
  919.  
  920. MyRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
  921. MyRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
  922.  
  923. Parameters 
  924.  
  925. The parameters required are: 
  926.  
  927. 'shareInfo'       The REXX variable holding the share information. The variable 
  928.                   is divided into: 
  929.  
  930.    o shareInfo.netname  The netname of a resource. 
  931.  
  932.      It is recommended that the shareInfo.netname and the shareInfo.path be the 
  933.      same for a Spooler Queue; otherwise, the result is unpredictable 
  934.  
  935.    o shareInfo.type  The share type. The following values are used: 
  936.  
  937.           Share type                       Value
  938.           ----------                       -----
  939.           Disk drive                       'Disk Drive'
  940.                                            'DISKTREE'
  941.  
  942.           Spooler queue                    'Spooler Queue'
  943.                                            'PRINTQ'
  944.  
  945.           Serial device                    'Serial Device'
  946.                                            'DEVICE'
  947.  
  948.           Interprocess Communications      'Interprocess communication (IPC)'
  949.                                            'IPC'
  950.  
  951.    o shareInfo.remark  The share remark 
  952.  
  953.    o shareInfo.max_uses  The maximum number of concurrent connections that the 
  954.      shared resource can accommodate. The default value is 65535 
  955.  
  956.    o shareInfo.path  The string containing the local path name of the shared 
  957.      resource. For disks, shareInfo.path is the path being shared. For spooler 
  958.      queues, shareInfo.path is the name of the spooler queue being shared. For 
  959.      serial device queues, shareInfo.path is a string of one or more 
  960.      communication device names separated by spaces (for example, COM1 COM2 
  961.      COM6). 
  962.  
  963.      It is recommended that the shareInfo.netname and the shareInfo.path be the 
  964.      same for a Spooler Queue; otherwise, the result is unpredictable 
  965.  
  966. SrvName           The server name that holds the resource to be shared 
  967.  
  968. The second form of the function call is divided into: 
  969.  
  970. DcName            The domain controller computer name, which holds the alias 
  971.                   information 
  972.  
  973. aliasName         The alias name 
  974.  
  975. NetName           The share network name. For a spooler queue the Queue name 
  976.                   will be identical with the netname. It the value is empty, 
  977.                   the default Alias netname will be used. It is recommended to 
  978.                   use the same netname as the alias name 
  979.  
  980. Note 
  981.  
  982. The server and DcName can be specified as '' for a local server 
  983.  
  984. Example using shareInfo structure 
  985.  
  986.  
  987. /* Net share add using a net share info structure */
  988. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  989. call LoadLs30utFuncs
  990.  
  991. NETSHARE   = 190
  992. SrvName    = '\\ILIDC'
  993.  
  994. shareInfo.netname  = 'TEMP'
  995. shareInfo.type     = 'Disk Drive'
  996. shareInfo.remark   = 'Temporary files share'
  997. shareInfo.max_uses = 10
  998. shareInfo.path     = 'D:\TEMP\FILES'
  999.  
  1000. myRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
  1001.  
  1002. if myRc <> '0' then do
  1003.  say 'Got error from NetAdd() ' myRc
  1004.  call DropLs30utFuncs
  1005.  exit 9
  1006. end
  1007. else do
  1008.  say
  1009.  say "Resource shared successfully"
  1010. end
  1011.  
  1012. call DropLs30utFuncs
  1013. call RxFuncDrop 'LoadLs30utFuncs'
  1014.  
  1015. exit 0
  1016.  
  1017. Example Output 
  1018.  
  1019.  
  1020. Resource shared successfully
  1021.  
  1022. Example using an alias 
  1023.  
  1024.  
  1025. /* Net share add using an alias */
  1026. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1027. call LoadLs30utFuncs
  1028.  
  1029. NETSHARE   = 190
  1030. DcName     = '\\ILIDC'
  1031. aliasName  = 'THEBOOK'
  1032. NetName    = 'THEBOOK'
  1033.  
  1034. myRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
  1035.  
  1036. if myRc <> '0' then do
  1037.  say 'Got error from NetAdd() ' myRc
  1038.  call DropLs30utFuncs
  1039.  exit 9
  1040. end
  1041. else do
  1042.  say
  1043.  say "Resource shared successfully"
  1044. end
  1045.  
  1046. call DropLs30utFuncs
  1047. call RxFuncDrop 'LoadLs30utFuncs'
  1048.  
  1049. exit 0
  1050.  
  1051. Example Output 
  1052.  
  1053.  
  1054. Resource shared successfully
  1055.  
  1056.  
  1057. ΓòÉΓòÉΓòÉ 5.8. NETUSE Add ΓòÉΓòÉΓòÉ
  1058.  
  1059. The function adds a use to a resource using either a UNC name or an alias. 
  1060.  
  1061. Syntax 
  1062.  
  1063.  
  1064. MyRc = NetAdd(NETUSE, 'useInfo', ComputerName)
  1065. MyRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
  1066.  
  1067. Parameters 
  1068.  
  1069. The parameters required are: 
  1070.  
  1071. 'useInfo'         The REXX variable holding the use information. The variable 
  1072.                   is divided into: 
  1073.  
  1074.    o useInfo.local  The local device name being redirected to the shared 
  1075.      resource. The variable can either be a device name connection or a UNC 
  1076.      connection. The following format can be used: 
  1077.  
  1078.           Connection type                  Format
  1079.           ---------------                  ------
  1080.           Device Name                      D: to Z:
  1081.                                            LPT1: to LPT9:
  1082.                                            COM1: to COM9:
  1083.  
  1084.           UNC                              ''
  1085.  
  1086.      For UNC connections the remote parameter will be used to specify the 
  1087.      resource to be used 
  1088.  
  1089.    o useInfo.remote  The UNC name of the remote resource being accessed. 
  1090.  
  1091.      The following UNC syntax must be used: 
  1092.  
  1093.           \\servername\sharename
  1094.  
  1095.      The sharename is identical to the netname 
  1096.  
  1097.    o useInfo.password  This password if required. A value of 'N/A' or '' will 
  1098.      be used as no password required. If the variable does not exist the 
  1099.      default default value is no password required 
  1100.  
  1101.    o useInfo.asg_type  The resource type. The following values must be used: 
  1102.  
  1103.           Device type                      Value
  1104.           -----------                      ------
  1105.           Disk Device                      'Disk device'
  1106.                                            'DISKDEV'
  1107.  
  1108.           Spooled device                   'Spooled printer'
  1109.                                            'SPOOLDEV'
  1110.  
  1111.           Serial device                    'Serial device'
  1112.                                            'CHARDEV'
  1113.  
  1114.           Interprocess communication (IPC) 'Interprocess communication (IPC)'
  1115.                                            'IPC'
  1116.  
  1117.           UNC where local is ''            'UNC'
  1118.  
  1119. ComputerName      The name of the computer that performs the net use operation. 
  1120.                   For a local workstation the value can be ''. 
  1121.  
  1122. The second form requires that the resource specified by the alias already is 
  1123. shared, otherwise a return code 67 will be returned. The second form of the 
  1124. function call is divided into: 
  1125.  
  1126. DcName            The domain controller computer name, which holds the alias 
  1127.                   information 
  1128.  
  1129. aliasName         The alias name 
  1130.  
  1131. LocalName         The local device name being redirected to the shared 
  1132.                   resource. The variable can either be a device name connection 
  1133.                   or a UNC connection. The following format can be used: 
  1134.  
  1135.                                     Connection type                  Format
  1136.                                     ---------------                  ------
  1137.                                     Device Name                      D: to Z:
  1138.                                                                      LPT1: to LPT9:
  1139.                                                                      COM1: to COM9:
  1140.  
  1141.                                     UNC                              ''
  1142.  
  1143.                   For UNC connections the remote resource name will be created 
  1144.                   from the alias 
  1145.  
  1146. ComputerName      The name of the computer that performs the net use operation. 
  1147.                   For a local workstation the value can be ''. 
  1148.  
  1149. Note 
  1150.  
  1151. The ComputerName and DcName can be specified as '' for a local server 
  1152.  
  1153. Example using useInfo structure 
  1154.  
  1155.  
  1156. /* Net use add using a net use info structure */
  1157. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1158. call LoadLs30utFuncs
  1159.  
  1160. NETUSE       = 270
  1161. ComputerName = '\\ILIDC'
  1162.  
  1163. useInfo.local    = 'W:'
  1164. useInfo.remote   = '\\ILIDC\BOOKS'
  1165. useInfo.password = ''
  1166. useInfo.asg_type = 'Disk device'
  1167.  
  1168. myRc = NetAdd(NETUSE, 'useInfo', ComputerName)
  1169.  
  1170. if myRc <> '0' then do
  1171.  say 'Got error from NetAdd() ' myRc
  1172.  call DropLs30utFuncs
  1173.  exit 9
  1174. end
  1175. else do
  1176.  say
  1177.  say "Successfully using resource"
  1178. end
  1179.  
  1180. call DropLs30utFuncs
  1181. call RxFuncDrop 'LoadLs30utFuncs'
  1182.  
  1183. exit 0
  1184.  
  1185. Example Output 
  1186.  
  1187.  
  1188. Successfully using resource
  1189.  
  1190. Example using an alias 
  1191.  
  1192.  
  1193. /* Net use add using an alias */
  1194. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1195. call LoadLs30utFuncs
  1196.  
  1197. NETUSE       = 270
  1198. DcName       = '\\ILIDC'
  1199. aliasName    = 'BOOKMGR'
  1200. LocalName    = 'X:'
  1201. ComputerName = '\\ILIDC'
  1202.  
  1203. myRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
  1204.  
  1205. if myRc <> '0' then do
  1206.  say 'Got error from NetAdd() ' myRc
  1207.  call DropLs30utFuncs
  1208.  exit 9
  1209. end
  1210. else do
  1211.  say
  1212.  say "Successfully using resource"
  1213. end
  1214.  
  1215. call DropLs30utFuncs
  1216. call RxFuncDrop 'LoadLs30utFuncs'
  1217.  
  1218. exit 0
  1219.  
  1220. Example Output 
  1221.  
  1222.  
  1223. Successfully using resource
  1224.  
  1225.  
  1226. ΓòÉΓòÉΓòÉ 5.9. NETUSER Add ΓòÉΓòÉΓòÉ
  1227.  
  1228. The function creates a userid entry. 
  1229.  
  1230. Syntax 
  1231.  
  1232.  
  1233. MyRc = NetAdd(NETUSER, 'userInfo', SrvName)
  1234.  
  1235. Parameters 
  1236.  
  1237. The parameters required are: 
  1238.  
  1239. 'userInfo'        The REXX variable holding the user account information. The 
  1240.                   variable is divided into: 
  1241.  
  1242.    o userInfo.name  The userid account name 
  1243.  
  1244.    o userInfo.password  The userid account password 
  1245.  
  1246.    o userInfo.priv  The userid account privilege level. The following values 
  1247.      can be used: 
  1248.  
  1249.           Account type                     Value
  1250.           ------------                     -----
  1251.           Guest                            'Guest'
  1252.  
  1253.           User                             'User'
  1254.  
  1255.           Administrator                    'Admin'
  1256.  
  1257.    o userInfo.home_dir  The path to the userid home directory, if any. The 
  1258.      following rules apply: 
  1259.  
  1260.           This string can take one of two forms. The first form defines
  1261.           the drive of the user that will be assigned to the home
  1262.           directory. It can have as many as 260 bytes.
  1263.  
  1264.           x:\machineID\y$\pathname
  1265.  
  1266.           where x is the drive letter to be assigned, machineID is the
  1267.           name of the server that holds the home directory, y is the
  1268.           driver letter on the server where the home directory exists,
  1269.           and pathname is the remaining path to the directory.
  1270.  
  1271.           The second form defines a first available drive specification
  1272.           for the name directory:
  1273.  
  1274.           \\machineID\y$\pathname
  1275.  
  1276.           where machineID, y, and pathname are defined as in the
  1277.           preceding example. To define a home directory at the root of
  1278.           a server's drive, omit \pathname from either of the forms
  1279.           previously mentioned.
  1280.  
  1281.           It is important to ensure that this field follows the correct
  1282.           format or users may not get their home directory at logon time.
  1283.           An access control profile must also be created, giving users
  1284.           access to the home directory.
  1285.  
  1286.    o userInfo.comment  The userid account comment 
  1287.  
  1288. SrvName           The server name of the domain controller 
  1289.  
  1290. Note 
  1291.  
  1292. The server name can be specified as '' for a local server. 
  1293.  
  1294. Example 
  1295.  
  1296.  
  1297. /* Add a userid */
  1298. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1299. call LoadLs30utFuncs
  1300.  
  1301. NETUSER = 280
  1302. SrvName = '\\ILIDC'
  1303.  
  1304. userInfo.name     = 'WS2221'
  1305. userInfo.password = 'PASSWORD'
  1306. userInfo.priv     = 'User'
  1307. userInfo.home_dir = ''
  1308. userInfo.comment  = 'WS2221 user in location N91-3161'
  1309.  
  1310. myRc = NetAdd(NETUSER, 'userInfo', SrvName)
  1311.  
  1312. if myRc <> '0' then do
  1313.  say 'Got error from NetAdd() ' myRc
  1314.  call DropLs30utFuncs
  1315.  exit 9
  1316. end
  1317. else do
  1318.  say
  1319.  say "User created successfully"
  1320. end
  1321.  
  1322. call DropLs30utFuncs
  1323. call RxFuncDrop 'LoadLs30utFuncs'
  1324.  
  1325. exit 0
  1326.  
  1327. Example Output 
  1328.  
  1329.  
  1330. User created successfully
  1331.  
  1332.  
  1333. ΓòÉΓòÉΓòÉ 5.10. NETAPPSEL Add ΓòÉΓòÉΓòÉ
  1334.  
  1335. The function adds an application to the userid application list. 
  1336.  
  1337. Syntax 
  1338.  
  1339.  
  1340. MyRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
  1341.  
  1342. Parameters 
  1343.  
  1344. The parameters required are: 
  1345.  
  1346. DcName            The Domain Controller computer name 
  1347.  
  1348. ApplicationName   The name of the application 
  1349.  
  1350. UserId            The userid 
  1351.  
  1352. AppType           Application type. The following application types are 
  1353.                   supported: 
  1354.  
  1355.                                     Application type                 Value
  1356.                                     ----------------                 -----
  1357.                                     Public DOS application           'Public DOS application'
  1358.                                                                      'DOS_PUBLIC'
  1359.  
  1360.                                     Public OS/2 application          'Public OS/2 application'
  1361.                                                                      'OS2_PUBLIC'
  1362.  
  1363.                                     Private OS/2 application         'Private OS/2 application'
  1364.                                                                      'OS2_PRIVATE'
  1365.  
  1366.                   The default value is 'Public OS/2 application'. 
  1367.  
  1368. Note 
  1369.  
  1370. The domain controller name can be specified as '' for a local server. 
  1371.  
  1372. If the application already is in the list, the application will not be added. 
  1373.  
  1374. Example 
  1375.  
  1376.  
  1377. /* Add a application to userid application list */
  1378. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1379. call LoadLs30utFuncs
  1380.  
  1381. NETAPPSEL       = 32
  1382. DcName          = '\\ILIDC'
  1383. ApplicationName = 'BOOKREAD'
  1384. UserId          = 'WS2221'
  1385. AppType         = 'Public OS/2 application'
  1386.  
  1387. myRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
  1388.  
  1389. if myRc <> '0' then do
  1390.  say 'Got error from NetAdd() ' myRc
  1391.  call DropLs30utFuncs
  1392.  exit 9
  1393. end
  1394. else do
  1395.  say
  1396.  say "Application added successfully to user application list"
  1397. end
  1398.  
  1399. call DropLs30utFuncs
  1400. call RxFuncDrop 'LoadLs30utFuncs'
  1401.  
  1402. exit 0
  1403.  
  1404. Example Output 
  1405.  
  1406.  
  1407. Application added successfully to user application list
  1408.  
  1409.  
  1410. ΓòÉΓòÉΓòÉ 5.11. NETLOGONASN Add ΓòÉΓòÉΓòÉ
  1411.  
  1412. The function adds a logon assignment for a userid. 
  1413.  
  1414. Syntax 
  1415.  
  1416.  
  1417. MyRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
  1418.  
  1419. Parameters 
  1420.  
  1421. The parameters required are: 
  1422.  
  1423. DcName            The Domain Controller computer name 
  1424.  
  1425. aliasName         The name of the alias to be assigned 
  1426.  
  1427. LocalName         The device that will be assigned to the resource specified by 
  1428.                   aliasName when the user logs on. Valid drive letters are A 
  1429.                   through Z. The drive letter can be followed by a colon (:), 
  1430.                   but a colon is not required. A value of * indicates that the 
  1431.                   system will choose the first available drive. Valid print 
  1432.                   devices are LPT1 through LPT9. Valid serial devices are LPT1 
  1433.                   through LPT9 and COM1 through COM9. Print and serial devices 
  1434.                   should not be followed by a colon (that is, COM1: is 
  1435.                   considered to be an invalid serial device). If the device 
  1436.                   field is left blank, the connection is to be deviceless. 
  1437.  
  1438. UserId            The userid 
  1439.  
  1440. Note 
  1441.  
  1442. The domain controller name can be specified as '' for a local server. 
  1443.  
  1444. If the logon assignment already is in the list, the additional assignment will 
  1445. not be added. 
  1446.  
  1447. Example 
  1448.  
  1449.  
  1450. /* Add a logon assignment for a userid */
  1451. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1452. call LoadLs30utFuncs
  1453.  
  1454. NETLOGONASN = 52
  1455. DcName      = '\\ILIDC'
  1456. aliasName   = 'BOOKS'
  1457. LocalName   = 'W'
  1458. UserId      = 'WS2221'
  1459.  
  1460. myRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
  1461.  
  1462. if myRc <> '0' then do
  1463.  say 'Got error from NetAdd() ' myRc
  1464.  call DropLs30utFuncs
  1465.  exit 9
  1466. end
  1467. else do
  1468.  say
  1469.  say "Logon assignment added successfully"
  1470. end
  1471.  
  1472. call DropLs30utFuncs
  1473. call RxFuncDrop 'LoadLs30utFuncs'
  1474.  
  1475. exit 0
  1476.  
  1477. Example Output 
  1478.  
  1479.  
  1480. Logon assignment added successfully
  1481.  
  1482.  
  1483. ΓòÉΓòÉΓòÉ 6. NetDelete ΓòÉΓòÉΓòÉ
  1484.  
  1485. The Net delete functions is a family of functions that can be called with a 
  1486. number of parameters. The use of the NetDelete has minimum two different 
  1487. parameters. The generic syntax is: 
  1488.  
  1489.  
  1490. MyRc = NetDelete(option, parm1, parm2, parm3)
  1491.  
  1492. The option parameter contains a value to determine what type or option has to 
  1493. be deleted. An example would be the deletion of a user. 
  1494.  
  1495. The parm1, parm2, parm3 parameters will be dependent on the performed option. 
  1496.  
  1497. The MyRc is the resturn code that will have an value from the NetDelete() 
  1498. function. If the call is successful the character '0' will be returned. 
  1499. Otherwise an error code and descriptive text will be inserted by NetDelete. 
  1500.  
  1501. The option parameter values are defined in Option parameter values. 
  1502.  
  1503.  
  1504. ΓòÉΓòÉΓòÉ 6.1. NETACCESS Delete ΓòÉΓòÉΓòÉ
  1505.  
  1506. The function deletes all access permission records for a particular shared 
  1507. resource. 
  1508.  
  1509. Syntax 
  1510.  
  1511.  
  1512. MyRc = NetDelete(NETACCESS, SrvName, Path)
  1513.  
  1514. Parameters 
  1515.  
  1516. The parameters specified are: 
  1517.  
  1518. SrvName           The server name 
  1519.  
  1520. Path              This variable must have a value. See below: 
  1521.  
  1522.                                     Resource Type                 Basepath Format
  1523.                                     -------------                 ---------------
  1524.                                     Drive                         drive:
  1525.                                     Path                          \path
  1526.                                     Directory                     drive:pathname
  1527.                                     File                          drive:pathname
  1528.                                     UNC                           \\server\sharename\path
  1529.                                     Pipe                          \pipe\pipename
  1530.                                     Spooler Queue                 \print\queuename
  1531.                                     Serial Device Queue           \comm\chardevqueue
  1532.  
  1533. Note 
  1534.  
  1535. The server name can be specified as '' for a local server. 
  1536.  
  1537. Example 
  1538.  
  1539.  
  1540. /* Delete access control profile */
  1541. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1542. call LoadLs30utFuncs
  1543.  
  1544. NETACCESS = 10
  1545. SrvName = '\\ILIDC'
  1546. Path = 'D:\TEMP'
  1547.  
  1548. myRc = NetDelete(NETACCESS, SrvName, Path)
  1549.  
  1550. if myRc <> '0' then do
  1551.  say 'Got error from NetDelete() ' myRc
  1552.  call DropLs30utFuncs
  1553.  exit 9
  1554. end
  1555. else do
  1556.  say 'Access Control Profile deleted'
  1557.  say
  1558. end
  1559.  
  1560. call DropLs30utFuncs
  1561. call RxFuncDrop 'LoadLs30utFuncs'
  1562.  
  1563. exit 0
  1564.  
  1565. Example Output 
  1566.  
  1567.  
  1568. Access Control Profile deleted
  1569.  
  1570.  
  1571. ΓòÉΓòÉΓòÉ 6.2. NETACCESSDEL ΓòÉΓòÉΓòÉ
  1572.  
  1573. The function deletes one access permission record for a particular existing 
  1574. access control profile. 
  1575.  
  1576. Syntax 
  1577.  
  1578.  
  1579. MyRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
  1580.  
  1581. Parameters 
  1582.  
  1583. The parameters specified are: 
  1584.  
  1585. SrvName           The server name 
  1586.  
  1587. resourceName      This variable must have a value. See below for accepted 
  1588.                   values: 
  1589.  
  1590.                                     Resource Type                 Basepath Format
  1591.                                     -------------                 ---------------
  1592.                                     Drive                         drive:
  1593.                                     Path                          \path
  1594.                                     Directory                     drive:pathname
  1595.                                     File                          drive:pathname
  1596.                                     UNC                           \\server\sharename\path
  1597.                                     Pipe                          \pipe\pipename
  1598.                                     Spooler Queue                 \print\queuename
  1599.                                     Serial Device Queue           \comm\chardevqueue
  1600.  
  1601. ugName            The user or group name 
  1602.  
  1603. Note 
  1604.  
  1605. The server name can be specified as '' for a local server. 
  1606.  
  1607. Example 
  1608.  
  1609.  
  1610. /* Delete access control profile entry */
  1611. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1612. call LoadLs30utFuncs
  1613.  
  1614. NETACCESSDEL = 240
  1615. SrvName      = '\\ILIDC'
  1616. resourceName = 'D:\APPS\TEMP'
  1617. ugName       = 'CSUSERS'
  1618.  
  1619. myRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
  1620.  
  1621. if myRc <> '0' then do
  1622.  say 'Got error from NetDelete() ' myRc
  1623.  call DropLs30utFuncs
  1624.  exit 9
  1625. end
  1626. else do
  1627.  say 'Access Control Profile Entry deleted successfully'
  1628.  say
  1629. end
  1630.  
  1631. call DropLs30utFuncs
  1632. call RxFuncDrop 'LoadLs30utFuncs'
  1633.  
  1634. exit 0
  1635.  
  1636. Example Output 
  1637.  
  1638.  
  1639. Access Control Profile Entry deleted successfully
  1640.  
  1641.  
  1642. ΓòÉΓòÉΓòÉ 6.3. NETALIAS Delete ΓòÉΓòÉΓòÉ
  1643.  
  1644. The function deletes a alias definition. 
  1645.  
  1646. Syntax 
  1647.  
  1648.  
  1649. MyRc = NetDelete(NETALIAS, SrvName, AliasName)
  1650.  
  1651. Parameters 
  1652.  
  1653. The parameters specified are: 
  1654.  
  1655. SrvName           The server name 
  1656.  
  1657. AliasName         The alias name 
  1658.  
  1659. Note 
  1660.  
  1661. The server name can be specified as '' for a local server. 
  1662.  
  1663. Example 
  1664.  
  1665.  
  1666. /* Delete alias definition */
  1667. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1668. call LoadLs30utFuncs
  1669.  
  1670. NETALIAS = 20
  1671. SrvName = '\\ILIDC'
  1672. AliasName = 'THEALIAS'
  1673.  
  1674. myRc = NetDelete(NETALIAS, SrvName, AliasName)
  1675.  
  1676. if myRc <> '0' then do
  1677.  say 'Got error from NetDelete() ' myRc
  1678.  call DropLs30utFuncs
  1679.  exit 9
  1680. end
  1681. else do
  1682.  say 'Alias deleted successfully'
  1683.  say
  1684. end
  1685.  
  1686. call DropLs30utFuncs
  1687. call RxFuncDrop 'LoadLs30utFuncs'
  1688.  
  1689. exit 0
  1690.  
  1691. Example Output 
  1692.  
  1693.  
  1694. Alias deleted successfully
  1695.  
  1696.  
  1697. ΓòÉΓòÉΓòÉ 6.4. NETAPP Delete ΓòÉΓòÉΓòÉ
  1698.  
  1699. The function deletes a public or private application. 
  1700.  
  1701. Syntax 
  1702.  
  1703.  
  1704. MyRc = NetDelete(NETAPP, SrvName, PublicApp)
  1705. MyRc = NetDelete(NETAPP, SrvName, PrivateApp, UserId)
  1706.  
  1707. Parameters 
  1708.  
  1709. The parameters specified are: 
  1710.  
  1711. SrvName           The server name 
  1712.  
  1713. PublicApp         Use the call to NetDelete with 3 arguments to delete a public 
  1714.                   application 
  1715.  
  1716. PrivateApp        This is the name of a private application. It must be used 
  1717.                   together with a UserId 
  1718.  
  1719. UserId            A userid 
  1720.  
  1721. Note 
  1722.  
  1723. The server name can be specified as '' for a local server. 
  1724.  
  1725. Example 
  1726.  
  1727.  
  1728. /* Delete a public application definition */
  1729. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1730. call LoadLs30utFuncs
  1731.  
  1732. NETAPP = 30
  1733. SrvName = '\\ILIDC'
  1734. PublicApp = 'MSAPP'
  1735.  
  1736. myRc = NetDelete(NETAPP, SrvName, PublicApp)
  1737.  
  1738. if myRc <> '0' then do
  1739.  say 'Got error from NetDelete() ' myRc
  1740.  call DropLs30utFuncs
  1741.  exit 9
  1742. end
  1743. else do
  1744.  say 'Public application deleted successfully'
  1745.  say
  1746. end
  1747.  
  1748. call DropLs30utFuncs
  1749. call RxFuncDrop 'LoadLs30utFuncs'
  1750.  
  1751. exit 0
  1752.  
  1753. Example Output 
  1754.  
  1755.  
  1756. Public application deleted successfully
  1757.  
  1758.  
  1759. ΓòÉΓòÉΓòÉ 6.5. NETGROUP Delete ΓòÉΓòÉΓòÉ
  1760.  
  1761. The function deletes a group definition. 
  1762.  
  1763. Syntax 
  1764.  
  1765.  
  1766. MyRc = NetDelete(NETGROUP, SrvName, GroupName)
  1767.  
  1768. Parameters 
  1769.  
  1770. The parameters specified are: 
  1771.  
  1772. SrvName           The server name 
  1773.  
  1774. GroupName         The name of the group definition to delete 
  1775.  
  1776. Note 
  1777.  
  1778. The server name can be specified as '' for a local server. 
  1779.  
  1780. Example 
  1781.  
  1782.  
  1783. /* Delete a group definition */
  1784. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1785. call LoadLs30utFuncs
  1786.  
  1787. NETGROUP = 70
  1788. SrvName = '\\ILIDC'
  1789. GroupName = 'TMPGROUP'
  1790.  
  1791. myRc = NetDelete(NETGROUP, SrvName, GroupName)
  1792.  
  1793. if myRc <> '0' then do
  1794.  say 'Got error from NetDelete() ' myRc
  1795.  call DropLs30utFuncs
  1796.  exit 9
  1797. end
  1798. else do
  1799.  say 'Group definition deleted successfully'
  1800.  say
  1801. end
  1802.  
  1803. call DropLs30utFuncs
  1804. call RxFuncDrop 'LoadLs30utFuncs'
  1805.  
  1806. exit 0
  1807.  
  1808. Example Output 
  1809.  
  1810.  
  1811. Group definition deleted successfully
  1812.  
  1813.  
  1814. ΓòÉΓòÉΓòÉ 6.6. NETGROUPUSERS Delete ΓòÉΓòÉΓòÉ
  1815.  
  1816. The function deletes a userid from a group definition. 
  1817.  
  1818. Syntax 
  1819.  
  1820.  
  1821. MyRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
  1822.  
  1823. Parameters 
  1824.  
  1825. The parameters specified are: 
  1826.  
  1827. SrvName           The server name 
  1828.  
  1829. GroupName         The name of the group definition to delete 
  1830.  
  1831. UserId            The userid to delete from a group 
  1832.  
  1833. Note 
  1834.  
  1835. The server name can be specified as '' for a local server. 
  1836.  
  1837. Example 
  1838.  
  1839.  
  1840. /* Delete a group definition */
  1841. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1842. call LoadLs30utFuncs
  1843.  
  1844. NETGROUPUSERS = 340
  1845. SrvName = '\\ILIDC'
  1846. GroupName = 'THEGROUP'
  1847. UserId = 'WS1000'
  1848.  
  1849. myRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
  1850.  
  1851. if myRc <> '0' then do
  1852.  say 'Got error from NetDelete() ' myRc
  1853.  call DropLs30utFuncs
  1854.  exit 9
  1855. end
  1856. else do
  1857.  say 'Userid deleted from group successfully'
  1858.  say
  1859. end
  1860.  
  1861. call DropLs30utFuncs
  1862. call RxFuncDrop 'LoadLs30utFuncs'
  1863.  
  1864. exit 0
  1865.  
  1866. Example Output 
  1867.  
  1868.  
  1869. Userid deleted from group successfully
  1870.  
  1871.  
  1872. ΓòÉΓòÉΓòÉ 6.7. NETPRINTJOB Delete ΓòÉΓòÉΓòÉ
  1873.  
  1874. The function deletes a print job from a printer queue. 
  1875.  
  1876. Syntax 
  1877.  
  1878.  
  1879. MyRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
  1880.  
  1881. Parameters 
  1882.  
  1883. The parameters specified are: 
  1884.  
  1885. SrvName           The server name 
  1886.  
  1887. QueueName         The name of the printer queue 
  1888.  
  1889. JobId             The job identification number 
  1890.  
  1891. Note 
  1892.  
  1893. The server name can be specified as '' for a local server. 
  1894.  
  1895. Example 
  1896.  
  1897.  
  1898. /* Delete a print job */
  1899. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1900. call LoadLs30utFuncs
  1901.  
  1902. NETPRINTJOB = 110
  1903. SrvName = '\\ILIDC'
  1904. QueueName = 'IBM4019L'
  1905. JobId = 6
  1906.  
  1907. myRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
  1908.  
  1909. if myRc <> '0' then do
  1910.  say 'Got error from NetDelete() ' myRc
  1911.  call DropLs30utFuncs
  1912.  exit 9
  1913. end
  1914. else do
  1915.  say 'Print job deleted successfully'
  1916.  say
  1917. end
  1918.  
  1919. call DropLs30utFuncs
  1920. call RxFuncDrop 'LoadLs30utFuncs'
  1921.  
  1922. exit 0
  1923.  
  1924. Example Output 
  1925.  
  1926.  
  1927. Print job deleted successfully
  1928.  
  1929.  
  1930. ΓòÉΓòÉΓòÉ 6.8. NETSESSION Delete ΓòÉΓòÉΓòÉ
  1931.  
  1932. The function ends a session between a requester and a server. 
  1933.  
  1934. Syntax 
  1935.  
  1936.  
  1937. MyRc = NetDelete(NETSESSION, SrvName, RequesterName)
  1938.  
  1939. Parameters 
  1940.  
  1941. The parameters specified are: 
  1942.  
  1943. SrvName           The server name 
  1944.  
  1945. RequesterName     The name of the requester that established the session being 
  1946.                   discontinued 
  1947.  
  1948. Note 
  1949.  
  1950. The server name can be specified as '' for a local server. 
  1951.  
  1952. Example 
  1953.  
  1954.  
  1955. /* Stop a session between a server and a requester */
  1956. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  1957. call LoadLs30utFuncs
  1958.  
  1959. NETSESSION = 180
  1960. SrvName = '\\ILIDC'
  1961. RequesterName = '\\TEST19'
  1962.  
  1963. myRc = NetDelete(NETSESSION, SrvName, RequesterName)
  1964.  
  1965. if myRc <> '0' then do
  1966.  say 'Got error from NetDelete() ' myRc
  1967.  call DropLs30utFuncs
  1968.  exit 9
  1969. end
  1970. else do
  1971.  say 'Session stopped successfully'
  1972.  say
  1973. end
  1974.  
  1975. call DropLs30utFuncs
  1976. call RxFuncDrop 'LoadLs30utFuncs'
  1977.  
  1978. exit 0
  1979.  
  1980. Example Output 
  1981.  
  1982.  
  1983. Session stopped successfully
  1984.  
  1985.  
  1986. ΓòÉΓòÉΓòÉ 6.9. NETSHARE Delete ΓòÉΓòÉΓòÉ
  1987.  
  1988. The function deletes a net name from the list of shared resources of a server. 
  1989.  
  1990. Syntax 
  1991.  
  1992.  
  1993. MyRc = NetDelete(NETSHARE, SrvName, NetName)
  1994.  
  1995. Parameters 
  1996.  
  1997. The parameters specified are: 
  1998.  
  1999. SrvName           The server name 
  2000.  
  2001. NetName           The network name of of shared resource 
  2002.  
  2003. Note 
  2004.  
  2005. The server name can be specified as '' for a local server. 
  2006.  
  2007. Example 
  2008.  
  2009.  
  2010. /* Stop sharing a shared resource */
  2011. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2012. call LoadLs30utFuncs
  2013.  
  2014. NETSHARE = 190
  2015. SrvName = '\\ILIDC'
  2016. NetName = 'BOOKS'
  2017.  
  2018. myRc = NetDelete(NETSHARE, SrvName, NetName)
  2019.  
  2020. if myRc <> '0' then do
  2021.  say 'Got error from NetDelete() ' myRc
  2022.  call DropLs30utFuncs
  2023.  exit 9
  2024. end
  2025. else do
  2026.  say 'Share stopped successfully'
  2027.  say
  2028. end
  2029.  
  2030. call DropLs30utFuncs
  2031. call RxFuncDrop 'LoadLs30utFuncs'
  2032.  
  2033. exit 0
  2034.  
  2035. Example Output 
  2036.  
  2037.  
  2038. Share stopped successfully
  2039.  
  2040.  
  2041. ΓòÉΓòÉΓòÉ 6.10. NETUSE Delete ΓòÉΓòÉΓòÉ
  2042.  
  2043. The function ends a connection between a local or UNC device name and a shared 
  2044. resource. 
  2045.  
  2046. Syntax 
  2047.  
  2048.  
  2049. MyRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
  2050.  
  2051. Parameters 
  2052.  
  2053. The parameters specified are: 
  2054.  
  2055. SrvName           The server name 
  2056.  
  2057. DeviceName        The device name that contains the following information: 
  2058.  
  2059.    o If the connection is a device name connection, the name specified must be 
  2060.      the name of the local device 
  2061.  
  2062.    o If the connection is a UNC connection (either implicit or explicit), the 
  2063.      name must be the UNC name 
  2064.  
  2065. Force             Is one of three values specifying the type of disconnection. 
  2066.                   The following Force values are available: 
  2067.  
  2068.    0       USE_NOFORCE Maintains the connection in a dormant state, 
  2069.            decrementing the usecount. A dormant session can quickly be 
  2070.            activated as soon as reconnection is needed, improving system 
  2071.            performance 
  2072.  
  2073.    1       USE_FORCE Connection is removed only if no file, directory, or drive 
  2074.            is opened. The usecount is decremented for a local device name 
  2075.            connection and forced to 0 for a UNC connection 
  2076.  
  2077.    2       USE_LOTS_OF_FORCE  All files, directories, and drives open on the 
  2078.            connection are forced closed 
  2079.  
  2080. Note 
  2081.  
  2082. The server name can be specified as '' for a local server. 
  2083.  
  2084. Example 
  2085.  
  2086.  
  2087. /* Stop using a UNC name */
  2088. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2089. call LoadLs30utFuncs
  2090.  
  2091. NETUSE = 270
  2092. SrvName = '\\ILIDC'
  2093. DeviceName = '\\ILIDC\BOOKS'
  2094. Force = 1
  2095.  
  2096. myRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
  2097.  
  2098. if myRc <> '0' then do
  2099.  say 'Got error from NetDelete() ' myRc
  2100.  call DropLs30utFuncs
  2101.  exit 9
  2102. end
  2103. else do
  2104.  say 'Net Use stopped successfully'
  2105.  say
  2106. end
  2107.  
  2108. call DropLs30utFuncs
  2109. call RxFuncDrop 'LoadLs30utFuncs'
  2110.  
  2111. exit 0
  2112.  
  2113. Example Output 
  2114.  
  2115.  
  2116. Net Use stopped successfully
  2117.  
  2118.  
  2119. ΓòÉΓòÉΓòÉ 6.11. NETUSER Delete ΓòÉΓòÉΓòÉ
  2120.  
  2121. The function removes an account from the user account subsystem database (UAS), 
  2122. ending all access to the resources in the system. 
  2123.  
  2124. Syntax 
  2125.  
  2126.  
  2127. MyRc = NetDelete(NETUSER, SrvName, UserId)
  2128.  
  2129. Parameters 
  2130.  
  2131. The parameters specified are: 
  2132.  
  2133. SrvName           The server name 
  2134.  
  2135. UserId            The userid to be deleted 
  2136.  
  2137. Note 
  2138.  
  2139. The server name can be specified as '' for a local server. 
  2140.  
  2141. Example 
  2142.  
  2143.  
  2144. /* Delete a userid */
  2145. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2146. call LoadLs30utFuncs
  2147.  
  2148. NETUSER = 280
  2149. SrvName = '\\ILIDC'
  2150. UserId = 'WS1000'
  2151.  
  2152. myRc = NetDelete(NETUSER, SrvName, UserId)
  2153.  
  2154. if myRc <> '0' then do
  2155.  say 'Got error from NetDelete() ' myRc
  2156.  call DropLs30utFuncs
  2157.  exit 9
  2158. end
  2159. else do
  2160.  say 'Userid deleted successfully'
  2161.  say
  2162. end
  2163.  
  2164. call DropLs30utFuncs
  2165. call RxFuncDrop 'LoadLs30utFuncs'
  2166.  
  2167. exit 0
  2168.  
  2169. Example Output 
  2170.  
  2171.  
  2172. Net Use stopped successfully
  2173.  
  2174.  
  2175. ΓòÉΓòÉΓòÉ 6.12. NETAPPSEL Delete ΓòÉΓòÉΓòÉ
  2176.  
  2177. The function removes an application from the user application selector list. 
  2178.  
  2179. Syntax 
  2180.  
  2181.  
  2182. MyRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
  2183.  
  2184. Parameters 
  2185.  
  2186. The parameters specified are: 
  2187.  
  2188. SrvName           The server name 
  2189.  
  2190. UserId            The userid to be deleted 
  2191.  
  2192. ApplicationName   The application name to remove from the application selection 
  2193.                   list 
  2194.  
  2195. Note 
  2196.  
  2197. The server name can be specified as '' for a local server. 
  2198.  
  2199. Example 
  2200.  
  2201.  
  2202. /* Delete a application from user dekstop */
  2203. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2204. call LoadLs30utFuncs
  2205.  
  2206. NETAPPSEL = 32
  2207. SrvName = '\\ILIDC'
  2208. UserId = 'WS12345'
  2209. ApplicationName = 'LIVA'
  2210.  
  2211. myRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
  2212.  
  2213. if myRc <> '0' then do
  2214.  say 'Got error from NetDelete() ' myRc
  2215.  call DropLs30utFuncs
  2216.  exit 9
  2217. end
  2218. else do
  2219.  say 'Application removed from desktop successfully'
  2220.  say
  2221. end
  2222.  
  2223. call DropLs30utFuncs
  2224. call RxFuncDrop 'LoadLs30utFuncs'
  2225.  
  2226. exit 0
  2227.  
  2228. Example Output 
  2229.  
  2230.  
  2231. Application removed from desktop successfully
  2232.  
  2233.  
  2234. ΓòÉΓòÉΓòÉ 6.13. NETLOGONASN Delete ΓòÉΓòÉΓòÉ
  2235.  
  2236. The function removes a resource from the user logon assignment list. 
  2237.  
  2238. Syntax 
  2239.  
  2240.  
  2241. MyRc = NetDelete(NETLOGONASN, SrvName, UserId, AliasName)
  2242.  
  2243. Parameters 
  2244.  
  2245. The parameters specified are: 
  2246.  
  2247. SrvName           The server name 
  2248.  
  2249. UserId            The userid to be deleted 
  2250.  
  2251. AliasName         The alias name which will be removed from the logon 
  2252.                   assignment list 
  2253.  
  2254. Note 
  2255.  
  2256. The server name can be specified as '' for a local server. 
  2257.  
  2258. Example 
  2259.  
  2260.  
  2261. /* Delete a logon assignment for a user */
  2262. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2263. call LoadLs30utFuncs
  2264.  
  2265. NETLOGONASN = 52
  2266. SrvName = '\\ILIDC'
  2267. UserId = 'WS12345'
  2268. Alias = 'BOOKS'
  2269.  
  2270. myRc = NetDelete(NETLOGONASN, SrvName, UserId, Alias)
  2271.  
  2272. if myRc <> '0' then do
  2273.  say 'Got error from NetDelete() ' myRc
  2274.  call DropLs30utFuncs
  2275.  exit 9
  2276. end
  2277. else do
  2278.  say 'Logon Assignment removed successfully'
  2279.  say
  2280. end
  2281.  
  2282. call DropLs30utFuncs
  2283. call RxFuncDrop 'LoadLs30utFuncs'
  2284.  
  2285. exit 0
  2286.  
  2287. Example Output 
  2288.  
  2289.  
  2290. Logon Assignment removed successfully
  2291.  
  2292.  
  2293. ΓòÉΓòÉΓòÉ 7. NetEnumerate ΓòÉΓòÉΓòÉ
  2294.  
  2295. The Net enumerate functions is a family of functions that can be called with a 
  2296. number of parameters. The use of the NetEnumerate has two to five different 
  2297. parameters. The generic syntax is: 
  2298.  
  2299.  
  2300. MyRc = NetEnumerate(option, 'StemVar', parm1, parm2, parm3)
  2301.  
  2302. The option parameter contains a value to determine what type or option has to 
  2303. be enumerated. An example would be the enumeration of users. 
  2304.  
  2305. The StemVar parameter is specified in quotes. It will actually contain the 
  2306. resulting information from the enumeration. 
  2307.  
  2308. The parm1, parm2, parm3 parameters will be dependent on the performed option. 
  2309.  
  2310. The MyRc is the resturn code that will have an value from the NetEnumeration() 
  2311. function. If the call is successful the character '0' will be returned. 
  2312. Otherwise an error code and descriptive text will be inserted by NetEnumerate. 
  2313.  
  2314. The option parameter values are defined in Option parameter values. 
  2315.  
  2316.  
  2317. ΓòÉΓòÉΓòÉ 7.1. NETACCESS Enumerate ΓòÉΓòÉΓòÉ
  2318.  
  2319. The function enumerates resource names having a access permission record (ACP, 
  2320. Access Control Profile). 
  2321.  
  2322. Syntax 
  2323.  
  2324.  
  2325. MyRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
  2326.  
  2327. Parameters 
  2328.  
  2329. The parameters specified are 
  2330.  
  2331. 'resourcesAcp'    The REXX variable receiving the result. The variable is 
  2332.                   divided into: 
  2333.  
  2334.    o resourcesAcp.extend This variable indicates if the list provided is either 
  2335.      'Complete' or 'Incomplete'. A incomplete list of resources having a access 
  2336.      control profile can be extended by calling the NetEnumerate with different 
  2337.      base path values 
  2338.  
  2339.    o resourcesAcp.0  The number of resources having a access control profile 
  2340.  
  2341.    o resourcesAcp.i  The resources having a access control profile. i has a 
  2342.      value from 1 to resourcesAcp.0. The resources listed are relative to the 
  2343.      basepath specified 
  2344.  
  2345. SrvName           The server name. 
  2346.  
  2347. Basepath          This variable can either be '' or have a path value. See 
  2348.                   below: 
  2349.  
  2350.                                     Resource Type                 Basepath Format
  2351.                                     -------------                 ---------------
  2352.                                     Directory                     drive:pathname
  2353.                                     File                          drive:pathname
  2354.                                     Pipe                          \pipe\pipename
  2355.                                     Spooler Queue                 \print\queuename
  2356.                                     Serial Device Queue           \comm\chardevqueue
  2357.  
  2358. Note 
  2359.  
  2360. The server name can be specified as '' for a local server. 
  2361.  
  2362. Example 
  2363.  
  2364.  
  2365. /* List resources having a access control profile */
  2366. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2367. call LoadLs30utFuncs
  2368.  
  2369. NETACCESS = 10
  2370. SrvName = '\\ILIDC'
  2371. /* BasePath = '' */
  2372. BasePath = 'C:\IBMLAN'
  2373.  
  2374. myRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
  2375.  
  2376. if myRc <> '0' then do
  2377.  say 'Got error from NetEnumerate() ' myRc
  2378.  call DropLs30utFuncs
  2379.  exit 9
  2380. end
  2381.  
  2382. if resourcesAcp.1 = '-none-' then do
  2383.  say resourcesAcp.1
  2384.  call DropLs30utFuncs
  2385.  exit 0
  2386. end
  2387.  
  2388. say 'The list provided is: ' resourcesAcp.extend
  2389. say 'Number of resources having a access control profile: ' resourcesAcp.0
  2390. say
  2391. say 'The base path is: ' BasePath
  2392. say 'Resources listed are relative to the base path'
  2393. say
  2394.  
  2395. do i=1 to resourcesAcp.0
  2396.  say resourcesAcp.i
  2397. end
  2398.  
  2399. call DropLs30utFuncs
  2400. call RxFuncDrop 'LoadLs30utFuncs'
  2401.  
  2402. exit 0
  2403.  
  2404. Example Output 
  2405.  
  2406.  
  2407. The list provided is:  Complete
  2408. Number of resources having an access control profile:  19
  2409.  
  2410. The base path is:  C:\IBMLAN
  2411. Resources listed are relative to the base path
  2412.  
  2413. \DOSLAN\DOS
  2414. \DOSLAN\NET
  2415. \DCDB
  2416. \DCDB\DATA
  2417. \DCDB\USERS\FMAM
  2418. \BOOK
  2419. \DCDB\APPS
  2420. \DCDB\USERS\USERID\BATCH
  2421. \DCDB\USERS\LINDBERG\BATCH
  2422. \DCDB\USERS\FMAM\BATCH
  2423. \DCDB\FILES
  2424. \DCDB\LISTS
  2425. \DCDB\IMAGES
  2426. \DCDB\USERS\USERID
  2427. \DCDB\DEVICES
  2428. \NETPROG
  2429. \REPL\IMPORT\SCRIPTS
  2430. \DCDB\USERS\LINDBERG
  2431. \DCDB\PRINTERS
  2432.  
  2433.  
  2434. ΓòÉΓòÉΓòÉ 7.2. NETALIAS Enumerate ΓòÉΓòÉΓòÉ
  2435.  
  2436. The function enumerates alias names of a given type. 
  2437.  
  2438. Syntax 
  2439.  
  2440.  
  2441. MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
  2442. MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName, AliasType)
  2443.  
  2444. Parameters 
  2445.  
  2446. The parameters specified are 
  2447.  
  2448. 'aliasNames'      The REXX variable receiving the result. The variable is 
  2449.                   divided into: 
  2450.  
  2451.    o aliasNames.0  The number of alias names returned 
  2452.  
  2453.    o aliasNames.i  The alias name number i, where i has a value from 1 to 
  2454.      aliasNames.0. The returned value contains the string '-none- Alias type' 
  2455.      if none alias of a type was found. 
  2456.  
  2457. SrvName           The server name. 
  2458.  
  2459. AliasType         The AliasType can be specified as indicated below: 
  2460.  
  2461.                                     ALIAS_TYPE_FILE     = 1
  2462.                                     ALIAS_TYPE_PRINTER  = 2
  2463.                                     ALIAS_TYPE_SERIAL   = 4
  2464.  
  2465.                   If AliasType is specified as '', it is identical as enumerate 
  2466.                   all alias names defined. This is identical as the call to 
  2467.                   NetEnumerate() without specifying a 4th. parameter 
  2468.  
  2469. Note 
  2470.  
  2471. The server name can be specified as '' for a local server. 
  2472.  
  2473. Example 
  2474.  
  2475.  
  2476. /* List all defined alias names */
  2477. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2478. call LoadLs30utFuncs
  2479.  
  2480. NETALIAS = 20
  2481. SrvName = '\\ILIDC'
  2482.  
  2483. myRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
  2484.  
  2485. if myRc <> '0' then do
  2486.  say 'Got error from NetEnumerate() ' myRc
  2487.  call DropLs30utFuncs
  2488.  exit 9
  2489. end
  2490.  
  2491. if aliasNames.1 = '-none-' then do
  2492.  say aliasNames.1
  2493.  call DropLs30utFuncs
  2494.  exit 0
  2495. end
  2496.  
  2497. say 'Number of alias names: ' aliasNames.0
  2498. say
  2499.  
  2500. do i=1 to aliasNames.0
  2501.  say aliasNames.i
  2502. end
  2503.  
  2504. call DropLs30utFuncs
  2505. call RxFuncDrop 'LoadLs30utFuncs'
  2506.  
  2507. exit 0
  2508.  
  2509. Example Output 
  2510.  
  2511.  
  2512. Number of alias names:  4
  2513.  
  2514. BOOKS
  2515. MYDEMO
  2516. -none- Printer Alias
  2517. SRVCOM
  2518.  
  2519.  
  2520. ΓòÉΓòÉΓòÉ 7.3. NETAPP Enumerate ΓòÉΓòÉΓòÉ
  2521.  
  2522. The function returns the application names of a given type. 
  2523.  
  2524. Syntax 
  2525.  
  2526.  
  2527. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName)
  2528. MyRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
  2529.  
  2530. Parameters 
  2531.  
  2532. The parameters specified are 
  2533.  
  2534. 'appNames'        The REXX variable receiving the result. The variable is 
  2535.                   divided into: 
  2536.  
  2537.    o appNames.0  The number of application names returned 
  2538.  
  2539.    o appNames.i  The application name number i, where i has a value from 1 to 
  2540.      appNames.0. The returned value contains the string '-none-' if no 
  2541.      application was found. 
  2542.  
  2543. SrvName           The server name. 
  2544.  
  2545. UserId            The UserId is specified for private application. For a list 
  2546.                   of all public DOS and OS/2 application use 
  2547.                   NetEnumerate(NETAPP) with 3 parameters. 
  2548.  
  2549. Note 
  2550.  
  2551. The server name can be specified as '' for a local server. 
  2552.  
  2553. Example 
  2554.  
  2555.  
  2556. /* List all public applications and provate applications for FMAM */
  2557. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2558. call LoadLs30utFuncs
  2559.  
  2560. NETAPP = 30
  2561. SrvName = '\\ILIDC'
  2562. UserId = 'FMAM'
  2563.  
  2564. /* Get all public application names */
  2565. myRc = NetEnumerate(NETAPP, 'appNames', SrvName)
  2566.  
  2567. if myRc <> '0' then do
  2568.  say 'Got error from NetEnumerate() ' myRc
  2569.  call DropLs30utFuncs
  2570.  exit 9
  2571. end
  2572.  
  2573. if appNames.1 = '-none-' then do
  2574.  say appNames.1 'public applications defined'
  2575. end
  2576. else do
  2577.  say 'Number of public applications: ' appNames.0
  2578.  say
  2579.  
  2580.  do i=1 to appNames.0
  2581.   say appNames.i
  2582.  end
  2583.  
  2584.  say
  2585. end
  2586.  
  2587. /* Get all private application names for UserId */
  2588. myRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
  2589.  
  2590. if myRc <> '0' then do
  2591.  say 'Got error from NetEnumerate() ' myRc
  2592.  call DropLs30utFuncs
  2593.  exit 9
  2594. end
  2595.  
  2596. if appNames.1 = '-none-' then do
  2597.  say appNames.1 'private applications defined for ' UserId
  2598.  call DropLs30utFuncs
  2599.  exit 0
  2600. end
  2601.  
  2602. say 'Number of private applications for ' UserId 'is:' appNames.0
  2603. say
  2604.  
  2605. do i=1 to appNames.0
  2606.  say appNames.i
  2607. end
  2608.  
  2609. call DropLs30utFuncs
  2610. call RxFuncDrop 'LoadLs30utFuncs'
  2611.  
  2612. exit 0
  2613.  
  2614. Example Output 
  2615.  
  2616.  
  2617. Number of public applications:  3
  2618.  
  2619. ALLAPPS
  2620. LANMSG
  2621. THENEW
  2622.  
  2623. -none- private applications defined for  FMAM
  2624.  
  2625.  
  2626. ΓòÉΓòÉΓòÉ 7.4. NETCONNECTION Enumerate ΓòÉΓòÉΓòÉ
  2627.  
  2628. The NETCONNECTION gives a listing of connections made to a shared resource of a 
  2629. server, or of all connections established from a particular computer to a 
  2630. server. This function is identical to NetGetInfo(NETCONNECTION). 
  2631.  
  2632. Syntax 
  2633.  
  2634.  
  2635. MyRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  2636.  
  2637. Parameters 
  2638.  
  2639. The parameters specified are 
  2640.  
  2641. 'connInfo'        The REXX variable receiving the result. The variable is 
  2642.                   divided into 
  2643.  
  2644.    o connInfo.num_entries The number of connection information entries. Each 
  2645.      entry is obtained by the index i, which has a value from 1 to 
  2646.      connInfo.num_entries 
  2647.  
  2648.    o connInfo.i.id  The connection id 
  2649.  
  2650.    o connInfo.i.type  The type of connection made from the local device name to 
  2651.      the shared resource 
  2652.  
  2653.    o connInfo.i.num_opens  The number of files that are currently open as a 
  2654.      result of the connection 
  2655.  
  2656.    o connInfo.i.num_users  The number of users on the connection 
  2657.  
  2658.    o connInfo.i.num_users  The number of users on the connection 
  2659.  
  2660.    o connInfo.i.time  The number of seconds the connection has been established 
  2661.  
  2662.    o connInfo.i.username  The name of the user that made the connection 
  2663.  
  2664.    o connInfo.i.netname A string indicating either the netname of the shared 
  2665.      resource of the server or the computer name of the requester, depending on 
  2666.      which name was specified as the Qualifier parameter 
  2667.  
  2668. SrvName           The server name 
  2669.  
  2670. Qualifier         An ASCIIZ string specifying either the netname of the shared 
  2671.                   resource whose connections will be listed or the client name 
  2672.                   of the requester whose connections to the shared resource 
  2673.                   will be listed 
  2674.  
  2675. Note 
  2676.  
  2677. The server name can be specified as '' for a local server. 
  2678.  
  2679. Example 
  2680.  
  2681.  
  2682. /* Get connection information */
  2683. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2684. call LoadLs30utFuncs
  2685.  
  2686. NETCONNECTION = 40
  2687. SrvName = '\\ILIDC'
  2688. Qualifier = '\\ILIDC'
  2689.  
  2690. myRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  2691.  
  2692. if myRc <> '0' then do
  2693.  say 'Got error from NetEnumerate() ' myRc
  2694.  call DropLs30utFuncs
  2695.  exit 9
  2696. end
  2697.  
  2698. if connInfo.1 <> 'CONNINFO.1' then do
  2699.  say connInfo.1
  2700.  call DropLs30utFuncs
  2701.  exit 0
  2702. end
  2703.  
  2704. if connInfo.num_entries <> 0 then do
  2705.  say "Number of entries: " connInfo.num_entries
  2706.  
  2707.  do i=1 to connInfo.num_entries
  2708.   say
  2709.   say "Connection id:        " connInfo.i.id
  2710.   say "Connection type:      " connInfo.i.type
  2711.   say "Connection num opens: " connInfo.i.num_opens
  2712.   say "Connection num users: " connInfo.i.num_users
  2713.   say "Connection time:      " connInfo.i.time
  2714.   say "Connection user name: " connInfo.i.username
  2715.   say "Connection net name:  " connInfo.i.netname
  2716.  end
  2717.  
  2718. end
  2719.  
  2720.  
  2721. call DropLs30utFuncs
  2722. call RxFuncDrop 'LoadLs30utFuncs'
  2723.  
  2724. exit 0
  2725.  
  2726. Example Output 
  2727.  
  2728.  
  2729. Number of entries:  1
  2730.  
  2731. Connection id:         4096
  2732. Connection type:       Disk Connection
  2733. Connection num opens:  0
  2734. Connection num users:  1
  2735. Connection time:       75
  2736. Connection user name:  LINDBERG
  2737. Connection net name:   BOOKS
  2738.  
  2739.  
  2740. ΓòÉΓòÉΓòÉ 7.5. NETLOGON Enumerate ΓòÉΓòÉΓòÉ
  2741.  
  2742. The NETLOGON gives a listing of logged-on users. 
  2743.  
  2744. Syntax 
  2745.  
  2746.  
  2747. MyRc = NetEnumerate(NETLOGON, 'logonInfo')
  2748. MyRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
  2749.  
  2750. Parameters 
  2751.  
  2752. The parameters specified are 
  2753.  
  2754. 'logonInfo'       The REXX variable receiving the result. The variable is 
  2755.                   divided into 
  2756.  
  2757.    o logonInfo.0  The number of user names logged-on. 
  2758.  
  2759.    o logonInfo.i  The user name i, where the variable i has a value from 1 to 
  2760.      logonInfo.0 
  2761.  
  2762. SrvName           The server name. If the server name is '', this will be 
  2763.                   identical as a call to NetEnumerate(NETLOGON) with only two 
  2764.                   parameters (Local Server). 
  2765.  
  2766. Note 
  2767.  
  2768. The server name can be specified as '' for a local server. 
  2769.  
  2770. Example 
  2771.  
  2772.  
  2773. /* List logged-on users */
  2774. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2775. call LoadLs30utFuncs
  2776.  
  2777. NETLOGON = 50
  2778. SrvName = '\\ILIDC'
  2779.  
  2780. myRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
  2781.  
  2782. if myRc <> '0' then do
  2783.  say 'Got error from NetEnumerate() ' myRc
  2784.  call DropLs30utFuncs
  2785.  exit 9
  2786. end
  2787.  
  2788. if logonInfo.1 = '-none-' then do
  2789.  say logonInfo.1
  2790.  call DropLs30utFuncs
  2791.  exit 0
  2792. end
  2793.  
  2794. say 'Number of user entries: ' logonInfo.0
  2795. say
  2796.  
  2797. do i=1 to logonInfo.0
  2798.  say logonInfo.i
  2799. end
  2800.  
  2801. call DropLs30utFuncs
  2802. call RxFuncDrop 'LoadLs30utFuncs'
  2803.  
  2804. exit 0
  2805.  
  2806. Example Output 
  2807.  
  2808.  
  2809. Number of user entries:  1
  2810.  
  2811. LINDBERG
  2812.  
  2813.  
  2814. ΓòÉΓòÉΓòÉ 7.6. NETFILE Enumerate ΓòÉΓòÉΓòÉ
  2815.  
  2816. The NETFILE function returns information about some or all open files on the 
  2817. server. 
  2818.  
  2819. Syntax 
  2820.  
  2821.  
  2822. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
  2823. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath)
  2824. MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
  2825.  
  2826. Parameters 
  2827.  
  2828. The parameters specified are 
  2829.  
  2830. 'fileInfo'        The REXX variable receiving the result. The variable is 
  2831.                   divided into 
  2832.  
  2833.    o fileInfo.count  The number of open files 
  2834.  
  2835.    o fileInfo.i.id  The file id i, where the variable i has a value from 1 to 
  2836.      fileInfo.0 
  2837.  
  2838.    o fileInfo.i.pathname  The path name i, where the variable i has a value 
  2839.      from 1 to fileInfo.0 
  2840.  
  2841. SrvName           The server name. If the server name is '', it is a call to 
  2842.                   the local server 
  2843.  
  2844. BasePath          The base path to the open files. For example is 'C:\' a base 
  2845.                   path 
  2846.  
  2847. UserId            A userid to enumerate open files on 
  2848.  
  2849. Note 
  2850.  
  2851. The server name can be specified as '' for a local server. 
  2852.  
  2853. There are 3 different calls to NetEnumerate(NETFILE). They are not identical if 
  2854. one or more specified parameters have the value ''. 
  2855.  
  2856. Example 
  2857.  
  2858.  
  2859. /* List open files on server */
  2860. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2861. call LoadLs30utFuncs
  2862.  
  2863. NETFILE = 60
  2864. SrvName = '\\ILIDC'
  2865. BasePath = ''
  2866. UserId = 'LINDBERG'
  2867.  
  2868. myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
  2869.  
  2870. if myRc <> '0' then do
  2871.  say 'Got error from NetEnumerate() ' myRc
  2872.  call DropLs30utFuncs
  2873.  exit 9
  2874. end
  2875.  
  2876. if fileInfo.1 = '-none-' then do
  2877.  say fileInfo.1
  2878.  call DropLs30utFuncs
  2879.  exit 0
  2880. end
  2881.  
  2882. say 'Number of open file entries: ' fileInfo.count
  2883. say
  2884.  
  2885. do i=1 to fileInfo.count
  2886.  say fileInfo.i.id fileInfo.i.pathname
  2887. end
  2888.  
  2889. call DropLs30utFuncs
  2890. call RxFuncDrop 'LoadLs30utFuncs'
  2891.  
  2892. exit 0
  2893.  
  2894. Example Output 
  2895.  
  2896.  
  2897. Number of open file entries:  14
  2898.  
  2899. 0 D:\APPS\BOOKS\t1.dat
  2900. 34 D:\APPS\BOOKS\t2.dat
  2901. 65 D:\APPS\BOOKS\t3.dat
  2902. 97 D:\APPS\BOOKS\t4.dat
  2903. 129 D:\APPS\BOOKS\t5.dat
  2904. 161 D:\APPS\BOOKS\t6.dat
  2905. 193 D:\APPS\BOOKS\t7.dat
  2906. 225 D:\APPS\BOOKS\t8.dat
  2907. 257 D:\APPS\BOOKS\t9.dat
  2908. 289 D:\APPS\BOOKS\t10.dat
  2909. 321 D:\APPS\BOOKS\t11.dat
  2910. 353 D:\APPS\BOOKS\t12.dat
  2911. 385 D:\APPS\BOOKS\t13.dat
  2912. 417 D:\APPS\BOOKS\t14.dat
  2913.  
  2914.  
  2915. ΓòÉΓòÉΓòÉ 7.7. NETGROUP Enumerate ΓòÉΓòÉΓòÉ
  2916.  
  2917. The function lists all group accounts on the UAS database. 
  2918.  
  2919. Syntax 
  2920.  
  2921.  
  2922. MyRc = NetEnumerate(NETGROUP, 'groupInfo')
  2923. MyRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
  2924.  
  2925. Parameters 
  2926.  
  2927. The parameters specified are 
  2928.  
  2929. 'groupInfo'       The REXX variable receiving the result. The variable is 
  2930.                   divided into 
  2931.  
  2932.    o groupInfo.0  The number of groups 
  2933.  
  2934.    o groupInfo.i  The group name i, where the variable i has a value from 1 to 
  2935.      groupInfo.0 
  2936.  
  2937. SrvName           The server name 
  2938.  
  2939. Note 
  2940.  
  2941. The server name can be specified as '' for a local server. 
  2942.  
  2943. There call to NetEnumerate with 2 parameters is identical to the call with 3 
  2944. parameters where SrvName is set to ''. 
  2945.  
  2946. Example 
  2947.  
  2948.  
  2949. /* List group names */
  2950. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  2951. call LoadLs30utFuncs
  2952.  
  2953. NETGROUP = 70
  2954. SrvName = '\\ILIDC'
  2955.  
  2956. myRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
  2957.  
  2958. if myRc <> '0' then do
  2959.  say 'Got error from NetEnumerate() ' myRc
  2960.  call DropLs30utFuncs
  2961.  exit 9
  2962. end
  2963.  
  2964. if groupInfo.1 = '-none-' then do
  2965.  say groupInfo.1
  2966.  call DropLs30utFuncs
  2967.  exit 0
  2968. end
  2969.  
  2970. say 'Number of group names: ' groupInfo.0
  2971. say
  2972.  
  2973. do i=1 to groupInfo.0
  2974.  say groupInfo.i
  2975. end
  2976.  
  2977. call DropLs30utFuncs
  2978. call RxFuncDrop 'LoadLs30utFuncs'
  2979.  
  2980. exit 0
  2981.  
  2982. Example Output 
  2983.  
  2984.  
  2985. Number of group names:  9
  2986.  
  2987. GROUPID
  2988. CSUSERS
  2989. SERVERS
  2990. MANAGERS
  2991. LOCAL
  2992. HR_PRINT
  2993. USERS
  2994. ADMINS
  2995. GUESTS
  2996.  
  2997.  
  2998. ΓòÉΓòÉΓòÉ 7.8. NETMESSAGENAME Enumerate ΓòÉΓòÉΓòÉ
  2999.  
  3000. The function lists the name entries in a message name table. 
  3001.  
  3002. Syntax 
  3003.  
  3004.  
  3005. MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo')
  3006. MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
  3007.  
  3008. Parameters 
  3009.  
  3010. The parameters specified are 
  3011.  
  3012. 'msgNameInfo'     The REXX variable receiving the result. The variable is 
  3013.                   divided into: 
  3014.  
  3015.    o msgNameInfo.0  The number of message name entries 
  3016.  
  3017.    o msgNameInfo.i  The message name entry i, where the variable i has a value 
  3018.      from 1 to msgNameInfo.0 
  3019.  
  3020. SrvName           The server name 
  3021.  
  3022. Note 
  3023.  
  3024. The server name can be specified as '' for a local server. 
  3025.  
  3026. There call to NetEnumerate with 2 parameters is identical to the call with 3 
  3027. parameters where SrvName is set to ''. 
  3028.  
  3029. Example 
  3030.  
  3031.  
  3032. /* List message names */
  3033. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3034. call LoadLs30utFuncs
  3035.  
  3036. NETMESSAGENAME = 80
  3037. SrvName = '\\ILIDC'
  3038.  
  3039. myRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
  3040.  
  3041. if myRc <> '0' then do
  3042.  say 'Got error from NetEnumerate() ' myRc
  3043.  call DropLs30utFuncs
  3044.  exit 9
  3045. end
  3046.  
  3047. if msgNameInfo.1 = '-none-' then do
  3048.  say msgNameInfo.1
  3049.  call DropLs30utFuncs
  3050.  exit 0
  3051. end
  3052.  
  3053. say 'Number of message names: ' msgNameInfo.0
  3054. say
  3055.  
  3056. do i=1 to msgNameInfo.0
  3057.  say msgNameInfo.i
  3058. end
  3059.  
  3060. call DropLs30utFuncs
  3061. call RxFuncDrop 'LoadLs30utFuncs'
  3062.  
  3063. exit 0
  3064.  
  3065. Example Output 
  3066.  
  3067.  
  3068. Number of message names:  2
  3069.  
  3070. ILIDC
  3071. LINDBERG
  3072.  
  3073.  
  3074. ΓòÉΓòÉΓòÉ 7.9. NETBIOS Enumerate ΓòÉΓòÉΓòÉ
  3075.  
  3076. The function returns information on all network device drivers installed on a 
  3077. computer. 
  3078.  
  3079. Syntax 
  3080.  
  3081.  
  3082. MyRc = NetEnumerate(NETBIOS, 'netBiosInfo')
  3083. MyRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
  3084.  
  3085. Parameters 
  3086.  
  3087. The parameters specified are 
  3088.  
  3089. 'netBiosInfo'     The REXX variable receiving the result. The variable is 
  3090.                   divided into: 
  3091.  
  3092.    o netBiosInfo.0  The number of netbios device drivers 
  3093.  
  3094.    o netBiosInfo.i  The netbios device driver name entry i, where the variable 
  3095.      i has a value from 1 to netBiosInfo.0 
  3096.  
  3097. SrvName           The server name 
  3098.  
  3099. Note 
  3100.  
  3101. The server name can be specified as '' for a local server. 
  3102.  
  3103. There call to NetEnumerate with 2 parameters is identical to the call with 3 
  3104. parameters where SrvName is set to ''. 
  3105.  
  3106. Example 
  3107.  
  3108.  
  3109. /* List NetBIOS device drivers names */
  3110. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3111. call LoadLs30utFuncs
  3112.  
  3113. NETBIOS = 90
  3114. SrvName = '\\ILIDC'
  3115.  
  3116. myRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
  3117.  
  3118. if myRc <> '0' then do
  3119.  say 'Got error from NetEnumerate() ' myRc
  3120.  call DropLs30utFuncs
  3121.  exit 9
  3122. end
  3123.  
  3124. if netBiosInfo.1 = '-none-' then do
  3125.  say netBiosInfo.1
  3126.  call DropLs30utFuncs
  3127.  exit 0
  3128. end
  3129.  
  3130. say 'Number of NetBIOS device drivers: ' netBiosInfo.0
  3131. say
  3132.  
  3133. do i=1 to netBiosInfo.0
  3134.  say netBiosInfo.i
  3135. end
  3136.  
  3137. call DropLs30utFuncs
  3138. call RxFuncDrop 'LoadLs30utFuncs'
  3139.  
  3140. exit 0
  3141.  
  3142. Example Output 
  3143.  
  3144.  
  3145. Number of NetBIOS device drivers:  1
  3146.  
  3147. NETLB
  3148.  
  3149.  
  3150. ΓòÉΓòÉΓòÉ 7.10. NETPRINTDEST Enumerate ΓòÉΓòÉΓòÉ
  3151.  
  3152. The function returns a list of print devices. 
  3153.  
  3154. Syntax 
  3155.  
  3156.  
  3157. MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo')
  3158. MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
  3159.  
  3160. Parameters 
  3161.  
  3162. The parameters specified are 
  3163.  
  3164. 'printDestInfo'   The REXX variable receiving the result. The variable is 
  3165.                   divided into: 
  3166.  
  3167.    o printDestInfo.0  The number of print devices 
  3168.  
  3169.    o printDestInfo.i  The print device name entry i, where the variable i has a 
  3170.      value from 1 to printDestInfo.0 
  3171.  
  3172. SrvName           The server name 
  3173.  
  3174. Note 
  3175.  
  3176. The server name can be specified as '' for a local server or computer. 
  3177.  
  3178. There call to NetEnumerate with 2 parameters is identical to the call with 3 
  3179. parameters where SrvName is set to ''. 
  3180.  
  3181. Example 
  3182.  
  3183.  
  3184. /* List print device names */
  3185. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3186. call LoadLs30utFuncs
  3187.  
  3188. NETPRINTDEST = 100
  3189. SrvName = '\\ILIDC'
  3190.  
  3191. myRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
  3192.  
  3193. if myRc <> '0' then do
  3194.  say 'Got error from NetEnumerate() ' myRc
  3195.  call DropLs30utFuncs
  3196.  exit 9
  3197. end
  3198.  
  3199. if printDestInfo.1 = '-none-' then do
  3200.  say printDestInfo.1
  3201.  call DropLs30utFuncs
  3202.  exit 0
  3203. end
  3204.  
  3205. say 'Number of print devices: ' printDestInfo.0
  3206. say
  3207.  
  3208. do i=1 to printDestInfo.0
  3209.  say printDestInfo.i
  3210. end
  3211.  
  3212. call DropLs30utFuncs
  3213. call RxFuncDrop 'LoadLs30utFuncs'
  3214.  
  3215. exit 0
  3216.  
  3217. Example Output 
  3218.  
  3219.  
  3220. Number of print devices:  1
  3221.  
  3222. IBM4019L
  3223.  
  3224.  
  3225. ΓòÉΓòÉΓòÉ 7.11. NETPRINTJOB Enumerate ΓòÉΓòÉΓòÉ
  3226.  
  3227. The function returns a list of jobs in a print queue. 
  3228.  
  3229. Syntax 
  3230.  
  3231.  
  3232. MyRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
  3233.  
  3234. Parameters 
  3235.  
  3236. The parameters specified are 
  3237.  
  3238. 'printJobInfo'    The REXX variable receiving the result. The variable is 
  3239.                   divided into: 
  3240.  
  3241.    o printJobInfo.count  The number of print jobs in the queue 
  3242.  
  3243.    o printJobInfo.i.JobId  The print job identification entry i, where the 
  3244.      variable i has a value from 1 to printJobInfo.count 
  3245.  
  3246.    o printJobInfo.i.UserName  The userid entry i, where the variable i has a 
  3247.      value from 1 to printJobInfo.count 
  3248.  
  3249.    o printJobInfo.i.Document  The document name entry i, where the variable i 
  3250.      has a value from 1 to printJobInfo.count 
  3251.  
  3252. SrvName           The server name 
  3253.  
  3254. QueueName         The queue name, which must be supplied 
  3255.  
  3256. Note 
  3257.  
  3258. The server name can be specified as '' for a local server or computer. 
  3259.  
  3260. Example 
  3261.  
  3262.  
  3263. /* List print jobs on a print queue */
  3264. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3265. call LoadLs30utFuncs
  3266.  
  3267. NETPRINTJOB = 110
  3268. SrvName = '\\ILIDC'
  3269. QueueName = 'IBM4019L'
  3270.  
  3271. myRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
  3272.  
  3273. if myRc <> '0' then do
  3274.  say 'Got error from NetEnumerate() ' myRc
  3275.  call DropLs30utFuncs
  3276.  exit 9
  3277. end
  3278.  
  3279. if printJobInfo.1 = '-none-' then do
  3280.  say printJobInfo.1
  3281.  call DropLs30utFuncs
  3282.  exit 0
  3283. end
  3284.  
  3285. say 'Number of print jobs: ' printJobInfo.count
  3286.  
  3287. do i=1 to printJobInfo.count
  3288.  say
  3289.  say 'Job Id:        ' printJobInfo.i.JobId
  3290.  say 'Userid:        ' printJobInfo.i.UserName
  3291.  say 'Document name: ' printJobInfo.i.Document
  3292. end
  3293.  
  3294. call DropLs30utFuncs
  3295. call RxFuncDrop 'LoadLs30utFuncs'
  3296.  
  3297. exit 0
  3298.  
  3299. Example Output 
  3300.  
  3301.  
  3302. Number of print jobs:  3
  3303.  
  3304. Job Id:         1
  3305. Userid:         LINDBERG
  3306. Document name:  OS/2 LAN Application Programmer's Reference
  3307.  
  3308. Job Id:         3
  3309. Userid:         Local
  3310. Document name:  LS30UT.MAK
  3311.  
  3312. Job Id:         4
  3313. Userid:         LINDBERG
  3314. Document name:  IBM LAN Server 3.0 REXX Utility DLL
  3315.  
  3316.  
  3317. ΓòÉΓòÉΓòÉ 7.12. NETPRINTQUEUE Enumerate ΓòÉΓòÉΓòÉ
  3318.  
  3319. The function returns a list of print queues. 
  3320.  
  3321. Syntax 
  3322.  
  3323.  
  3324. MyRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
  3325.  
  3326. Parameters 
  3327.  
  3328. The parameters specified are 
  3329.  
  3330. 'printQInfo'      The REXX variable receiving the result. The variable is 
  3331.                   divided into: 
  3332.  
  3333.    o printQInfo.0  The number of print queues 
  3334.  
  3335.    o printQInfo.i  The print queue name entry i, where the variable i has a 
  3336.      value from 1 to printQInfo.0 
  3337.  
  3338. SrvName           The server name 
  3339.  
  3340. Note 
  3341.  
  3342. The server name can be specified as '' for a local server or computer. 
  3343.  
  3344. Example 
  3345.  
  3346.  
  3347. /* List print queue names */
  3348. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3349. call LoadLs30utFuncs
  3350.  
  3351. NETPRINTQUEUE = 120
  3352. SrvName = '\\ILIDC'
  3353.  
  3354. myRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
  3355.  
  3356. if myRc <> '0' then do
  3357.  say 'Got error from NetEnumerate() ' myRc
  3358.  call DropLs30utFuncs
  3359.  exit 9
  3360. end
  3361.  
  3362. if printQInfo.1 = '-none-' then do
  3363.  say printQInfo.1
  3364.  call DropLs30utFuncs
  3365.  exit 0
  3366. end
  3367.  
  3368. say 'Number of printer queue names: ' printQInfo.0
  3369. say
  3370.  
  3371. do i=1 to printQInfo.0
  3372.  say printQInfo.i
  3373. end
  3374.  
  3375. call DropLs30utFuncs
  3376. call RxFuncDrop 'LoadLs30utFuncs'
  3377.  
  3378. exit 0
  3379.  
  3380. Example Output 
  3381.  
  3382.  
  3383. Number of printer queue names:  1
  3384.  
  3385. IBM4019L
  3386.  
  3387.  
  3388. ΓòÉΓòÉΓòÉ 7.13. NETCHARDEV Enumerate ΓòÉΓòÉΓòÉ
  3389.  
  3390. The function provides a list of serial devices on a server. 
  3391.  
  3392. Syntax 
  3393.  
  3394.  
  3395. MyRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
  3396.  
  3397. Parameters 
  3398.  
  3399. The parameters specified are 
  3400.  
  3401. 'charDevInfo'     The REXX variable receiving the result. The variable is 
  3402.                   divided into: 
  3403.  
  3404.    o charDevInfo.0  The number of serial devices 
  3405.  
  3406.    o charDevInfo.i  The serial device name entry i, where the variable i has a 
  3407.      value from 1 to charDevInfo.0 
  3408.  
  3409. SrvName           The server name 
  3410.  
  3411. Note 
  3412.  
  3413. The server name can be specified as '' for a local server or computer. 
  3414.  
  3415. Example 
  3416.  
  3417.  
  3418. /* List serial device names on a server */
  3419. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3420. call LoadLs30utFuncs
  3421.  
  3422. NETCHARDEV = 130
  3423. SrvName = '\\ILIDC'
  3424.  
  3425. myRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
  3426.  
  3427. if myRc <> '0' then do
  3428.  say 'Got error from NetEnumerate() ' myRc
  3429.  call DropLs30utFuncs
  3430.  exit 9
  3431. end
  3432.  
  3433. if charDevInfo.1 = '-none-' then do
  3434.  say charDevInfo.1
  3435.  call DropLs30utFuncs
  3436.  exit 0
  3437. end
  3438.  
  3439. say 'Number of serial device names: ' charDevInfo.0
  3440. say
  3441.  
  3442. do i=1 to charDevInfo.0
  3443.  say charDevInfo.i
  3444. end
  3445.  
  3446. call DropLs30utFuncs
  3447. call RxFuncDrop 'LoadLs30utFuncs'
  3448.  
  3449. exit 0
  3450.  
  3451. Example Output 
  3452.  
  3453.  
  3454. Number of serial device names:  1
  3455.  
  3456. COM1
  3457.  
  3458.  
  3459. ΓòÉΓòÉΓòÉ 7.14. NETCHARDEVQ Enumerate ΓòÉΓòÉΓòÉ
  3460.  
  3461. The function provides a list of serial device queues on a server. 
  3462.  
  3463. Syntax 
  3464.  
  3465.  
  3466. MyRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
  3467.  
  3468. Parameters 
  3469.  
  3470. The parameters specified are 
  3471.  
  3472. 'charDevQInfo'    The REXX variable receiving the result. The variable is 
  3473.                   divided into: 
  3474.  
  3475.    o charDevQInfo.0  The number of serial device queues 
  3476.  
  3477.    o charDevQInfo.i  The serial device queue name entry i, where the variable i 
  3478.      has a value from 1 to charDevQInfo.0 
  3479.  
  3480. SrvName           The server name 
  3481.  
  3482. Note 
  3483.  
  3484. The server name can be specified as '' for a local server or computer. 
  3485.  
  3486. Example 
  3487.  
  3488.  
  3489. /* List serial device names on a server */
  3490. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3491. call LoadLs30utFuncs
  3492.  
  3493. NETCHARDEVQ = 140
  3494. SrvName = '\\ILIDC'
  3495.  
  3496. myRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
  3497.  
  3498. if myRc <> '0' then do
  3499.  say 'Got error from NetEnumerate() ' myRc
  3500.  call DropLs30utFuncs
  3501.  exit 9
  3502. end
  3503.  
  3504. if charDevQInfo.1 = '-none-' then do
  3505.  say charDevQInfo.1
  3506.  call DropLs30utFuncs
  3507.  exit 0
  3508. end
  3509.  
  3510. say 'Number of serial device queue names: ' charDevQInfo.0
  3511. say
  3512.  
  3513. do i=1 to charDevQInfo.0
  3514.  say charDevQInfo.i
  3515. end
  3516.  
  3517. call DropLs30utFuncs
  3518. call RxFuncDrop 'LoadLs30utFuncs'
  3519.  
  3520. exit 0
  3521.  
  3522. Example Output 
  3523.  
  3524.  
  3525. Number of serial device queue names:  1
  3526.  
  3527. SRVCOM
  3528.  
  3529.  
  3530. ΓòÉΓòÉΓòÉ 7.15. NETSERVERDISK Enumerate ΓòÉΓòÉΓòÉ
  3531.  
  3532. The function retrieves a list of diskette and disk drives on a workstation. 
  3533.  
  3534. Syntax 
  3535.  
  3536.  
  3537. MyRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
  3538.  
  3539. Parameters 
  3540.  
  3541. The parameters specified are 
  3542.  
  3543. 'srvDiskInfo'     The REXX variable receiving the result. The variable is 
  3544.                   divided into: 
  3545.  
  3546.    o srvDiskInfo.0  The number of disk drives defined 
  3547.  
  3548.    o srvDiskInfo.i  The disk drive name entry i, where the variable i has a 
  3549.      value from 1 to srvDiskInfo.0 
  3550.  
  3551. SrvName           The server name 
  3552.  
  3553. Note 
  3554.  
  3555. The server name can be specified as '' for a local server. 
  3556.  
  3557. Example 
  3558.  
  3559.  
  3560. /* List disk drives on a server */
  3561. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3562. call LoadLs30utFuncs
  3563.  
  3564. NETSERVERDISK = 150
  3565. SrvName = '\\ILIDC'
  3566.  
  3567. myRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
  3568.  
  3569. if myRc <> '0' then do
  3570.  say 'Got error from NetEnumerate() ' myRc
  3571.  call DropLs30utFuncs
  3572.  exit 9
  3573. end
  3574.  
  3575. if srvDiskInfo.1 = '-none-' then do
  3576.  say srvDiskInfo.1
  3577.  call DropLs30utFuncs
  3578.  exit 0
  3579. end
  3580.  
  3581. say 'Number of disk drives: ' srvDiskInfo.0
  3582. say
  3583.  
  3584. do i=1 to srvDiskInfo.0
  3585.  say srvDiskInfo.i
  3586. end
  3587.  
  3588. call DropLs30utFuncs
  3589. call RxFuncDrop 'LoadLs30utFuncs'
  3590.  
  3591. exit 0
  3592.  
  3593. Example Output 
  3594.  
  3595.  
  3596. Number of disk drives:  4
  3597.  
  3598. A:
  3599. B:
  3600. C:
  3601. D:
  3602.  
  3603.  
  3604. ΓòÉΓòÉΓòÉ 7.16. NETSERVER Enumerate ΓòÉΓòÉΓòÉ
  3605.  
  3606. The function list all servers visible on the network. 
  3607.  
  3608. Syntax 
  3609.  
  3610.  
  3611. MyRc = NetEnumerate(NETSERVER, 'serverList')
  3612. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName)
  3613. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType)
  3614. MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
  3615.  
  3616. Parameters 
  3617.  
  3618. The parameters specified are 
  3619.  
  3620. 'serverList'      The REXX variable receiving the result. The variable is 
  3621.                   divided into: 
  3622.  
  3623.    o serverList.0  The number of servers found 
  3624.  
  3625.    o serverList.i  The server name entry i, where the variable i has a value 
  3626.      from 1 to serverList.0 
  3627.  
  3628. SrvType           The server type value are defined as follows: 
  3629.  
  3630.                                     SV_TYPE_WORKSTATION    =   1   /* Workstation */
  3631.                                     SV_TYPE_SERVER         =   2   /* Server */
  3632.                                     SV_TYPE_SQLSERVER      =   4   /* SQL server */
  3633.                                     SV_TYPE_DOMAIN_CTRL    =   8   /* Domain controller */
  3634.                                     SV_TYPE_DOMAIN_BAKCTRL =  16   /* Backup domain controller */
  3635.                                     SV_TYPE_TIME_SOURCE    =  32   /* Time server */
  3636.                                     SV_TYPE_AFP            =  64   /* Apple File Protocol (AFP) service */
  3637.                                     SV_TYPE_NOVELL         = 128   /* Novell service */
  3638.                                     SV_TYPE_ALL            =  -1   /* All types of servers */
  3639.  
  3640. SrvName           The server name 
  3641.  
  3642. DomainName        The domain name 
  3643.  
  3644. Note 
  3645.  
  3646. The server name can be specified as '' for a local server or workstation. 
  3647.  
  3648. The default values in the four different call forms are as follows: 
  3649.  
  3650. 2 parms     The function executes on the local computer, list all domain 
  3651.             controllers found in the logon domain and domains found in the 
  3652.             'other Domains' parameter 
  3653.  
  3654. 3 parms     The function executes on the computer specified, list all domain 
  3655.             controllers found in the logon domain and domains found in the 
  3656.             'other Domains' parameter 
  3657.  
  3658. 4 parms     The function executes on the computer specified, list the server 
  3659.             types specified in the logon domain and domains found in the 'other 
  3660.             Domains' parameter 
  3661.  
  3662. 5 parms     The function executes on the computer specified, list the server 
  3663.             types specified in the domain specified 
  3664.  
  3665. Example 
  3666.  
  3667.  
  3668. /* Get the domain controller computer name */
  3669. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3670. call LoadLs30utFuncs
  3671.  
  3672. NETSERVER = 160
  3673. SrvName = '\\ILIDC'
  3674. SrvType = 8    /* Domain Controller */
  3675. DomainName = 'ILI'
  3676.  
  3677. myRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
  3678.  
  3679. if myRc <> '0' then do
  3680.  say 'Got error from NetEnumerate() ' myRc
  3681.  call DropLs30utFuncs
  3682.  exit 9
  3683. end
  3684.  
  3685. if serverList.1 = '-none-' then do
  3686.  say serverList.1
  3687.  call DropLs30utFuncs
  3688.  exit 0
  3689. end
  3690.  
  3691. say 'Number of servers found: ' serverList.0
  3692. say
  3693.  
  3694. do i=1 to serverList.0
  3695.  say serverList.i
  3696. end
  3697.  
  3698. call DropLs30utFuncs
  3699. call RxFuncDrop 'LoadLs30utFuncs'
  3700.  
  3701. exit 0
  3702.  
  3703. Example Output 
  3704.  
  3705.  
  3706. Number of servers found:  1
  3707.  
  3708. ILIDC
  3709.  
  3710.  
  3711. ΓòÉΓòÉΓòÉ 7.17. NETSERVICE Enumerate ΓòÉΓòÉΓòÉ
  3712.  
  3713. The function retrieves a list of all network services that are started. 
  3714.  
  3715. Syntax 
  3716.  
  3717.  
  3718. MyRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
  3719.  
  3720. Parameters 
  3721.  
  3722. The parameters specified are 
  3723.  
  3724. 'serviceInfo'     The REXX variable receiving the result. The variable is 
  3725.                   divided into: 
  3726.  
  3727.    o serviceInfo.0  The number of service started 
  3728.  
  3729.    o serviceInfo.i  The started service name entry i, where the variable i has 
  3730.      a value from 1 to serviceInfo.0 
  3731.  
  3732. SrvName           The server name 
  3733.  
  3734. Note 
  3735.  
  3736. The server name can be specified as '' for a local server. 
  3737.  
  3738. Example 
  3739.  
  3740.  
  3741. /* List service names started on computer */
  3742. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3743. call LoadLs30utFuncs
  3744.  
  3745. NETSERVICE = 170
  3746. SrvName = '\\ILIDC'
  3747.  
  3748. myRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
  3749.  
  3750. if myRc <> '0' then do
  3751.  say 'Got error from NetEnumerate() ' myRc
  3752.  call DropLs30utFuncs
  3753.  exit 9
  3754. end
  3755.  
  3756. if serviceInfo.1 = '-none-' then do
  3757.  say serviceInfo.1
  3758.  call DropLs30utFuncs
  3759.  exit 0
  3760. end
  3761.  
  3762. say 'Number of services started: ' serviceInfo.0
  3763. say
  3764.  
  3765. do i=1 to serviceInfo.0
  3766.  say serviceInfo.i
  3767. end
  3768.  
  3769. call DropLs30utFuncs
  3770. call RxFuncDrop 'LoadLs30utFuncs'
  3771.  
  3772. exit 0
  3773.  
  3774. Example Output 
  3775.  
  3776.  
  3777. Number of services started:  10
  3778.  
  3779. REQUESTER
  3780. LSCLIENT
  3781. MESSENGER
  3782. NETPOPUP
  3783. SERVER
  3784. NETLOGON
  3785. LSSERVER
  3786. ALERTER
  3787. GENALERT
  3788. TIMESOURCE
  3789.  
  3790.  
  3791. ΓòÉΓòÉΓòÉ 7.18. NETSESSION Enumerate ΓòÉΓòÉΓòÉ
  3792.  
  3793. The function retrieves a list of current computers having a session to a 
  3794. server. 
  3795.  
  3796. Syntax 
  3797.  
  3798.  
  3799. MyRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
  3800.  
  3801. Parameters 
  3802.  
  3803. The parameters specified are 
  3804.  
  3805. 'sessionInfo'     The REXX variable receiving the result. The variable is 
  3806.                   divided into: 
  3807.  
  3808.    o sessionInfo.0  The number of sessions 
  3809.  
  3810.    o sessionInfo.i  The computer name entry i, where the variable i has a value 
  3811.      from 1 to sessionInfo.0 
  3812.  
  3813. SrvName           The server name 
  3814.  
  3815. Note 
  3816.  
  3817. The server name can be specified as '' for a local server. 
  3818.  
  3819. Example 
  3820.  
  3821.  
  3822. /* List computer names having a session to a server */
  3823. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3824. call LoadLs30utFuncs
  3825.  
  3826. NETSESSION = 180
  3827. SrvName = '\\ILIDC'
  3828.  
  3829. myRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
  3830.  
  3831. if myRc <> '0' then do
  3832.  say 'Got error from NetEnumerate() ' myRc
  3833.  call DropLs30utFuncs
  3834.  exit 9
  3835. end
  3836.  
  3837. if sessionInfo.1 = '-none-' then do
  3838.  say sessionInfo.1
  3839.  call DropLs30utFuncs
  3840.  exit 0
  3841. end
  3842.  
  3843. say 'Number of computers having a session to server: ' sessionInfo.0
  3844. say
  3845.  
  3846. do i=1 to sessionInfo.0
  3847.  say sessionInfo.i
  3848. end
  3849.  
  3850. call DropLs30utFuncs
  3851. call RxFuncDrop 'LoadLs30utFuncs'
  3852.  
  3853. exit 0
  3854.  
  3855. Example Output 
  3856.  
  3857.  
  3858. Number of computers having a session to server:  1
  3859.  
  3860. ILIDC
  3861.  
  3862.  
  3863. ΓòÉΓòÉΓòÉ 7.19. NETSHARE Enumerate ΓòÉΓòÉΓòÉ
  3864.  
  3865. The function retrieves a list of current uses on a server or a local 
  3866. workstation. 
  3867.  
  3868. Syntax 
  3869.  
  3870.  
  3871. MyRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  3872.  
  3873. Parameters 
  3874.  
  3875. The parameters specified are 
  3876.  
  3877. 'shareInfo'       The REXX variable receiving the result. The variable is 
  3878.                   divided into: 
  3879.  
  3880.    o shareInfo.0  The number of netnames shared 
  3881.  
  3882.    o shareInfo.i  The netname entry i, where the variable i has a value from 1 
  3883.      to shareInfo.0 
  3884.  
  3885. SrvName           The server name 
  3886.  
  3887. Note 
  3888.  
  3889. The server name can be specified as '' for a local server. 
  3890.  
  3891. Example 
  3892.  
  3893.  
  3894. /* List shared netnames on a server */
  3895. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3896. call LoadLs30utFuncs
  3897.  
  3898. NETSHARE = 190
  3899. SrvName = '\\ILIDC'
  3900.  
  3901. myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  3902.  
  3903. if myRc <> '0' then do
  3904.  say 'Got error from NetEnumerate() ' myRc
  3905.  call DropLs30utFuncs
  3906.  exit 9
  3907. end
  3908.  
  3909. if shareInfo.1 = '-none-' then do
  3910.  say shareInfo.1
  3911.  call DropLs30utFuncs
  3912.  exit 0
  3913. end
  3914.  
  3915. say 'Number of shared netnames: ' shareInfo.0
  3916. say
  3917.  
  3918. do i=1 to shareInfo.0
  3919.  say shareInfo.i
  3920. end
  3921.  
  3922. call DropLs30utFuncs
  3923. call RxFuncDrop 'LoadLs30utFuncs'
  3924.  
  3925. exit 0
  3926.  
  3927. Example Output 
  3928.  
  3929.  
  3930. Number of shared netnames:  3
  3931.  
  3932. NETLOGON
  3933. SRVCOM
  3934. BOOKS
  3935.  
  3936.  
  3937. ΓòÉΓòÉΓòÉ 7.20. NETUSE Enumerate ΓòÉΓòÉΓòÉ
  3938.  
  3939. The function retrieves a list of current shared netnames on a server. 
  3940.  
  3941. Syntax 
  3942.  
  3943.  
  3944. MyRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
  3945.  
  3946. Parameters 
  3947.  
  3948. The parameters specified are 
  3949.  
  3950. 'useInfo'         The REXX variable receiving the result. The variable is 
  3951.                   divided into: 
  3952.  
  3953.    o useInfo.count  The number of net uses 
  3954.  
  3955.    o useInfo.i.local  The local device entry i, where the variable i has a 
  3956.      value from 1 to useInfo.count 
  3957.  
  3958.    o useInfo.i.remote  The UNC name entry i, where the variable i has a value 
  3959.      from 1 to useInfo.count 
  3960.  
  3961. SrvName           The server name 
  3962.  
  3963. Note 
  3964.  
  3965. The server name can be specified as '' for a local computer. 
  3966.  
  3967. Example 
  3968.  
  3969.  
  3970. /* List net uses */
  3971. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  3972. call LoadLs30utFuncs
  3973.  
  3974. NETUSE = 270
  3975. SrvName = ''
  3976.  
  3977. myRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
  3978.  
  3979. if myRc <> '0' then do
  3980.  say 'Got error from NetEnumerate() ' myRc
  3981.  call DropLs30utFuncs
  3982.  exit 9
  3983. end
  3984.  
  3985. if useInfo.1 = '-none-' then do
  3986.  say useInfo.1
  3987.  call DropLs30utFuncs
  3988.  exit 0
  3989. end
  3990.  
  3991. say 'Number of net uses: ' useInfo.count
  3992.  
  3993. do i=1 to useInfo.count
  3994.  say
  3995.  say useInfo.i.local
  3996.  say useInfo.i.remote
  3997. end
  3998.  
  3999. call DropLs30utFuncs
  4000. call RxFuncDrop 'LoadLs30utFuncs'
  4001.  
  4002. exit 0
  4003.  
  4004. Example Output 
  4005.  
  4006.  
  4007. Number of net uses:  3
  4008.  
  4009. G:
  4010. \\ILIDC\BOOKS
  4011.  
  4012. COM7
  4013. \\ILIDC\SRVCOM
  4014.  
  4015. UNC connection
  4016. \\ILIDC\D$
  4017.  
  4018.  
  4019. ΓòÉΓòÉΓòÉ 7.21. NETUSER Enumerate ΓòÉΓòÉΓòÉ
  4020.  
  4021. The function retrieves a list of defined users on a server. 
  4022.  
  4023. Syntax 
  4024.  
  4025.  
  4026. MyRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
  4027.  
  4028. Parameters 
  4029.  
  4030. The parameters specified are 
  4031.  
  4032. 'userInfo'        The REXX variable receiving the result. The variable is 
  4033.                   divided into: 
  4034.  
  4035.    o userInfo.0  The number of users 
  4036.  
  4037.    o userInfo.i  User name  entry i, where the variable i has a value from 1 to 
  4038.      userInfo.0 
  4039.  
  4040. SrvName           The server name 
  4041.  
  4042. Note 
  4043.  
  4044. The server name can be specified as '' for a local server. 
  4045.  
  4046. Example 
  4047.  
  4048.  
  4049. /* List defined users in the UAS */
  4050. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4051. call LoadLs30utFuncs
  4052.  
  4053. NETUSER = 280
  4054. SrvName = ''
  4055.  
  4056. myRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
  4057.  
  4058. if myRc <> '0' then do
  4059.  say 'Got error from NetEnumerate() ' myRc
  4060.  call DropLs30utFuncs
  4061.  exit 9
  4062. end
  4063.  
  4064. if userInfo.1 = '-none-' then do
  4065.  say userInfo.1
  4066.  call DropLs30utFuncs
  4067.  exit 0
  4068. end
  4069.  
  4070. say 'Number of users defined: ' userInfo.0
  4071. say
  4072.  
  4073. do i=1 to userInfo.0
  4074.  say userInfo.i
  4075. end
  4076.  
  4077. call DropLs30utFuncs
  4078. call RxFuncDrop 'LoadLs30utFuncs'
  4079.  
  4080. exit 0
  4081.  
  4082. Example Output 
  4083.  
  4084.  
  4085. Number of users defined:  6
  4086.  
  4087. GUEST
  4088. FMAM
  4089. LINDBERG
  4090. BRUGERID
  4091. USERID
  4092. ILIDC
  4093.  
  4094.  
  4095. ΓòÉΓòÉΓòÉ 7.22. NETPRINTPORT Enumerate ΓòÉΓòÉΓòÉ
  4096.  
  4097. The function retrieves a list of printer ports on a server or workstation. 
  4098.  
  4099. Syntax 
  4100.  
  4101.  
  4102. MyRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
  4103.  
  4104. Parameters 
  4105.  
  4106. The parameters specified are 
  4107.  
  4108. 'prtPortInfo'     The REXX variable receiving the result. The variable is 
  4109.                   divided into: 
  4110.  
  4111.    o prtPortInfo.0  The number of printer ports 
  4112.  
  4113.    o prtPortInfo.i  Port name entry i, where the variable i has a value from 1 
  4114.      to prtPortInfo.0 
  4115.  
  4116. SrvName           The server name 
  4117.  
  4118. Note 
  4119.  
  4120. The server name can be specified as '' for a local computer. 
  4121.  
  4122. Example 
  4123.  
  4124.  
  4125. /* List printer ports */
  4126. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4127. call LoadLs30utFuncs
  4128.  
  4129. NETPRINTPORT = 300
  4130. SrvName = ''
  4131.  
  4132. myRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
  4133.  
  4134. if myRc <> '0' then do
  4135.  say 'Got error from NetEnumerate() ' myRc
  4136.  call DropLs30utFuncs
  4137.  exit 9
  4138. end
  4139.  
  4140. if prtPortInfo.1 = '-none-' then do
  4141.  say prtPortInfo.1
  4142.  call DropLs30utFuncs
  4143.  exit 0
  4144. end
  4145.  
  4146. say 'Number of printer ports defined: ' prtPortInfo.0
  4147. say
  4148.  
  4149. do i=1 to prtPortInfo.0
  4150.  say prtPortInfo.i
  4151. end
  4152.  
  4153. call DropLs30utFuncs
  4154. call RxFuncDrop 'LoadLs30utFuncs'
  4155.  
  4156. exit 0
  4157.  
  4158. Example Output 
  4159.  
  4160.  
  4161. Number of printer ports defined:  8
  4162.  
  4163. FILE
  4164. COM4
  4165. COM3
  4166. COM2
  4167. COM1
  4168. LPT3
  4169. LPT2
  4170. LPT1
  4171.  
  4172.  
  4173. ΓòÉΓòÉΓòÉ 7.23. NETPRINTDRIVER Enumerate ΓòÉΓòÉΓòÉ
  4174.  
  4175. The function retrieves a list of printer presentation drivers on a server or 
  4176. workstation. 
  4177.  
  4178. Syntax 
  4179.  
  4180.  
  4181. MyRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
  4182.  
  4183. Parameters 
  4184.  
  4185. The parameters specified are 
  4186.  
  4187. 'prtDriverInfo'   The REXX variable receiving the result. The variable is 
  4188.                   divided into: 
  4189.  
  4190.    o prtDriverInfo.0  The number of printer presentation drivers 
  4191.  
  4192.    o prtDriverInfo.i  Printer presentation driver name entry i, where the 
  4193.      variable i has a value from 1 to prtDriverInfo.0 
  4194.  
  4195. SrvName           The server name 
  4196.  
  4197. Note 
  4198.  
  4199. The server name can be specified as '' for a local computer. 
  4200.  
  4201. Example 
  4202.  
  4203.  
  4204. /* List printer presentation drivers */
  4205. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4206. call LoadLs30utFuncs
  4207.  
  4208. NETPRINTDRIVER = 310
  4209. SrvName = ''
  4210.  
  4211. myRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
  4212.  
  4213. if myRc <> '0' then do
  4214.  say 'Got error from NetEnumerate() ' myRc
  4215.  call DropLs30utFuncs
  4216.  exit 9
  4217. end
  4218.  
  4219. if prtDriverInfo.1 = '-none-' then do
  4220.  say prtDriverInfo.1
  4221.  call DropLs30utFuncs
  4222.  exit 0
  4223. end
  4224.  
  4225. say 'Number of printer presentation drivers defined: ' prtDriverInfo.0
  4226. say
  4227.  
  4228. do i=1 to prtDriverInfo.0
  4229.  say prtDriverInfo.i
  4230. end
  4231.  
  4232. call DropLs30utFuncs
  4233. call RxFuncDrop 'LoadLs30utFuncs'
  4234.  
  4235. exit 0
  4236.  
  4237. Example Output 
  4238.  
  4239.  
  4240. Number of printer presentation drivers defined:  2
  4241.  
  4242. IBM4019.IBM 4019 LaserPrinter
  4243. IBMNULL
  4244.  
  4245.  
  4246. ΓòÉΓòÉΓòÉ 7.24. NETPRINTQPROC Enumerate ΓòÉΓòÉΓòÉ
  4247.  
  4248. The function retrieves a list of printer queue processors on a server or 
  4249. workstation. 
  4250.  
  4251. Syntax 
  4252.  
  4253.  
  4254. MyRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
  4255.  
  4256. Parameters 
  4257.  
  4258. The parameters specified are 
  4259.  
  4260. 'prtQProcInfo'    The REXX variable receiving the result. The variable is 
  4261.                   divided into: 
  4262.  
  4263.    o prtQProcInfo.0  The number of printer queue processors 
  4264.  
  4265.    o prtQProcInfo.i  Printer queue processor name entry i, where the variable i 
  4266.      has a value from 1 to prtQProcInfo.0 
  4267.  
  4268. SrvName           The server name 
  4269.  
  4270. Note 
  4271.  
  4272. The server name can be specified as '' for a local computer. 
  4273.  
  4274. Example 
  4275.  
  4276.  
  4277. /* List printer queue processors */
  4278. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4279. call LoadLs30utFuncs
  4280.  
  4281. NETPRINTQPROC = 320
  4282. SrvName = '\\ILIDC'
  4283.  
  4284. myRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
  4285.  
  4286. if myRc <> '0' then do
  4287.  say 'Got error from NetEnumerate() ' myRc
  4288.  call DropLs30utFuncs
  4289.  exit 9
  4290. end
  4291.  
  4292. if prtQProcInfo.1 = '-none-' then do
  4293.  say prtQProcInfo.1
  4294.  call DropLs30utFuncs
  4295.  exit 0
  4296. end
  4297.  
  4298. if prtQProcInfo.0 <> 0 then do
  4299.  say 'Number of entries: ' prtQProcInfo.0
  4300.  say
  4301.  
  4302.  do i=1 to prtQProcInfo.0
  4303.   say prtQProcInfo.i
  4304.  end
  4305.  
  4306. end
  4307.  
  4308. call DropLs30utFuncs
  4309. call RxFuncDrop 'LoadLs30utFuncs'
  4310.  
  4311. exit 0
  4312.  
  4313. Example Output 
  4314.  
  4315.  
  4316. Number of entries:  1
  4317.  
  4318. PMPRINT
  4319.  
  4320.  
  4321. ΓòÉΓòÉΓòÉ 7.25. NETUSERGROUPS Enumerate ΓòÉΓòÉΓòÉ
  4322.  
  4323. The function lists the names of all groups in the user accounts subsystem (UAS) 
  4324. database to which a particular user belongs. This function is identical to 
  4325. NetGetInfo(NETUSERGROUPS). 
  4326.  
  4327. Syntax 
  4328.  
  4329.  
  4330. MyRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  4331.  
  4332. Parameters 
  4333.  
  4334. The parameters specified are 
  4335.  
  4336. 'userGroups'      The REXX variable receiving the result. The variable is 
  4337.                   divided into: 
  4338.  
  4339.    o userGroups.0  The number of groups in which the user has a entry 
  4340.  
  4341.    o userGroups.i  The actual group names 
  4342.  
  4343. SrvName           The server name if remote 
  4344.  
  4345. UserId            The userid 
  4346.  
  4347. Note 
  4348.  
  4349. The server name can be specified as '' for a local server or computer. 
  4350.  
  4351. Example 
  4352.  
  4353.  
  4354. /* Get the groups in which a user is defined */
  4355. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4356. call LoadLs30utFuncs
  4357.  
  4358. NETUSERGROUPS = 330
  4359. SrvName = '\\ILIDC'
  4360. UserId = 'FMAM'
  4361.  
  4362. myRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  4363.  
  4364. if myRc <> '0' then do
  4365.  say 'Got error from NetEnumerate() ' myRc
  4366.  call DropLs30utFuncs
  4367.  exit 9
  4368. end
  4369.  
  4370. if userGroups.1 = '-none-' then do
  4371.  say userGroups.1
  4372.  call DropLs30utFuncs
  4373.  exit 0
  4374. end
  4375.  
  4376. if userGroups.0 <> 0 then do
  4377.  say 'Number of entries: ' userGroups.0
  4378.  say
  4379.  
  4380.  do i=1 to userGroups.0
  4381.   say 'Group Name: ' userGroups.i
  4382.  end
  4383.  
  4384. end
  4385.  
  4386. call DropLs30utFuncs
  4387. call RxFuncDrop 'LoadLs30utFuncs'
  4388.  
  4389. exit 0
  4390.  
  4391. Example Output 
  4392.  
  4393.  
  4394. Number of entries:  3
  4395.  
  4396. Group Name:  MANAGERS
  4397. Group Name:  HR_PRINT
  4398. Group Name:  USERS
  4399.  
  4400.  
  4401. ΓòÉΓòÉΓòÉ 8. NetGetInfo ΓòÉΓòÉΓòÉ
  4402.  
  4403. The Net Get Information functions is a family of functions that can be called 
  4404. with a number of parameters. The use of the NetGetInfo has two to five 
  4405. different parameters. The generic syntax is: 
  4406.  
  4407.  
  4408. MyRc = NetGetInfo(option, 'StemVar', parm1, parm2, parm3)
  4409.  
  4410. The option parameter contains a value to determine what type or option 
  4411. information is obtained from. An example would be information of a user. 
  4412.  
  4413. The StemVar parameter is specified in quotes. It will actually contain the 
  4414. resulting information from the NetGetInfo. 
  4415.  
  4416. The parm1, parm2, parm3 parameters will be dependent on the performed option. 
  4417.  
  4418. The MyRc is the return code that will have an value from the NetGetInfo() 
  4419. function. If the call is successful the character '0' will be returned. 
  4420. Otherwise an error code and descriptive text will be inserted by NetGetInfo. 
  4421.  
  4422. The option parameter values are defined in Option parameter values. 
  4423.  
  4424.  
  4425. ΓòÉΓòÉΓòÉ 8.1. NETACCESS GetInfo ΓòÉΓòÉΓòÉ
  4426.  
  4427. NETACCESS GetInfo function retrieves information about the access control 
  4428. profile of a resource. The resources can either be a Directory, a File, a Pipe, 
  4429. a Spooler Queue or a Serial Device Queue. 
  4430.  
  4431. Syntax 
  4432.  
  4433.  
  4434. MyRc = NetGetInfo(NETACCESS, 'Access', ServerName, ResourceName)
  4435.  
  4436. Parameters 
  4437.  
  4438. The parameters specified are 
  4439.  
  4440. 'Access'          The REXX variable receiving the result. The variable is 
  4441.                   divided into 
  4442.  
  4443.    o Access.count  The number of of access controls available for the resource 
  4444.  
  4445.    o Access.audit  The auditing flags. The flags are defined as: 
  4446.  
  4447.       - A  Audit all. When this bit is set, all access attempts will be 
  4448.         audited. 
  4449.  
  4450.       - O  If O, audit successful file opens. 
  4451.  
  4452.       - W  If W, audit successful file writes and successful directory creates. 
  4453.  
  4454.       - D  If D, audit successful file deletes or truncates and successful 
  4455.         directory deletes. 
  4456.  
  4457.       - P  If P, audit successful file and directory access control profile 
  4458.         change. 
  4459.  
  4460.       - o  If o, audit failed file opens. 
  4461.  
  4462.       - w  If w, audit failed file writes and failed directory creates. 
  4463.  
  4464.       - d  If d, audit failed file deletes or truncates and failed directory 
  4465.         deletes. 
  4466.  
  4467.       - p  If d, audit failed file and directory access control profile change. 
  4468.  
  4469.       - -none- or N  Do not perform any auditing 
  4470.  
  4471.    o Access.i.ugname  The user or group name. i is a value from 1 to 
  4472.      Access.count 
  4473.  
  4474.    o Access.i.access  The access profile. i is specified as above. The access 
  4475.      control flags are as follows: 
  4476.  
  4477.       - N None 
  4478.  
  4479.       - R Read 
  4480.  
  4481.       - W Write 
  4482.  
  4483.       - C Create 
  4484.  
  4485.       - X Execute 
  4486.  
  4487.       - D Delete 
  4488.  
  4489.       - P Permissions 
  4490.  
  4491.       - G This is a Group permission 
  4492.  
  4493. ServerName        The server name 
  4494.  
  4495. Resource Name     The resource name 
  4496.  
  4497. Note 
  4498.  
  4499. The serverName can be specified as '' for a local server. 
  4500.  
  4501. Example 
  4502.  
  4503. /* Add a access control profile for a resource */
  4504. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4505. call LoadLs30utFuncs
  4506.  
  4507. NETACCESS = 10
  4508. dcName = '\\FSC30DCR'
  4509. ResourceName = 'D:\APPS\NETPROG'
  4510.  
  4511. myRc = NetGetInfo(NETACCESS, 'Access', dcName, ResourceName)
  4512.  
  4513. if myRc <> '0' then do
  4514.  say 'Got error from NetGetInfo() ' myRc
  4515.  call DropLs30utFuncs
  4516.  exit 9
  4517. end
  4518.  
  4519. say
  4520. say 'Count:   ' Access.count
  4521. say 'Audit:   ' Access.audit
  4522.  
  4523. do i=1 to Access.count
  4524.  say
  4525.  say Access.i.ugname
  4526.  say Access.i.access
  4527. end
  4528.  
  4529. call DropLs30utFuncs
  4530. call RxFuncDrop 'LoadLs30utFuncs'
  4531.  
  4532. exit 0
  4533.  
  4534. Example Output 
  4535.  
  4536. Count:    2
  4537. Audit:    owdp
  4538.  
  4539. USERS
  4540. RG
  4541.  
  4542. GUESTS
  4543. RG
  4544.  
  4545.  
  4546. ΓòÉΓòÉΓòÉ 8.2. NETACCESSUSERPERMS Get Info ΓòÉΓòÉΓòÉ
  4547.  
  4548. This functions obtains a specified userId or group permission to a resource. 
  4549. The resource can be a file, directory, drive, pipe, queue or logical resource 
  4550. and can be specified remotely by a UNC path. 
  4551.  
  4552. Syntax 
  4553.  
  4554.  
  4555. MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
  4556.  
  4557. Parameters 
  4558.  
  4559. The parameters specified are 
  4560.  
  4561. 'UsrPerms'        The REXX variable receiving the result. The variable is 
  4562.                   divided into 
  4563.  
  4564.    o UsrPerms.perms  The access controls available for the resource. The access 
  4565.      control flags are as follows: 
  4566.  
  4567.       - N None 
  4568.  
  4569.       - R Read 
  4570.  
  4571.       - W Write 
  4572.  
  4573.       - C Create 
  4574.  
  4575.       - X Execute 
  4576.  
  4577.       - D Delete 
  4578.  
  4579.       - P Permissions 
  4580.  
  4581. SrvName           The server name 
  4582.  
  4583. NetResName        The resource name 
  4584.  
  4585. UgName            User or group name 
  4586.  
  4587. Note 
  4588.  
  4589. The server name can be specified as '' for a local server. 
  4590.  
  4591. Example 
  4592.  
  4593. /* Get access control profile for a resource and a user or group */
  4594. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4595. call LoadLs30utFuncs
  4596.  
  4597. NETACCESSUSERPERMS = 12
  4598. SrvName = '\\FSC30DCR'
  4599. NetResName = 'C:\IBMLAN\NETPROG'
  4600. UgName = 'USERS'
  4601.  
  4602.  
  4603. MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
  4604.  
  4605. if myRc <> '0' then do
  4606.  say 'Got error from NetGetInfo() ' myRc
  4607.  call DropLs30utFuncs
  4608.  exit 9
  4609. end
  4610.  
  4611. say
  4612. say 'Access Perms: ' UsrPerms.perms
  4613.  
  4614.  
  4615. call DropLs30utFuncs
  4616. call RxFuncDrop 'LoadLs30utFuncs'
  4617.  
  4618. exit 0
  4619.  
  4620. Example Output 
  4621.  
  4622.  
  4623. Access Perms:  R
  4624.  
  4625.  
  4626. ΓòÉΓòÉΓòÉ 8.3. NETALIAS Get Info ΓòÉΓòÉΓòÉ
  4627.  
  4628. The function retrieves information about the specified alias. 
  4629.  
  4630. Syntax 
  4631.  
  4632.  
  4633. MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
  4634.  
  4635. Parameters 
  4636.  
  4637. The parameters specified are 
  4638.  
  4639. 'AliasInfo'       The REXX variable receiving the result. The variable is 
  4640.                   divided into 
  4641.  
  4642.    o AliasInfo.name  The alias name. 
  4643.  
  4644.    o AliasInfo.remark  The alias comment or remark 
  4645.  
  4646.    o AliasInfo.server  The name of the server where the resource described by 
  4647.      this alias resides 
  4648.  
  4649.    o AliasInfo.netname The alias name for files aliases, and the queue name for 
  4650.      printer and serial device aliases 
  4651.  
  4652.    o AliasInfo.location  The alias location 
  4653.  
  4654.    o AliasInfo.mode  When the alias is shared 
  4655.  
  4656.    o AliasInfo.maxuses  The maximum number of users who can have redirection to 
  4657.      the resource identified by this alias 
  4658.  
  4659.    o AliasInfo.type  The alias type 
  4660.  
  4661.    o AliasInfo.queue  The queue name for serial or printer alias only 
  4662.  
  4663.    o AliasInfo.path  The path for files alias only 
  4664.  
  4665.    o AliasInfo.priority  The serial device priority 
  4666.  
  4667.    o AliasInfo.device_pool  The serial device pool 
  4668.  
  4669. SrvName           The server name 
  4670.  
  4671. Alias             The alias name 
  4672.  
  4673. Note 
  4674.  
  4675. The server name can be specified as '' for a local server. 
  4676.  
  4677. Example 
  4678.  
  4679. /* Get alias information */
  4680. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4681. call LoadLs30utFuncs
  4682.  
  4683. NETALIAS = 20
  4684. SrvName = '\\FSC30DCR'
  4685. Alias = 'FORALL'
  4686.  
  4687.  
  4688. MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
  4689.  
  4690. if myRc <> '0' then do
  4691.  say 'Got error from NetGetInfo() ' myRc
  4692.  call DropLs30utFuncs
  4693.  exit 9
  4694. end
  4695.  
  4696. if aliasInfo.0 = '1' then do
  4697.  say aliasInfo.1
  4698.  call DropLs30utFuncs
  4699.  exit 0
  4700. end
  4701.  
  4702. say
  4703. say 'Alias Name:        ' aliasInfo.name
  4704. say 'Alias Remark:      ' aliasInfo.remark
  4705. say 'Alias Server:      ' aliasInfo.server
  4706. say 'Alias NetName:     ' aliasInfo.netname
  4707. say 'Alias Location:    ' aliasInfo.location
  4708. say 'Alias Mode:        ' aliasInfo.mode
  4709. say 'Alias Max uses:    ' aliasInfo.maxuses
  4710. say 'Alias Type:        ' aliasInfo.type
  4711. say 'Alias Queue:       ' aliasInfo.queue
  4712. say 'Alias path:        ' aliasInfo.path
  4713. say 'Alias priority:    ' aliasInfo.priority
  4714. say 'Alias device pool: ' aliasInfo.device_pool
  4715.  
  4716.  
  4717. call DropLs30utFuncs
  4718. call RxFuncDrop 'LoadLs30utFuncs'
  4719.  
  4720. exit 0
  4721.  
  4722. Example Output 
  4723.  
  4724.  
  4725. Alias Name:         FORALL
  4726. Alias Remark:       For all users
  4727. Alias Server:       \\FSC30DCR
  4728. Alias NetName:      FORALL
  4729. Alias Location:     Within Domain
  4730. Alias Mode:         At Requester use
  4731. Alias Max uses:     45
  4732. Alias Type:         Files
  4733. Alias Queue:        Unknown
  4734. Alias path:         D:\APPS\BOOKS
  4735. Alias priority:     Unknown
  4736. Alias device pool:  Unknown
  4737.  
  4738.  
  4739. ΓòÉΓòÉΓòÉ 8.4. NETAPP Get Info ΓòÉΓòÉΓòÉ
  4740.  
  4741. The function retrieves information about an application. 
  4742.  
  4743. Syntax 
  4744.  
  4745.  
  4746. MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
  4747. MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application, UserId)
  4748.  
  4749. Parameters 
  4750.  
  4751. The function call can be either with four or five parameters. 
  4752.  
  4753. The parameters specified are 
  4754.  
  4755. 'AppInfo'         The REXX variable receiving the result. The variable is 
  4756.                   divided into 
  4757.  
  4758.    o AppInfo.name  The application name 
  4759.  
  4760.    o AppInfo.remark  The application remark or description 
  4761.  
  4762.    o AppInfo.command  The command that starts the application 
  4763.  
  4764.    o AppInfo.command_parms  The application start parameters 
  4765.  
  4766.    o AppInfo.app_alias_or_drv  The alias or drive where the application 
  4767.      resides. It specifies a drive letter, followed by a colon (:), if the 
  4768.      application resides on the user's local machine or it specifies an 
  4769.      existing alias if the application resides on a server. 
  4770.  
  4771.    o AppInfo.app_drive  Applies to DOS public applications only. It is used to 
  4772.      specify the drive that is current when the application runs. A value of * 
  4773.      indicates that the system should choose a drive letter. 
  4774.  
  4775.    o AppInfo.app_path_to_dir  The remaining path to the application. 
  4776.  
  4777.    o AppInfo.wrkdir_alias_or_drv  Specifies the directory that is made current 
  4778.      when the application runs. If the working directory is on the local 
  4779.      machine, it specifies the drive, where the directory is located. If the 
  4780.      working directory is remote, it specifies an existing alias where the 
  4781.      directory is located. 
  4782.  
  4783.    o AppInfo.wrkdir_drive  Specifies the drive that the working directory is to 
  4784.      be assigned to when the application is started. A value of * indicates 
  4785.      that the system should choose a drive when the application is started. 
  4786.      wrkdir_path_to_dir 
  4787.  
  4788.    o AppInfo.wrkdir_path_to_dir  The remaining path to the working directory 
  4789.  
  4790.    o AppInfo.prompt  Prompt for parameters 
  4791.  
  4792.    o AppInfo.interface  The interface type 
  4793.  
  4794.    o AppInfo.type  The application type 
  4795.  
  4796.    o AppInfo.res_count  The number of application resource list that follows. A 
  4797.      value of zero indicates that the application does not require any 
  4798.      redirected devices when it runs. 
  4799.  
  4800.    o AppInfo.i.arl_alias The alias for the resource required by the 
  4801.      application. The variable i has a value from 1 to AppInfo.res_count 
  4802.  
  4803.    o AppInfo.i.arl_device  The device assigned to the resource specified. The 
  4804.      variable i has a value from 1 to AppInfo.res_count 
  4805.  
  4806. SrvName           The server name 
  4807.  
  4808. Application       The application name 
  4809.  
  4810. UserId            The userid. The userid must be specified for private 
  4811.                   applications 
  4812.  
  4813. Note 
  4814.  
  4815. The server name can be specified as '' for a local server. 
  4816.  
  4817. Using UserId = '' is identical to calling NetGetInfo(NETAPP) without the UserId 
  4818. parameter. 
  4819.  
  4820. Example 
  4821.  
  4822.  
  4823. /* Get application information */
  4824. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4825. call LoadLs30utFuncs
  4826.  
  4827. NETALIAS = 30
  4828. SrvName = '\\ILIDC'
  4829. Application = 'THENEW'
  4830.  
  4831. MyRc = NetGetInfo(NETALIAS, 'AppInfo', SrvName, Application)
  4832.  
  4833. if myRc <> '0' then do
  4834.  say 'Got error from NetGetInfo() ' myRc
  4835.  call DropLs30utFuncs
  4836.  exit 9
  4837. end
  4838.  
  4839. if AppInfo.0 = '1' then do
  4840.  say AppInfo.1
  4841.  call DropLs30utFuncs
  4842.  exit 0
  4843. end
  4844.  
  4845. say 'App Name:                ' AppInfo.name
  4846. say 'App Remark:              ' AppInfo.remark
  4847. say 'App Command:             ' AppInfo.command
  4848. say 'App Command parms:       ' AppInfo.command_parms
  4849. say 'App alias or drive:      ' AppInfo.app_alias_or_drv
  4850. say 'App drive:               ' AppInfo.app_drive
  4851. say 'App path to dir:         ' AppInfo.app_path_to_dir
  4852. say 'App wrkdir alias or drv: ' AppInfo.wrkdir_alias_or_drv
  4853. say 'App wrkdir drive:        ' AppInfo.wrkdir_drive
  4854. say 'App wrkdir path to dir:  ' AppInfo.wrkdir_path_to_dir
  4855. say 'App prompt:              ' AppInfo.prompt
  4856. say 'App interface type:      ' AppInfo.interface
  4857. say 'App type:                ' AppInfo.apptype
  4858. say 'App resource count:      ' AppInfo.res_count
  4859.  
  4860.  
  4861. if AppInfo.res_count <> 0 then do
  4862.  
  4863.  do i=1 to AppInfo.res_count
  4864.   say
  4865.   say "Alias: " AppInfo.i.arl_alias
  4866.   say "Device:" AppInfo.i.arl_device
  4867.  end
  4868.  
  4869. end
  4870.  
  4871. call DropLs30utFuncs
  4872. call RxFuncDrop 'LoadLs30utFuncs'
  4873.  
  4874. exit 0
  4875.  
  4876. Example Output 
  4877.  
  4878.  
  4879. App Name:                 THENEW
  4880. App Remark:               The New application
  4881. App Command:              myapp.exe
  4882. App Command parms:
  4883. App alias or drive:       C:
  4884. App drive:                N/A
  4885. App path to dir:          \
  4886. App wrkdir alias or drv:  D:
  4887. App wrkdir drive:         Local
  4888. App wrkdir path to dir:   \
  4889. App prompt:               Prompt user for parameters
  4890. App interface type:       Presentation Manager
  4891. App type:                 Public OS/2 application
  4892. App resource count:       2
  4893.  
  4894. Alias:  BOOKS
  4895. Device: *
  4896.  
  4897. Alias:  MYDEMO
  4898. Device: U
  4899.  
  4900.  
  4901. ΓòÉΓòÉΓòÉ 8.5. NETCONNECTION Get Info ΓòÉΓòÉΓòÉ
  4902.  
  4903. The NETCONNECTION gives a listing of connections made to a shared resource of a 
  4904. server, or of all connections established from a particular computer to a 
  4905. server. This functions is identical to NetEnumerate(NETCONNECTION). 
  4906.  
  4907. Syntax 
  4908.  
  4909.  
  4910. MyRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  4911.  
  4912. Parameters 
  4913.  
  4914. The parameters specified are 
  4915.  
  4916. 'connInfo'        The REXX variable receiving the result. The variable is 
  4917.                   divided into 
  4918.  
  4919.    o connInfo.num_entries The number of connection information entries. Each 
  4920.      entry is obtained by the index i, which has a value from 1 to 
  4921.      connInfo.num_entries 
  4922.  
  4923.    o connInfo.i.id  The connection id 
  4924.  
  4925.    o connInfo.i.type  The type of connection made from the local device name to 
  4926.      the shared resource 
  4927.  
  4928.    o connInfo.i.num_opens  The number of files that are currently open as a 
  4929.      result of the connection 
  4930.  
  4931.    o connInfo.i.num_users  The number of users on the connection 
  4932.  
  4933.    o connInfo.i.num_users  The number of users on the connection 
  4934.  
  4935.    o connInfo.i.time  The number of seconds the connection has been established 
  4936.  
  4937.    o connInfo.i.username  The name of the user that made the connection 
  4938.  
  4939.    o connInfo.i.netname A string indicating either the netname of the shared 
  4940.      resource of the server or the computer name of the requester, depending on 
  4941.      which name was specified as the Qualifier parameter 
  4942.  
  4943. SrvName           The server name 
  4944.  
  4945. Qualifier         An ASCIIZ string specifying either the netname of the shared 
  4946.                   resource whose connections will be listed or the client name 
  4947.                   of the requester whose connections to the shared resource 
  4948.                   will be listed 
  4949.  
  4950. Note 
  4951.  
  4952. The server name can be specified as '' for a local server. 
  4953.  
  4954. Example 
  4955.  
  4956.  
  4957. /* Get connection information */
  4958. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  4959. call LoadLs30utFuncs
  4960.  
  4961. NETCONNECTION = 40
  4962. SrvName = '\\ILIDC'
  4963. Qualifier = '\\ILIDC'
  4964.  
  4965. myRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
  4966.  
  4967. if myRc <> '0' then do
  4968.  say 'Got error from NetGetInfo() ' myRc
  4969.  call DropLs30utFuncs
  4970.  exit 9
  4971. end
  4972.  
  4973. if connInfo.1 <> 'CONNINFO.1' then do
  4974.  say connInfo.1
  4975.  call DropLs30utFuncs
  4976.  exit 0
  4977. end
  4978.  
  4979. if connInfo.num_entries <> 0 then do
  4980.  say "Number of entries: " connInfo.num_entries
  4981.  
  4982.  do i=1 to connInfo.num_entries
  4983.   say
  4984.   say "Connection id:        " connInfo.i.id
  4985.   say "Connection type:      " connInfo.i.type
  4986.   say "Connection num opens: " connInfo.i.num_opens
  4987.   say "Connection num users: " connInfo.i.num_users
  4988.   say "Connection time:      " connInfo.i.time
  4989.   say "Connection user name: " connInfo.i.username
  4990.   say "Connection net name:  " connInfo.i.netname
  4991.  end
  4992.  
  4993. end
  4994.  
  4995.  
  4996. call DropLs30utFuncs
  4997. call RxFuncDrop 'LoadLs30utFuncs'
  4998.  
  4999. exit 0
  5000.  
  5001. Example Output 
  5002.  
  5003.  
  5004. Number of entries:  1
  5005.  
  5006. Connection id:         4096
  5007. Connection type:       Disk Connection
  5008. Connection num opens:  0
  5009. Connection num users:  1
  5010. Connection time:       75
  5011. Connection user name:  LINDBERG
  5012. Connection net name:   BOOKS
  5013.  
  5014.  
  5015. ΓòÉΓòÉΓòÉ 8.6. NETLOGON Get Info ΓòÉΓòÉΓòÉ
  5016.  
  5017. Retrieves information about logged-on users. 
  5018.  
  5019. Syntax 
  5020.  
  5021.  
  5022. MyRc = NetGetInfo(NETLOGON, 'logonInfo')
  5023. MyRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
  5024.  
  5025. Parameters 
  5026.  
  5027. The call to NetGetInfo(NETLOGON) can have two different forms. The first form 
  5028. with no SrvName parameter is identical to the second form with the SrvName 
  5029. parameter value set to ''. 
  5030.  
  5031. The parameters specified are 
  5032.  
  5033. 'logonInfo'       The REXX variable receiving the result. The variable is 
  5034.                   divided into 
  5035.  
  5036.    o logonInfo.num_entries The number of logon information entries. Each entry 
  5037.      is obtained by the index i, which has a value from 1 to 
  5038.      logonInfo.num_entries 
  5039.  
  5040.    o logonInfo.i.eff_name The name of the account to which the user was logged 
  5041.      on 
  5042.  
  5043.    o logonInfo.i.computer 
  5044.  
  5045.    o logonInfo.i.full_name The fullname value specified in the user account 
  5046.  
  5047.    o logonInfo.i.usrcomment The user-settable value for user comments 
  5048.  
  5049.    o logonInfo.i.logon_time The time and date when the user logged on. 
  5050.  
  5051. SrvName           The server name 
  5052.  
  5053. Note 
  5054.  
  5055. The server name can be specified as '' for a local server. 
  5056.  
  5057. Example 
  5058.  
  5059.  
  5060. /* Get information on logged on users on this server */
  5061. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5062. call LoadLs30utFuncs
  5063.  
  5064. NETLOGON = 50
  5065. SrvName = '\\FSCDC'
  5066.  
  5067. myRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
  5068.  
  5069. if myRc <> '0' then do
  5070.  say 'Got error from NetGetInfo() ' myRc
  5071.  call DropLs30utFuncs
  5072.  exit 9
  5073. end
  5074.  
  5075. if logonInfo.1 = '-none-' then do
  5076.  say logonInfo.1
  5077.  call DropLs30utFuncs
  5078.  exit 0
  5079. end
  5080.  
  5081. if logonInfo.num_entries <> 0 then do
  5082.  say "Number of entries: " logonInfo.num_entries
  5083.  
  5084.  do i=1 to logonInfo.num_entries
  5085.   say
  5086.   say "Logon eff_name:     " logonInfo.i.eff_name
  5087.   say "Logon computer:     " logonInfo.i.computer
  5088.   say "Logon full name:    " logonInfo.i.full_name
  5089.   say "Logon user comment: " logonInfo.i.usrcomment
  5090.   say "Logon time:         " logonInfo.i.logon_time
  5091.  end
  5092.  
  5093. end
  5094.  
  5095.  
  5096. call DropLs30utFuncs
  5097. call RxFuncDrop 'LoadLs30utFuncs'
  5098.  
  5099. exit 0
  5100.  
  5101. Example Output 
  5102.  
  5103.  
  5104. Number of entries:  1
  5105.  
  5106. Logon eff_name:      LINDBERG
  5107. Logon computer:      FSC30DCR
  5108. Logon full name:     Ingolf Lindberg, OS/2 Competency Center
  5109. Logon user comment:  Ingolf Lindberg in N91-3161
  5110. Logon time:          Tue May  4 07:44:26 1993
  5111.  
  5112.  
  5113. ΓòÉΓòÉΓòÉ 8.7. NETFILE Get Info ΓòÉΓòÉΓòÉ
  5114.  
  5115. The function retrieves information about a particular opened file on a server. 
  5116.  
  5117. Syntax 
  5118.  
  5119.  
  5120. MyRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
  5121.  
  5122. Parameters 
  5123.  
  5124. The parameters specified are 
  5125.  
  5126. 'fileInfo'        The REXX variable receiving the result. The variable is 
  5127.                   divided into 
  5128.  
  5129.    o fileInfo.id  The file Id 
  5130.  
  5131.    o fileInfo.permissions  The access permissions of the opening application. 
  5132.  
  5133.    o fileInfo.num_locks  The number of file locks on the file, device, or pipe 
  5134.  
  5135.    o fileInfo.pathname  The path name of the opened resource 
  5136.  
  5137.    o fileInfo.username  The username of the one that first opened the path 
  5138.  
  5139. SrvName           The server name 
  5140.  
  5141. fileId            The file Id. This value must be supplied 
  5142.  
  5143. Note 
  5144.  
  5145. The server name can be specified as '' for a local server. 
  5146.  
  5147. Example 
  5148.  
  5149.  
  5150. /* Get opened file information */
  5151. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5152. call LoadLs30utFuncs
  5153.  
  5154. NETFILE = 60
  5155. SrvName = '\\FSCDC'
  5156. fileId = 167273
  5157.  
  5158. myRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
  5159.  
  5160. if myRc <> '0' then do
  5161.  say 'Got error from NetGetInfo() ' myRc
  5162.  call DropLs30utFuncs
  5163.  exit 9
  5164. end
  5165.  
  5166. if fileInfo.1 = '-none-' then do
  5167.  say fileInfo.1
  5168.  call DropLs30utFuncs
  5169.  exit 0
  5170. end
  5171.  
  5172. say
  5173. say "File id:           " fileInfo.id
  5174. say "File permissions:  " fileInfo.permissions
  5175. say "File number locks: " fileInfo.num_locks
  5176. say "File path:         " fileInfo.pathname
  5177. say "File user name:    " fileInfo.username
  5178.  
  5179. call DropLs30utFuncs
  5180. call RxFuncDrop 'LoadLs30utFuncs'
  5181.  
  5182. exit 0
  5183.  
  5184. Example Output 
  5185.  
  5186.  
  5187. File id:            167273
  5188. File permissions:   R
  5189. File number locks:  0
  5190. File path:          D:\BOOKS\GG243783.BOO
  5191. File user name:     FSCADMIN
  5192.  
  5193.  
  5194. ΓòÉΓòÉΓòÉ 8.8. NETGROUP Get Info ΓòÉΓòÉΓòÉ
  5195.  
  5196. The function retrieves group-related information. 
  5197.  
  5198. Syntax 
  5199.  
  5200.  
  5201. MyRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
  5202.  
  5203. Parameters 
  5204.  
  5205. The parameters specified are 
  5206.  
  5207. 'groupInfo'       The REXX variable receiving the result. The variable is 
  5208.                   divided into 
  5209.  
  5210.    o groupInfo.name  The group name 
  5211.  
  5212.    o groupInfo.comment  The group comment or description 
  5213.  
  5214. SrvName           The server name 
  5215.  
  5216. GroupName         The group name. This value must be supplied 
  5217.  
  5218. Note 
  5219.  
  5220. The server name can be specified as '' for a local server. 
  5221.  
  5222. Example 
  5223.  
  5224.  
  5225. /* Get group comment */
  5226. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5227. call LoadLs30utFuncs
  5228.  
  5229. NETGROUP = 70
  5230. SrvName = '\\ILIDC'
  5231. GroupName = 'CSUSERS'
  5232.  
  5233. myRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
  5234.  
  5235. if myRc <> '0' then do
  5236.  say 'Got error from NetGetInfo() ' myRc
  5237.  call DropLs30utFuncs
  5238.  exit 9
  5239. end
  5240.  
  5241. say
  5242. say "Group Name:    " groupInfo.name
  5243. say "Group Comment: " groupInfo.comment
  5244.  
  5245.  
  5246. call DropLs30utFuncs
  5247. call RxFuncDrop 'LoadLs30utFuncs'
  5248.  
  5249. exit 0
  5250.  
  5251. Example Output 
  5252.  
  5253.  
  5254. Group Name:     CSUSERS
  5255. Group Comment:  The Client/Server users group
  5256.  
  5257.  
  5258. ΓòÉΓòÉΓòÉ 8.9. NETGROUPUSERS Get Info ΓòÉΓòÉΓòÉ
  5259.  
  5260. The function returns a list of members of a particular group. 
  5261.  
  5262. Syntax 
  5263.  
  5264.  
  5265. MyRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  5266.  
  5267. Parameters 
  5268.  
  5269. The parameters specified are 
  5270.  
  5271. 'groupInfo'       The REXX variable receiving the result. The variable is 
  5272.                   divided into 
  5273.  
  5274.    o groupInfo.0  Counts the number of users defined in the group 
  5275.  
  5276.    o groupInfo.i  The userId number i defined in the group. i has a value from 
  5277.      1 to groupInfo.0 
  5278.  
  5279. SrvName           The server name 
  5280.  
  5281. GroupName         The group name. This value must be supplied 
  5282.  
  5283. Note 
  5284.  
  5285. The server name can be specified as '' for a local server. 
  5286.  
  5287. Example 
  5288.  
  5289.  
  5290. /* Get group users */
  5291. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5292. call LoadLs30utFuncs
  5293.  
  5294. NETGROUPUSERS = 340
  5295. SrvName = '\\ILIDC'
  5296. GroupName = 'CSUSERS'
  5297.  
  5298. myRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
  5299.  
  5300. if myRc <> '0' then do
  5301.  say 'Got error from NetGetInfo() ' myRc
  5302.  call DropLs30utFuncs
  5303.  exit 9
  5304. end
  5305.  
  5306. say
  5307.  
  5308. do i=1 to groupInfo.0
  5309.   say "UserId:        " groupInfo.i
  5310. end
  5311.  
  5312. call DropLs30utFuncs
  5313. call RxFuncDrop 'LoadLs30utFuncs'
  5314.  
  5315. exit 0
  5316.  
  5317. Example Output 
  5318.  
  5319.  
  5320. UserId:         LINDBERG
  5321. UserId:         BRUGERID
  5322. UserId:         USERID
  5323.  
  5324.  
  5325. ΓòÉΓòÉΓòÉ 8.10. NETMESSAGENAME Get Info ΓòÉΓòÉΓòÉ
  5326.  
  5327. The function retrieves information about a user's entry in the message name 
  5328. table. 
  5329.  
  5330. Syntax 
  5331.  
  5332.  
  5333. MyRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
  5334.  
  5335. Parameters 
  5336.  
  5337. The parameters specified are 
  5338.  
  5339. 'msgNameInfo'     The REXX variable receiving the result. The variable is 
  5340.                   divided into 
  5341.  
  5342.    o msgNameInfo.name  The messaging name to send a message 
  5343.  
  5344.    o msgNameInfo.forward_flag  The value specifies whether messages will be 
  5345.      sent to a user or application on the local computer, or forwarded to a 
  5346.      user or application on a remote computer 
  5347.  
  5348.    o msgNameInfo.forward The value will specify the user name to which the 
  5349.      message will be sent, if messages are to be forwarded 
  5350.  
  5351. SrvName           The server name 
  5352.  
  5353. MsgName           The message name 
  5354.  
  5355. Note 
  5356.  
  5357. The server name can be specified as '' for a local server or computer. 
  5358.  
  5359. Example 
  5360.  
  5361.  
  5362. /* Get message name information */
  5363. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5364. call LoadLs30utFuncs
  5365.  
  5366. NETMESSAGENAME = 80
  5367. SrvName = '\\ILIDC'
  5368. MsgName = 'LINDBERG'
  5369.  
  5370. myRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
  5371.  
  5372. if myRc <> '0' then do
  5373.  say 'Got error from NetGetInfo() ' myRc
  5374.  call DropLs30utFuncs
  5375.  exit 9
  5376. end
  5377.  
  5378. say
  5379. say "Message Name: " msgNameInfo.name
  5380. say "Forward flag: " msgNameInfo.forward_flag
  5381. say "Forward to:   " msgNameInfo.forward
  5382.  
  5383. call DropLs30utFuncs
  5384. call RxFuncDrop 'LoadLs30utFuncs'
  5385.  
  5386. exit 0
  5387.  
  5388. Example Output 
  5389.  
  5390.  
  5391. Message Name:  LINDBERG
  5392. Forward flag:  Not forwarded
  5393. Forward to:    N/A
  5394.  
  5395.  
  5396. ΓòÉΓòÉΓòÉ 8.11. NETBIOS Get Info ΓòÉΓòÉΓòÉ
  5397.  
  5398. The function returns information about a particular network device driver 
  5399. installed on a computer. 
  5400.  
  5401. Syntax 
  5402.  
  5403.  
  5404. MyRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
  5405.  
  5406. Parameters 
  5407.  
  5408. The parameters specified are 
  5409.  
  5410. 'netBiosInfo'     The REXX variable receiving the result. The variable is 
  5411.                   divided into: 
  5412.  
  5413.    o netBiosInfo.name  The name of the network. For example 'NET1' or 'NETLB' 
  5414.  
  5415.    o netBiosInfo.driver_name  The network device driver name the LAN Server 
  5416.      software uses 
  5417.  
  5418.    o netBiosInfo.lana_num  The LAN adapter number 
  5419.  
  5420.    o netBiosInfo.driver_type  The device driver protocol type 
  5421.  
  5422.    o netBiosInfo.net_status  The status of the device driver 
  5423.  
  5424.    o netBiosInfo.net_bandwidth  Indicates the number of bytes per second that 
  5425.      the network hardware accommodates 
  5426.  
  5427.    o netBiosInfo.max_sess  The maximum number of concurrent sessions that the 
  5428.      device driver can establish 
  5429.  
  5430.    o netBiosInfo.max_ncbs  The maximum number of NCBs that can be outstanding 
  5431.      at any time 
  5432.  
  5433.    o netBiosInfo.max_names  The maximum number of network names that a network 
  5434.      (netBiosInfo.name) can establish 
  5435.  
  5436. SrvName           The server name 
  5437.  
  5438. NetName           The network name 
  5439.  
  5440. Note 
  5441.  
  5442. The server name can be specified as '' for a local server or computer. 
  5443.  
  5444. Example 
  5445.  
  5446.  
  5447. /* Get NetBios information for NET1 */
  5448. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5449. call LoadLs30utFuncs
  5450.  
  5451. NETBIOS = 90
  5452. SrvName = '\\FSC30DCR'
  5453. NetName = 'NET1'
  5454.  
  5455. myRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
  5456.  
  5457. if myRc <> '0' then do
  5458.  say 'Got error from NetGetInfo() ' myRc
  5459.  call DropLs30utFuncs
  5460.  exit 9
  5461. end
  5462.  
  5463. if netBiosInfo.1 = '-none-' then do
  5464.  say netBiosInfo.1
  5465.  call DropLs30utFuncs
  5466.  exit 0
  5467. end
  5468.  
  5469. say
  5470. say "Netbios net_name:     " netBiosInfo.net_name
  5471. say "Netbios driver_name:  " netBiosInfo.driver_name
  5472. say "Netbios lana num:     " netBiosInfo.lana_num
  5473. say "Netbios driver_type:  " netBiosInfo.driver_type
  5474. say "Netbios net status:   " netBiosInfo.net_status
  5475. say "Netbios net bandwidth:" netBiosInfo.net_bandwidth
  5476. say "Netbios max sessions: " netBiosInfo.max_sess
  5477. say "Netbios max ncbs:     " netBiosInfo.max_ncbs
  5478. say "Netbios max names:    " netBiosInfo.max_names
  5479.  
  5480. call DropLs30utFuncs
  5481. call RxFuncDrop 'LoadLs30utFuncs'
  5482.  
  5483. exit 0
  5484.  
  5485. Example Output 
  5486.  
  5487.  
  5488. Netbios net_name:      NET1
  5489. Netbios driver_name:   NETBEUI$
  5490. Netbios lana num:      0
  5491. Netbios driver_type:   Network Control Block Protocol
  5492. Netbios net status:    Unknown
  5493. Netbios net bandwidth: 524288
  5494. Netbios max sessions:  32
  5495. Netbios max ncbs:      50
  5496. Netbios max names:     14
  5497.  
  5498.  
  5499. ΓòÉΓòÉΓòÉ 8.12. NETPRINTDEST Get Info ΓòÉΓòÉΓòÉ
  5500.  
  5501. The function returns information about a particular network device driver 
  5502. installed on a computer. 
  5503.  
  5504. Syntax 
  5505.  
  5506.  
  5507. MyRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
  5508.  
  5509. Parameters 
  5510.  
  5511. The parameters specified are 
  5512.  
  5513. 'prtDestInfo'     The REXX variable receiving the result. The variable is 
  5514.                   divided into: 
  5515.  
  5516.    o prtDestInfo.PrinterName  The printer device name 
  5517.  
  5518.    o prtDestInfo.UserName  The user that submitted the current job if any. If a 
  5519.      local job is printing the value 'Local User' is used. If no jobs are 
  5520.      printing the value of '-none-' is used 
  5521.  
  5522.    o prtDestInfo.LogAddr  The printer logical address (LPT1 for example) 
  5523.  
  5524.    o prtDestInfo.JobId  The current printing job id. '-none-' is no jobs are 
  5525.      printing 
  5526.  
  5527.    o prtDestInfo.Status  The printer device status 
  5528.  
  5529.    o prtDestInfo.StatusComment  Print device comment while printing 
  5530.  
  5531.    o prtDestInfo.Comment  Print device description 
  5532.  
  5533.    o prtDestInfo.Drivers  Print driver supported by this device 
  5534.  
  5535.    o prtDestInfo.time  Time (in minutes) current print job has been printing 
  5536.  
  5537.    o prtDestInfo.TimeOut  Print device Time Out (in seconds) 
  5538.  
  5539. SrvName           The server name 
  5540.  
  5541. DevName           The printer device name 
  5542.  
  5543. Note 
  5544.  
  5545. The server name can be specified as '' for a local server or computer. 
  5546.  
  5547. Example 
  5548.  
  5549.  
  5550. /* Get Print destination information */
  5551. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5552. call LoadLs30utFuncs
  5553.  
  5554. NETPRINTDEST = 100
  5555. SrvName = '\\FSC30DCR'
  5556. DevName = 'IBM40191'
  5557.  
  5558. myRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
  5559.  
  5560. if myRc <> '0' then do
  5561.  say 'Got error from NetGetInfo() ' myRc
  5562.  call DropLs30utFuncs
  5563.  exit 9
  5564. end
  5565.  
  5566. if prtDestInfo.1 = '-none-' then do
  5567.  say prtDestInfo.1
  5568.  call DropLs30utFuncs
  5569.  exit 0
  5570. end
  5571.  
  5572. say
  5573. say 'Printer device name:       ' prtDestInfo.PrinterName
  5574. say 'Current user job printing: ' prtDestInfo.UserName
  5575. say 'Printer logical address:   ' prtDestInfo.LogAddr
  5576. say 'Current job id printing:   ' prtDestInfo.JobId
  5577. say 'Print device status:       ' prtDestInfo.Status
  5578. say 'Job Comment:               ' prtDestInfo.StatusComment
  5579. say 'Device describtion:        ' prtDestInfo.Comment
  5580. say 'Supported drivers:         ' prtDestInfo.Drivers
  5581. say 'Time current job printing: ' prtDestInfo.time
  5582. say 'Print device timeout:      ' prtDestInfo.TimeOut
  5583.  
  5584. call DropLs30utFuncs
  5585. call RxFuncDrop 'LoadLs30utFuncs'
  5586.  
  5587. exit 0
  5588.  
  5589. Example Output 
  5590.  
  5591.  
  5592. Printer device name:        IBM40191
  5593. Current user job printing:  -none-
  5594. Printer logical address:    LPT3
  5595. Current job id printing:    -none-
  5596. Print device status:        Processing
  5597. Job Comment:                -none-
  5598. Device describtion:         IBM 4019 LaserPrinter
  5599. Supported drivers:          IBM4019.IBM 4019 LaserPrinter
  5600. Time current job printing:  -none-
  5601. Print device timeout:       45
  5602.  
  5603.  
  5604. ΓòÉΓòÉΓòÉ 8.13. NETPRINTJOB Get Info ΓòÉΓòÉΓòÉ
  5605.  
  5606. The function returns information about a print job. 
  5607.  
  5608. Syntax 
  5609.  
  5610.  
  5611. MyRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
  5612.  
  5613. Parameters 
  5614.  
  5615. The parameters specified are 
  5616.  
  5617. 'prtJobInfo'      The REXX variable receiving the result. The variable is 
  5618.                   divided into: 
  5619.  
  5620.    o prtJobInfo.JobId  The print job id 
  5621.  
  5622.    o prtJobInfo.Priority  The print job priority 
  5623.  
  5624.    o prtJobInfo.UserName  The userid of the job submitting the job 
  5625.  
  5626.    o prtJobInfo.Position  The job position in the print queue 
  5627.  
  5628.    o prtJobInfo.Status  The status of the print job 
  5629.  
  5630.    o prtJobInfo.Submitted  The time when the job was submitted 
  5631.  
  5632.    o prtJobInfo.Size  The print job size 
  5633.  
  5634.    o prtJobInfo.Comment  The print job comment 
  5635.  
  5636.    o prtJobInfo.Document  The document name 
  5637.  
  5638.    o prtJobInfo.NotifyName  Messaging alias for print alert 
  5639.  
  5640.    o prtJobInfo.DataType  The data type of the submitted file 
  5641.  
  5642.    o prtJobInfo.Parms  The parameters related to the print job 
  5643.  
  5644.    o prtJobInfo.StatusComment  The status comment 
  5645.  
  5646.    o prtJobInfo.Queue  The queue name 
  5647.  
  5648.    o prtJobInfo.QProcName  The queue processor name 
  5649.  
  5650.    o prtJobInfo.QProcParms  The queue processor parameters 
  5651.  
  5652.    o prtJobInfo.PrinterName  The printer name 
  5653.  
  5654.    o prtJobInfo.Version  The printer driver version 
  5655.  
  5656.    o prtJobInfo.DeviceName  The device name 
  5657.  
  5658. SrvName           The server name 
  5659.  
  5660. QueueName         The Queue name 
  5661.  
  5662. PrtJobId          The Printer Job Id 
  5663.  
  5664. Note 
  5665.  
  5666. The server name can be specified as '' for a local server or computer. 
  5667.  
  5668. Example 
  5669.  
  5670.  
  5671. /* Get Print job information */
  5672. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5673. call LoadLs30utFuncs
  5674.  
  5675. NETPRINTJOB = 110
  5676. SrvName = '\\FSC30DCR'
  5677. QueueName = 'IBM4019L'
  5678. PrtJobId = 5
  5679.  
  5680. myRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
  5681.  
  5682. if myRc <> '0' then do
  5683.  say 'Got error from NetGetInfo() ' myRc
  5684.  call DropLs30utFuncs
  5685.  exit 9
  5686. end
  5687.  
  5688. if prtJobInfo.1 = '-none-' then do
  5689.  say prtJobInfo.1
  5690.  call DropLs30utFuncs
  5691.  exit 0
  5692. end
  5693.  
  5694. say
  5695. say 'Job id:                     ' prtJobInfo.JobId
  5696. say 'Job priority:               ' prtJobInfo.Priority
  5697. say 'Userid who submitted job:   ' prtJobInfo.UserName
  5698. say 'Job position in Queue:      ' prtJobInfo.Position
  5699. say 'Job status:                 ' prtJobInfo.Status
  5700. say 'Submitted at:               ' prtJobInfo.Submitted
  5701. say 'Job size:                   ' prtJobInfo.Size
  5702. say 'Job comment:                ' prtJobInfo.Comment
  5703. say 'Document name:              ' prtJobInfo.Document
  5704. say 'Notify:                     ' prtJobInfo.NotifyName
  5705. say 'Data type:                  ' prtJobInfo.DataType
  5706. say 'Job parameters:             ' prtJobInfo.Parms
  5707. say 'Job status comment:         ' prtJobInfo.StatusComment
  5708. say 'Queue name:                 ' prtJobInfo.Queue
  5709. say 'Queue processor:            ' prtJobInfo.QProcName
  5710. say 'Queue processor parameters: ' prtJobInfo.QProcParms
  5711. say 'The printer name:           ' prtJobInfo.PrinterName
  5712. say 'Printer Driver version:     ' prtJobInfo.Version
  5713. say 'Device Name:                ' prtJobInfo.DeviceName
  5714.  
  5715. call DropLs30utFuncs
  5716. call RxFuncDrop 'LoadLs30utFuncs'
  5717.  
  5718. exit 0
  5719.  
  5720. Example Output 
  5721.  
  5722.  
  5723. Job id:                      5
  5724. Job priority:                50
  5725. Userid who submitted job:
  5726. Job position in Queue:       Next
  5727. Job status:                  Queued
  5728. Submitted at:                Wed May  5 19:45:06 1993
  5729.  
  5730. Job size:                    109320
  5731. Job comment:                 System
  5732. Document name:               LS30BAS2.C
  5733. Notify:
  5734. Data type:                   PM_Q_RAW
  5735. Job parameters:
  5736. Job status comment:
  5737. Queue name:                  IBM4019L
  5738. Queue processor:             PMPRINT
  5739. Queue processor parameters:  CDP=850
  5740. The printer name:
  5741. Printer Driver version:      777
  5742. Device Name:                 IBM 4019 LaserPrinter
  5743.  
  5744.  
  5745. ΓòÉΓòÉΓòÉ 8.14. NETPRINTQUEUE Get Info ΓòÉΓòÉΓòÉ
  5746.  
  5747. The function returns information about a print queue. 
  5748.  
  5749. Syntax 
  5750.  
  5751.  
  5752. MyRc = NetGetInfo(NETPRINTJOB, 'prtQInfo', SrvName, QueueName)
  5753.  
  5754. Parameters 
  5755.  
  5756. The parameters specified are 
  5757.  
  5758. 'prtQInfo'        The REXX variable receiving the result. The variable is 
  5759.                   divided into: 
  5760.  
  5761.    o prtQInfo.Priority  The queue priority 
  5762.  
  5763.    o prtQInfo.StartTime  The queue start time 
  5764.  
  5765.    o prtQInfo.UntilTime  The queue until time 
  5766.  
  5767.    o prtQInfo.Type  The queue type. A hexadecimal value, which is not 
  5768.      interpreted 
  5769.  
  5770.    o prtQInfo.SepFile  The queue seperator file if any 
  5771.  
  5772.    o prtQInfo.PrProc  The queue default queue processor 
  5773.  
  5774.    o prtQInfo.Parms  The queue parameters 
  5775.  
  5776.    o prtQInfo.Comment  The queue comment or description 
  5777.  
  5778.    o prtQInfo.Status  The queue status. A hexadecimal value, which is not 
  5779.      interpreted 
  5780.  
  5781.    o prtQInfo.Jobs  The number of jobs in the queue 
  5782.  
  5783.    o prtQInfo.Printers  The print device connected to the queue 
  5784.  
  5785.    o prtQInfo.DriverName  The default print driver 
  5786.  
  5787.    o prtQInfo.RemoteComputerName  The remote computer name 
  5788.  
  5789.    o prtQInfo.RemoteQueueName  The remote queue name 
  5790.  
  5791.    o prtQInfo.Version  The printer driver version 
  5792.  
  5793.    o prtQInfo.DeviceName  The device name 
  5794.  
  5795. SrvName           The server name 
  5796.  
  5797. QueueName         The Queue name 
  5798.  
  5799. Note 
  5800.  
  5801. The server name can be specified as '' for a local server or computer. 
  5802.  
  5803. Example 
  5804.  
  5805.  
  5806. /* Get Print queue information */
  5807. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5808. call LoadLs30utFuncs
  5809.  
  5810. NETPRINTJOB = 120
  5811. SrvName = '\\FSC30DCR'
  5812. QueueName = 'IBM4019L'
  5813.  
  5814. myRc = NetGetInfo(NETPRINTJOB, 'prtQInfo', SrvName, QueueName)
  5815.  
  5816. if myRc <> '0' then do
  5817.  say 'Got error from NetGetInfo() ' myRc
  5818.  call DropLs30utFuncs
  5819.  exit 9
  5820. end
  5821.  
  5822. if prtJobInfo.1 = '-none-' then do
  5823.  say prtJobInfo.1
  5824.  call DropLs30utFuncs
  5825.  exit 0
  5826. end
  5827.  
  5828. say
  5829. say 'Queue Priority:            ' prtQInfo.Priority
  5830. say 'Queue start time:          ' prtQInfo.StartTime
  5831. say 'Queue until time:          ' prtQInfo.UntilTime
  5832. say 'Queue type:                ' prtQInfo.Type
  5833. say 'Seperator File:            ' prtQInfo.SepFile
  5834. say 'Default Queue processor:   ' prtQInfo.PrProc
  5835. say 'Queue parameters:          ' prtQInfo.Parms
  5836. say 'Queue description:         ' prtQInfo.Comment
  5837. say 'Queue status:              ' prtQInfo.Status
  5838. say 'Number of jobs in queue:   ' prtQInfo.Jobs
  5839. say 'Printer connected:         ' prtQInfo.Printers
  5840. say 'Default printer driver:    ' prtQInfo.DriverName
  5841. say 'Computer Name at location: ' prtQInfo.RemoteComputerName
  5842. say 'Queue name at location:    ' prtQInfo.RemoteQueueName
  5843. say 'Printer Driver version:    ' prtQInfo.Version
  5844. say 'Device Name:               ' prtQInfo.DeviceName
  5845.  
  5846. call DropLs30utFuncs
  5847. call RxFuncDrop 'LoadLs30utFuncs'
  5848.  
  5849. exit 0
  5850.  
  5851. Example Output 
  5852.  
  5853.  
  5854. Queue Priority:             5
  5855. Queue start time:           No Restriction
  5856. Queue until time:           No Restriction
  5857. Queue type:                 0002
  5858. Seperator File:
  5859. Default Queue processor:    PMPRINT
  5860. Queue parameters:
  5861. Queue description:          IBM 4019 LaserPrinter
  5862. Queue status:               0001
  5863. Number of jobs in queue:    0
  5864. Printer connected:          IBM40191
  5865. Default printer driver:     IBM4019.IBM 4019 LaserPrinter
  5866. Computer Name at location:
  5867. Queue name at location:
  5868. Printer Driver version:     777
  5869. Device Name:                IBM 4019 LaserPrinter
  5870.  
  5871.  
  5872. ΓòÉΓòÉΓòÉ 8.15. NETCHARDEV Get Info ΓòÉΓòÉΓòÉ
  5873.  
  5874. The function retrieves information about a particular serial device in a shared 
  5875. serial device queue on a server. 
  5876.  
  5877. Syntax 
  5878.  
  5879.  
  5880. MyRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
  5881.  
  5882. Parameters 
  5883.  
  5884. The parameters specified are 
  5885.  
  5886. 'charDevInfo'     The REXX variable receiving the result. The variable is 
  5887.                   divided into: 
  5888.  
  5889.    o charDevInfo.dev  The device name 
  5890.  
  5891.    o charDevInfo.status  The status of the device 
  5892.  
  5893.    o charDevInfo.username  The current user name of the device 
  5894.  
  5895.    o charDevInfo.time  The number of seconds the current application has been 
  5896.      connected to the serial device 
  5897.  
  5898. SrvName           The server name 
  5899.  
  5900. DeviceName        The name of the device 
  5901.  
  5902. Note 
  5903.  
  5904. The server name can be specified as '' for a local server or computer. 
  5905.  
  5906. Example 
  5907.  
  5908.  
  5909. /* Get the serial device information */
  5910. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5911. call LoadLs30utFuncs
  5912.  
  5913. NETCHARDEV = 130
  5914. SrvName = '\\ILIDC'
  5915. DeviceName = 'COM1'
  5916.  
  5917. myRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
  5918.  
  5919. if myRc <> '0' then do
  5920.  say 'Got error from NetGetInfo() ' myRc
  5921.  call DropLs30utFuncs
  5922.  exit 9
  5923. end
  5924.  
  5925. say
  5926. say 'The device name:   ' charDevInfo.dev
  5927. say 'Device status:     ' charDevInfo.status
  5928. say 'Current user name: ' charDevInfo.username
  5929. say 'Time in use:       ' charDevInfo.time
  5930.  
  5931. call DropLs30utFuncs
  5932. call RxFuncDrop 'LoadLs30utFuncs'
  5933.  
  5934. exit 0
  5935.  
  5936. Example Output 
  5937.  
  5938.  
  5939. The device name:    COM1
  5940. Device status:      Idle
  5941. Current user name:  -none-
  5942. Time in use:        0
  5943.  
  5944.  
  5945. ΓòÉΓòÉΓòÉ 8.16. NETCHARDEVQ Get Info ΓòÉΓòÉΓòÉ
  5946.  
  5947. The function retrieves information about a particular serial device queue on a 
  5948. server. 
  5949.  
  5950. Syntax 
  5951.  
  5952.  
  5953. MyRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
  5954.  
  5955. Parameters 
  5956.  
  5957. The parameters specified are 
  5958.  
  5959. 'charQInfo'       The REXX variable receiving the result. The variable is 
  5960.                   divided into: 
  5961.  
  5962.    o charQInfo.dev  The name of the serial device queue for which information 
  5963.      is returned 
  5964.  
  5965.    o charQInfo.priority  The queue priority 
  5966.  
  5967.    o charQInfo.devs  The names of the local devices in the pool 
  5968.  
  5969.    o charQInfo.numusers  The number of users waiting in the device queue 
  5970.  
  5971.    o charQInfo.numahead  The number of users ahead of the UserId specified in 
  5972.      the call the NetGetInfo(CHARDEVQ) 
  5973.  
  5974. SrvName           The server name 
  5975.  
  5976. QueueName         The name of the queue. This name is identical to the netname 
  5977.  
  5978. UserId            A userid 
  5979.  
  5980. Note 
  5981.  
  5982. The server name can be specified as '' for a local server or computer. 
  5983.  
  5984. Example 
  5985.  
  5986.  
  5987. /* Get queue information for a serial device */
  5988. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  5989. call LoadLs30utFuncs
  5990.  
  5991. NETCHARDEVQ = 140
  5992. SrvName = '\\ILIDC'
  5993. QueueName = 'SRVCOM'
  5994. UserId = 'LINDBERG'
  5995.  
  5996. myRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
  5997.  
  5998. if myRc <> '0' then do
  5999.  say 'Got error from NetGetInfo() ' myRc
  6000.  call DropLs30utFuncs
  6001.  exit 9
  6002. end
  6003.  
  6004. say
  6005. say 'Device name:           ' charQInfo.dev
  6006. say 'Queue Priority:        ' charQInfo.priority
  6007. say 'Queue server devices:  ' charQInfo.devs
  6008. say 'Numbers users waiting: ' charQInfo.numusers
  6009. say 'Number users ahead of ' UserId ':' charQInfo.numahead
  6010.  
  6011. call DropLs30utFuncs
  6012. call RxFuncDrop 'LoadLs30utFuncs'
  6013.  
  6014. exit 0
  6015.  
  6016. Example Output 
  6017.  
  6018.  
  6019. Device name:            SRVCOM
  6020. Queue Priority:         3
  6021. Queue server devices:   COM1
  6022. Numbers users waiting:  0
  6023. Number users ahead of  LINDBERG : Userid has no requests in the queue
  6024.  
  6025.  
  6026. ΓòÉΓòÉΓòÉ 8.17. NETSERVER Get Info ΓòÉΓòÉΓòÉ
  6027.  
  6028. The function retrieves information about a particular server. 
  6029.  
  6030. Syntax 
  6031.  
  6032.  
  6033. MyRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
  6034.  
  6035. Parameters 
  6036.  
  6037. The parameters specified are 
  6038.  
  6039. 'serverInfo'      The REXX variable receiving the result. The variable is 
  6040.                   divided into: 
  6041.  
  6042.    o serverInfo.name  The server name 
  6043.  
  6044.    o serverInfo.version_major  The major version number (Version) 
  6045.  
  6046.    o serverInfo.version_minor  The minor version number (Release) 
  6047.  
  6048.    o serverInfo.type  The server type. This information is a hexadecimal value 
  6049.      and is not interpreted 
  6050.  
  6051.    o serverInfo.comment  The server comment 
  6052.  
  6053.    o serverInfo.ulist_mtime  The last time the users list was modified 
  6054.  
  6055.    o serverInfo.glist_mtime  The last time the group list was modified 
  6056.  
  6057.    o serverInfo.alist_mtime  The last time the access control list was modified 
  6058.  
  6059.    o serverInfo.users  The maximum of users on the server 
  6060.  
  6061.    o serverInfo.disc  The auto-disconnet value 
  6062.  
  6063.    o serverInfo.alerts  The server alerts receiver table. The table can be 
  6064.      empty 
  6065.  
  6066.    o serverInfo.security  The security type of the server 
  6067.  
  6068.    o serverInfo.auditing  The auditing setting 
  6069.  
  6070.    o serverInfo.numadmin  The maximum allowed number of administrators 
  6071.  
  6072.    o serverInfo.lanmask  The order in which the network device drivers are 
  6073.      served. The value is uninterpreted 
  6074.  
  6075.    o serverInfo.hidden  The server hidden attribute setting 
  6076.  
  6077.    o serverInfo.announce  The network announce delta (in seconds), which 
  6078.      determines how often the server will be announced to other computers on 
  6079.      the network 
  6080.  
  6081.    o serverInfo.anndelta  The random announce rate (in milliseconds) 
  6082.  
  6083.    o serverInfo.guestacct  The guest account name 
  6084.  
  6085.    o serverInfo.userpath  The path name to user directories 
  6086.  
  6087.    o serverInfo.chdevs  The number of serial devices that can be shared on the 
  6088.      server 
  6089.  
  6090.    o serverInfo.chdevq  The number of serial device queues that can coexist on 
  6091.      the server 
  6092.  
  6093.    o serverInfo.chdevjobs  The number of serial device jobs that can be pending 
  6094.      on a server 
  6095.  
  6096.    o serverInfo.connections  The maximum number of connections to netnames that 
  6097.      are allowed 
  6098.  
  6099.    o serverInfo.shares  The maximum number of netnames a server can accommodate 
  6100.  
  6101.    o serverInfo.openfiles  The number of files  (file handles to for example 
  6102.      files or pipes) that can be opened at once 
  6103.  
  6104.    o serverInfo.sessopens  The number of files that can be opened in one 
  6105.      session 
  6106.  
  6107.    o serverInfo.sessvcs  The maximum number of virtual circuits per client 
  6108.  
  6109.    o serverInfo.sessreqs  The number of simultaneous requests that a client can 
  6110.      make on any virtual circuit 
  6111.  
  6112.    o serverInfo.opensearch  The number of searches that can be opened at once 
  6113.  
  6114.    o serverInfo.activelocks  The number of file locks that can be active 
  6115.  
  6116.    o serverInfo.numreqbuf  The number of server buffers that are provided 
  6117.  
  6118.    o serverInfo.sizreqbuf  The size (in bytes) of each server buffer 
  6119.  
  6120.    o serverInfo.numbigbuf  Number of 64KB server buffers that are provided 
  6121.  
  6122.    o serverInfo.numfiletasks  Number of processes that can access the operating 
  6123.      system at one time 
  6124.  
  6125.    o serverInfo.alertsched  The alert interval for notifying an administrator 
  6126.      of a network event 
  6127.  
  6128.    o serverInfo.erroralert  The number of entries that can be written to the 
  6129.      error log file during a interval before notifying an administrator 
  6130.  
  6131.    o serverInfo.logonalert  The number of failed logon attempts to allow a user 
  6132.      before notifying an administrator 
  6133.  
  6134.    o serverInfo.accessalert  The number of failed file accesses to allow before 
  6135.      issuing an administrative alert 
  6136.  
  6137.    o serverInfo.diskalert  The number of kilobytes of free disk space, at 
  6138.      which, an administrator must be notified that the free space is low 
  6139.  
  6140.    o serverInfo.maxauditsz  Maximum audit file size 
  6141.  
  6142.    o serverInfo.srvheuristics  The server heuristics settings 
  6143.  
  6144.    o serverInfo.auditedevents  The audit events setting. This value is 
  6145.      unformatted and is presented hexadecimal 
  6146.  
  6147.    o serverInfo.autoprofile  The server auto profile setting 
  6148.  
  6149.    o serverInfo.autopath  The server autoprofile location 
  6150.  
  6151. SrvName           The server name 
  6152.  
  6153. Note 
  6154.  
  6155. The server name can be specified as '' for a local server or computer. 
  6156.  
  6157. Example 
  6158.  
  6159.  
  6160. /* Get server information */
  6161. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6162. call LoadLs30utFuncs
  6163.  
  6164. NETSERVER = 160
  6165. SrvName = '\\ILIDC'
  6166.  
  6167. myRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
  6168.  
  6169. if myRc <> '0' then do
  6170.  say 'Got error from NetGetInfo() ' myRc
  6171.  call DropLs30utFuncs
  6172.  exit 9
  6173. end
  6174.  
  6175. say
  6176. say 'Server name:                         ' serverInfo.name
  6177. say 'Major version (Version):             ' serverInfo.version_major
  6178. say 'Minor version (Release):             ' serverInfo.version_minor
  6179. say 'Server type:                         ' serverInfo.type
  6180. say 'Comment:                             ' serverInfo.comment
  6181. say 'Users list last changed:             ' serverInfo.ulist_mtime
  6182. say 'Group list last changed:             ' serverInfo.glist_mtime
  6183. say 'Access Control list last changed:    ' serverInfo.alist_mtime
  6184. say 'Maximum number of users:             ' serverInfo.users
  6185. say 'Auto-disconnect value:               ' serverInfo.disc
  6186. say 'Send server alerts to:               ' serverInfo.alerts
  6187. say 'Server security type:                ' serverInfo.security
  6188. say 'Auditing setting:                    ' serverInfo.auditing
  6189. say 'Maximum number administrators:       ' serverInfo.numadmin
  6190. say 'LAN mask setting:                    ' serverInfo.lanmask
  6191. say 'Server hidden attribute setting:     ' serverInfo.hidden
  6192. say 'Server network announce:             ' serverInfo.announce
  6193. say 'Random announce rate delta:          ' serverInfo.anndelta
  6194. say 'Guest account name:                  ' serverInfo.guestacct
  6195. say 'Path to user directories:            ' serverInfo.userpath
  6196. say 'Maximum shared serial devices:       ' serverInfo.chdevs
  6197. say 'Maximum serial device queues:        ' serverInfo.chdevq
  6198. say 'Maximum pending serial jobs:         ' serverInfo.chdevjobs
  6199. say 'Maximum connections:                 ' serverInfo.connections
  6200. say 'Maximum shares:                      ' serverInfo.shares
  6201. say 'Maximum open file handles:           ' serverInfo.openfiles
  6202. say 'Maximum session opens:               ' serverInfo.sessopens
  6203. say 'Per Client maximum virtual circuits: ' serverInfo.sessvcs
  6204. say 'Maximum requests:                    ' serverInfo.sessreqs
  6205. say 'Maximum searches:                    ' serverInfo.opensearch
  6206. say 'Maximum locks:                       ' serverInfo.activelocks
  6207. say 'Number requester buffers:            ' serverInfo.numreqbuf
  6208. say 'Requester buffer size:               ' serverInfo.sizreqbuf
  6209. say 'Number big buffers:                  ' serverInfo.numbigbuf
  6210. say 'Number file tasks:                   ' serverInfo.numfiletasks
  6211. say 'alertsched value:                    ' serverInfo.alertsched
  6212. say 'erroralert value:                    ' serverInfo.erroralert
  6213. say 'logonalert value:                    ' serverInfo.logonalert
  6214. say 'accessalert value:                   ' serverInfo.accessalert
  6215. say 'diskalert value:                     ' serverInfo.diskalert
  6216. say 'Maximum auditing log file size:      ' serverInfo.maxauditsz
  6217. say 'srvheuristics:                       ' serverInfo.srvheuristics
  6218. say 'Audit events flags:                  ' serverInfo.auditedevents
  6219. say 'Server auto profile setting:         ' serverInfo.autoprofile
  6220. say 'Server autoprofile location:         ' serverInfo.autopath
  6221.  
  6222. call DropLs30utFuncs
  6223. call RxFuncDrop 'LoadLs30utFuncs'
  6224.  
  6225. exit 0
  6226.  
  6227. Example Output 
  6228.  
  6229.  
  6230. Server name:                          ILIDC
  6231. Major version (Version):              3
  6232. Minor version (Release):              0
  6233. Server type:                          0000002B
  6234. Comment:                              ILI netvork group Domain Controller
  6235. Users list last changed:              Never modified or unknown
  6236. Group list last changed:              Never modified or unknown
  6237. Access Control list last changed:     Wed May  5 18:30:24 1993
  6238.  
  6239. Maximum number of users:              32
  6240. Auto-disconnect value:                120
  6241. Send server alerts to:                -none-
  6242. Server security type:                 User-level
  6243. Auditing setting:                     Disabled
  6244. Maximum number administrators:        65535
  6245. LAN mask setting:                     1
  6246. Server hidden attribute setting:      Visible
  6247. Server network announce:              60
  6248. Random announce rate delta:           3000
  6249. Guest account name:                   GUEST
  6250. Path to user directories:             -none-
  6251. Maximum shared serial devices:        2
  6252. Maximum serial device queues:         2
  6253. Maximum pending serial jobs:          6
  6254. Maximum connections:                  128
  6255. Maximum shares:                       24
  6256. Maximum open file handles:            250
  6257. Maximum session opens:                80
  6258. Per Client maximum virtual circuits:  1
  6259. Maximum requests:                     50
  6260. Maximum searches:                     50
  6261. Maximum locks:                        64
  6262. Number requester buffers:             36
  6263. Requester buffer size:                4096
  6264. Number big buffers:                   12
  6265. Number file tasks:                    1
  6266. alertsched value:                     5
  6267. erroralert value:                     5
  6268. logonalert value:                     5
  6269. accessalert value:                    5
  6270. diskalert value:                      5000
  6271. Maximum auditing log file size:       100
  6272. srvheuristics:                        11110141111311001331
  6273. Audit events flags:                   0
  6274. Server auto profile setting:          Unknown
  6275. Server autoprofile location:          SRVAUTO.PRO
  6276.  
  6277.  
  6278. ΓòÉΓòÉΓòÉ 8.18. NETSERVICE Get Info ΓòÉΓòÉΓòÉ
  6279.  
  6280. The function retrieves information about a particular network service that is 
  6281. started. 
  6282.  
  6283. Syntax 
  6284.  
  6285.  
  6286. MyRc = NetGetInfo(NETSERVER, 'serviceInfo', SrvName, ServiceName)
  6287.  
  6288. Parameters 
  6289.  
  6290. The parameters specified are 
  6291.  
  6292. 'serviceInfo'     The REXX variable receiving the result. The variable is 
  6293.                   divided into: 
  6294.  
  6295.    o serviceInfo.name  The service name 
  6296.  
  6297.    o serviceInfo.status  The service status. This is a uninterpreted 
  6298.      hexadecimal value 
  6299.  
  6300.    o serviceInfo.code  The error codes when a service stops or fails to start 
  6301.      properly.  The values are a primary and secondary code 
  6302.  
  6303.    o serviceInfo.pid  The service process id 
  6304.  
  6305.    o serviceInfo.text  The service text 
  6306.  
  6307. SrvName           The server name if remote 
  6308.  
  6309. ServiceName       The service name 
  6310.  
  6311. Note 
  6312.  
  6313. The server name can be specified as '' for a local server or computer. 
  6314.  
  6315. Example 
  6316.  
  6317.  
  6318. /* Get service information */
  6319. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6320. call LoadLs30utFuncs
  6321.  
  6322. NETSERVICE = 170
  6323. SrvName = '\\FSC30DCR'
  6324. ServiceName = 'ALERTER'
  6325.  
  6326. myRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
  6327.  
  6328. if myRc <> '0' then do
  6329.  say 'Got error from NetGetInfo() ' myRc
  6330.  call DropLs30utFuncs
  6331.  exit 9
  6332. end
  6333.  
  6334. say
  6335. say 'The service name: ' serviceInfo.name
  6336. say 'Service status:   ' serviceInfo.status
  6337. say 'Service code:     ' serviceInfo.code
  6338. say 'Process id:       ' serviceInfo.pid
  6339. say 'Service text:     ' serviceInfo.text
  6340.  
  6341. call DropLs30utFuncs
  6342. call RxFuncDrop 'LoadLs30utFuncs'
  6343.  
  6344. exit 0
  6345.  
  6346. Example Output 
  6347.  
  6348.  
  6349. The service name:  ALERTER
  6350. Service status:    13
  6351. Service code:      0
  6352. Process id:        67
  6353. Service text:      -none-
  6354.  
  6355.  
  6356. ΓòÉΓòÉΓòÉ 8.19. NETSESSION Get Info ΓòÉΓòÉΓòÉ
  6357.  
  6358. The function retrieves information about a particular network service that is 
  6359. started. 
  6360.  
  6361. Syntax 
  6362.  
  6363.  
  6364. MyRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
  6365.  
  6366. Parameters 
  6367.  
  6368. The parameters specified are 
  6369.  
  6370. 'sessionInfo'     The REXX variable receiving the result. The variable is 
  6371.                   divided into: 
  6372.  
  6373.    o sessionInfo.cname  The computer name 
  6374.  
  6375.    o sessionInfo.username  The user name (Userid) 
  6376.  
  6377.    o sessionInfo.num_conns  The number of connections that have been made 
  6378.      during the session 
  6379.  
  6380.    o sessionInfo.num_opens  The number of opens that have been made during the 
  6381.      session 
  6382.  
  6383.    o sessionInfo.num_users  The number of sessions that are established between 
  6384.      the server and req 
  6385.  
  6386.    o sessionInfo.time  The number of seconds a session has been active 
  6387.  
  6388.    o sessionInfo.idle_time  The number of seconds a session has been idle 
  6389.  
  6390.    o sessionInfo.user_flags  The user flags 
  6391.  
  6392.    o sessionInfo.cltype_name  Set the name of the client types 
  6393.  
  6394. SrvName           The server name if remote 
  6395.  
  6396. ComputerName      The computer name 
  6397.  
  6398. Note 
  6399.  
  6400. The server name can be specified as '' for a local server or computer. 
  6401.  
  6402. Example 
  6403.  
  6404.  
  6405. /* Get session information */
  6406. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6407. call LoadLs30utFuncs
  6408.  
  6409. NETSESSION = 180
  6410. SrvName = '\\FSCDC'
  6411. ComputerName = '\\FSC30DCR'
  6412.  
  6413. myRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
  6414.  
  6415. if myRc <> '0' then do
  6416.  say 'Got error from NetGetInfo() ' myRc
  6417.  call DropLs30utFuncs
  6418.  exit 9
  6419. end
  6420.  
  6421. say
  6422. say 'The computer name:    ' sessionInfo.cname
  6423. say 'Userid:               ' sessionInfo.username
  6424. say 'Connections made:     ' sessionInfo.num_conns
  6425. say 'Number opens:         ' sessionInfo.num_opens
  6426. say 'Sessions established: ' sessionInfo.num_users
  6427. say 'Session time:         ' sessionInfo.time
  6428. say 'Idle time:            ' sessionInfo.idle_time
  6429. say 'User flags:           ' sessionInfo.user_flags
  6430. say 'Client type:          ' sessionInfo.cltype_name
  6431.  
  6432. call DropLs30utFuncs
  6433. call RxFuncDrop 'LoadLs30utFuncs'
  6434.  
  6435. exit 0
  6436.  
  6437. Example Output 
  6438.  
  6439.  
  6440. The computer name:     FSC30DCR
  6441. Userid:                FSCADMIN
  6442. Connections made:      3
  6443. Number opens:          1
  6444. Sessions established:  1
  6445. Session time:          176
  6446. Idle time:             0
  6447. User flags:            Unknown
  6448. Client type:           OS/2 LS 1.2
  6449.  
  6450.  
  6451. ΓòÉΓòÉΓòÉ 8.20. NETSHARE Get Info ΓòÉΓòÉΓòÉ
  6452.  
  6453. The function retrieves information about a particular shared resource on a 
  6454. server. 
  6455.  
  6456. Syntax 
  6457.  
  6458.  
  6459. MyRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
  6460.  
  6461. Parameters 
  6462.  
  6463. The parameters specified are 
  6464.  
  6465. 'shareInfo'       The REXX variable receiving the result. The variable is 
  6466.                   divided into: 
  6467.  
  6468.    o shareInfo.netname  The network name of the resource 
  6469.  
  6470.    o shareInfo.type  The share type (For example Serial Device) 
  6471.  
  6472.    o shareInfo.remark  The share remark (Comment) 
  6473.  
  6474.    o shareInfo.max_uses  The maximum number of concurrent connections that the 
  6475.      shared resource can accommodate 
  6476.  
  6477.    o shareInfo.current_uses  The number of connections that are currently made 
  6478.      to the resource 
  6479.  
  6480.    o shareInfo.path  The local path name of the shared resource. For disks, it 
  6481.      is the path being shared. For spooler queues, it is the name of the 
  6482.      spooler queue being shared. For serial device queues, it is a string of 
  6483.      one or more communication device names separated by spaces (For example, 
  6484.      COM1 COM2) 
  6485.  
  6486. SrvName           The server name if remote 
  6487.  
  6488. NetName           The network name 
  6489.  
  6490. Note 
  6491.  
  6492. The server name can be specified as '' for a local server or computer. 
  6493.  
  6494. Example 
  6495.  
  6496.  
  6497. /* Get share information */
  6498. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6499. call LoadLs30utFuncs
  6500.  
  6501. NETSHARE = 190
  6502. SrvName = '\\FSC30DCR'
  6503. NetworkName = 'FORALL'
  6504.  
  6505. myRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
  6506.  
  6507. if myRc <> '0' then do
  6508.  say 'Got error from NetGetInfo() ' myRc
  6509.  call DropLs30utFuncs
  6510.  exit 9
  6511. end
  6512.  
  6513. say
  6514. say 'Network name:        ' shareInfo.netname
  6515. say 'Share type:          ' shareInfo.type
  6516. say 'Comment:             ' shareInfo.remark
  6517. say 'Maximum uses:        ' shareInfo.max_uses
  6518. say 'Current uses:        ' shareInfo.current_uses
  6519. say 'Local resource path: ' shareInfo.path
  6520.  
  6521. call DropLs30utFuncs
  6522. call RxFuncDrop 'LoadLs30utFuncs'
  6523.  
  6524. exit 0
  6525.  
  6526. Example Output 
  6527.  
  6528.  
  6529. Network name:         FORALL
  6530. Share type:           Disk Drive
  6531. Comment:              For all users
  6532. Maximum uses:         45
  6533. Current uses:         1
  6534. Local resource path:  D:\APPS\BOOKS
  6535.  
  6536.  
  6537. ΓòÉΓòÉΓòÉ 8.21. NETSTATISTICS ΓòÉΓòÉΓòÉ
  6538.  
  6539. The function retrieves operating statistics for a service. 
  6540.  
  6541. Syntax 
  6542.  
  6543.  
  6544. MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType)
  6545.  
  6546. Parameters 
  6547.  
  6548. The parameters specified are 
  6549.  
  6550. 'statisticsInfo'  The REXX variable receiving the result. The variable is 
  6551.                   divided into two ways depending of the StatType parameter. If 
  6552.                   StatType = 0 then the requester statistics are provided. If 
  6553.                   StatType = 1 then the server statistics are provided. The 
  6554.                   returned values for requester statistics are: 
  6555.  
  6556.    o statisticsInfo.start  The time that statistics collection started or the 
  6557.      date or time that the statistics were last cleared 
  6558.  
  6559.    o statisticsInfo.numNCB_r  The number of NCBs issued (redirector) 
  6560.  
  6561.    o statisticsInfo.numNCB_s  The number of NCBs issued (server) 
  6562.  
  6563.    o statisticsInfo.numNCB_a  The number of NCBs issued (application) 
  6564.  
  6565.    o statisticsInfo.fiNCB_r  The number of NCBs that failed issue (redirector) 
  6566.  
  6567.    o statisticsInfo.fiNCB_s  The number of NCBs that failed issue (server) 
  6568.  
  6569.    o statisticsInfo.fiNCB_a  The number of NCBs that failed issue (application) 
  6570.  
  6571.    o statisticsInfo.fcNCB_r  The number of NCBs that failed completion 
  6572.      (redirector) 
  6573.  
  6574.    o statisticsInfo.fcNCB_s  The number of NCBs that failed completion (server) 
  6575.  
  6576.    o statisticsInfo.fcNCB_a  The number of NCBs that failed completion 
  6577.      (application) 
  6578.  
  6579.    o statisticsInfo.sesstart The number of requester sessions started 
  6580.  
  6581.    o statisticsInfo.sessfailcon  The number of requester session failures to 
  6582.      connect 
  6583.  
  6584.    o statisticsInfo.sessbroke  The number of failures of requester sessions 
  6585.  
  6586.    o statisticsInfo.uses  The number of requester uses 
  6587.  
  6588.    o statisticsInfo.usefail  The number of requester use failures 
  6589.  
  6590.    o statisticsInfo.autorec  The number of requester autoconnects 
  6591.  
  6592.    o statisticsInfo.bytessent_r The number of requester bytes sent to the 
  6593.      network. The representation will be floating point if the bytes send 
  6594.      exceeds 0xFFFFFFFF 
  6595.  
  6596.    o statisticsInfo.bytesrcvd_r  The number of requester bytes received from 
  6597.      the network. The representation will be floating point if the bytes 
  6598.      received exceeds 0xFFFFFFFF 
  6599.  
  6600.    o statisticsInfo.bytessent_s  The number of server bytes sent to the 
  6601.      network. The representation will be floating point if the bytes send 
  6602.      exceeds 0xFFFFFFFF 
  6603.  
  6604.    o statisticsInfo.bytesrcvd_s  The number of server bytes received from the 
  6605.      network. The representation will be floating point if the bytes received 
  6606.      exceeds 0xFFFFFFFF 
  6607.  
  6608.    o statisticsInfo.bytessent_a  The number of application bytes sent to the 
  6609.      network. The representation will be floating point if the bytes send 
  6610.      exceeds 0xFFFFFFFF 
  6611.  
  6612.    o statisticsInfo.bytesrcvd_a  The number of application bytes received from 
  6613.      the network. The representation will be floating point if the bytes 
  6614.      received exceeds 0xFFFFFFFF 
  6615.  
  6616.    o statisticsInfo.reqbufneed  The number of times the requester required a 
  6617.      request buffer but failed 
  6618.  
  6619.    o statisticsInfo.bigbufneed  The number of times the requester required a 
  6620.      big buffer but failed 
  6621.  
  6622.                   The returned values for server statistics are: 
  6623.  
  6624.    o statisticsInfo.start  The time that statistics collection started or the 
  6625.      date or time that the statistics were last cleared 
  6626.  
  6627.    o statisticsInfo.fopens  The number of server file opens.  This includes 
  6628.      opens of named pipes 
  6629.  
  6630.    o statisticsInfo.devopens  The number of server device opens 
  6631.  
  6632.    o statisticsInfo.jobsqueued  The number of server print jobs spooled 
  6633.  
  6634.    o statisticsInfo.sopens  The  number of server session starts 
  6635.  
  6636.    o statisticsInfo.stimedout  The number of server session autodisconnects 
  6637.  
  6638.    o statisticsInfo.serrorout  The number of server sessions errored out 
  6639.  
  6640.    o statisticsInfo.pwerrors  The number of server password violations 
  6641.  
  6642.    o statisticsInfo.permerrors  The number of server access permission errors 
  6643.  
  6644.    o statisticsInfo.syserrors  The number of server system errors 
  6645.  
  6646.    o statisticsInfo.bytessent  The number of server bytes sent to the network. 
  6647.      The representation will be floating point if the bytes send exceeds 
  6648.      0xFFFFFFFF 
  6649.  
  6650.    o statisticsInfo.bytesrcvd  The number of server bytes received from the 
  6651.      network. The representation will be floating point if the bytes received 
  6652.      exceeds 0xFFFFFFFF 
  6653.  
  6654.    o statisticsInfo.avresponse  The average server response time in 
  6655.      milliseconds 
  6656.  
  6657.    o statisticsInfo.reqbufneed  The number of times the server required a 
  6658.      request buffer but failed 
  6659.  
  6660.    o statisticsInfo.bigbufneed  The number of times the server required a big 
  6661.      buffer but failed 
  6662.  
  6663. ComputerName      The server name if remote 
  6664.  
  6665. StatType          Using value 0 gives requester statistics. A value 1 gives 
  6666.                   server statistics 
  6667.  
  6668. Note 
  6669.  
  6670. The server name can be specified as '' for a local server or computer. 
  6671.  
  6672. Example 
  6673.  
  6674.  
  6675. /* Get statistics information */
  6676. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6677. call LoadLs30utFuncs
  6678.  
  6679. SrvName = '\\FSC30DCR'
  6680. NETSTATISTICS        = 195
  6681. REQ_STAT             = 0
  6682. SRV_STAT             = 1
  6683.  
  6684. /* Get the requester statistics */
  6685. myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, REQ_STAT)
  6686.  
  6687. if myRc <> '0' then do
  6688.  say 'Got error from NetGetInfo() ' myRc
  6689.  call DropLs30utFuncs
  6690.  exit 9
  6691. end
  6692.  
  6693. if statisticsInfo.1 = '-none-' then do
  6694.  say statisticsInfo.1
  6695.  call DropLs30utFuncs
  6696.  exit 0
  6697. end
  6698.  
  6699. say
  6700. say "Statistics req start:       " statisticsInfo.start
  6701. say "Statistics req numNCB_r:    " statisticsInfo.numNCB_r
  6702. say "Net Statistics numNCB_s:    " statisticsInfo.numNCB_s
  6703. say "Net Statistics numNCB_a:    " statisticsInfo.numNCB_a
  6704. say "Net Statistics fiNCB_r:     " statisticsInfo.fiNCB_r
  6705. say "Net Statistics fiNCB_s:     " statisticsInfo.fiNCB_s
  6706. say "Net Statistics fiNCB_a:     " statisticsInfo.fiNCB_a
  6707. say "Net Statistics fcNCB_r:     " statisticsInfo.fcNCB_r
  6708. say "Net Statistics fcNCB_s:     " statisticsInfo.fcNCB_s
  6709. say "Net Statistics fcNCB_a:     " statisticsInfo.fcNCB_a
  6710. say "Net Statistics sesstart:    " statisticsInfo.sesstart
  6711. say "Net Statistics sessfailcon: " statisticsInfo.sessfailcon
  6712. say "Net Statistics sessbroke:   " statisticsInfo.sessbroke
  6713. say "Net Statistics uses:        " statisticsInfo.uses
  6714. say "Net Statistics usefail:     " statisticsInfo.usefail
  6715. say "Net Statistics autorec:     " statisticsInfo.autorec
  6716. say "Net Statistics bytessent_r: " statisticsInfo.bytessent_r
  6717. say "Net Statistics bytesrcvd_r: " statisticsInfo.bytesrcvd_r
  6718. say "Net Statistics bytessent_s: " statisticsInfo.bytessent_s
  6719. say "Net Statistics bytesrcvd_s: " statisticsInfo.bytesrcvd_s
  6720. say "Net Statistics bytessent_a: " statisticsInfo.bytessent_a
  6721. say "Net Statistics bytesrcvd_a: " statisticsInfo.bytesrcvd_a
  6722. say "Net Statistics reqbufneed:  " statisticsInfo.reqbufneed
  6723. say "Net Statistics bigbufneed:  " statisticsInfo.bigbufneed
  6724.  
  6725. /* The server statistics */
  6726. myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, SRV_STAT)
  6727.  
  6728. if myRc <> '0' then do
  6729.  say 'Got error from NetGetInfo() ' myRc
  6730.  call DropLs30utFuncs
  6731.  exit 9
  6732. end
  6733.  
  6734. if statisticsInfo.1 = '-none-' then do
  6735.  say statisticsInfo.1
  6736.  call DropLs30utFuncs
  6737.  exit 0
  6738. end
  6739.  
  6740. say
  6741. say "Statistics srv start:      " statisticsInfo.start
  6742. say "Statistics srv fopens:     " statisticsInfo.fopens
  6743. say "Statistics srv devopens:   " statisticsInfo.devopens
  6744. say "Statistics srv jobsqueued: " statisticsInfo.jobsqueued
  6745. say "Statistics srv sopens:     " statisticsInfo.sopens
  6746. say "Statistics srv stimedout:  " statisticsInfo.stimedout
  6747. say "Statistics srv serrorout:  " statisticsInfo.serrorout
  6748. say "Statistics srv pwerrors:   " statisticsInfo.pwerrors
  6749. say "Statistics srv permerrors: " statisticsInfo.permerrors
  6750. say "Statistics srv syserrors:  " statisticsInfo.syserrors
  6751. say "Statistics srv bytessent:  " statisticsInfo.bytessent
  6752. say "Statistics srv bytesrcvd:  " statisticsInfo.bytesrcvd
  6753. say "Statistics srv avresponse: " statisticsInfo.avresponse
  6754. say "Statistics srv reqbufneed: " statisticsInfo.reqbufneed
  6755. say "Statistics srv bigbufneed: " statisticsInfo.bigbufneed
  6756.  
  6757. call DropLs30utFuncs
  6758. call RxFuncDrop 'LoadLs30utFuncs'
  6759.  
  6760. exit 0
  6761.  
  6762. Example Output 
  6763.  
  6764.  
  6765. Statistics req start:        Thu May  6 18:19:15 1993
  6766.  
  6767. Statistics req numNCB_r:     2213
  6768. Net Statistics numNCB_s:     31
  6769. Net Statistics numNCB_a:     1410
  6770. Net Statistics fiNCB_r:      0
  6771. Net Statistics fiNCB_s:      0
  6772. Net Statistics fiNCB_a:      0
  6773. Net Statistics fcNCB_r:      0
  6774. Net Statistics fcNCB_s:      0
  6775. Net Statistics fcNCB_a:      0
  6776. Net Statistics sesstart:     7
  6777. Net Statistics sessfailcon:  0
  6778. Net Statistics sessbroke:    3
  6779. Net Statistics uses:         23
  6780. Net Statistics usefail:      0
  6781. Net Statistics autorec:      0
  6782. Net Statistics bytessent_r:  2430724
  6783. Net Statistics bytesrcvd_r:  263720
  6784. Net Statistics bytessent_s:  320
  6785. Net Statistics bytesrcvd_s:  1019
  6786. Net Statistics bytessent_a:  73113
  6787. Net Statistics bytesrcvd_a:  90194
  6788. Net Statistics reqbufneed:   0
  6789. Net Statistics bigbufneed:   0
  6790.  
  6791. Statistics srv start:       Thu May  6 20:19:21 1993
  6792.  
  6793. Statistics srv fopens:      0
  6794. Statistics srv devopens:    0
  6795. Statistics srv jobsqueued:  0
  6796. Statistics srv sopens:      2
  6797. Statistics srv stimedout:   0
  6798. Statistics srv serrorout:   0
  6799. Statistics srv pwerrors:    0
  6800. Statistics srv permerrors:  0
  6801. Statistics srv syserrors:   0
  6802. Statistics srv bytessent:   160
  6803. Statistics srv bytesrcvd:   5121
  6804. Statistics srv avresponse:  157
  6805. Statistics srv reqbufneed:  0
  6806. Statistics srv bigbufneed:  0
  6807.  
  6808.  
  6809. ΓòÉΓòÉΓòÉ 8.22. NETUSE Get Info ΓòÉΓòÉΓòÉ
  6810.  
  6811. The function retrieves information about a connection to a shared resource. 
  6812.  
  6813. Syntax 
  6814.  
  6815.  
  6816. MyRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
  6817.  
  6818. Parameters 
  6819.  
  6820. The parameters specified are 
  6821.  
  6822. 'useInfo'         The REXX variable receiving the result. The variable is 
  6823.                   divided into: 
  6824.  
  6825.    o useInfo.local  The local device name being redirected to the shared 
  6826.      resource 
  6827.  
  6828.    o useInfo.remote  The UNC name of the remote resource being accessed. The 
  6829.      string has the following form \\servername\netname. 
  6830.  
  6831.    o useInfo.password  This value is not available (N/A) 
  6832.  
  6833.    o useInfo.status  The status of the connection 
  6834.  
  6835.    o useInfo.asg_type  The resource type 
  6836.  
  6837.    o useInfo.refcount  The number of files, directories, and other processes 
  6838.      that are open on the remote resource 
  6839.  
  6840.    o useInfo.usecount  The number of uses 
  6841.  
  6842. SrvName           The server name if remote 
  6843.  
  6844. NetworkName       The network name. 
  6845.  
  6846.    o If the connection is a device name connection, then the name specified 
  6847.      must be the name of the local device 
  6848.  
  6849.    o If the connection is a UNC connection, then the name specified must be the 
  6850.      UNC name 
  6851.  
  6852. Note 
  6853.  
  6854. The server name can be specified as '' for a local server or computer. 
  6855.  
  6856. Example 
  6857.  
  6858.  
  6859. /* Get net use information */
  6860. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6861. call LoadLs30utFuncs
  6862.  
  6863. NETUSE = 270
  6864. SrvName = '\\FSC30DCR'
  6865. NetworkName = 'T:'
  6866.  
  6867. myRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
  6868.  
  6869. if myRc <> '0' then do
  6870.  say 'Got error from NetGetInfo() ' myRc
  6871.  call DropLs30utFuncs
  6872.  exit 9
  6873. end
  6874.  
  6875. say
  6876. say 'Local device name: ' useInfo.local
  6877. say 'UNC name:          ' useInfo.remote
  6878. say 'Password:          ' useInfo.password
  6879. say 'Connection status: ' useInfo.status
  6880. say 'Resource type:     ' useInfo.asg_type
  6881. say 'Open count:        ' useInfo.refcount
  6882. say 'Number uses:       ' useInfo.usecount
  6883.  
  6884. call DropLs30utFuncs
  6885. call RxFuncDrop 'LoadLs30utFuncs'
  6886.  
  6887. exit 0
  6888.  
  6889. Example Output 
  6890.  
  6891.  
  6892. Local device name:  T:
  6893. UNC name:           \\FSC30DCR\FORALL
  6894. Password:           N/A
  6895. Connection status:  Connection valid
  6896. Resource type:      Disk device
  6897. Open count:         1
  6898. Number uses:        1
  6899.  
  6900.  
  6901. ΓòÉΓòÉΓòÉ 8.23. NETAPPSEL Get Info ΓòÉΓòÉΓòÉ
  6902.  
  6903. The function retrieves information about all types of applications contained in 
  6904. the user's desktop application folders 
  6905.  
  6906. Syntax 
  6907.  
  6908.  
  6909. MyRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
  6910.  
  6911. Parameters 
  6912.  
  6913. The parameters specified are 
  6914.  
  6915. 'appSelInfo'      The REXX variable receiving the result. The variable is 
  6916.                   divided into: 
  6917.  
  6918.    o appSelInfo.count  The count of application selector entries returned 
  6919.  
  6920.    o appSelInfo.i.appname  The application name. The variable i has a value 1 
  6921.      to appSelInfo.count 
  6922.  
  6923.    o appSelInfo.i.apptype  The application type. The variable i, see above 
  6924.  
  6925. SrvName           The server name if remote 
  6926.  
  6927. UserId            The userid 
  6928.  
  6929. Note 
  6930.  
  6931. The server name can be specified as '' for a local server or computer. 
  6932.  
  6933. Example 
  6934.  
  6935.  
  6936. /* Get application selector information */
  6937. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  6938. call LoadLs30utFuncs
  6939.  
  6940. NETAPPSEL = 32
  6941. SrvName = '\\ILIDC'
  6942. UserId = 'FMAM'
  6943.  
  6944. myRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
  6945.  
  6946. if myRc <> '0' then do
  6947.  say 'Got error from NetGetInfo() ' myRc
  6948.  call DropLs30utFuncs
  6949.  exit 9
  6950. end
  6951.  
  6952. if appSelInfo.1 = '-none-' then do
  6953.  say appSelInfo.1
  6954.  call DropLs30utFuncs
  6955.  exit 0
  6956. end
  6957.  
  6958. if appSelInfo.count <> 0 then do
  6959.  say 'Number of entries: ' appSelInfo.count
  6960.  
  6961.  do i=1 to appSelInfo.count
  6962.   say
  6963.   say 'Application entry: ' i
  6964.   say 'Application Name:  ' appSelInfo.i.appname
  6965.   say 'Application type:  ' appSelInfo.i.apptype
  6966.  end
  6967.  
  6968. end
  6969.  
  6970. call DropLs30utFuncs
  6971. call RxFuncDrop 'LoadLs30utFuncs'
  6972.  
  6973. exit 0
  6974.  
  6975. Example Output 
  6976.  
  6977.  
  6978. Number of entries:  2
  6979.  
  6980. Application entry:  1
  6981. Application Name:   ALLAPPS
  6982. Application type:   Public OS/2 application
  6983.  
  6984. Application entry:  2
  6985. Application Name:   THENEW
  6986. Application type:   Public OS/2 application
  6987.  
  6988.  
  6989. ΓòÉΓòÉΓòÉ 8.24. NETUSERGROUPS Get Info ΓòÉΓòÉΓòÉ
  6990.  
  6991. The function lists the names of all groups in the user accounts subsystem (UAS) 
  6992. database to which a particular user belongs. This function is identical to 
  6993. NetEnumerate(NETUSERGROUPS). 
  6994.  
  6995. Syntax 
  6996.  
  6997.  
  6998. MyRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  6999.  
  7000. Parameters 
  7001.  
  7002. The parameters specified are 
  7003.  
  7004. 'userGroups'      The REXX variable receiving the result. The variable is 
  7005.                   divided into: 
  7006.  
  7007.    o userGroups.0  The number of groups in which the user has a entry 
  7008.  
  7009.    o userGroups.i  The actual group names 
  7010.  
  7011. SrvName           The server name if remote 
  7012.  
  7013. UserId            The userid 
  7014.  
  7015. Note 
  7016.  
  7017. The server name can be specified as '' for a local server or computer. 
  7018.  
  7019. Example 
  7020.  
  7021.  
  7022. /* Get the groups in which a user is defined */
  7023. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7024. call LoadLs30utFuncs
  7025.  
  7026. NETUSERGROUPS = 330
  7027. SrvName = '\\ILIDC'
  7028. UserId = 'FMAM'
  7029.  
  7030. myRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
  7031.  
  7032. if myRc <> '0' then do
  7033.  say 'Got error from NetGetInfo() ' myRc
  7034.  call DropLs30utFuncs
  7035.  exit 9
  7036. end
  7037.  
  7038. if userGroups.1 = '-none-' then do
  7039.  say userGroups.1
  7040.  call DropLs30utFuncs
  7041.  exit 0
  7042. end
  7043.  
  7044. if userGroups.0 <> 0 then do
  7045.  say 'Number of entries: ' userGroups.0
  7046.  say
  7047.  
  7048.  do i=1 to userGroups.0
  7049.   say 'Group Name: ' userGroups.i
  7050.  end
  7051.  
  7052. end
  7053.  
  7054. call DropLs30utFuncs
  7055. call RxFuncDrop 'LoadLs30utFuncs'
  7056.  
  7057. exit 0
  7058.  
  7059. Example Output 
  7060.  
  7061.  
  7062. Number of entries:  3
  7063.  
  7064. Group Name:  MANAGERS
  7065. Group Name:  HR_PRINT
  7066. Group Name:  USERS
  7067.  
  7068.  
  7069. ΓòÉΓòÉΓòÉ 8.25. NETUSER Get Info ΓòÉΓòÉΓòÉ
  7070.  
  7071. The function retrieves information about a particular account on a server. 
  7072.  
  7073. Syntax 
  7074.  
  7075.  
  7076. MyRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
  7077.  
  7078. Parameters 
  7079.  
  7080. The parameters specified are 
  7081.  
  7082. 'userInfo'        The REXX variable receiving the result. The variable is 
  7083.                   divided into: 
  7084.  
  7085.    o userInfo.name  The account name 
  7086.  
  7087.    o userInfo.comment  The account comment 
  7088.  
  7089.    o userInfo.usr_comment  The account comment which is a user-settable comment 
  7090.  
  7091.    o userInfo.full_name  The full name of the user 
  7092.  
  7093.    o userInfo.priv  The account privilege level 
  7094.  
  7095.    o userInfo.password_age  The password age in seconds 
  7096.  
  7097.    o userInfo.home_dir  The user home directory, if any 
  7098.  
  7099.    o userInfo.parms  The user parameters 
  7100.  
  7101.    o userInfo.last_logon  The last logon time 
  7102.  
  7103.    o userInfo.last_logoff  The last logoff time 
  7104.  
  7105.    o userInfo.bad_pw_count  The number of attempts to validate a bad password 
  7106.  
  7107.    o userInfo.num_logons  The number of successful logons 
  7108.  
  7109.    o userInfo.logon_server  The computer to handle logon requests for a user 
  7110.  
  7111.    o userInfo.country_code  The country code for the user 
  7112.  
  7113.    o userInfo.code_page  The country code page for the user 
  7114.  
  7115.    o userInfo.workstations  The workstation restriction for the user 
  7116.  
  7117.    o userInfo.max_storage  The maximum storage allotted for the home directory 
  7118.  
  7119.    o userInfo.unit_per_week  The number of hours within a week (7 * 24 = 168) 
  7120.  
  7121.    o userInfo.restricted_hours  Logon restriction on certain hours 
  7122.  
  7123.    o userInfo.i.logon_hours  The logon hours allowed. 0 means 0 to 0:59, 1 1:00 
  7124.      to 1:59. The variable i has a value from 1 to 7, where 1 is Sunday, 2 
  7125.      Monday etc.. The logon_hours are only valid if userInfo.restricted_hours 
  7126.      differs from the value '-none-' 
  7127.  
  7128. SrvName           The server name if remote 
  7129.  
  7130. UserId            The userid 
  7131.  
  7132. Note 
  7133.  
  7134. The server name can be specified as '' for a local server or computer. 
  7135.  
  7136. Example 
  7137.  
  7138.  
  7139. /* Get the user account information */
  7140. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7141. call LoadLs30utFuncs
  7142.  
  7143. NETUSER = 280
  7144. SrvName = '\\ILIDC'
  7145. UserId = 'FMAM'
  7146.  
  7147. myRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
  7148.  
  7149. if myRc <> '0' then do
  7150.  say 'Got error from NetGetInfo() ' myRc
  7151.  call DropLs30utFuncs
  7152.  exit 9
  7153. end
  7154.  
  7155. if userInfo.1 = '-none-' then do
  7156.  say userInfo.1
  7157.  call DropLs30utFuncs
  7158.  exit 0
  7159. end
  7160.  
  7161. say
  7162. say 'The account name:     ' userInfo.name
  7163. say 'Comment:              ' userInfo.comment
  7164. say 'User comment:         ' userInfo.usr_comment
  7165. say 'Full name:            ' userInfo.full_name
  7166. say 'Account privilege:    ' userInfo.priv
  7167. say 'Password age:         ' userInfo.password_age
  7168. say 'Home directory:       ' userInfo.home_dir
  7169. say 'User parameters:      ' userInfo.parms
  7170. say 'Last logon:           ' userInfo.last_logon
  7171. say 'Last logoff:          ' userInfo.last_logoff
  7172. say 'Bad password count:   ' userInfo.bad_pw_count
  7173. say 'Number logons:        ' userInfo.num_logons
  7174. say 'Logon Server:         ' userInfo.logon_server
  7175. say 'Country Code:         ' userInfo.country_code
  7176. say 'Code page:            ' userInfo.code_page
  7177. say 'Workstations allowed: ' userInfo.workstations
  7178. say 'Max. disk storage:    ' userInfo.max_storage
  7179. say 'Hours per week:       ' userInfo.units_per_week
  7180.  
  7181. if userInfo.restricted_hours <> '-none-' then do
  7182.  say
  7183.  say 'Logon hours from Sunday = 1 to Saterday = 7'
  7184.  say
  7185.  
  7186.  do i=1 to 7
  7187.   say 'Day: ' i 'Hours: ' userInfo.i.logon_hours
  7188.  end
  7189.  
  7190. end
  7191.  
  7192. call DropLs30utFuncs
  7193. call RxFuncDrop 'LoadLs30utFuncs'
  7194.  
  7195. exit 0
  7196.  
  7197. Example Output 
  7198.  
  7199.  
  7200. The account name:      FMAM
  7201. Comment:               Section Manager in N91
  7202. User comment:          -none-
  7203. Full name:             Section A Manager Mr Fm Am
  7204. Account privilege:     User
  7205. Password age:          7445
  7206. Home directory:        -none-
  7207. User parameters:       -none-
  7208. Last logon:            Unknown
  7209. Last logoff:           Unknown
  7210. Bad password count:    1
  7211. Number logons:         Unknown
  7212. Logon Server:          \\*
  7213. Country Code:          000
  7214. Code page:             0
  7215. Workstations allowed:  No Restriction
  7216. Max. disk storage:     No Limit
  7217. Hours per week:        168
  7218.  
  7219. Logon hours from Sunday = 1 to Saterday = 7
  7220.  
  7221. Day:  1 Hours:
  7222. Day:  2 Hours:   8 9 10 11 12 13 14 15 16 17
  7223. Day:  3 Hours:   8 9 10 11 12 13 14 15 16 17
  7224. Day:  4 Hours:   8 9 10 11 12 13 14 15 16 17
  7225. Day:  5 Hours:   8 9 10 11 12 13 14 15 16 17
  7226. Day:  6 Hours:   8 9 10 11 12 13 14 15 16 17
  7227. Day:  7 Hours:
  7228.  
  7229.  
  7230. ΓòÉΓòÉΓòÉ 8.26. NETLOGONASN Get Info ΓòÉΓòÉΓòÉ
  7231.  
  7232. The function retrieves information about a user logon assignments. 
  7233.  
  7234. Syntax 
  7235.  
  7236.  
  7237. MyRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
  7238.  
  7239. Parameters 
  7240.  
  7241. The parameters specified are 
  7242.  
  7243. 'logonAsnInfo'    The REXX variable receiving the result. The variable is 
  7244.                   divided into: 
  7245.  
  7246.    o logonAsnInfo.count  The count of logon assignments. If this value is equal 
  7247.      or large than 1 then following values are assigned 
  7248.  
  7249.    o logonAsnInfo.i.alias  The alias name assigned. The variable i has a value 
  7250.      from 1 to logonAsnInfo.count 
  7251.  
  7252.    o logonAsnInfo.i.type  The alias type. The variable i has a value from 1 to 
  7253.      logonAsnInfo.count 
  7254.  
  7255.    o logonAsnInfo.i.device  The local device. The variable i has a value from 1 
  7256.      to logonAsnInfo.count 
  7257.  
  7258. SrvName           The server name if remote 
  7259.  
  7260. UserId            The userid 
  7261.  
  7262. Note 
  7263.  
  7264. The server name can be specified as '' for a local server. 
  7265.  
  7266. Example 
  7267.  
  7268.  
  7269. /* Get the user logon assignments information */
  7270. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7271. call LoadLs30utFuncs
  7272.  
  7273. NETLOGONASN = 52
  7274. SrvName = '\\ILIDC'
  7275. UserId = 'FMAM'
  7276.  
  7277. myRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
  7278.  
  7279. if myRc <> '0' then do
  7280.  say 'Got error from NetGetInfo() ' myRc
  7281.  call DropLs30utFuncs
  7282.  exit 9
  7283. end
  7284.  
  7285. if logonAsnInfo.1 = '-none-' then do
  7286.  say logonAsnInfo.1
  7287.  call DropLs30utFuncs
  7288.  exit 0
  7289. end
  7290.  
  7291. say 'The number of logon assigments are: ' logonAsnInfo.count
  7292.  
  7293. do i=1 to logonAsnInfo.count
  7294.  say
  7295.  say 'The Alias assigned: ' logonAsnInfo.i.alias
  7296.  say 'Alias type:         ' logonAsnInfo.i.type
  7297.  say 'Device assigned:    ' logonAsnInfo.i.device
  7298. end
  7299.  
  7300. call DropLs30utFuncs
  7301. call RxFuncDrop 'LoadLs30utFuncs'
  7302.  
  7303. exit 0
  7304.  
  7305. Example Output 
  7306.  
  7307.  
  7308. The number of logon assigments are:  3
  7309.  
  7310. The Alias assigned:  BOOKS
  7311. Alias type:          Files alias
  7312. Device assigned:     O
  7313.  
  7314. The Alias assigned:  MYDEMO
  7315. Alias type:          Files alias
  7316. Device assigned:     P
  7317.  
  7318. The Alias assigned:  SRVCOM
  7319. Alias type:          Serial device alias
  7320. Device assigned:     COM3
  7321.  
  7322.  
  7323. ΓòÉΓòÉΓòÉ 8.27. NETUSERMODALS Get Info ΓòÉΓòÉΓòÉ
  7324.  
  7325. The function gets global modals-related information for all users and groups in 
  7326. the user accounts subsystem (UAS) database. 
  7327.  
  7328. Syntax 
  7329.  
  7330.  
  7331. MyRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
  7332.  
  7333. Parameters 
  7334.  
  7335. The parameters specified are 
  7336.  
  7337. 'userModalsInfo'  The REXX variable receiving the result. The variable is 
  7338.                   divided into: 
  7339.  
  7340.    o userModalsInfo.min_passwd_len  The minimum password length 
  7341.  
  7342.    o userModalsInfo.max_passwd_age  The maximum password age in days 
  7343.  
  7344.    o userModalsInfo.min_passwd_age  The minimum password age in days 
  7345.  
  7346.    o userModalsInfo.force_logoff  The length of time (in seconds) after the 
  7347.      valid logon hours that the user should be forced off the network 
  7348.  
  7349.    o userModalsInfo.password_hist_len  The length of the password history, that 
  7350.      is, the number of passwords in the history buffer that are scanned versus 
  7351.      the new password in a password change attempt 
  7352.  
  7353. SrvName           The server name if remote 
  7354.  
  7355. Note 
  7356.  
  7357. The server name can be specified as '' for a local server. 
  7358.  
  7359. Example 
  7360.  
  7361.  
  7362. /* Get user modals information */
  7363. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7364. call LoadLs30utFuncs
  7365.  
  7366. NETUSERMODALS = 360
  7367. SrvName = '\\ILIDC'
  7368.  
  7369. myRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
  7370.  
  7371. if myRc <> '0' then do
  7372.  say 'Got error from NetGetInfo() ' myRc
  7373.  call DropLs30utFuncs
  7374.  exit 9
  7375. end
  7376.  
  7377. if userModalsInfo.1 = '-none-' then do
  7378.  say logonAsnInfo.1
  7379.  call DropLs30utFuncs
  7380.  exit 0
  7381. end
  7382.  
  7383. say
  7384. say 'Minimum password length: ' userModalsInfo.min_passwd_len
  7385. say 'Maximum password age:    ' userModalsInfo.max_passwd_age
  7386. say 'Minimum password age:    ' userModalsInfo.min_passwd_age
  7387. say 'Forced logoff time:      ' userModalsInfo.force_logoff
  7388. say 'Password history length: ' userModalsInfo.password_hist_len
  7389.  
  7390. call DropLs30utFuncs
  7391. call RxFuncDrop 'LoadLs30utFuncs'
  7392.  
  7393. exit 0
  7394.  
  7395. Example Output 
  7396.  
  7397.  
  7398. Minimum password length:  4
  7399. Maximum password age:     Unlimited
  7400. Minimum password age:     No delay required
  7401. Forced logoff time:       Never
  7402. Password history length:  8
  7403.  
  7404.  
  7405. ΓòÉΓòÉΓòÉ 8.28. NETWKSTA Get Info ΓòÉΓòÉΓòÉ
  7406.  
  7407. The function returns information about the configuration components of the 
  7408. requester component. 
  7409.  
  7410. Syntax 
  7411.  
  7412.  
  7413. MyRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
  7414.  
  7415. Parameters 
  7416.  
  7417. The parameters specified are 
  7418.  
  7419. 'wkstaInfo'       The REXX variable receiving the result. The variable is 
  7420.                   divided into: 
  7421.  
  7422.    o wkstaInfo.computername  The computer name of the requester being queried 
  7423.  
  7424.    o wkstaInfo.username  The user's name logged on the requester 
  7425.  
  7426.    o wkstaInfo.langroup  The name of the domain to which the requester belongs 
  7427.  
  7428.    o wkstaInfo.ver_major  The major software version (Version) 
  7429.  
  7430.    o wkstaInfo.ver_minor  The minor software version (Release) 
  7431.  
  7432.    o wkstaInfo.logon_domain  The name of the domain that the user is logged on 
  7433.      to 
  7434.  
  7435.    o wkstaInfo.oth_domains  Listing of domains on which the machine is 
  7436.      currently enlisted 
  7437.  
  7438. SrvName           The server name if a remote server otherwise a null string 
  7439.                   for the local computer. 
  7440.  
  7441. Note 
  7442.  
  7443. The server name can be specified as '' for a local server. 
  7444.  
  7445. Example 
  7446.  
  7447.  
  7448. /* Get wksta information */
  7449. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7450. call LoadLs30utFuncs
  7451.  
  7452. NETWKSTA = 350
  7453. SrvName = '\\ILIDC'
  7454.  
  7455. myRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
  7456.  
  7457. if myRc <> '0' then do
  7458.  say 'Got error from NetGetInfo() ' myRc
  7459.  call DropLs30utFuncs
  7460.  exit 9
  7461. end
  7462.  
  7463. if wkstaInfo.1 = '-none-' then do
  7464.  say wkstaInfo.1
  7465.  call DropLs30utFuncs
  7466.  exit 0
  7467. end
  7468.  
  7469. say
  7470. say 'Computer Name:        ' wkstaInfo.computername
  7471. say 'User Id logged on:    ' wkstaInfo.username
  7472. say 'LAN Group:            ' wkstaInfo.langroup
  7473. say 'Major version number: ' wkstaInfo.ver_major
  7474. say 'Minor version number: ' wkstaInfo.ver_minor
  7475. say 'Logon domain:         ' wkstaInfo.logon_domain
  7476. say 'Other domains:        ' wkstaInfo.oth_domains
  7477.  
  7478. call DropLs30utFuncs
  7479. call RxFuncDrop 'LoadLs30utFuncs'
  7480.  
  7481. exit 0
  7482.  
  7483. Example Output 
  7484.  
  7485.  
  7486. Computer Name:         \\ILIDC
  7487. User Id logged on:     LINDBERG
  7488. LAN Group:             ILI
  7489. Major version number:  3
  7490. Minor version number:  0
  7491. Logon domain:          ILI
  7492. Other domains:         -none-
  7493.  
  7494.  
  7495. ΓòÉΓòÉΓòÉ 8.29. NETSERVERMODALS Get Info ΓòÉΓòÉΓòÉ
  7496.  
  7497. The function gets server modals-related information. 
  7498.  
  7499. Syntax 
  7500.  
  7501.  
  7502. MyRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
  7503.  
  7504. Parameters 
  7505.  
  7506. The parameters specified are 
  7507.  
  7508. 'serverModalsInfo' The REXX variable receiving the result. The variable is 
  7509.                   divided into: 
  7510.  
  7511.    o serModalsInfo.role  The server role 
  7512.  
  7513.    o serModalsInfo.primary  The name of the primary domain controller to which 
  7514.      the server belongs 
  7515.  
  7516. SrvName           The server name. 
  7517.  
  7518. Note 
  7519.  
  7520. The server name can be specified as '' for a local server. 
  7521.  
  7522. Example 
  7523.  
  7524.  
  7525. /* Get server modals information */
  7526. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7527. call LoadLs30utFuncs
  7528.  
  7529. NETSERVERMODALS = 370
  7530. SrvName = '\\ILIDC'
  7531.  
  7532. myRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
  7533.  
  7534. if myRc <> '0' then do
  7535.  say 'Got error from NetGetInfo() ' myRc
  7536.  call DropLs30utFuncs
  7537.  exit 9
  7538. end
  7539.  
  7540. if serverModalsInfo.1 = '-none-' then do
  7541.  say serverModalsInfo.1
  7542.  call DropLs30utFuncs
  7543.  exit 0
  7544. end
  7545.  
  7546. say
  7547. say 'Server role:            ' serverModalsInfo.role
  7548. say 'Domain Controller name: ' serverModalsInfo.primary
  7549.  
  7550. call DropLs30utFuncs
  7551. call RxFuncDrop 'LoadLs30utFuncs'
  7552.  
  7553. exit 0
  7554.  
  7555. Example Output 
  7556.  
  7557.  
  7558. Server role:             Primary server in the domain
  7559. Domain Controller name:  ILIDC
  7560.  
  7561.  
  7562. ΓòÉΓòÉΓòÉ 9. NetSetInfo ΓòÉΓòÉΓòÉ
  7563.  
  7564. The Net Set Information functions is a family of functions that can be called 
  7565. with a number of parameters. The use of the NetSetInfo has minimum two 
  7566. different parameters. The generic syntax is: 
  7567.  
  7568.  
  7569. MyRc = NetSetInfo(option, stemvar, parm1, parm2, parm3)
  7570. MyRc = NetSetInfo(option, parm1, parm2, parm3)
  7571.  
  7572. The option parameter contains a value to determine what type or option has to 
  7573. be deleted. An example would be the deletion of a user. 
  7574.  
  7575. The parm1, parm2, parm3 parameters will be dependent on the performed option. 
  7576.  
  7577. The MyRc is the return code that will have an value from the NetAdd() function. 
  7578. If the call is successful the character '0' will be returned. Otherwise an 
  7579. error code and descriptive text will be inserted by NetAdd. 
  7580.  
  7581. The option parameter values are defined in Option parameter values. 
  7582.  
  7583.  
  7584. ΓòÉΓòÉΓòÉ 9.1. NETACCESS Set Info ΓòÉΓòÉΓòÉ
  7585.  
  7586. The function modifies one or more Access Control Profiles for an existing 
  7587. Access Control List for a resource. 
  7588.  
  7589. Syntax 
  7590.  
  7591.  
  7592. MyRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
  7593.  
  7594. Parameters 
  7595.  
  7596. The parameters required are: 
  7597.  
  7598. 'ModifyACL'       The REXX variable holding the values. The variable is divided 
  7599.                   into 
  7600.  
  7601.    o ModifyACL.audit  The auditing flags. The flags are defined as: 
  7602.  
  7603.       - A  Audit all. When this bit is set, all access attempts will be 
  7604.         audited. 
  7605.  
  7606.       - O  If O, audit successful file opens. 
  7607.  
  7608.       - W  If W, audit successful file writes and successful directory creates. 
  7609.  
  7610.       - D  If D, audit successful file deletes or truncates and successful 
  7611.         directory deletes. 
  7612.  
  7613.       - P  If P, audit successful file and directory access control profile 
  7614.         change. 
  7615.  
  7616.       - o  If o, audit failed file opens. 
  7617.  
  7618.       - w  If w, audit failed file writes and failed directory creates. 
  7619.  
  7620.       - d  If d, audit failed file deletes or truncates and failed directory 
  7621.         deletes. 
  7622.  
  7623.       - p  If d, audit failed file and directory access control profile change. 
  7624.  
  7625.       - N or -none-  No auditing is performed. 
  7626.  
  7627.      If no value is specied or ModifyACL.audit is not defined, existing 
  7628.      auditing flags are not modified 
  7629.  
  7630.    o ModifyACL.count  The number of of access controls available for the 
  7631.      resource. The value can be 0 or undefined. In this case access control 
  7632.      profiles are not modified 
  7633.  
  7634.    o ModifyACL.i.ugname  The user or group name. i is a value from 1 to 
  7635.      ModifyACL.count 
  7636.  
  7637.    o ModifyACL.i.access  The access profile. i is specified as above. The 
  7638.      access control flags are as follows: 
  7639.  
  7640.       - N None 
  7641.  
  7642.       - R Read 
  7643.  
  7644.       - W Write 
  7645.  
  7646.       - C Create 
  7647.  
  7648.       - X Execute 
  7649.  
  7650.       - D Delete 
  7651.  
  7652.       - P Permissions 
  7653.  
  7654.       - G This is a Group permission. The G parameter is not required to be 
  7655.         specified 
  7656.  
  7657. SrvName           The server name 
  7658.  
  7659. resourceName      The resource name must be specified in the name format as 
  7660.                   described below: 
  7661.  
  7662.                                     Resource Type                 Name Format
  7663.                                     -------------                 -----------
  7664.                                     Drive                         drive:
  7665.                                     Path                          \path
  7666.                                     Directory                     drive:pathname
  7667.                                     File                          drive:pathname
  7668.                                     UNC                           \\server\sharename\path
  7669.                                     Pipe                          \pipe\pipename
  7670.                                     Spooler Queue                 \print\queuename
  7671.                                     Serial Device Queue           \comm\chardevqueue
  7672.  
  7673. Note 
  7674.  
  7675. The server name can be specified as '' for a local server. 
  7676.  
  7677. Example 
  7678.  
  7679.  
  7680. /* Modify existing Access Control Entry */
  7681. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7682. call LoadLs30utFuncs
  7683.  
  7684. NETACCESS = 10
  7685. SrvName = '\\ILIDC'
  7686. resourceName = 'D:\APPS\TEMP'
  7687. ModifyACL.count = 1
  7688. ModifyACL.1.ugname = 'CSUSERS'
  7689. ModifyACL.1.access = 'RWCD'
  7690.  
  7691. myRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
  7692.  
  7693. if myRc <> '0' then do
  7694.  say 'Got error from NetSetInfo() ' myRc
  7695.  call DropLs30utFuncs
  7696.  exit 9
  7697. end
  7698. else do
  7699.  say
  7700.  say "Access Control Profile modified successfully"
  7701. end
  7702.  
  7703. call DropLs30utFuncs
  7704. call RxFuncDrop 'LoadLs30utFuncs'
  7705.  
  7706. exit 0
  7707.  
  7708. Example Output 
  7709.  
  7710.  
  7711. Access Control Profile modified successfully
  7712.  
  7713.  
  7714. ΓòÉΓòÉΓòÉ 9.2. NETALIAS Set Info ΓòÉΓòÉΓòÉ
  7715.  
  7716. The function modifies a certain alias definition parameter value. 
  7717.  
  7718. Syntax 
  7719.  
  7720.  
  7721. MyRc = NetSetInfo(NETALIAS, 'PARAMETER', parmValue, SrvName, AliasName)
  7722.  
  7723. Parameters 
  7724.  
  7725. The parameters required are: 
  7726.  
  7727. 'PARAMETER'       The parameter name of the alias value to be modified. The 
  7728.                   parm values that causes a change of the alias definitions are 
  7729.                   specified below. Only one parameter value can be changed at a 
  7730.                   time. If the parameter is invalid or the parameter value is 
  7731.                   unknown or in error no changes will occour. 
  7732.  
  7733.    o remark  The alias comment or remark 
  7734.  
  7735.    o mode  When the alias is shared. Accepted values are: 
  7736.  
  7737.           When shared                   Shared mode name
  7738.           -----------                   ----------------
  7739.           At server startup             'At server startup'
  7740.                                         'STARTUP'
  7741.  
  7742.           Shared by adminstrator        'By administrator'
  7743.                                         'BYADMIN'
  7744.  
  7745.           Shared by request to use      'At Requester use'
  7746.                                         'DYNAMIC'
  7747.  
  7748.    o maxuses  The maximum number of users who can have redirection to the 
  7749.      resource identified by this alias 
  7750.  
  7751.    o path  The path for files alias only 
  7752.  
  7753.    o priority  The serial device priority 
  7754.  
  7755.    o device_pool  The serial device pool 
  7756.  
  7757. parmValue         The value of the parameter that is being modified 
  7758.  
  7759. SrvName           The server name. In this case the domain controller name 
  7760.  
  7761. AliasName         The name of the alias 
  7762.  
  7763. Note 
  7764.  
  7765. The server name can be specified as '' for a local server. 
  7766.  
  7767. Example 
  7768.  
  7769.  
  7770. /* Modify existing Alias remark, maxuses and share mode */
  7771. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7772. call LoadLs30utFuncs
  7773.  
  7774. NETALIAS  = 20
  7775. SrvName   = '\\ILIDC'
  7776. AliasName = 'BOOKS'
  7777. aliasInfo.remark  = 'Modified Alias for more uses'
  7778. aliasInfo.maxuses = 280
  7779. aliasInfo.mode    = 'At Requester use'
  7780.  
  7781. myRc = NetSetInfo(NETALIAS, 'remark', aliasInfo.remark, SrvName, AliasName)
  7782.  
  7783. if myRc <> '0' then do
  7784.  say 'Got error from NetSetInfo() ' myRc
  7785.  call DropLs30utFuncs
  7786.  exit 9
  7787. end
  7788.  
  7789. myRc = NetSetInfo(NETALIAS, 'maxuses', aliasInfo.maxuses, SrvName, AliasName)
  7790.  
  7791. if myRc <> '0' then do
  7792.  say 'Got error from NetSetInfo() ' myRc
  7793.  call DropLs30utFuncs
  7794.  exit 9
  7795. end
  7796.  
  7797. myRc = NetSetInfo(NETALIAS, 'mode', aliasInfo.mode, SrvName, AliasName)
  7798.  
  7799. if myRc <> '0' then do
  7800.  say 'Got error from NetSetInfo() ' myRc
  7801.  call DropLs30utFuncs
  7802.  exit 9
  7803. end
  7804. else do
  7805.  say
  7806.  say "Alias definition modified successfully"
  7807. end
  7808.  
  7809. call DropLs30utFuncs
  7810. call RxFuncDrop 'LoadLs30utFuncs'
  7811.  
  7812. exit 0
  7813.  
  7814. Example Output 
  7815.  
  7816.  
  7817. Alias definition modified successfully
  7818.  
  7819.  
  7820. ΓòÉΓòÉΓòÉ 9.3. NETAPP Set Info ΓòÉΓòÉΓòÉ
  7821.  
  7822. The function modifies one of the application definition parameter value. 
  7823.  
  7824. Syntax 
  7825.  
  7826.  
  7827. MyRc = NetSetInfo(NETAPP, 'PARAMETER', parmValue, SrvName, AppName, UserId)
  7828.  
  7829. Parameters 
  7830.  
  7831. The parameters required are: 
  7832.  
  7833. 'PARAMETER'       The parameter name of the application value to be modified. 
  7834.                   The parameter values that causes a change of the alias 
  7835.                   definitions are specified below. Only one parameter value can 
  7836.                   be changed at a time. If the parameter is invalid or the 
  7837.                   parameter value is unknown or in error no changes will 
  7838.                   occour. 
  7839.  
  7840.    o remark  The application comment or remark 
  7841.  
  7842.    o command  The command that starts the application 
  7843.  
  7844.    o command_parms  The application start parameters 
  7845.  
  7846. parmValue         The value of the parameter that is being modified 
  7847.  
  7848. SrvName           The server name. In this case the domain controller name 
  7849.  
  7850. AppName           The name of the application 
  7851.  
  7852. UserId            The UserId must be specified for private application. For 
  7853.                   public applications use the value '' 
  7854.  
  7855. Note 
  7856.  
  7857. The server name can be specified as '' for a local server. 
  7858.  
  7859. Example 
  7860.  
  7861.  
  7862. /* Modify existing Public application remark */
  7863. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7864. call LoadLs30utFuncs
  7865.  
  7866. NETAPP  = 30
  7867. SrvName = '\\ILIDC'
  7868. AppName = 'BOOKREAD'
  7869. UserId  = ''
  7870. appInfo.remark  = 'IBM BookManager Read/2 1.2.1'
  7871.  
  7872. myRc = NetSetInfo(NETAPP, 'remark', appInfo.remark, SrvName, AppName, UserId)
  7873.  
  7874. if myRc <> '0' then do
  7875.  say 'Got error from NetSetInfo() ' myRc
  7876.  call DropLs30utFuncs
  7877.  exit 9
  7878. end
  7879. else do
  7880.  say
  7881.  say "Application remark modified successfully"
  7882. end
  7883.  
  7884. call DropLs30utFuncs
  7885. call RxFuncDrop 'LoadLs30utFuncs'
  7886.  
  7887. exit 0
  7888.  
  7889. Example Output 
  7890.  
  7891.  
  7892. Application remark modified successfully
  7893.  
  7894.  
  7895. ΓòÉΓòÉΓòÉ 9.4. NETUSERPASSWORD Set Info ΓòÉΓòÉΓòÉ
  7896.  
  7897. The function changes a user password. 
  7898.  
  7899. Syntax 
  7900.  
  7901.  
  7902. MyRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
  7903.  
  7904. Parameters 
  7905.  
  7906. The parameters specified are: 
  7907.  
  7908. SrvName           The server name 
  7909.  
  7910. UserId            The userid to change to password on 
  7911.  
  7912. OldPw             The old password 
  7913.  
  7914. NewPw             The new password 
  7915.  
  7916. Note 
  7917.  
  7918. The server name can be specified as '' for a local server. 
  7919.  
  7920. Example 
  7921.  
  7922.  
  7923. /* Change a userid password */
  7924. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  7925. call LoadLs30utFuncs
  7926.  
  7927. NETUSERPASSWORD = 260
  7928. SrvName = '\\ILIDC'
  7929. UserId = 'WS12345'
  7930. OldPw = 'PASSWORD'
  7931. NewPw = 'NEWPASS'
  7932.  
  7933. myRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
  7934.  
  7935. if myRc <> '0' then do
  7936.  say 'Got error from NetSetInfo() ' myRc
  7937.  call DropLs30utFuncs
  7938.  exit 9
  7939. end
  7940. else do
  7941.  say 'Changed Password successfully'
  7942.  say
  7943. end
  7944.  
  7945. call DropLs30utFuncs
  7946. call RxFuncDrop 'LoadLs30utFuncs'
  7947.  
  7948. exit 0
  7949.  
  7950. Example Output 
  7951.  
  7952.  
  7953. Changed Password successfully
  7954.  
  7955.  
  7956. ΓòÉΓòÉΓòÉ 10. Option parameter values ΓòÉΓòÉΓòÉ
  7957.  
  7958. The option values defined are as follows: 
  7959.  
  7960. NETACCESS                10
  7961. NETACCESSUSERPERMS       12
  7962. NETALIAS                 20
  7963. NETAPP                   30
  7964. NETAPPSEL                32
  7965. NETCONNECTION            40
  7966. NETLOGON                 50
  7967. NETLOGONASN              52
  7968. NETFILE                  60
  7969. NETGROUP                 70
  7970. NETMESSAGENAME           80
  7971. NETBIOS                  90
  7972. NETPRINTDEST            100
  7973. NETPRINTJOB             110
  7974. NETPRINTQUEUE           120
  7975. NETCHARDEV              130
  7976. NETCHARDEVQ             140
  7977. NETSERVERDISK           150
  7978. NETSERVER               160
  7979. NETSERVICE              170
  7980. NETSESSION              180
  7981. NETSHARE                190
  7982. NETSTATISTICS           195
  7983. NETACCESSDEL            240
  7984. NETACCESSADD            250
  7985. NETUSERPASSWORD         260
  7986. NETUSE                  270
  7987. NETUSER                 280
  7988. NETPRINTPORT            300
  7989. NETPRINTDRIVER          310
  7990. NETPRINTQPROC           320
  7991. NETUSERGROUPS           330
  7992. NETGROUPUSERS           340
  7993. NETWKSTA                350
  7994. NETUSERMODALS           360
  7995. NETSERVERMODALS         370
  7996.  
  7997.  
  7998. ΓòÉΓòÉΓòÉ 11. Sample REXX Procedures ΓòÉΓòÉΓòÉ
  7999.  
  8000. This chapter describes some REXX procedures that combines a number of 
  8001. LS30UT.DLL functions into work related procedures 
  8002.  
  8003.  
  8004. ΓòÉΓòÉΓòÉ 11.1. Monitor Number Shares ΓòÉΓòÉΓòÉ
  8005.  
  8006. This function monitors the number of shares on a server. The administrator 
  8007. wanted to know if the MAXSHARES parameter was sufficient configured. 
  8008.  
  8009. NUMSHARE Procedure 
  8010.  
  8011.  
  8012. /* Display number shares on a server */
  8013. call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs
  8014. call SysLoadFuncs
  8015. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  8016. call LoadLs30utFuncs
  8017.  
  8018. NETSHARE = 190
  8019. SrvName = '\\FSCDC'
  8020. '@CLS'
  8021.  
  8022. signal on error name error
  8023. signal on halt name error
  8024. signal on syntax name error
  8025. call SysCurState OFF
  8026.  
  8027. do forever
  8028.  myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
  8029.  
  8030.  if myRc <> '0' then do
  8031.   say 'Got error from NetEnumerate() ' myRc
  8032.   call SysCurState ON
  8033.   call DropLs30utFuncs
  8034.   call SysDropFuncs
  8035.   exit 9
  8036.  end
  8037.  
  8038.  if shareInfo.1 = '-none-' then do
  8039.   say shareInfo.1
  8040.   call SysCurState ON
  8041.   call DropLs30utFuncs
  8042.   call SysDropFuncs
  8043.   exit 0
  8044.  end
  8045.  
  8046.  pos = SysCurPos(0,0)
  8047.  say 'Time:' TIME('N') 'Num shares: ' shareInfo.0
  8048.  call SysSleep 60
  8049.  
  8050. end
  8051.  
  8052. error:
  8053. call SysCurState ON
  8054. call DropLs30utFuncs
  8055. call SysDropFuncs
  8056. call RxFuncDrop 'LoadLs30utFuncs'
  8057.  
  8058. exit 0
  8059.  
  8060.  
  8061. ΓòÉΓòÉΓòÉ 12. FASTService for OS/2 ΓòÉΓòÉΓòÉ
  8062.  
  8063. The IBM FASTService for OS/2 does not have a REXX interface. This chapter 
  8064. describes a private interface that can be used to make use of some or most of 
  8065. the FASTService Software Probes. 
  8066.  
  8067. Refer to Software Probe APIs for High-Level Languages Programmer's Guide, 
  8068. Release 2, LC38-7088. 
  8069.  
  8070.  
  8071. ΓòÉΓòÉΓòÉ 12.1. FASTService interface ΓòÉΓòÉΓòÉ
  8072.  
  8073. The FASTService REXX API is a private implementation, which does follow the C 
  8074. call API. The functions implemented are: 
  8075.  
  8076. o EPVSTRT 
  8077.  
  8078. o EPVOPTQ 
  8079.  
  8080. o EPVOPTS 
  8081.  
  8082. o EPVDUMP  Currently not included. Memory leak problem 
  8083.  
  8084. o EPVKEYW 
  8085.  
  8086. o EPVMSG 
  8087.  
  8088. o EPVQUIC 
  8089.  
  8090. o EPVPROB 
  8091.  
  8092. o EPVSTOP 
  8093.  
  8094. The use of the functions is performed by a call to FASTService() with two 
  8095. parameters. The parameters are: 
  8096.  
  8097. o The FASTService function name value 
  8098.  
  8099. o The parameter list, provided by a REXX variable 
  8100.  
  8101. The call to FASTService will provide a return code. See below for an example: 
  8102.  
  8103.  
  8104. VEPVSTRT = 10
  8105. rexxVar.product_id      = 'THETHING'
  8106. rexxVar.product_version = '100'
  8107. /* More lines */
  8108.  
  8109. theRc = FASTService(VEPVSTRT, rexxVar)
  8110.  
  8111. /* Handle return code */
  8112.  
  8113.  
  8114. ΓòÉΓòÉΓòÉ 12.2. EPVSTRT ΓòÉΓòÉΓòÉ
  8115.  
  8116. Start using and define Probe global variables. 
  8117.  
  8118. Syntax 
  8119.  
  8120.  
  8121. MyRc = FASTService(VEPVSTRT, rexxVar)
  8122.  
  8123. Parameters 
  8124.  
  8125. The parameters and default values are: 
  8126.  
  8127. VEPVSTRT          The implementation value is 10 
  8128.  
  8129. rexxVar           The values of the rexxVar are: 
  8130.  
  8131.    o rexxVar.handle  The value must be 1. If not specified a default of 1 will 
  8132.      be used. The returned value must be supplied on all other calls to 
  8133.      FASTService 
  8134.  
  8135.    o rexxVar.language The value must be '01' for C interface. If not specified 
  8136.      a value of '01' will be used 
  8137.  
  8138.    o rexxVar.product_id  The product id. A value must be specified. Otherwise a 
  8139.      default of 'LS30UTIL  ' will be used 
  8140.  
  8141.    o rexxVar.product_version  If not specified a value of '100  ' will be used 
  8142.  
  8143.    o rexxVar.product_long_name  If not specied a value of 'REXX procedure' will 
  8144.      be used 
  8145.  
  8146.    o rexxVar.product_owner  If not specied the value 'IBM' will be used 
  8147.  
  8148.    o rexxVar.ffst_version  This must be specified as '1200'. If not specified 
  8149.      the value '1200' will be used 
  8150.  
  8151.    o rexxVar.application_id  If not specied a default value of 'REXXAPI' will 
  8152.      be used 
  8153.  
  8154. MyRc              The FastService or LS30UT.DLL return code 
  8155.  
  8156. Note 
  8157.  
  8158. None. 
  8159.  
  8160. Example 
  8161.  
  8162.  
  8163. /* Start using FASTService */
  8164. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  8165. call LoadLs30utFuncs
  8166.  
  8167. VEPVSTRT = 10
  8168. VEPVSTOP = 90
  8169. rexxVar.handle            = 1
  8170. rexxVar.product_id        = 'LS30UTIL    ' /* 12 chars, with last 3 blanks */
  8171. rexxVar.product_version   = '102  '        /* 5 chars, with last 2 blanks  */
  8172. rexxVar.product_long_name = 'FASTService from LS30UT.DLL'
  8173. rexxVar.product_owner     = 'IBM'
  8174. rexxVar.application_id    = 'REXXAPI'      /* Entry to PCT                 */
  8175.  
  8176. myRc = FASTService(VEPVSTRT, rexxVar)
  8177.  
  8178. if myRc <> '0' then do
  8179.  say 'Got error from FASTService() ' myRc
  8180.  myRc = FASTService(VEPVSTOP, rexxVar.handle)
  8181.  call DropLs30utFuncs
  8182.  exit 9
  8183. end
  8184. else do
  8185.  say
  8186.  say "Initiated FASTService successfully"
  8187. end
  8188.  
  8189. myRc = FASTService(VEPVSTOP, rexxVar.handle)
  8190. say 'EPVSTOP returned' myRc
  8191.  
  8192. call DropLs30utFuncs
  8193. call RxFuncDrop 'LoadLs30utFuncs'
  8194.  
  8195. exit 0
  8196.  
  8197. Example Output 
  8198.  
  8199.  
  8200. Initiated FASTService successfully
  8201. EPVSTOP returned  0
  8202.  
  8203.  
  8204. ΓòÉΓòÉΓòÉ 12.3. EPVOPTQ ΓòÉΓòÉΓòÉ
  8205.  
  8206. Turn output options on or off for quick probes. 
  8207.  
  8208. Syntax 
  8209.  
  8210.  
  8211. MyRc = FASTService(VEPVOPTQ, rexxVar)
  8212.  
  8213. Parameters 
  8214.  
  8215. The parameters and default values are: 
  8216.  
  8217. VEPVOPTQ          The implementation value is 20 
  8218.  
  8219. rexxVar           The values of the rexxVar are: 
  8220.  
  8221.    o rexxVar.handle  The handle value returned from EPVSTRT 
  8222.  
  8223.    o rexxVar.send_alert  The value can either be '0' or '1'. The default value 
  8224.      is '1' (Send alert) 
  8225.  
  8226.    o rexxVar.log_event  The value can either be '0' or '1'. The default value 
  8227.      is '1' (Create a local log entry) 
  8228.  
  8229.    o rexxVar.ffst_msgs  This value does not apply for OS/2 
  8230.  
  8231. MyRc              The FastService or LS30UT.DLL return code 
  8232.  
  8233. Note 
  8234.  
  8235. See Sample FASTService Procedure. 
  8236.  
  8237.  
  8238. ΓòÉΓòÉΓòÉ 12.4. EPVOPTS ΓòÉΓòÉΓòÉ
  8239.  
  8240. Turn output options on or off for probes and suppress dublicate dumps. 
  8241.  
  8242. Syntax 
  8243.  
  8244.  
  8245. MyRc = FASTService(VEPVOPTS, rexxVar)
  8246.  
  8247. Parameters 
  8248.  
  8249. The parameters and default values are: 
  8250.  
  8251. VEPVOPTS          The implementation value is 30 
  8252.  
  8253. rexxVar           The values of the rexxVar are: 
  8254.  
  8255.    o rexxVar.handle  The handle value returned from EPVSTRT 
  8256.  
  8257.    o rexxVar.send_alert  The value can either be '0' or '1'. The default value 
  8258.      is '1' (Send alert) 
  8259.  
  8260.    o rexxVar.send_symp_str  This value does not apply for OS/2 
  8261.  
  8262.    o rexxVar.log_event  The value can either be '0' or '1'. The default value 
  8263.      is '1' (Create a local log entry) 
  8264.  
  8265.    o rexxVar.ffst_msgs  This value does not apply for OS/2 
  8266.  
  8267.    o rexxVar.add_system_data  The value can either be '0' or '1'. The default 
  8268.      value is '0' (Do not add extended data) 
  8269.  
  8270.    o rexxVar.suppress_dup_dump  The value can either be '0' or '1'. The default 
  8271.      value is '1' (Suppress duplicate costomized dumps) 
  8272.  
  8273.    o rexxVar.keep_probe_data  The value can either be '0' or '1'. The default 
  8274.      value is '0' (Do not keep probe data) 
  8275.  
  8276. MyRc              The FastService or LS30UT.DLL return code 
  8277.  
  8278. Note 
  8279.  
  8280. See Sample FASTService Procedure. 
  8281.  
  8282.  
  8283. ΓòÉΓòÉΓòÉ 12.5. EPVDUMP ΓòÉΓòÉΓòÉ
  8284.  
  8285. Currently not included. 
  8286.  
  8287.  
  8288. ΓòÉΓòÉΓòÉ 12.6. EPVKEYW ΓòÉΓòÉΓòÉ
  8289.  
  8290. Defines the primary symptom string. 
  8291.  
  8292. Syntax 
  8293.  
  8294.  
  8295. MyRc = FASTService(VEPVKEYW, rexxVar)
  8296.  
  8297. Parameters 
  8298.  
  8299. The parameters and default values are: 
  8300.  
  8301. VEPVKEYW          The implementation value is 50 
  8302.  
  8303. rexxVar           The values of the rexxVar are: 
  8304.  
  8305.    o rexxVar.handle  The handle value returned from EPVSTRT 
  8306.  
  8307.    o rexxVar.code_point_set  The code points in the generic alert 
  8308.  
  8309.    o rexxVar.keyword1  The keyword to include in the primary symptom string 
  8310.  
  8311.    o rexxVar.keyword2  The second keyword to include in the primary symptom 
  8312.      string 
  8313.  
  8314.    o rexxVar.keyword3  The third keyword to include in the primary symptom 
  8315.      string 
  8316.  
  8317.    o rexxVar.keyword4  The fourth keyword to include in the primary symptom 
  8318.      string 
  8319.  
  8320. MyRc              The FastService or LS30UT.DLL return code 
  8321.  
  8322. Note 
  8323.  
  8324. See Sample FASTService Procedure. 
  8325.  
  8326.  
  8327. ΓòÉΓòÉΓòÉ 12.7. EPVMSG ΓòÉΓòÉΓòÉ
  8328.  
  8329. Specify a message. 
  8330.  
  8331. Syntax 
  8332.  
  8333.  
  8334. MyRc = FASTService(VEPVMSG, rexxVar)
  8335.  
  8336. Parameters 
  8337.  
  8338. The parameters and default values are: 
  8339.  
  8340. VEPVMSG           The implementation value is 60 
  8341.  
  8342. rexxVar           The values of the rexxVar are: 
  8343.  
  8344.    o rexxVar.handle  The handle value returned from EPVSTRT 
  8345.  
  8346.    o rexxVar.path  The path to the message file 
  8347.  
  8348.    o rexxVar.filename  The message file name 
  8349.  
  8350.    o rexxVar.msg_id  The message id 
  8351.  
  8352.    o rexxVar.log_msg  The value can either be '0' or '1'. The default value is 
  8353.      '1' (Log the message in the message log) 
  8354.  
  8355.    o rexxVar.disp_msg  The value can either be '0' or '1'. The default value is 
  8356.      '1' (Display the message in the message console) 
  8357.  
  8358.    o rexxVar.substitute1  Substitute input value number 1 
  8359.  
  8360.    o rexxVar.substitute2  Substitute input value number 2 
  8361.  
  8362.    o rexxVar.substitute3  Substitute input value number 3 
  8363.  
  8364.    o rexxVar.substitute4  Substitute input value number 4 
  8365.  
  8366. MyRc              The FastService or LS30UT.DLL return code 
  8367.  
  8368. Note 
  8369.  
  8370. See Sample FASTService Procedure. 
  8371.  
  8372.  
  8373. ΓòÉΓòÉΓòÉ 12.8. EPVQUIC ΓòÉΓòÉΓòÉ
  8374.  
  8375. Issue a Quick probe. 
  8376.  
  8377. Syntax 
  8378.  
  8379.  
  8380. MyRc = FASTService(VEPVQUIC, rexxVar)
  8381.  
  8382. Parameters 
  8383.  
  8384. The parameters and default values are: 
  8385.  
  8386. VEPVQUIC          The implementation value is 70 
  8387.  
  8388. rexxVar           The values of the rexxVar are: 
  8389.  
  8390.    o rexxVar.handle  The handle value returned from EPVSTRT 
  8391.  
  8392.    o rexxVar.probe_id  The probe identifier 
  8393.  
  8394. MyRc              The FastService or LS30UT.DLL return code 
  8395.  
  8396. Note 
  8397.  
  8398. See Sample FASTService Procedure. 
  8399.  
  8400.  
  8401. ΓòÉΓòÉΓòÉ 12.9. EPVPROB ΓòÉΓòÉΓòÉ
  8402.  
  8403. Issue a probe. 
  8404.  
  8405. Syntax 
  8406.  
  8407.  
  8408. MyRc = FASTService(VEPVPROB, rexxVar)
  8409.  
  8410. Parameters 
  8411.  
  8412. The parameters and default values are: 
  8413.  
  8414. VEPVPROB          The implementation value is 80 
  8415.  
  8416. rexxVar           The values of the rexxVar are: 
  8417.  
  8418.    o rexxVar.handle  The handle value returned from EPVSTRT 
  8419.  
  8420.    o rexxVar.probe_id  The probe identifier 
  8421.  
  8422.    o rexxVar.group_id  The probe group identifier 
  8423.  
  8424.    o rexxVar.msg_id  The probe message identifier in the primary symptom string 
  8425.  
  8426.    o rexxVar.unit_id  The name of the code unit containing the probe 
  8427.  
  8428.    o rexxVar.probe_description  The probe text information 
  8429.  
  8430.    o rexxVar.probe_type  The probe type field 
  8431.  
  8432.    o rexxVar.severity  The severity of the event 
  8433.  
  8434.    o rexxVar.major_error_code  The major error code 
  8435.  
  8436.    o rexxVar.minor_error_code  The minor error code 
  8437.  
  8438. MyRc              The FastService or LS30UT.DLL return code 
  8439.  
  8440. Note 
  8441.  
  8442. See Sample FASTService Procedure. 
  8443.  
  8444.  
  8445. ΓòÉΓòÉΓòÉ 12.10. EPVSTOP ΓòÉΓòÉΓòÉ
  8446.  
  8447. Stop using and free Probe global variables. 
  8448.  
  8449. Syntax 
  8450.  
  8451.  
  8452. MyRc = FASTService(VEPVSTOP, handleValue)
  8453.  
  8454. Parameters 
  8455.  
  8456. The parameters and default values are: 
  8457.  
  8458. VEPVSTOP          The implementation value is 90 
  8459.  
  8460. handleValue       The FASTService handle value which must be the returned value 
  8461.                   from EPVSTRT 
  8462.  
  8463. MyRc              The FastService or LS30UT.DLL return code 
  8464.  
  8465. Note 
  8466.  
  8467. None 
  8468.  
  8469. Example 
  8470.  
  8471.  
  8472. /* Start using FASTService */
  8473. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  8474. call LoadLs30utFuncs
  8475.  
  8476. VEPVSTRT = 10
  8477. VEPVSTOP = 90
  8478. rexxVar.handle            = 1
  8479. rexxVar.product_id        = 'LS30UTIL    ' /* 12 chars, with last 3 blanks */
  8480. rexxVar.product_version   = '102  '        /* 5 chars, with last 2 blanks  */
  8481. rexxVar.product_long_name = 'FASTService from LS30UT.DLL'
  8482. rexxVar.product_owner     = 'IBM'
  8483. rexxVar.application_id    = 'REXXAPI'      /* Entry to PCT                 */
  8484.  
  8485. myRc = FASTService(VEPVSTRT, rexxVar)
  8486.  
  8487. if myRc <> '0' then do
  8488.  say 'Got error from FASTService() ' myRc
  8489.  myRc = FASTService(VEPVSTOP, rexxVar.handle)
  8490.  call DropLs30utFuncs
  8491.  exit 9
  8492. end
  8493. else do
  8494.  say
  8495.  say "Initiated FASTService successfully"
  8496. end
  8497.  
  8498. myRc = FASTService(VEPVSTOP, rexxVar.handle)
  8499. say 'EPVSTOP returned' myRc
  8500.  
  8501. call DropLs30utFuncs
  8502. call RxFuncDrop 'LoadLs30utFuncs'
  8503.  
  8504. exit 0
  8505.  
  8506. Example Output 
  8507.  
  8508.  
  8509. Initiated FASTService successfully
  8510. EPVSTOP returned  0
  8511.  
  8512.  
  8513. ΓòÉΓòÉΓòÉ 12.11. EPV parameter values ΓòÉΓòÉΓòÉ
  8514.  
  8515. The FASTService REXX API parameter values are as follows: 
  8516.  
  8517. VEPVSTRT     10
  8518. VEPVOPTQ     20
  8519. VEPVOPTS     30
  8520. VEPVDUMP     40
  8521. VEPVKEYW     50
  8522. VEPVMSG      60
  8523. VEPVQUIC     70
  8524. VEPVPROB     80
  8525. VEPVSTOP     90
  8526.  
  8527.  
  8528. ΓòÉΓòÉΓòÉ 12.12. Sample FASTService Procedure ΓòÉΓòÉΓòÉ
  8529.  
  8530. The following procedure was used to validate the FASTService interface to REXX. 
  8531.  
  8532. Example 
  8533.  
  8534.  
  8535. /* Test the FASTService REXX interface */
  8536. call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
  8537. call LoadLs30utFuncs
  8538.  
  8539. VEPVSTRT = 10
  8540. VEPVOPTQ = 20
  8541. VEPVOPTS = 30
  8542. VEPVDUMP = 40
  8543. VEPVKEYW = 50
  8544. VEPVMSG  = 60
  8545. VEPVQUIC = 70
  8546. VEPVPROB = 80
  8547. VEPVSTOP = 90
  8548.  
  8549. rexxVar.handle          = 1
  8550. rexxVar.probe_id        = 'PROBE001'
  8551. rexxVar.ffst_version    = '1200'
  8552. rexxVar.keyword1        = 'KEYWORD/VALUE'
  8553. rexxVar.keyword2        = 'PRCS/ABGD--'
  8554. rexxVar.keyword3        = 'PRCS/AB0911'
  8555. rexxVar.keyword4        = '--KEYWRD1--'
  8556. rexxVar.language        = '01'
  8557. rexxVar.major_error_code=  4444
  8558. rexxVar.minor_error_code=  5555
  8559. rexxVar.application_id  = 'xxxx'
  8560. rexxVar.send_alert      = '1'
  8561. rexxVar.log_event       = '1'
  8562. rexxVar.add_system_data = '1'
  8563. rexxVar.keep_probe_data = '1'
  8564. rexxVar.code_point_set  = '123'
  8565. rexxVar.probe_type      = 'PROBETYPE  '
  8566. rexxVar.group_id        = 'GROUPID  '
  8567. rexxVar.unit_id         = 'UNIT_ID   '
  8568. rexxVar.probe_description = 'This is a very very very long probe description'
  8569. rexxVar.product_id      = 'TESTERPID  '
  8570. rexxVar.product_long_name = 'THIS IS THE PRODUCT LONG NAME  '
  8571. rexxVar.product_owner   = 'PRODUCT OWNER  '
  8572. rexxVar.product_version = '110  '
  8573. rexxVar.disp_msg        = 'Y'
  8574. rexxVar.path            = 'C:\OS2\SYSTEM\'
  8575. rexxVar.filename        = 'OSO001.MSG  '
  8576. rexxVar.msg_id          = 'SYS0725E  '
  8577. rexxVar.log_msg         = '1'
  8578. rexxVar.substitute1     = 'PARM1         '
  8579. rexxVar.substitute2     = 'BAD DATA      '
  8580. rexxVar.substitute3     = 'THIRD         '
  8581. rexxVar.substitute4     = '              '
  8582. rexxVar.severity        = '9'
  8583. rexxVar.suppress_dup_dump = 'N'
  8584. rexxVar.probe_type      = '1'
  8585.  
  8586. myRc = FASTService(VEPVSTRT, rexxVar)
  8587. say 'Expected 0 got ' myRc
  8588.  
  8589. say 'Test the EPVOPTQ function'
  8590. myRc = FASTService(VEPVOPTQ, rexxVar)
  8591. say 'Expected 0 got ' myRc
  8592.  
  8593. say 'Test the EPVOPTQ function'
  8594. myRc = FASTService(VEPVOPTQ, rexxVar)
  8595. say 'Expected 0 got ' myRc
  8596.  
  8597. say 'Test the EPVOPTS function'
  8598. myRc = FASTService(VEPVOPTS, rexxVar)
  8599. say 'Expected -2027151 got ' myRc
  8600.  
  8601. say 'Test the EPVKEYW function'
  8602. myRc = FASTService(VEPVKEYW, rexxVar)
  8603. say 'Expected -2043251 got ' myRc
  8604.  
  8605. say 'Test the EPVKEYW function - second pass'
  8606. rexxVar1.handle = 0
  8607. rexxVar1.code_point_set = rexxVar.code_point_set
  8608. rexxVar1.keyword1 = ''
  8609. rexxVar1.keyword2 = ''
  8610. rexxVar1.keyword3 = ''
  8611. rexxVar1.keyword4 = ''
  8612.  
  8613. myRc = FASTService(VEPVKEYW, rexxVar1)
  8614. say 'Expected -3041051 got ' myRc
  8615.  
  8616. say 'Test the EPVKEYW function - third pass'
  8617. rexxVar1.handle = rexxVar.handle
  8618. rexxVar1.code_point_set = ''
  8619. rexxVar1.keyword1 = ''
  8620. rexxVar1.keyword2 = ''
  8621. rexxVar1.keyword3 = ''
  8622. rexxVar1.keyword4 = ''
  8623.  
  8624. myRc = FASTService(VEPVKEYW, rexxVar1)
  8625. say 'Expected 0 got ' myRc
  8626.  
  8627. say 'Test the EPVMSG function'
  8628. myRc = FASTService(VEPVMSG, rexxVar)
  8629. say 'Expected -2066151 got ' myRc
  8630.  
  8631. say 'Test the EPVMSG function - second pass'
  8632. rexxVar.disp_msg = '1'
  8633. rexxVar.substitute1     = '  '
  8634. rexxVar.substitute2     = '  '
  8635. rexxVar.substitute3     = '  '
  8636. rexxVar.substitute4     = '  '
  8637. myRc = FASTService(VEPVMSG, rexxVar)
  8638. say 'Expected 0 got ' myRc
  8639.  
  8640. say 'Test the EPVPROB function'
  8641. myRc = FASTService(VEPVPROB, rexxVar)
  8642. say 'Expected -2217302 got ' myRc
  8643.  
  8644. say 'Test the EPVPROB function - second pass'
  8645. rexxVar.probe_id        = ''
  8646. rexxVar.major_error_code = ''
  8647. myRc = FASTService(VEPVPROB, rexxVar)
  8648. say 'Expected -3212056 got ' myRc
  8649.  
  8650. say 'Test the EPVPROB function - third pass'
  8651. rexxVar.probe_id        = 'PROBE001'
  8652. rexxVar.major_error_code = 4444
  8653.  
  8654. myRc = FASTService(VEPVPROB, rexxVar)
  8655. say 'Expected -2217302 got ' myRc
  8656.  
  8657. myRc = FASTService(VEPVSTOP, rexxVar.handle)
  8658. say 'EPVSTOP returned' myRc
  8659.  
  8660. call DropLs30utFuncs
  8661. call RxFuncDrop 'LoadLs30utFuncs'
  8662.  
  8663. exit 0
  8664.  
  8665. Example Output 
  8666.  
  8667.  
  8668. Expected 0 got  0
  8669. Test the EPVOPTQ function
  8670. Expected 0 got  0
  8671. Test the EPVOPTQ function
  8672. Expected 0 got  0
  8673. Test the EPVOPTS function
  8674. Expected -2027151 got  -2027151 Could not perform EPVOPTS
  8675. Test the EPVKEYW function
  8676. Expected -2043251 got  -2043251 Could not perform EPVKEYW
  8677. Test the EPVKEYW function - second pass
  8678. Expected -3041051 got  -3041051 Could not perform EPVKEYW
  8679. Test the EPVKEYW function - third pass
  8680. Expected 0 got  0
  8681. Test the EPVMSG function
  8682. Expected -2066151 got  -2066151 Could not perform EPVMSG
  8683. Test the EPVMSG function - second pass
  8684. Expected 0 got  0
  8685. Test the EPVPROB function
  8686. Expected -2217302 got  -2217302 Could not perform EPVPROB
  8687. Test the EPVPROB function - second pass
  8688. Expected -3212056 got  -3212056 Could not perform EPVPROB
  8689. Test the EPVPROB function - third pass
  8690. Expected -2217302 got  -2217302 Could not perform EPVPROB
  8691. EPVSTOP returned 0
  8692.  
  8693.