IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


NETACCESS Enumerate


The function enumerates resource names having a access permission record 
(ACP, Access Control Profile). The number of returned entries will be 
either complete or incomplete.   
Syntax 


MyRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)

  
Parameters 
The parameters specified are: 
'resourcesAcp'  The REXX variable receiving the result. The variable is 
                divided into: 
   o resourcesAcp.extend 
     This variable indicates if the list provided is either 'Complete' or 
     'Incomplete'. A incomplete list of resources having a access control 
     profile can be extended by calling the NetEnumerate with different 
     base path values 
   o resourcesAcp.0 
     The number of resources having a access control profile. If no access 
     control profiles where found, the value is 0 and the resourcesAcp.1 
     is equal to '-none-' 
   o resourcesAcp.i 
     The resources having a access control profile. The variable i has a 
     value from 1 to resourcesAcp.0. The resources listed are relative to 
     the basepath specified 
SrvName         The server computer name 
Basepath        This variable can either be '' or have a path value. See 
                below: 

                Resource Type                 Basepath Format
                -------------                 ---------------
                Directory                     drive:pathname
                File                          drive:pathname
                Pipe                          \pipe\pipename
                Spooler Queue                 \print\queuename
                Serial Device Queue           \comm\chardevqueue
                
                
  
Note 
The server computer name can be specified as '' for a local server.   
Example   


/* List resources having a access control profile */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETACCESS = 10
SrvName   = '\\DOMAIN_CONTRLR'
BasePath  = 'C:\IBMLAN'
/* BasePath = '' */

myRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)

if myRc <> '0' then do
 say 'Got error from NetEnumerate() ' myRc
 call DropLsRxutFuncs
 exit 9
end

if resourcesAcp.0 = 0 then do
 say '-none-'
 call DropLsRxutFuncs
 exit 0
end

say 'The list provided is: ' resourcesAcp.extend
say 'Number of resources having a access control profile: ' resourcesAcp.0
say
say 'The base path is: ' BasePath
say 'Resources listed are relative to the base path'
say

do i=1 to resourcesAcp.0
 say resourcesAcp.i
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   


The list provided is:  Complete
Number of resources having an access control profile:  19

The base path is:  C:\IBMLAN
Resources listed are relative to the base path

\DOSLAN\DOS
\DOSLAN\NET
\DCDB
\DCDB\DATA
\DCDB\USERS\FMAM
\BOOK
\DCDB\APPS
\DCDB\USERS\USERID\BATCH
\DCDB\USERS\LINDBERG\BATCH
\DCDB\USERS\FMAM\BATCH
\DCDB\FILES
\DCDB\LISTS
\DCDB\IMAGES
\DCDB\USERS\USERID
\DCDB\DEVICES
\NETPROG
\REPL\IMPORT\SCRIPTS
\DCDB\USERS\LINDBERG
\DCDB\PRINTERS



Inf-HTML End Run - Successful