0.9b (c) 1995 Peter Childs
The function enumerates alias names of a given type.
Syntax
MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName) MyRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName, AliasType)
Parameters
The parameters specified are:
'aliasNames' The REXX variable receiving the result. The variable is divided into:
o aliasNames.0
The number of alias names returned
o aliasNames.i
The alias name number i, where the variable i has a value from 1 to aliasNames.0.
o aliasNames.totalentries
The total number of entries available. If many entries are defined the number of entries returned (aliasNames.0) is not identical to the total numbers available
SrvName The server computer name
AliasType The AliasType can be specified as indicated below:
ALIAS_TYPE_FILE = 1 ALIAS_TYPE_PRINTER = 2 ALIAS_TYPE_SERIAL = 4
If AliasType is specified as '', it is identical as enumerate all alias names defined. This is identical as the call to NetEnumerate() without specifying a forth parameter
Note
The server computer name can be specified as '' for a local server.
Example
/* List all defined alias names (as many as possible) */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETALIAS = 20 SrvName = '\\DOMAIN_CONTRLR' myRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName) if myRc <> 0 then do say 'Got error from NetEnumerate() ' myRc call DropLsRxutFuncs exit 9 end if aliasNames.0 = 0 then do say '-none-' call DropLsRxutFuncs exit 0 end say 'Number of alias names: ' aliasNames.0 say 'Total number of alias: ' aliasNames.totalentries say do i=1 to aliasNames.0 say aliasNames.i end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Number of alias names: 7280 Total number of alias: 8301 APPL-CAM APPL-DRW APPL-EXL APPL-FLG APPL-LPX APPL-P2P APPL-P38 APPL-PNT
Inf-HTML End Run - Successful