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
Wrap
OS/2 Help File
|
1993-07-23
|
129KB
|
8,693 lines
ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
The IBM LAN Server 3.0 utility DLL described in IBM LAN Server 3.0 Recovery
Considerations, IBM Form number GG24-4043, has been extended with a number of
additional functions. This document describes the additional functions and
their intended use.
Written by Ingolf Lindberg, IBM Denmark, OS/2 Competency Center
ΓòÉΓòÉΓòÉ 1.1. History ΓòÉΓòÉΓòÉ
The major changes in the different versions are:
Version 1.0.0 Closed March 9th. 1993. All functions are described in
GG24-4043.
Version 1.0.1 Added Ls30utVer(), NetEnumerate() and NetGetInfo(). Added the
LS30UT.INF file. It is a draft version. It contains spelling and
wording errors.
Version 1.0.2 Added NetAdd(), NetDelete() and NetSetInfo(). An additonal alert
part was added using the IBM FASTService for OS/2, which of
cource must be installed if used. A IBM LAN Server 3.0
controlling workstation can now together with FASTService and
the addition of Remote Operations from either Extended Services
or CM/2 perform operations under control of NetView. The NetView
control is intended to be triggered by an alert, which will
trigger a NetView CLIST that performs a RUNCMD against the IBM
LAN Server 3.0 controlling workstation.
The LS30UT.INF is still having spell and wording errors.
ΓòÉΓòÉΓòÉ 1.2. The Files ΓòÉΓòÉΓòÉ
The IBM LAN Server 3.0 Utility DLL package contains:
1. The LS30UT.INF file (This file)
2. An updated version of LS30UT.DLL
ΓòÉΓòÉΓòÉ 1.3. References ΓòÉΓòÉΓòÉ
The following documentation can be used for additional description of the
parameters and values used and provided in the LS30UT.DLL:
o IBM LAN Server 3.0 Application Programming Reference
o IBM LAN Server 2.0 Application Programming Reference, but not for alias and
application related calls
o IBM LAN Server 3.0 Recovery Considerations, IBM Form number GG24-4043
ΓòÉΓòÉΓòÉ 2. How to use ΓòÉΓòÉΓòÉ
The use of the LS30UT.DLL functions requires OS/2 2.0 and IBM LAN Server 3.0 or
IBM OS/2 LAN Requester 3.0.
The LS30UT.DLL must be installed in any subdirectory that is mentioned in the
CONFIG.SYS LIBPATH= parameter.
To validate the correct installation of the LS30UT.DLL the following REXX
procedure can be used:
/************************************************/
Say 'Testing LS30UT.DLL access'
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
Say 'LoadLs30utFuncs is complete.'
version = Ls30utVer()
say 'Version is ' version
call DropLs30utFuncs
exit 0
An output of the test function would be like:
Testing LS30UT.DLL access
LoadLs30utFuncs is complete.
Version is 1.00.01
ΓòÉΓòÉΓòÉ 3. LS30UT.DLL Load and Drop ΓòÉΓòÉΓòÉ
To active the functions of the LS30UT.DLL must a REXX call be made to make REXX
aware of the existence of the LS30UT.DLL functions.
A similar REXX call must be made to unload or drop the LS30UT.DLL.
To provide this, two functions are implemented. They are:
o LoadLs30utFuncs()
o DropLs30utFuncs()
ΓòÉΓòÉΓòÉ 3.1. DropLs30utFuncs() ΓòÉΓòÉΓòÉ
Drop all functions in LS30UT.DLL
Syntax
call DropLs30utFuncs
Parameters
none
Note
The call to DropLs30utFuncs must be initiated after any use of the LS30UT.DLL
functions.
Example
/************************************************/
Say 'Testing LS30UT.DLL access'
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
Say 'LoadLs30utFuncs is complete.'
version = Ls30utVer()
say 'Version is ' version
call DropLs30utFuncs
exit 0
Example output
Testing LS30UT.DLL access
LoadLs30utFuncs is complete.
Version is 1.00.01
ΓòÉΓòÉΓòÉ 3.2. LoadLs30utFuncs() ΓòÉΓòÉΓòÉ
Register all functions in LS30UT.DLL
Syntax
call LoadLs30utFuncs
Parameters
none
Note
The call to LoadLs30utFuncs must be combined with the RxFuncAdd. The correct
sequence is:
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
Example
/************************************************/
Say 'Testing LS30UT.DLL access'
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
Say 'LoadLs30utFuncs is complete.'
version = Ls30utVer()
say 'Version is ' version
call DropLs30utFuncs
exit 0
Example output
Testing LS30UT.DLL access
LoadLs30utFuncs is complete.
Version is 1.00.01
ΓòÉΓòÉΓòÉ 4. The Base Functions ΓòÉΓòÉΓòÉ
The base functions provided in the IBM LAN Server 3.0 utility DLL are described
in detail in the IBM LAN Server 3.0 Recovery Considerations, IBM Form number
GG24-4043. For completeness a short list of those functions is included here.
GetDCName() Get The Domain Controller Name
CopyDirAcls() Copy Directory Access Control Profiles specified in the
source location to the destination location. The source
directory will be created if it does not exist. Local
support only.
DumpAllUsers() Dump all users defined to a binary file.
DumpUser() Dump user specified to a binary file.
InsertAllUsers() From dump file reestablish all user definitions. A new
password must be supplied.
QueryDirAliasPath() Query the path of a directory alias
MoveDirAlias() Move a directory alias to a new location
SetLogonAsn() Set logon assignment for a user
GetLogonAsn() Get logon assignments for a user
NetEnum() Enumerate some NET provided information
GetLogonAsnAcp() Get logon assignment access control profiles
ΓòÉΓòÉΓòÉ 5. NetAdd ΓòÉΓòÉΓòÉ
The Net Add functions is a family of functions that can be called with a number
of parameters. The use of the NetAdd has minimum two different parameters. The
generic syntax is:
MyRc = NetAdd(option, 'stemvar', parm1, parm2, parm3)
MyRc = NetAdd(option, parm1, parm2, parm3)
The option parameter contains a value to determine what type or option has to
be deleted. An example would be the deletion of a user.
The parm1, parm2, parm3 parameters will be dependent on the performed option.
The MyRc is the return code that will have an value from the NetAdd() function.
If the call is successful the character '0' will be returned. Otherwise an
error code and descriptive text will be inserted by NetAdd.
The option parameter values are defined in Option parameter values.
ΓòÉΓòÉΓòÉ 5.1. NETACCESS Add ΓòÉΓòÉΓòÉ
The function creates the resource auditing entry and adds 0 or more entries in
the Access Control List for a resource.
Syntax
MyRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
Parameters
The parameters required are:
'Access' The REXX variable holding the values. The variable is divided
into
o Access.count The number of of access controls available for the resource.
The value can be 0 or undefined. In this case access control profiles are
not created
o Access.audit The auditing flags. If the variable is undefined a default
value of No auditing is used. The flags are defined as:
- A Audit all. When this bit is set, all access attempts will be
audited.
- O If O, audit successful file opens.
- W If W, audit successful file writes and successful directory creates.
- D If D, audit successful file deletes or truncates and successful
directory deletes.
- P If P, audit successful file and directory access control profile
change.
- o If o, audit failed file opens.
- w If w, audit failed file writes and failed directory creates.
- d If d, audit failed file deletes or truncates and failed directory
deletes.
- p If d, audit failed file and directory access control profile change.
- N or -none- No auditing is performed.
o Access.i.ugname The user or group name. i is a value from 1 to
Access.count
Use the group name USERS to create an access control profile for all users
o Access.i.access The access profile. i is specified as above. The access
control flags are as follows:
- N None
- R Read
- W Write
- C Create
- X Execute
- D Delete
- P Permissions
- G This is a Group permission. The G parameter is not required to be
specified
SrvName The server name
resourceName The resource name must be specified in the name format as
described below:
Resource Type Name Format
------------- -----------
Drive drive:
Path \path
Directory drive:pathname
File drive:pathname
UNC \\server\sharename\path
Pipe \pipe\pipename
Spooler Queue \print\queuename
Serial Device Queue \comm\chardevqueue
Note
The server name can be specified as '' for a local server.
Example
/* Create a access control profile for a resource */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESS = 10
SrvName = '\\ILIDC'
resourceName = 'D:\APPS\TEMP'
Access.audit = 'A'
Access.count = 2
Access.1.ugname = 'CSUSERS'
Access.1.access = 'RX'
Access.2.ugname = 'FMAM'
Access.2.access = 'RWCXDP'
myRc = NetAdd(NETACCESS, 'Access', SrvName, resourceName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say 'Access Control Profile created successfully'
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Access Control Profile created successfully
ΓòÉΓòÉΓòÉ 5.2. NETACCESSADD ΓòÉΓòÉΓòÉ
The function adds one or more Access Control Profiles to the existing Access
Control List for a resource.
Syntax
MyRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
Parameters
The parameters required are:
'AddtoACL' The REXX variable holding the values. The variable is divided
into
o AddtoACL.count The number of of access controls available for the
resource. The value can be 0 or undefined. In this case access control
profiles are not created
o AddtoACL.i.ugname The user or group name. i is a value from 1 to
AddtoACL.count
o AddtoACL.i.access The access profile. i is specified as above. The access
control flags are as follows:
- N None
- R Read
- W Write
- C Create
- X Execute
- D Delete
- P Permissions
- G This is a Group permission. The G parameter is not required to be
specified
SrvName The server name
resourceName The resource name must be specified in the name format as
described below:
Resource Type Name Format
------------- -----------
Drive drive:
Path \path
Directory drive:pathname
File drive:pathname
UNC \\server\sharename\path
Pipe \pipe\pipename
Spooler Queue \print\queuename
Serial Device Queue \comm\chardevqueue
Note
The server name can be specified as '' for a local server.
Example
/* Add another Access Control Entry to existing Access Profile List */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESSADD = 250
SrvName = '\\ILIDC'
resourceName = 'D:\APPS\TEMP'
AddtoACL.count = 1
AddtoACL.1.ugname = 'CSUSERS'
AddtoACL.1.access = 'RWC'
myRc = NetAdd(NETACCESSADD, 'AddtoACL', SrvName, resourceName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Additional Access Control Profile added successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Additional Access Control Profile added successfully
ΓòÉΓòÉΓòÉ 5.3. NETALIAS Add ΓòÉΓòÉΓòÉ
The function creates an alias definition for a resource.
Syntax
MyRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
Parameters
The parameters required are:
'AliasInfo' The REXX variable holding the alias information values. The
variable is divided into:
o AliasInfo.name The alias name
o AliasInfo.remark The alias comment or remark
o AliasInfo.server The name of the server where the resource described by
this alias resides. The server name can be different from SrvName
o AliasInfo.netname The alias name for files aliases, and the queue name for
printer and serial device aliases. This value is not used by the NetAdd()
function
o AliasInfo.location The alias location. The following values are valid:
Location location value
-------- --------------
Within the domain 'Within Domain'
'INTERNAL'
External, for DOS 'External, for DOS'
'EXTERNAL_DOS'
External, for OS/2 'External, for OS/2'
'EXTERNAL_OS2'
External, for DOS and OS/2 'External, for DOS and OS/2'
'EXTERNAL_BOTH'
The default value is 'Within Domain'
o AliasInfo.mode When the alias is shared. The following values are valid:
Sharing mode mode value
------------ ----------
At server startup 'At server startup'
'STARTUP'
By administrator 'By administrator'
'BYADMIN'
At Requester use 'At Requester use'
'DYNAMIC'
The default value is 'At Requester use'
o AliasInfo.maxuses The maximum number of users who can have redirection to
the resource identified by this alias. The default value is 65535
o AliasInfo.type The alias type. The following values are valid:
Type type value
---- ----------
Files alias 'Files'
Printer alias 'Printer'
Serial alias 'Serial'
o AliasInfo.queue The queue name for serial or printer alias only
o AliasInfo.path The path for files alias only
o AliasInfo.priority The serial device priority. The value can be from 1 to
9. 1 is the highest priority. The value of 9 will be used as default if no
value is specified
o AliasInfo.device_pool The serial device pool. LPT1 to LPT9 and COM1 to
COM9 can be used. If specified the entries are separated by a space. For
example 'COM1 COM4'
SrvName The server name (Domain controller name)
Note
The server name can be specified as '' for a local domain controller.
Example
/* Add a alias */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETALIAS = 20
SrvName = '\\ILIDC'
AliasInfo.name = 'THEBOOK'
AliasInfo.remark = 'Temporary alias'
AliasInfo.server = '\\ILIDC'
AliasInfo.location = 'Within Domain'
AliasInfo.mode = 'At Requester use'
AliasInfo.type = 'Files'
AliasInfo.path = 'D:\APPS\TEMP'
myRc = NetAdd(NETALIAS, 'AliasInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Alias added successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Alias added successfully
ΓòÉΓòÉΓòÉ 5.4. NETAPP Add ΓòÉΓòÉΓòÉ
The function creates a public or private application.
Syntax
MyRc = NetAdd(NETAPP, 'AppInfo', SrvName)
MyRc = NetAdd(NETAPP, 'AppInfo', SrvName, UserId)
Parameters
The parameters required are:
'AppInfo' The REXX variable holding the application information. The
variable is divided into:
o AppInfo.name The application name
o AppInfo.remark The application remark or description. A remark must be
provided
o AppInfo.command The command that starts the application
o AppInfo.command_parms The application start parameters if required
o AppInfo.app_alias_or_drv The alias or drive where the application
resides. It specifies a drive letter, followed by a colon (:), if the
application resides on the user's local machine or it specifies an
existing alias if the application resides on a server.
o AppInfo.app_drive Applies to DOS public applications only. It is used to
specify the drive that is current when the application runs. Valid letters
are A through X. A value of * indicates that the system should choose a
drive letter.
o AppInfo.app_path_to_dir The remaining path to the application.
o AppInfo.wrkdir_alias_or_drv Specifies the directory that is made current
when the application runs. If the working directory is on the local
machine, it specifies the drive, where the directory is located. If the
working directory is remote, it specifies an existing alias where the
directory is located.
o AppInfo.wrkdir_drive Specifies the drive that the working directory is to
be assigned to when the application is started. For OS/2 applications,
this can be any letter D through Z. For DOS applications, this can be any
letter A through X. A value of * indicates that the system should choose a
drive when the application is started.
o AppInfo.wrkdir_path_to_dir The remaining path to the working directory
o AppInfo.prompt Prompt for parameters. The following values can be used:
Prompt for parameters Value
--------------------- -----
Yes 'Prompt user for parameters'
'Yes'
No 'Do not prompt user for parameters'
'No'
The default value is 'No'.
o AppInfo.interface The interface type. The values can be:
Interface type Value
-------------- -----
Presentation Manager 'Presentation Manager'
'PM'
OS/2 Fullscreen 'Fullscreen'
'FS'
OS/2 Windowed 'Windowed'
'WIN'
The default value is 'Presentation Manager'.
o AppInfo.type The application type. The following values are used:
Application type Value
---------------- -----
Public DOS 'Public DOS application'
'PUBLIC_DOS'
Public OS/2 'Public OS/2 application'
'PUBLIC_OS2'
Private OS/2 'Private OS/2 application'
'PRIVATE_OS2'
The default value is 'Public OS/2 application'.
o AppInfo.res_count The number of application resource list entries that
follows. A value of zero indicates that the application does not require
any redirected devices when it runs.
o AppInfo.i.arl_alias The alias for the resource required by the
application. The variable i must have a value from 1 to AppInfo.res_count
o AppInfo.i.arl_device The device assigned to the resource specified. If
AppInfo.i.arl_alias specifies a files alias, AppInfo.i.arl_device must be
a drive letter followed by a colon (:). Valid drive letters for OS/2
applications are D: through Z:. Valid drive letters for DOS applications
are A: through X:. If AppInfo.i.arl_alias specifies a print alias, valid
values are LPT1 through LPT9. If AppInfo.i.arl_alias specifies a serial
device alias, valid values for AppInfo.i.arl_device are LPT1 through LPT9
and COM1 through COM9. Additionally, each application resource list entry
must have a unique value for its AppInfo.i.arl_device field. For example,
if AppInfo.i.arl_alias specifies a files alias, the drive letter specified
in the AppInfo.i.arl_device field must be different from
AppInfo.app_drive, AppInfo.wrkdir_drive, and any other
AppInfo.i.arl_device fields for files aliases. The variable i must have a
value from 1 to AppInfo.res_count
SrvName The server name
Application The application name
UserId The userid. The userid must be specified for private
applications
Note
The server name can be specified as '' for a local server.
Example
/* Add a public application */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPP = 30
SrvName = '\\ILIDC'
AppInfo.name = 'BOOKREAD'
AppInfo.remark = 'Shared Bookmanager Read/2'
AppInfo.command = 'BOOKMGR.EXE'
AppInfo.command_parms = ''
AppInfo.app_alias_or_drv = 'BOOKMGR' /* Bookmanager programs alias */
/* AppInfo.app_drive not used */
AppInfo.app_path_to_dir = '\'
AppInfo.wrkdir_alias_or_drv = 'BOOKMGR'
AppInfo.wrkdir_drive = 'R' /* Make R: the working dir */
AppInfo.wrkdir_path_to_dir = '\' /* Remaining path */
AppInfo.prompt = 'Do not prompt user for parameters'
AppInfo.interface = 'Presentation Manager'
AppInfo.type = 'Public OS/2 application'
/* The additional resources */
AppInfo.res_count = 3
AppInfo.1.arl_alias = 'SHAREDLL'
AppInfo.1.arl_device = 'Y:'
AppInfo.2.arl_alias = 'THEBOOK'
AppInfo.2.arl_device = 'Q:'
AppInfo.3.arl_alias = 'PRINTIT'
AppInfo.3.arl_device = 'LPT4'
myRc = NetAdd(NETAPP, 'AppInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Application added successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Application added successfully
ΓòÉΓòÉΓòÉ 5.5. NETGROUP Add ΓòÉΓòÉΓòÉ
The function creates a group.
Syntax
MyRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
Parameters
The parameters required are:
'groupInfo' The REXX variable holding the group information. The variable
is divided into
o groupInfo.name The group name
o groupInfo.comment The group comment or description. A default comment
will be provided if groupInfo.comment does not hold a value.
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* Create a new group with a comment */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUP = 70
SrvName = '\\ILIDC'
groupInfo.name = 'CSUSERS'
groupInfo.comment = 'The Client/Server users group'
myRc = NetAdd(NETGROUP, 'groupInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Group created successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Group created successfully
ΓòÉΓòÉΓòÉ 5.6. NETGROUPUSERS Add ΓòÉΓòÉΓòÉ
The function adds a userid to a group.
Syntax
MyRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
Parameters
The parameters required are:
SrvName The server name
GroupName The group name
UserId The userid to add
Note
The server name can be specified as '' for a local server.
Example
/* Add a userid to a group */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUPUSERS = 340
SrvName = '\\ILIDC'
GroupName = 'CS2USERS'
UserId = 'WS2332'
myRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Userid added to Group successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Userid added to Group successfully
ΓòÉΓòÉΓòÉ 5.7. NETSHARE Add ΓòÉΓòÉΓòÉ
The function adds a server share using either a alias or a shareInfo structure.
Syntax
MyRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
MyRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
Parameters
The parameters required are:
'shareInfo' The REXX variable holding the share information. The variable
is divided into:
o shareInfo.netname The netname of a resource.
It is recommended that the shareInfo.netname and the shareInfo.path be the
same for a Spooler Queue; otherwise, the result is unpredictable
o shareInfo.type The share type. The following values are used:
Share type Value
---------- -----
Disk drive 'Disk Drive'
'DISKTREE'
Spooler queue 'Spooler Queue'
'PRINTQ'
Serial device 'Serial Device'
'DEVICE'
Interprocess Communications 'Interprocess communication (IPC)'
'IPC'
o shareInfo.remark The share remark
o shareInfo.max_uses The maximum number of concurrent connections that the
shared resource can accommodate. The default value is 65535
o shareInfo.path The string containing the local path name of the shared
resource. For disks, shareInfo.path is the path being shared. For spooler
queues, shareInfo.path is the name of the spooler queue being shared. For
serial device queues, shareInfo.path is a string of one or more
communication device names separated by spaces (for example, COM1 COM2
COM6).
It is recommended that the shareInfo.netname and the shareInfo.path be the
same for a Spooler Queue; otherwise, the result is unpredictable
SrvName The server name that holds the resource to be shared
The second form of the function call is divided into:
DcName The domain controller computer name, which holds the alias
information
aliasName The alias name
NetName The share network name. For a spooler queue the Queue name
will be identical with the netname. It the value is empty,
the default Alias netname will be used. It is recommended to
use the same netname as the alias name
Note
The server and DcName can be specified as '' for a local server
Example using shareInfo structure
/* Net share add using a net share info structure */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSHARE = 190
SrvName = '\\ILIDC'
shareInfo.netname = 'TEMP'
shareInfo.type = 'Disk Drive'
shareInfo.remark = 'Temporary files share'
shareInfo.max_uses = 10
shareInfo.path = 'D:\TEMP\FILES'
myRc = NetAdd(NETSHARE, 'shareInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Resource shared successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Resource shared successfully
Example using an alias
/* Net share add using an alias */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSHARE = 190
DcName = '\\ILIDC'
aliasName = 'THEBOOK'
NetName = 'THEBOOK'
myRc = NetAdd(NETSHARE, DcName, aliasName, NetName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Resource shared successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Resource shared successfully
ΓòÉΓòÉΓòÉ 5.8. NETUSE Add ΓòÉΓòÉΓòÉ
The function adds a use to a resource using either a UNC name or an alias.
Syntax
MyRc = NetAdd(NETUSE, 'useInfo', ComputerName)
MyRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
Parameters
The parameters required are:
'useInfo' The REXX variable holding the use information. The variable
is divided into:
o useInfo.local The local device name being redirected to the shared
resource. The variable can either be a device name connection or a UNC
connection. The following format can be used:
Connection type Format
--------------- ------
Device Name D: to Z:
LPT1: to LPT9:
COM1: to COM9:
UNC ''
For UNC connections the remote parameter will be used to specify the
resource to be used
o useInfo.remote The UNC name of the remote resource being accessed.
The following UNC syntax must be used:
\\servername\sharename
The sharename is identical to the netname
o useInfo.password This password if required. A value of 'N/A' or '' will
be used as no password required. If the variable does not exist the
default default value is no password required
o useInfo.asg_type The resource type. The following values must be used:
Device type Value
----------- ------
Disk Device 'Disk device'
'DISKDEV'
Spooled device 'Spooled printer'
'SPOOLDEV'
Serial device 'Serial device'
'CHARDEV'
Interprocess communication (IPC) 'Interprocess communication (IPC)'
'IPC'
UNC where local is '' 'UNC'
ComputerName The name of the computer that performs the net use operation.
For a local workstation the value can be ''.
The second form requires that the resource specified by the alias already is
shared, otherwise a return code 67 will be returned. The second form of the
function call is divided into:
DcName The domain controller computer name, which holds the alias
information
aliasName The alias name
LocalName The local device name being redirected to the shared
resource. The variable can either be a device name connection
or a UNC connection. The following format can be used:
Connection type Format
--------------- ------
Device Name D: to Z:
LPT1: to LPT9:
COM1: to COM9:
UNC ''
For UNC connections the remote resource name will be created
from the alias
ComputerName The name of the computer that performs the net use operation.
For a local workstation the value can be ''.
Note
The ComputerName and DcName can be specified as '' for a local server
Example using useInfo structure
/* Net use add using a net use info structure */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSE = 270
ComputerName = '\\ILIDC'
useInfo.local = 'W:'
useInfo.remote = '\\ILIDC\BOOKS'
useInfo.password = ''
useInfo.asg_type = 'Disk device'
myRc = NetAdd(NETUSE, 'useInfo', ComputerName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Successfully using resource"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Successfully using resource
Example using an alias
/* Net use add using an alias */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSE = 270
DcName = '\\ILIDC'
aliasName = 'BOOKMGR'
LocalName = 'X:'
ComputerName = '\\ILIDC'
myRc = NetAdd(NETUSE, DcName, aliasName, LocalName, ComputerName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Successfully using resource"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Successfully using resource
ΓòÉΓòÉΓòÉ 5.9. NETUSER Add ΓòÉΓòÉΓòÉ
The function creates a userid entry.
Syntax
MyRc = NetAdd(NETUSER, 'userInfo', SrvName)
Parameters
The parameters required are:
'userInfo' The REXX variable holding the user account information. The
variable is divided into:
o userInfo.name The userid account name
o userInfo.password The userid account password
o userInfo.priv The userid account privilege level. The following values
can be used:
Account type Value
------------ -----
Guest 'Guest'
User 'User'
Administrator 'Admin'
o userInfo.home_dir The path to the userid home directory, if any. The
following rules apply:
This string can take one of two forms. The first form defines
the drive of the user that will be assigned to the home
directory. It can have as many as 260 bytes.
x:\machineID\y$\pathname
where x is the drive letter to be assigned, machineID is the
name of the server that holds the home directory, y is the
driver letter on the server where the home directory exists,
and pathname is the remaining path to the directory.
The second form defines a first available drive specification
for the name directory:
\\machineID\y$\pathname
where machineID, y, and pathname are defined as in the
preceding example. To define a home directory at the root of
a server's drive, omit \pathname from either of the forms
previously mentioned.
It is important to ensure that this field follows the correct
format or users may not get their home directory at logon time.
An access control profile must also be created, giving users
access to the home directory.
o userInfo.comment The userid account comment
SrvName The server name of the domain controller
Note
The server name can be specified as '' for a local server.
Example
/* Add a userid */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSER = 280
SrvName = '\\ILIDC'
userInfo.name = 'WS2221'
userInfo.password = 'PASSWORD'
userInfo.priv = 'User'
userInfo.home_dir = ''
userInfo.comment = 'WS2221 user in location N91-3161'
myRc = NetAdd(NETUSER, 'userInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "User created successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
User created successfully
ΓòÉΓòÉΓòÉ 5.10. NETAPPSEL Add ΓòÉΓòÉΓòÉ
The function adds an application to the userid application list.
Syntax
MyRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
Parameters
The parameters required are:
DcName The Domain Controller computer name
ApplicationName The name of the application
UserId The userid
AppType Application type. The following application types are
supported:
Application type Value
---------------- -----
Public DOS application 'Public DOS application'
'DOS_PUBLIC'
Public OS/2 application 'Public OS/2 application'
'OS2_PUBLIC'
Private OS/2 application 'Private OS/2 application'
'OS2_PRIVATE'
The default value is 'Public OS/2 application'.
Note
The domain controller name can be specified as '' for a local server.
If the application already is in the list, the application will not be added.
Example
/* Add a application to userid application list */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPPSEL = 32
DcName = '\\ILIDC'
ApplicationName = 'BOOKREAD'
UserId = 'WS2221'
AppType = 'Public OS/2 application'
myRc = NetAdd(NETAPPSEL, DcName, ApplicationName, UserId, AppType)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Application added successfully to user application list"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Application added successfully to user application list
ΓòÉΓòÉΓòÉ 5.11. NETLOGONASN Add ΓòÉΓòÉΓòÉ
The function adds a logon assignment for a userid.
Syntax
MyRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
Parameters
The parameters required are:
DcName The Domain Controller computer name
aliasName The name of the alias to be assigned
LocalName The device that will be assigned to the resource specified by
aliasName when the user logs on. Valid drive letters are A
through Z. The drive letter can be followed by a colon (:),
but a colon is not required. A value of * indicates that the
system will choose the first available drive. Valid print
devices are LPT1 through LPT9. Valid serial devices are LPT1
through LPT9 and COM1 through COM9. Print and serial devices
should not be followed by a colon (that is, COM1: is
considered to be an invalid serial device). If the device
field is left blank, the connection is to be deviceless.
UserId The userid
Note
The domain controller name can be specified as '' for a local server.
If the logon assignment already is in the list, the additional assignment will
not be added.
Example
/* Add a logon assignment for a userid */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETLOGONASN = 52
DcName = '\\ILIDC'
aliasName = 'BOOKS'
LocalName = 'W'
UserId = 'WS2221'
myRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
if myRc <> '0' then do
say 'Got error from NetAdd() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Logon assignment added successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Logon assignment added successfully
ΓòÉΓòÉΓòÉ 6. NetDelete ΓòÉΓòÉΓòÉ
The Net delete functions is a family of functions that can be called with a
number of parameters. The use of the NetDelete has minimum two different
parameters. The generic syntax is:
MyRc = NetDelete(option, parm1, parm2, parm3)
The option parameter contains a value to determine what type or option has to
be deleted. An example would be the deletion of a user.
The parm1, parm2, parm3 parameters will be dependent on the performed option.
The MyRc is the resturn code that will have an value from the NetDelete()
function. If the call is successful the character '0' will be returned.
Otherwise an error code and descriptive text will be inserted by NetDelete.
The option parameter values are defined in Option parameter values.
ΓòÉΓòÉΓòÉ 6.1. NETACCESS Delete ΓòÉΓòÉΓòÉ
The function deletes all access permission records for a particular shared
resource.
Syntax
MyRc = NetDelete(NETACCESS, SrvName, Path)
Parameters
The parameters specified are:
SrvName The server name
Path This variable must have a value. See below:
Resource Type Basepath Format
------------- ---------------
Drive drive:
Path \path
Directory drive:pathname
File drive:pathname
UNC \\server\sharename\path
Pipe \pipe\pipename
Spooler Queue \print\queuename
Serial Device Queue \comm\chardevqueue
Note
The server name can be specified as '' for a local server.
Example
/* Delete access control profile */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESS = 10
SrvName = '\\ILIDC'
Path = 'D:\TEMP'
myRc = NetDelete(NETACCESS, SrvName, Path)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Access Control Profile deleted'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Access Control Profile deleted
ΓòÉΓòÉΓòÉ 6.2. NETACCESSDEL ΓòÉΓòÉΓòÉ
The function deletes one access permission record for a particular existing
access control profile.
Syntax
MyRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
Parameters
The parameters specified are:
SrvName The server name
resourceName This variable must have a value. See below for accepted
values:
Resource Type Basepath Format
------------- ---------------
Drive drive:
Path \path
Directory drive:pathname
File drive:pathname
UNC \\server\sharename\path
Pipe \pipe\pipename
Spooler Queue \print\queuename
Serial Device Queue \comm\chardevqueue
ugName The user or group name
Note
The server name can be specified as '' for a local server.
Example
/* Delete access control profile entry */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESSDEL = 240
SrvName = '\\ILIDC'
resourceName = 'D:\APPS\TEMP'
ugName = 'CSUSERS'
myRc = NetDelete(NETACCESSDEL, SrvName, resourceName, ugName)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Access Control Profile Entry deleted successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Access Control Profile Entry deleted successfully
ΓòÉΓòÉΓòÉ 6.3. NETALIAS Delete ΓòÉΓòÉΓòÉ
The function deletes a alias definition.
Syntax
MyRc = NetDelete(NETALIAS, SrvName, AliasName)
Parameters
The parameters specified are:
SrvName The server name
AliasName The alias name
Note
The server name can be specified as '' for a local server.
Example
/* Delete alias definition */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETALIAS = 20
SrvName = '\\ILIDC'
AliasName = 'THEALIAS'
myRc = NetDelete(NETALIAS, SrvName, AliasName)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Alias deleted successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Alias deleted successfully
ΓòÉΓòÉΓòÉ 6.4. NETAPP Delete ΓòÉΓòÉΓòÉ
The function deletes a public or private application.
Syntax
MyRc = NetDelete(NETAPP, SrvName, PublicApp)
MyRc = NetDelete(NETAPP, SrvName, PrivateApp, UserId)
Parameters
The parameters specified are:
SrvName The server name
PublicApp Use the call to NetDelete with 3 arguments to delete a public
application
PrivateApp This is the name of a private application. It must be used
together with a UserId
UserId A userid
Note
The server name can be specified as '' for a local server.
Example
/* Delete a public application definition */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPP = 30
SrvName = '\\ILIDC'
PublicApp = 'MSAPP'
myRc = NetDelete(NETAPP, SrvName, PublicApp)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Public application deleted successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Public application deleted successfully
ΓòÉΓòÉΓòÉ 6.5. NETGROUP Delete ΓòÉΓòÉΓòÉ
The function deletes a group definition.
Syntax
MyRc = NetDelete(NETGROUP, SrvName, GroupName)
Parameters
The parameters specified are:
SrvName The server name
GroupName The name of the group definition to delete
Note
The server name can be specified as '' for a local server.
Example
/* Delete a group definition */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUP = 70
SrvName = '\\ILIDC'
GroupName = 'TMPGROUP'
myRc = NetDelete(NETGROUP, SrvName, GroupName)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Group definition deleted successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Group definition deleted successfully
ΓòÉΓòÉΓòÉ 6.6. NETGROUPUSERS Delete ΓòÉΓòÉΓòÉ
The function deletes a userid from a group definition.
Syntax
MyRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
Parameters
The parameters specified are:
SrvName The server name
GroupName The name of the group definition to delete
UserId The userid to delete from a group
Note
The server name can be specified as '' for a local server.
Example
/* Delete a group definition */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUPUSERS = 340
SrvName = '\\ILIDC'
GroupName = 'THEGROUP'
UserId = 'WS1000'
myRc = NetDelete(NETGROUPUSERS, SrvName, GroupName, UserId)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Userid deleted from group successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Userid deleted from group successfully
ΓòÉΓòÉΓòÉ 6.7. NETPRINTJOB Delete ΓòÉΓòÉΓòÉ
The function deletes a print job from a printer queue.
Syntax
MyRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
Parameters
The parameters specified are:
SrvName The server name
QueueName The name of the printer queue
JobId The job identification number
Note
The server name can be specified as '' for a local server.
Example
/* Delete a print job */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTJOB = 110
SrvName = '\\ILIDC'
QueueName = 'IBM4019L'
JobId = 6
myRc = NetDelete(NETPRINTJOB, SrvName, QueueName, JobId)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Print job deleted successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Print job deleted successfully
ΓòÉΓòÉΓòÉ 6.8. NETSESSION Delete ΓòÉΓòÉΓòÉ
The function ends a session between a requester and a server.
Syntax
MyRc = NetDelete(NETSESSION, SrvName, RequesterName)
Parameters
The parameters specified are:
SrvName The server name
RequesterName The name of the requester that established the session being
discontinued
Note
The server name can be specified as '' for a local server.
Example
/* Stop a session between a server and a requester */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSESSION = 180
SrvName = '\\ILIDC'
RequesterName = '\\TEST19'
myRc = NetDelete(NETSESSION, SrvName, RequesterName)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Session stopped successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Session stopped successfully
ΓòÉΓòÉΓòÉ 6.9. NETSHARE Delete ΓòÉΓòÉΓòÉ
The function deletes a net name from the list of shared resources of a server.
Syntax
MyRc = NetDelete(NETSHARE, SrvName, NetName)
Parameters
The parameters specified are:
SrvName The server name
NetName The network name of of shared resource
Note
The server name can be specified as '' for a local server.
Example
/* Stop sharing a shared resource */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSHARE = 190
SrvName = '\\ILIDC'
NetName = 'BOOKS'
myRc = NetDelete(NETSHARE, SrvName, NetName)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Share stopped successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Share stopped successfully
ΓòÉΓòÉΓòÉ 6.10. NETUSE Delete ΓòÉΓòÉΓòÉ
The function ends a connection between a local or UNC device name and a shared
resource.
Syntax
MyRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
Parameters
The parameters specified are:
SrvName The server name
DeviceName The device name that contains the following information:
o If the connection is a device name connection, the name specified must be
the name of the local device
o If the connection is a UNC connection (either implicit or explicit), the
name must be the UNC name
Force Is one of three values specifying the type of disconnection.
The following Force values are available:
0 USE_NOFORCE Maintains the connection in a dormant state,
decrementing the usecount. A dormant session can quickly be
activated as soon as reconnection is needed, improving system
performance
1 USE_FORCE Connection is removed only if no file, directory, or drive
is opened. The usecount is decremented for a local device name
connection and forced to 0 for a UNC connection
2 USE_LOTS_OF_FORCE All files, directories, and drives open on the
connection are forced closed
Note
The server name can be specified as '' for a local server.
Example
/* Stop using a UNC name */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSE = 270
SrvName = '\\ILIDC'
DeviceName = '\\ILIDC\BOOKS'
Force = 1
myRc = NetDelete(NETUSE, SrvName, DeviceName, Force)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Net Use stopped successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Net Use stopped successfully
ΓòÉΓòÉΓòÉ 6.11. NETUSER Delete ΓòÉΓòÉΓòÉ
The function removes an account from the user account subsystem database (UAS),
ending all access to the resources in the system.
Syntax
MyRc = NetDelete(NETUSER, SrvName, UserId)
Parameters
The parameters specified are:
SrvName The server name
UserId The userid to be deleted
Note
The server name can be specified as '' for a local server.
Example
/* Delete a userid */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSER = 280
SrvName = '\\ILIDC'
UserId = 'WS1000'
myRc = NetDelete(NETUSER, SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Userid deleted successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Net Use stopped successfully
ΓòÉΓòÉΓòÉ 6.12. NETAPPSEL Delete ΓòÉΓòÉΓòÉ
The function removes an application from the user application selector list.
Syntax
MyRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
Parameters
The parameters specified are:
SrvName The server name
UserId The userid to be deleted
ApplicationName The application name to remove from the application selection
list
Note
The server name can be specified as '' for a local server.
Example
/* Delete a application from user dekstop */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPPSEL = 32
SrvName = '\\ILIDC'
UserId = 'WS12345'
ApplicationName = 'LIVA'
myRc = NetDelete(NETAPPSEL, SrvName, UserId, ApplicationName)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Application removed from desktop successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Application removed from desktop successfully
ΓòÉΓòÉΓòÉ 6.13. NETLOGONASN Delete ΓòÉΓòÉΓòÉ
The function removes a resource from the user logon assignment list.
Syntax
MyRc = NetDelete(NETLOGONASN, SrvName, UserId, AliasName)
Parameters
The parameters specified are:
SrvName The server name
UserId The userid to be deleted
AliasName The alias name which will be removed from the logon
assignment list
Note
The server name can be specified as '' for a local server.
Example
/* Delete a logon assignment for a user */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETLOGONASN = 52
SrvName = '\\ILIDC'
UserId = 'WS12345'
Alias = 'BOOKS'
myRc = NetDelete(NETLOGONASN, SrvName, UserId, Alias)
if myRc <> '0' then do
say 'Got error from NetDelete() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Logon Assignment removed successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Logon Assignment removed successfully
ΓòÉΓòÉΓòÉ 7. NetEnumerate ΓòÉΓòÉΓòÉ
The Net enumerate functions is a family of functions that can be called with a
number of parameters. The use of the NetEnumerate has two to five different
parameters. The generic syntax is:
MyRc = NetEnumerate(option, 'StemVar', parm1, parm2, parm3)
The option parameter contains a value to determine what type or option has to
be enumerated. An example would be the enumeration of users.
The StemVar parameter is specified in quotes. It will actually contain the
resulting information from the enumeration.
The parm1, parm2, parm3 parameters will be dependent on the performed option.
The MyRc is the resturn code that will have an value from the NetEnumeration()
function. If the call is successful the character '0' will be returned.
Otherwise an error code and descriptive text will be inserted by NetEnumerate.
The option parameter values are defined in Option parameter values.
ΓòÉΓòÉΓòÉ 7.1. NETACCESS Enumerate ΓòÉΓòÉΓòÉ
The function enumerates resource names having a access permission record (ACP,
Access Control Profile).
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
o resourcesAcp.i The resources having a access control profile. i has a
value from 1 to resourcesAcp.0. The resources listed are relative to the
basepath specified
SrvName The server 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 name can be specified as '' for a local server.
Example
/* List resources having a access control profile */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESS = 10
SrvName = '\\ILIDC'
/* BasePath = '' */
BasePath = 'C:\IBMLAN'
myRc = NetEnumerate(NETACCESS, 'resourcesAcp', SrvName, BasePath)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if resourcesAcp.1 = '-none-' then do
say resourcesAcp.1
call DropLs30utFuncs
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 DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
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
ΓòÉΓòÉΓòÉ 7.2. NETALIAS Enumerate ΓòÉΓòÉΓòÉ
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 i has a value from 1 to
aliasNames.0. The returned value contains the string '-none- Alias type'
if none alias of a type was found.
SrvName The server 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 4th. parameter
Note
The server name can be specified as '' for a local server.
Example
/* List all defined alias names */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETALIAS = 20
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETALIAS, 'aliasNames', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if aliasNames.1 = '-none-' then do
say aliasNames.1
call DropLs30utFuncs
exit 0
end
say 'Number of alias names: ' aliasNames.0
say
do i=1 to aliasNames.0
say aliasNames.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of alias names: 4
BOOKS
MYDEMO
-none- Printer Alias
SRVCOM
ΓòÉΓòÉΓòÉ 7.3. NETAPP Enumerate ΓòÉΓòÉΓòÉ
The function returns the application names of a given type.
Syntax
MyRc = NetEnumerate(NETAPP, 'appNames', SrvName)
MyRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
Parameters
The parameters specified are
'appNames' The REXX variable receiving the result. The variable is
divided into:
o appNames.0 The number of application names returned
o appNames.i The application name number i, where i has a value from 1 to
appNames.0. The returned value contains the string '-none-' if no
application was found.
SrvName The server name.
UserId The UserId is specified for private application. For a list
of all public DOS and OS/2 application use
NetEnumerate(NETAPP) with 3 parameters.
Note
The server name can be specified as '' for a local server.
Example
/* List all public applications and provate applications for FMAM */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPP = 30
SrvName = '\\ILIDC'
UserId = 'FMAM'
/* Get all public application names */
myRc = NetEnumerate(NETAPP, 'appNames', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if appNames.1 = '-none-' then do
say appNames.1 'public applications defined'
end
else do
say 'Number of public applications: ' appNames.0
say
do i=1 to appNames.0
say appNames.i
end
say
end
/* Get all private application names for UserId */
myRc = NetEnumerate(NETAPP, 'appNames', SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if appNames.1 = '-none-' then do
say appNames.1 'private applications defined for ' UserId
call DropLs30utFuncs
exit 0
end
say 'Number of private applications for ' UserId 'is:' appNames.0
say
do i=1 to appNames.0
say appNames.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of public applications: 3
ALLAPPS
LANMSG
THENEW
-none- private applications defined for FMAM
ΓòÉΓòÉΓòÉ 7.4. NETCONNECTION Enumerate ΓòÉΓòÉΓòÉ
The NETCONNECTION gives a listing of connections made to a shared resource of a
server, or of all connections established from a particular computer to a
server. This function is identical to NetGetInfo(NETCONNECTION).
Syntax
MyRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
Parameters
The parameters specified are
'connInfo' The REXX variable receiving the result. The variable is
divided into
o connInfo.num_entries The number of connection information entries. Each
entry is obtained by the index i, which has a value from 1 to
connInfo.num_entries
o connInfo.i.id The connection id
o connInfo.i.type The type of connection made from the local device name to
the shared resource
o connInfo.i.num_opens The number of files that are currently open as a
result of the connection
o connInfo.i.num_users The number of users on the connection
o connInfo.i.num_users The number of users on the connection
o connInfo.i.time The number of seconds the connection has been established
o connInfo.i.username The name of the user that made the connection
o connInfo.i.netname A string indicating either the netname of the shared
resource of the server or the computer name of the requester, depending on
which name was specified as the Qualifier parameter
SrvName The server name
Qualifier An ASCIIZ string specifying either the netname of the shared
resource whose connections will be listed or the client name
of the requester whose connections to the shared resource
will be listed
Note
The server name can be specified as '' for a local server.
Example
/* Get connection information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETCONNECTION = 40
SrvName = '\\ILIDC'
Qualifier = '\\ILIDC'
myRc = NetEnumerate(NETCONNECTION, 'connInfo', SrvName, Qualifier)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if connInfo.1 <> 'CONNINFO.1' then do
say connInfo.1
call DropLs30utFuncs
exit 0
end
if connInfo.num_entries <> 0 then do
say "Number of entries: " connInfo.num_entries
do i=1 to connInfo.num_entries
say
say "Connection id: " connInfo.i.id
say "Connection type: " connInfo.i.type
say "Connection num opens: " connInfo.i.num_opens
say "Connection num users: " connInfo.i.num_users
say "Connection time: " connInfo.i.time
say "Connection user name: " connInfo.i.username
say "Connection net name: " connInfo.i.netname
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 1
Connection id: 4096
Connection type: Disk Connection
Connection num opens: 0
Connection num users: 1
Connection time: 75
Connection user name: LINDBERG
Connection net name: BOOKS
ΓòÉΓòÉΓòÉ 7.5. NETLOGON Enumerate ΓòÉΓòÉΓòÉ
The NETLOGON gives a listing of logged-on users.
Syntax
MyRc = NetEnumerate(NETLOGON, 'logonInfo')
MyRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
Parameters
The parameters specified are
'logonInfo' The REXX variable receiving the result. The variable is
divided into
o logonInfo.0 The number of user names logged-on.
o logonInfo.i The user name i, where the variable i has a value from 1 to
logonInfo.0
SrvName The server name. If the server name is '', this will be
identical as a call to NetEnumerate(NETLOGON) with only two
parameters (Local Server).
Note
The server name can be specified as '' for a local server.
Example
/* List logged-on users */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETLOGON = 50
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if logonInfo.1 = '-none-' then do
say logonInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of user entries: ' logonInfo.0
say
do i=1 to logonInfo.0
say logonInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of user entries: 1
LINDBERG
ΓòÉΓòÉΓòÉ 7.6. NETFILE Enumerate ΓòÉΓòÉΓòÉ
The NETFILE function returns information about some or all open files on the
server.
Syntax
MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName)
MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath)
MyRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
Parameters
The parameters specified are
'fileInfo' The REXX variable receiving the result. The variable is
divided into
o fileInfo.count The number of open files
o fileInfo.i.id The file id i, where the variable i has a value from 1 to
fileInfo.0
o fileInfo.i.pathname The path name i, where the variable i has a value
from 1 to fileInfo.0
SrvName The server name. If the server name is '', it is a call to
the local server
BasePath The base path to the open files. For example is 'C:\' a base
path
UserId A userid to enumerate open files on
Note
The server name can be specified as '' for a local server.
There are 3 different calls to NetEnumerate(NETFILE). They are not identical if
one or more specified parameters have the value ''.
Example
/* List open files on server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETFILE = 60
SrvName = '\\ILIDC'
BasePath = ''
UserId = 'LINDBERG'
myRc = NetEnumerate(NETFILE, 'fileInfo', SrvName, BasePath, UserId)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if fileInfo.1 = '-none-' then do
say fileInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of open file entries: ' fileInfo.count
say
do i=1 to fileInfo.count
say fileInfo.i.id fileInfo.i.pathname
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of open file entries: 14
0 D:\APPS\BOOKS\t1.dat
34 D:\APPS\BOOKS\t2.dat
65 D:\APPS\BOOKS\t3.dat
97 D:\APPS\BOOKS\t4.dat
129 D:\APPS\BOOKS\t5.dat
161 D:\APPS\BOOKS\t6.dat
193 D:\APPS\BOOKS\t7.dat
225 D:\APPS\BOOKS\t8.dat
257 D:\APPS\BOOKS\t9.dat
289 D:\APPS\BOOKS\t10.dat
321 D:\APPS\BOOKS\t11.dat
353 D:\APPS\BOOKS\t12.dat
385 D:\APPS\BOOKS\t13.dat
417 D:\APPS\BOOKS\t14.dat
ΓòÉΓòÉΓòÉ 7.7. NETGROUP Enumerate ΓòÉΓòÉΓòÉ
The function lists all group accounts on the UAS database.
Syntax
MyRc = NetEnumerate(NETGROUP, 'groupInfo')
MyRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
Parameters
The parameters specified are
'groupInfo' The REXX variable receiving the result. The variable is
divided into
o groupInfo.0 The number of groups
o groupInfo.i The group name i, where the variable i has a value from 1 to
groupInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
There call to NetEnumerate with 2 parameters is identical to the call with 3
parameters where SrvName is set to ''.
Example
/* List group names */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUP = 70
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if groupInfo.1 = '-none-' then do
say groupInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of group names: ' groupInfo.0
say
do i=1 to groupInfo.0
say groupInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of group names: 9
GROUPID
CSUSERS
SERVERS
MANAGERS
LOCAL
HR_PRINT
USERS
ADMINS
GUESTS
ΓòÉΓòÉΓòÉ 7.8. NETMESSAGENAME Enumerate ΓòÉΓòÉΓòÉ
The function lists the name entries in a message name table.
Syntax
MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo')
MyRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
Parameters
The parameters specified are
'msgNameInfo' The REXX variable receiving the result. The variable is
divided into:
o msgNameInfo.0 The number of message name entries
o msgNameInfo.i The message name entry i, where the variable i has a value
from 1 to msgNameInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
There call to NetEnumerate with 2 parameters is identical to the call with 3
parameters where SrvName is set to ''.
Example
/* List message names */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETMESSAGENAME = 80
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETMESSAGENAME, 'msgNameInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if msgNameInfo.1 = '-none-' then do
say msgNameInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of message names: ' msgNameInfo.0
say
do i=1 to msgNameInfo.0
say msgNameInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of message names: 2
ILIDC
LINDBERG
ΓòÉΓòÉΓòÉ 7.9. NETBIOS Enumerate ΓòÉΓòÉΓòÉ
The function returns information on all network device drivers installed on a
computer.
Syntax
MyRc = NetEnumerate(NETBIOS, 'netBiosInfo')
MyRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
Parameters
The parameters specified are
'netBiosInfo' The REXX variable receiving the result. The variable is
divided into:
o netBiosInfo.0 The number of netbios device drivers
o netBiosInfo.i The netbios device driver name entry i, where the variable
i has a value from 1 to netBiosInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
There call to NetEnumerate with 2 parameters is identical to the call with 3
parameters where SrvName is set to ''.
Example
/* List NetBIOS device drivers names */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETBIOS = 90
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETBIOS, 'netBiosInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if netBiosInfo.1 = '-none-' then do
say netBiosInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of NetBIOS device drivers: ' netBiosInfo.0
say
do i=1 to netBiosInfo.0
say netBiosInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of NetBIOS device drivers: 1
NETLB
ΓòÉΓòÉΓòÉ 7.10. NETPRINTDEST Enumerate ΓòÉΓòÉΓòÉ
The function returns a list of print devices.
Syntax
MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo')
MyRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
Parameters
The parameters specified are
'printDestInfo' The REXX variable receiving the result. The variable is
divided into:
o printDestInfo.0 The number of print devices
o printDestInfo.i The print device name entry i, where the variable i has a
value from 1 to printDestInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server or computer.
There call to NetEnumerate with 2 parameters is identical to the call with 3
parameters where SrvName is set to ''.
Example
/* List print device names */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTDEST = 100
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETPRINTDEST, 'printDestInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if printDestInfo.1 = '-none-' then do
say printDestInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of print devices: ' printDestInfo.0
say
do i=1 to printDestInfo.0
say printDestInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of print devices: 1
IBM4019L
ΓòÉΓòÉΓòÉ 7.11. NETPRINTJOB Enumerate ΓòÉΓòÉΓòÉ
The function returns a list of jobs in a print queue.
Syntax
MyRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
Parameters
The parameters specified are
'printJobInfo' The REXX variable receiving the result. The variable is
divided into:
o printJobInfo.count The number of print jobs in the queue
o printJobInfo.i.JobId The print job identification entry i, where the
variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.UserName The userid entry i, where the variable i has a
value from 1 to printJobInfo.count
o printJobInfo.i.Document The document name entry i, where the variable i
has a value from 1 to printJobInfo.count
SrvName The server name
QueueName The queue name, which must be supplied
Note
The server name can be specified as '' for a local server or computer.
Example
/* List print jobs on a print queue */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTJOB = 110
SrvName = '\\ILIDC'
QueueName = 'IBM4019L'
myRc = NetEnumerate(NETPRINTJOB, 'printJobInfo', SrvName, QueueName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if printJobInfo.1 = '-none-' then do
say printJobInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of print jobs: ' printJobInfo.count
do i=1 to printJobInfo.count
say
say 'Job Id: ' printJobInfo.i.JobId
say 'Userid: ' printJobInfo.i.UserName
say 'Document name: ' printJobInfo.i.Document
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of print jobs: 3
Job Id: 1
Userid: LINDBERG
Document name: OS/2 LAN Application Programmer's Reference
Job Id: 3
Userid: Local
Document name: LS30UT.MAK
Job Id: 4
Userid: LINDBERG
Document name: IBM LAN Server 3.0 REXX Utility DLL
ΓòÉΓòÉΓòÉ 7.12. NETPRINTQUEUE Enumerate ΓòÉΓòÉΓòÉ
The function returns a list of print queues.
Syntax
MyRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
Parameters
The parameters specified are
'printQInfo' The REXX variable receiving the result. The variable is
divided into:
o printQInfo.0 The number of print queues
o printQInfo.i The print queue name entry i, where the variable i has a
value from 1 to printQInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server or computer.
Example
/* List print queue names */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTQUEUE = 120
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETPRINTQUEUE, 'printQInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if printQInfo.1 = '-none-' then do
say printQInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of printer queue names: ' printQInfo.0
say
do i=1 to printQInfo.0
say printQInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of printer queue names: 1
IBM4019L
ΓòÉΓòÉΓòÉ 7.13. NETCHARDEV Enumerate ΓòÉΓòÉΓòÉ
The function provides a list of serial devices on a server.
Syntax
MyRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
Parameters
The parameters specified are
'charDevInfo' The REXX variable receiving the result. The variable is
divided into:
o charDevInfo.0 The number of serial devices
o charDevInfo.i The serial device name entry i, where the variable i has a
value from 1 to charDevInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server or computer.
Example
/* List serial device names on a server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETCHARDEV = 130
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETCHARDEV, 'charDevInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if charDevInfo.1 = '-none-' then do
say charDevInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of serial device names: ' charDevInfo.0
say
do i=1 to charDevInfo.0
say charDevInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of serial device names: 1
COM1
ΓòÉΓòÉΓòÉ 7.14. NETCHARDEVQ Enumerate ΓòÉΓòÉΓòÉ
The function provides a list of serial device queues on a server.
Syntax
MyRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
Parameters
The parameters specified are
'charDevQInfo' The REXX variable receiving the result. The variable is
divided into:
o charDevQInfo.0 The number of serial device queues
o charDevQInfo.i The serial device queue name entry i, where the variable i
has a value from 1 to charDevQInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server or computer.
Example
/* List serial device names on a server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETCHARDEVQ = 140
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETCHARDEVQ, 'charDevQInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if charDevQInfo.1 = '-none-' then do
say charDevQInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of serial device queue names: ' charDevQInfo.0
say
do i=1 to charDevQInfo.0
say charDevQInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of serial device queue names: 1
SRVCOM
ΓòÉΓòÉΓòÉ 7.15. NETSERVERDISK Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of diskette and disk drives on a workstation.
Syntax
MyRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
Parameters
The parameters specified are
'srvDiskInfo' The REXX variable receiving the result. The variable is
divided into:
o srvDiskInfo.0 The number of disk drives defined
o srvDiskInfo.i The disk drive name entry i, where the variable i has a
value from 1 to srvDiskInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* List disk drives on a server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSERVERDISK = 150
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETSERVERDISK, 'srvDiskInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if srvDiskInfo.1 = '-none-' then do
say srvDiskInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of disk drives: ' srvDiskInfo.0
say
do i=1 to srvDiskInfo.0
say srvDiskInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of disk drives: 4
A:
B:
C:
D:
ΓòÉΓòÉΓòÉ 7.16. NETSERVER Enumerate ΓòÉΓòÉΓòÉ
The function list all servers visible on the network.
Syntax
MyRc = NetEnumerate(NETSERVER, 'serverList')
MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName)
MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType)
MyRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
Parameters
The parameters specified are
'serverList' The REXX variable receiving the result. The variable is
divided into:
o serverList.0 The number of servers found
o serverList.i The server name entry i, where the variable i has a value
from 1 to serverList.0
SrvType The server type value are defined as follows:
SV_TYPE_WORKSTATION = 1 /* Workstation */
SV_TYPE_SERVER = 2 /* Server */
SV_TYPE_SQLSERVER = 4 /* SQL server */
SV_TYPE_DOMAIN_CTRL = 8 /* Domain controller */
SV_TYPE_DOMAIN_BAKCTRL = 16 /* Backup domain controller */
SV_TYPE_TIME_SOURCE = 32 /* Time server */
SV_TYPE_AFP = 64 /* Apple File Protocol (AFP) service */
SV_TYPE_NOVELL = 128 /* Novell service */
SV_TYPE_ALL = -1 /* All types of servers */
SrvName The server name
DomainName The domain name
Note
The server name can be specified as '' for a local server or workstation.
The default values in the four different call forms are as follows:
2 parms The function executes on the local computer, list all domain
controllers found in the logon domain and domains found in the
'other Domains' parameter
3 parms The function executes on the computer specified, list all domain
controllers found in the logon domain and domains found in the
'other Domains' parameter
4 parms The function executes on the computer specified, list the server
types specified in the logon domain and domains found in the 'other
Domains' parameter
5 parms The function executes on the computer specified, list the server
types specified in the domain specified
Example
/* Get the domain controller computer name */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSERVER = 160
SrvName = '\\ILIDC'
SrvType = 8 /* Domain Controller */
DomainName = 'ILI'
myRc = NetEnumerate(NETSERVER, 'serverList', SrvName, SrvType, DomainName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if serverList.1 = '-none-' then do
say serverList.1
call DropLs30utFuncs
exit 0
end
say 'Number of servers found: ' serverList.0
say
do i=1 to serverList.0
say serverList.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of servers found: 1
ILIDC
ΓòÉΓòÉΓòÉ 7.17. NETSERVICE Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of all network services that are started.
Syntax
MyRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
Parameters
The parameters specified are
'serviceInfo' The REXX variable receiving the result. The variable is
divided into:
o serviceInfo.0 The number of service started
o serviceInfo.i The started service name entry i, where the variable i has
a value from 1 to serviceInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* List service names started on computer */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSERVICE = 170
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETSERVICE, 'serviceInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if serviceInfo.1 = '-none-' then do
say serviceInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of services started: ' serviceInfo.0
say
do i=1 to serviceInfo.0
say serviceInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of services started: 10
REQUESTER
LSCLIENT
MESSENGER
NETPOPUP
SERVER
NETLOGON
LSSERVER
ALERTER
GENALERT
TIMESOURCE
ΓòÉΓòÉΓòÉ 7.18. NETSESSION Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of current computers having a session to a
server.
Syntax
MyRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
Parameters
The parameters specified are
'sessionInfo' The REXX variable receiving the result. The variable is
divided into:
o sessionInfo.0 The number of sessions
o sessionInfo.i The computer name entry i, where the variable i has a value
from 1 to sessionInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* List computer names having a session to a server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSESSION = 180
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETSESSION, 'sessionInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if sessionInfo.1 = '-none-' then do
say sessionInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of computers having a session to server: ' sessionInfo.0
say
do i=1 to sessionInfo.0
say sessionInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of computers having a session to server: 1
ILIDC
ΓòÉΓòÉΓòÉ 7.19. NETSHARE Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of current uses on a server or a local
workstation.
Syntax
MyRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
Parameters
The parameters specified are
'shareInfo' The REXX variable receiving the result. The variable is
divided into:
o shareInfo.0 The number of netnames shared
o shareInfo.i The netname entry i, where the variable i has a value from 1
to shareInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* List shared netnames on a server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSHARE = 190
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if shareInfo.1 = '-none-' then do
say shareInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of shared netnames: ' shareInfo.0
say
do i=1 to shareInfo.0
say shareInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of shared netnames: 3
NETLOGON
SRVCOM
BOOKS
ΓòÉΓòÉΓòÉ 7.20. NETUSE Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of current shared netnames on a server.
Syntax
MyRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
Parameters
The parameters specified are
'useInfo' The REXX variable receiving the result. The variable is
divided into:
o useInfo.count The number of net uses
o useInfo.i.local The local device entry i, where the variable i has a
value from 1 to useInfo.count
o useInfo.i.remote The UNC name entry i, where the variable i has a value
from 1 to useInfo.count
SrvName The server name
Note
The server name can be specified as '' for a local computer.
Example
/* List net uses */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSE = 270
SrvName = ''
myRc = NetEnumerate(NETUSE, 'useInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if useInfo.1 = '-none-' then do
say useInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of net uses: ' useInfo.count
do i=1 to useInfo.count
say
say useInfo.i.local
say useInfo.i.remote
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of net uses: 3
G:
\\ILIDC\BOOKS
COM7
\\ILIDC\SRVCOM
UNC connection
\\ILIDC\D$
ΓòÉΓòÉΓòÉ 7.21. NETUSER Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of defined users on a server.
Syntax
MyRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
Parameters
The parameters specified are
'userInfo' The REXX variable receiving the result. The variable is
divided into:
o userInfo.0 The number of users
o userInfo.i User name entry i, where the variable i has a value from 1 to
userInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* List defined users in the UAS */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSER = 280
SrvName = ''
myRc = NetEnumerate(NETUSER, 'userInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if userInfo.1 = '-none-' then do
say userInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of users defined: ' userInfo.0
say
do i=1 to userInfo.0
say userInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of users defined: 6
GUEST
FMAM
LINDBERG
BRUGERID
USERID
ILIDC
ΓòÉΓòÉΓòÉ 7.22. NETPRINTPORT Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of printer ports on a server or workstation.
Syntax
MyRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
Parameters
The parameters specified are
'prtPortInfo' The REXX variable receiving the result. The variable is
divided into:
o prtPortInfo.0 The number of printer ports
o prtPortInfo.i Port name entry i, where the variable i has a value from 1
to prtPortInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local computer.
Example
/* List printer ports */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTPORT = 300
SrvName = ''
myRc = NetEnumerate(NETPRINTPORT, 'prtPortInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if prtPortInfo.1 = '-none-' then do
say prtPortInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of printer ports defined: ' prtPortInfo.0
say
do i=1 to prtPortInfo.0
say prtPortInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of printer ports defined: 8
FILE
COM4
COM3
COM2
COM1
LPT3
LPT2
LPT1
ΓòÉΓòÉΓòÉ 7.23. NETPRINTDRIVER Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of printer presentation drivers on a server or
workstation.
Syntax
MyRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
Parameters
The parameters specified are
'prtDriverInfo' The REXX variable receiving the result. The variable is
divided into:
o prtDriverInfo.0 The number of printer presentation drivers
o prtDriverInfo.i Printer presentation driver name entry i, where the
variable i has a value from 1 to prtDriverInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local computer.
Example
/* List printer presentation drivers */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTDRIVER = 310
SrvName = ''
myRc = NetEnumerate(NETPRINTDRIVER, 'prtDriverInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if prtDriverInfo.1 = '-none-' then do
say prtDriverInfo.1
call DropLs30utFuncs
exit 0
end
say 'Number of printer presentation drivers defined: ' prtDriverInfo.0
say
do i=1 to prtDriverInfo.0
say prtDriverInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of printer presentation drivers defined: 2
IBM4019.IBM 4019 LaserPrinter
IBMNULL
ΓòÉΓòÉΓòÉ 7.24. NETPRINTQPROC Enumerate ΓòÉΓòÉΓòÉ
The function retrieves a list of printer queue processors on a server or
workstation.
Syntax
MyRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
Parameters
The parameters specified are
'prtQProcInfo' The REXX variable receiving the result. The variable is
divided into:
o prtQProcInfo.0 The number of printer queue processors
o prtQProcInfo.i Printer queue processor name entry i, where the variable i
has a value from 1 to prtQProcInfo.0
SrvName The server name
Note
The server name can be specified as '' for a local computer.
Example
/* List printer queue processors */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTQPROC = 320
SrvName = '\\ILIDC'
myRc = NetEnumerate(NETPRINTQPROC, 'prtQProcInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if prtQProcInfo.1 = '-none-' then do
say prtQProcInfo.1
call DropLs30utFuncs
exit 0
end
if prtQProcInfo.0 <> 0 then do
say 'Number of entries: ' prtQProcInfo.0
say
do i=1 to prtQProcInfo.0
say prtQProcInfo.i
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 1
PMPRINT
ΓòÉΓòÉΓòÉ 7.25. NETUSERGROUPS Enumerate ΓòÉΓòÉΓòÉ
The function lists the names of all groups in the user accounts subsystem (UAS)
database to which a particular user belongs. This function is identical to
NetGetInfo(NETUSERGROUPS).
Syntax
MyRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
Parameters
The parameters specified are
'userGroups' The REXX variable receiving the result. The variable is
divided into:
o userGroups.0 The number of groups in which the user has a entry
o userGroups.i The actual group names
SrvName The server name if remote
UserId The userid
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get the groups in which a user is defined */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSERGROUPS = 330
SrvName = '\\ILIDC'
UserId = 'FMAM'
myRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLs30utFuncs
exit 9
end
if userGroups.1 = '-none-' then do
say userGroups.1
call DropLs30utFuncs
exit 0
end
if userGroups.0 <> 0 then do
say 'Number of entries: ' userGroups.0
say
do i=1 to userGroups.0
say 'Group Name: ' userGroups.i
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 3
Group Name: MANAGERS
Group Name: HR_PRINT
Group Name: USERS
ΓòÉΓòÉΓòÉ 8. NetGetInfo ΓòÉΓòÉΓòÉ
The Net Get Information functions is a family of functions that can be called
with a number of parameters. The use of the NetGetInfo has two to five
different parameters. The generic syntax is:
MyRc = NetGetInfo(option, 'StemVar', parm1, parm2, parm3)
The option parameter contains a value to determine what type or option
information is obtained from. An example would be information of a user.
The StemVar parameter is specified in quotes. It will actually contain the
resulting information from the NetGetInfo.
The parm1, parm2, parm3 parameters will be dependent on the performed option.
The MyRc is the return code that will have an value from the NetGetInfo()
function. If the call is successful the character '0' will be returned.
Otherwise an error code and descriptive text will be inserted by NetGetInfo.
The option parameter values are defined in Option parameter values.
ΓòÉΓòÉΓòÉ 8.1. NETACCESS GetInfo ΓòÉΓòÉΓòÉ
NETACCESS GetInfo function retrieves information about the access control
profile of a resource. The resources can either be a Directory, a File, a Pipe,
a Spooler Queue or a Serial Device Queue.
Syntax
MyRc = NetGetInfo(NETACCESS, 'Access', ServerName, ResourceName)
Parameters
The parameters specified are
'Access' The REXX variable receiving the result. The variable is
divided into
o Access.count The number of of access controls available for the resource
o Access.audit The auditing flags. The flags are defined as:
- A Audit all. When this bit is set, all access attempts will be
audited.
- O If O, audit successful file opens.
- W If W, audit successful file writes and successful directory creates.
- D If D, audit successful file deletes or truncates and successful
directory deletes.
- P If P, audit successful file and directory access control profile
change.
- o If o, audit failed file opens.
- w If w, audit failed file writes and failed directory creates.
- d If d, audit failed file deletes or truncates and failed directory
deletes.
- p If d, audit failed file and directory access control profile change.
- -none- or N Do not perform any auditing
o Access.i.ugname The user or group name. i is a value from 1 to
Access.count
o Access.i.access The access profile. i is specified as above. The access
control flags are as follows:
- N None
- R Read
- W Write
- C Create
- X Execute
- D Delete
- P Permissions
- G This is a Group permission
ServerName The server name
Resource Name The resource name
Note
The serverName can be specified as '' for a local server.
Example
/* Add a access control profile for a resource */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESS = 10
dcName = '\\FSC30DCR'
ResourceName = 'D:\APPS\NETPROG'
myRc = NetGetInfo(NETACCESS, 'Access', dcName, ResourceName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'Count: ' Access.count
say 'Audit: ' Access.audit
do i=1 to Access.count
say
say Access.i.ugname
say Access.i.access
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Count: 2
Audit: owdp
USERS
RG
GUESTS
RG
ΓòÉΓòÉΓòÉ 8.2. NETACCESSUSERPERMS Get Info ΓòÉΓòÉΓòÉ
This functions obtains a specified userId or group permission to a resource.
The resource can be a file, directory, drive, pipe, queue or logical resource
and can be specified remotely by a UNC path.
Syntax
MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
Parameters
The parameters specified are
'UsrPerms' The REXX variable receiving the result. The variable is
divided into
o UsrPerms.perms The access controls available for the resource. The access
control flags are as follows:
- N None
- R Read
- W Write
- C Create
- X Execute
- D Delete
- P Permissions
SrvName The server name
NetResName The resource name
UgName User or group name
Note
The server name can be specified as '' for a local server.
Example
/* Get access control profile for a resource and a user or group */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESSUSERPERMS = 12
SrvName = '\\FSC30DCR'
NetResName = 'C:\IBMLAN\NETPROG'
UgName = 'USERS'
MyRc = NetGetInfo(NETACCESSUSERPERMS, 'UsrPerms', SrvName, NetResName, UgName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'Access Perms: ' UsrPerms.perms
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Access Perms: R
ΓòÉΓòÉΓòÉ 8.3. NETALIAS Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about the specified alias.
Syntax
MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
Parameters
The parameters specified are
'AliasInfo' The REXX variable receiving the result. The variable is
divided into
o AliasInfo.name The alias name.
o AliasInfo.remark The alias comment or remark
o AliasInfo.server The name of the server where the resource described by
this alias resides
o AliasInfo.netname The alias name for files aliases, and the queue name for
printer and serial device aliases
o AliasInfo.location The alias location
o AliasInfo.mode When the alias is shared
o AliasInfo.maxuses The maximum number of users who can have redirection to
the resource identified by this alias
o AliasInfo.type The alias type
o AliasInfo.queue The queue name for serial or printer alias only
o AliasInfo.path The path for files alias only
o AliasInfo.priority The serial device priority
o AliasInfo.device_pool The serial device pool
SrvName The server name
Alias The alias name
Note
The server name can be specified as '' for a local server.
Example
/* Get alias information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETALIAS = 20
SrvName = '\\FSC30DCR'
Alias = 'FORALL'
MyRc = NetGetInfo(NETALIAS, 'AliasInfo', SrvName, Alias)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if aliasInfo.0 = '1' then do
say aliasInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Alias Name: ' aliasInfo.name
say 'Alias Remark: ' aliasInfo.remark
say 'Alias Server: ' aliasInfo.server
say 'Alias NetName: ' aliasInfo.netname
say 'Alias Location: ' aliasInfo.location
say 'Alias Mode: ' aliasInfo.mode
say 'Alias Max uses: ' aliasInfo.maxuses
say 'Alias Type: ' aliasInfo.type
say 'Alias Queue: ' aliasInfo.queue
say 'Alias path: ' aliasInfo.path
say 'Alias priority: ' aliasInfo.priority
say 'Alias device pool: ' aliasInfo.device_pool
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Alias Name: FORALL
Alias Remark: For all users
Alias Server: \\FSC30DCR
Alias NetName: FORALL
Alias Location: Within Domain
Alias Mode: At Requester use
Alias Max uses: 45
Alias Type: Files
Alias Queue: Unknown
Alias path: D:\APPS\BOOKS
Alias priority: Unknown
Alias device pool: Unknown
ΓòÉΓòÉΓòÉ 8.4. NETAPP Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about an application.
Syntax
MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application, UserId)
Parameters
The function call can be either with four or five parameters.
The parameters specified are
'AppInfo' The REXX variable receiving the result. The variable is
divided into
o AppInfo.name The application name
o AppInfo.remark The application remark or description
o AppInfo.command The command that starts the application
o AppInfo.command_parms The application start parameters
o AppInfo.app_alias_or_drv The alias or drive where the application
resides. It specifies a drive letter, followed by a colon (:), if the
application resides on the user's local machine or it specifies an
existing alias if the application resides on a server.
o AppInfo.app_drive Applies to DOS public applications only. It is used to
specify the drive that is current when the application runs. A value of *
indicates that the system should choose a drive letter.
o AppInfo.app_path_to_dir The remaining path to the application.
o AppInfo.wrkdir_alias_or_drv Specifies the directory that is made current
when the application runs. If the working directory is on the local
machine, it specifies the drive, where the directory is located. If the
working directory is remote, it specifies an existing alias where the
directory is located.
o AppInfo.wrkdir_drive Specifies the drive that the working directory is to
be assigned to when the application is started. A value of * indicates
that the system should choose a drive when the application is started.
wrkdir_path_to_dir
o AppInfo.wrkdir_path_to_dir The remaining path to the working directory
o AppInfo.prompt Prompt for parameters
o AppInfo.interface The interface type
o AppInfo.type The application type
o AppInfo.res_count The number of application resource list that follows. A
value of zero indicates that the application does not require any
redirected devices when it runs.
o AppInfo.i.arl_alias The alias for the resource required by the
application. The variable i has a value from 1 to AppInfo.res_count
o AppInfo.i.arl_device The device assigned to the resource specified. The
variable i has a value from 1 to AppInfo.res_count
SrvName The server name
Application The application name
UserId The userid. The userid must be specified for private
applications
Note
The server name can be specified as '' for a local server.
Using UserId = '' is identical to calling NetGetInfo(NETAPP) without the UserId
parameter.
Example
/* Get application information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETALIAS = 30
SrvName = '\\ILIDC'
Application = 'THENEW'
MyRc = NetGetInfo(NETALIAS, 'AppInfo', SrvName, Application)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if AppInfo.0 = '1' then do
say AppInfo.1
call DropLs30utFuncs
exit 0
end
say 'App Name: ' AppInfo.name
say 'App Remark: ' AppInfo.remark
say 'App Command: ' AppInfo.command
say 'App Command parms: ' AppInfo.command_parms
say 'App alias or drive: ' AppInfo.app_alias_or_drv
say 'App drive: ' AppInfo.app_drive
say 'App path to dir: ' AppInfo.app_path_to_dir
say 'App wrkdir alias or drv: ' AppInfo.wrkdir_alias_or_drv
say 'App wrkdir drive: ' AppInfo.wrkdir_drive
say 'App wrkdir path to dir: ' AppInfo.wrkdir_path_to_dir
say 'App prompt: ' AppInfo.prompt
say 'App interface type: ' AppInfo.interface
say 'App type: ' AppInfo.apptype
say 'App resource count: ' AppInfo.res_count
if AppInfo.res_count <> 0 then do
do i=1 to AppInfo.res_count
say
say "Alias: " AppInfo.i.arl_alias
say "Device:" AppInfo.i.arl_device
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
App Name: THENEW
App Remark: The New application
App Command: myapp.exe
App Command parms:
App alias or drive: C:
App drive: N/A
App path to dir: \
App wrkdir alias or drv: D:
App wrkdir drive: Local
App wrkdir path to dir: \
App prompt: Prompt user for parameters
App interface type: Presentation Manager
App type: Public OS/2 application
App resource count: 2
Alias: BOOKS
Device: *
Alias: MYDEMO
Device: U
ΓòÉΓòÉΓòÉ 8.5. NETCONNECTION Get Info ΓòÉΓòÉΓòÉ
The NETCONNECTION gives a listing of connections made to a shared resource of a
server, or of all connections established from a particular computer to a
server. This functions is identical to NetEnumerate(NETCONNECTION).
Syntax
MyRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
Parameters
The parameters specified are
'connInfo' The REXX variable receiving the result. The variable is
divided into
o connInfo.num_entries The number of connection information entries. Each
entry is obtained by the index i, which has a value from 1 to
connInfo.num_entries
o connInfo.i.id The connection id
o connInfo.i.type The type of connection made from the local device name to
the shared resource
o connInfo.i.num_opens The number of files that are currently open as a
result of the connection
o connInfo.i.num_users The number of users on the connection
o connInfo.i.num_users The number of users on the connection
o connInfo.i.time The number of seconds the connection has been established
o connInfo.i.username The name of the user that made the connection
o connInfo.i.netname A string indicating either the netname of the shared
resource of the server or the computer name of the requester, depending on
which name was specified as the Qualifier parameter
SrvName The server name
Qualifier An ASCIIZ string specifying either the netname of the shared
resource whose connections will be listed or the client name
of the requester whose connections to the shared resource
will be listed
Note
The server name can be specified as '' for a local server.
Example
/* Get connection information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETCONNECTION = 40
SrvName = '\\ILIDC'
Qualifier = '\\ILIDC'
myRc = NetGetInfo(NETCONNECTION, 'connInfo', SrvName, Qualifier)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if connInfo.1 <> 'CONNINFO.1' then do
say connInfo.1
call DropLs30utFuncs
exit 0
end
if connInfo.num_entries <> 0 then do
say "Number of entries: " connInfo.num_entries
do i=1 to connInfo.num_entries
say
say "Connection id: " connInfo.i.id
say "Connection type: " connInfo.i.type
say "Connection num opens: " connInfo.i.num_opens
say "Connection num users: " connInfo.i.num_users
say "Connection time: " connInfo.i.time
say "Connection user name: " connInfo.i.username
say "Connection net name: " connInfo.i.netname
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 1
Connection id: 4096
Connection type: Disk Connection
Connection num opens: 0
Connection num users: 1
Connection time: 75
Connection user name: LINDBERG
Connection net name: BOOKS
ΓòÉΓòÉΓòÉ 8.6. NETLOGON Get Info ΓòÉΓòÉΓòÉ
Retrieves information about logged-on users.
Syntax
MyRc = NetGetInfo(NETLOGON, 'logonInfo')
MyRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
Parameters
The call to NetGetInfo(NETLOGON) can have two different forms. The first form
with no SrvName parameter is identical to the second form with the SrvName
parameter value set to ''.
The parameters specified are
'logonInfo' The REXX variable receiving the result. The variable is
divided into
o logonInfo.num_entries The number of logon information entries. Each entry
is obtained by the index i, which has a value from 1 to
logonInfo.num_entries
o logonInfo.i.eff_name The name of the account to which the user was logged
on
o logonInfo.i.computer
o logonInfo.i.full_name The fullname value specified in the user account
o logonInfo.i.usrcomment The user-settable value for user comments
o logonInfo.i.logon_time The time and date when the user logged on.
SrvName The server name
Note
The server name can be specified as '' for a local server.
Example
/* Get information on logged on users on this server */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETLOGON = 50
SrvName = '\\FSCDC'
myRc = NetGetInfo(NETLOGON, 'logonInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if logonInfo.1 = '-none-' then do
say logonInfo.1
call DropLs30utFuncs
exit 0
end
if logonInfo.num_entries <> 0 then do
say "Number of entries: " logonInfo.num_entries
do i=1 to logonInfo.num_entries
say
say "Logon eff_name: " logonInfo.i.eff_name
say "Logon computer: " logonInfo.i.computer
say "Logon full name: " logonInfo.i.full_name
say "Logon user comment: " logonInfo.i.usrcomment
say "Logon time: " logonInfo.i.logon_time
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 1
Logon eff_name: LINDBERG
Logon computer: FSC30DCR
Logon full name: Ingolf Lindberg, OS/2 Competency Center
Logon user comment: Ingolf Lindberg in N91-3161
Logon time: Tue May 4 07:44:26 1993
ΓòÉΓòÉΓòÉ 8.7. NETFILE Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular opened file on a server.
Syntax
MyRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
Parameters
The parameters specified are
'fileInfo' The REXX variable receiving the result. The variable is
divided into
o fileInfo.id The file Id
o fileInfo.permissions The access permissions of the opening application.
o fileInfo.num_locks The number of file locks on the file, device, or pipe
o fileInfo.pathname The path name of the opened resource
o fileInfo.username The username of the one that first opened the path
SrvName The server name
fileId The file Id. This value must be supplied
Note
The server name can be specified as '' for a local server.
Example
/* Get opened file information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETFILE = 60
SrvName = '\\FSCDC'
fileId = 167273
myRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if fileInfo.1 = '-none-' then do
say fileInfo.1
call DropLs30utFuncs
exit 0
end
say
say "File id: " fileInfo.id
say "File permissions: " fileInfo.permissions
say "File number locks: " fileInfo.num_locks
say "File path: " fileInfo.pathname
say "File user name: " fileInfo.username
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
File id: 167273
File permissions: R
File number locks: 0
File path: D:\BOOKS\GG243783.BOO
File user name: FSCADMIN
ΓòÉΓòÉΓòÉ 8.8. NETGROUP Get Info ΓòÉΓòÉΓòÉ
The function retrieves group-related information.
Syntax
MyRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
Parameters
The parameters specified are
'groupInfo' The REXX variable receiving the result. The variable is
divided into
o groupInfo.name The group name
o groupInfo.comment The group comment or description
SrvName The server name
GroupName The group name. This value must be supplied
Note
The server name can be specified as '' for a local server.
Example
/* Get group comment */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUP = 70
SrvName = '\\ILIDC'
GroupName = 'CSUSERS'
myRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say "Group Name: " groupInfo.name
say "Group Comment: " groupInfo.comment
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Group Name: CSUSERS
Group Comment: The Client/Server users group
ΓòÉΓòÉΓòÉ 8.9. NETGROUPUSERS Get Info ΓòÉΓòÉΓòÉ
The function returns a list of members of a particular group.
Syntax
MyRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
Parameters
The parameters specified are
'groupInfo' The REXX variable receiving the result. The variable is
divided into
o groupInfo.0 Counts the number of users defined in the group
o groupInfo.i The userId number i defined in the group. i has a value from
1 to groupInfo.0
SrvName The server name
GroupName The group name. This value must be supplied
Note
The server name can be specified as '' for a local server.
Example
/* Get group users */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETGROUPUSERS = 340
SrvName = '\\ILIDC'
GroupName = 'CSUSERS'
myRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
do i=1 to groupInfo.0
say "UserId: " groupInfo.i
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
UserId: LINDBERG
UserId: BRUGERID
UserId: USERID
ΓòÉΓòÉΓòÉ 8.10. NETMESSAGENAME Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a user's entry in the message name
table.
Syntax
MyRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
Parameters
The parameters specified are
'msgNameInfo' The REXX variable receiving the result. The variable is
divided into
o msgNameInfo.name The messaging name to send a message
o msgNameInfo.forward_flag The value specifies whether messages will be
sent to a user or application on the local computer, or forwarded to a
user or application on a remote computer
o msgNameInfo.forward The value will specify the user name to which the
message will be sent, if messages are to be forwarded
SrvName The server name
MsgName The message name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get message name information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETMESSAGENAME = 80
SrvName = '\\ILIDC'
MsgName = 'LINDBERG'
myRc = NetGetInfo(NETMESSAGENAME, 'msgNameInfo', SrvName, MsgName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say "Message Name: " msgNameInfo.name
say "Forward flag: " msgNameInfo.forward_flag
say "Forward to: " msgNameInfo.forward
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Message Name: LINDBERG
Forward flag: Not forwarded
Forward to: N/A
ΓòÉΓòÉΓòÉ 8.11. NETBIOS Get Info ΓòÉΓòÉΓòÉ
The function returns information about a particular network device driver
installed on a computer.
Syntax
MyRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
Parameters
The parameters specified are
'netBiosInfo' The REXX variable receiving the result. The variable is
divided into:
o netBiosInfo.name The name of the network. For example 'NET1' or 'NETLB'
o netBiosInfo.driver_name The network device driver name the LAN Server
software uses
o netBiosInfo.lana_num The LAN adapter number
o netBiosInfo.driver_type The device driver protocol type
o netBiosInfo.net_status The status of the device driver
o netBiosInfo.net_bandwidth Indicates the number of bytes per second that
the network hardware accommodates
o netBiosInfo.max_sess The maximum number of concurrent sessions that the
device driver can establish
o netBiosInfo.max_ncbs The maximum number of NCBs that can be outstanding
at any time
o netBiosInfo.max_names The maximum number of network names that a network
(netBiosInfo.name) can establish
SrvName The server name
NetName The network name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get NetBios information for NET1 */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETBIOS = 90
SrvName = '\\FSC30DCR'
NetName = 'NET1'
myRc = NetGetInfo(NETBIOS, 'netBiosInfo', SrvName, NetName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if netBiosInfo.1 = '-none-' then do
say netBiosInfo.1
call DropLs30utFuncs
exit 0
end
say
say "Netbios net_name: " netBiosInfo.net_name
say "Netbios driver_name: " netBiosInfo.driver_name
say "Netbios lana num: " netBiosInfo.lana_num
say "Netbios driver_type: " netBiosInfo.driver_type
say "Netbios net status: " netBiosInfo.net_status
say "Netbios net bandwidth:" netBiosInfo.net_bandwidth
say "Netbios max sessions: " netBiosInfo.max_sess
say "Netbios max ncbs: " netBiosInfo.max_ncbs
say "Netbios max names: " netBiosInfo.max_names
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Netbios net_name: NET1
Netbios driver_name: NETBEUI$
Netbios lana num: 0
Netbios driver_type: Network Control Block Protocol
Netbios net status: Unknown
Netbios net bandwidth: 524288
Netbios max sessions: 32
Netbios max ncbs: 50
Netbios max names: 14
ΓòÉΓòÉΓòÉ 8.12. NETPRINTDEST Get Info ΓòÉΓòÉΓòÉ
The function returns information about a particular network device driver
installed on a computer.
Syntax
MyRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
Parameters
The parameters specified are
'prtDestInfo' The REXX variable receiving the result. The variable is
divided into:
o prtDestInfo.PrinterName The printer device name
o prtDestInfo.UserName The user that submitted the current job if any. If a
local job is printing the value 'Local User' is used. If no jobs are
printing the value of '-none-' is used
o prtDestInfo.LogAddr The printer logical address (LPT1 for example)
o prtDestInfo.JobId The current printing job id. '-none-' is no jobs are
printing
o prtDestInfo.Status The printer device status
o prtDestInfo.StatusComment Print device comment while printing
o prtDestInfo.Comment Print device description
o prtDestInfo.Drivers Print driver supported by this device
o prtDestInfo.time Time (in minutes) current print job has been printing
o prtDestInfo.TimeOut Print device Time Out (in seconds)
SrvName The server name
DevName The printer device name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get Print destination information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTDEST = 100
SrvName = '\\FSC30DCR'
DevName = 'IBM40191'
myRc = NetGetInfo(NETPRINTDEST, 'prtDestInfo', SrvName, DevName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if prtDestInfo.1 = '-none-' then do
say prtDestInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Printer device name: ' prtDestInfo.PrinterName
say 'Current user job printing: ' prtDestInfo.UserName
say 'Printer logical address: ' prtDestInfo.LogAddr
say 'Current job id printing: ' prtDestInfo.JobId
say 'Print device status: ' prtDestInfo.Status
say 'Job Comment: ' prtDestInfo.StatusComment
say 'Device describtion: ' prtDestInfo.Comment
say 'Supported drivers: ' prtDestInfo.Drivers
say 'Time current job printing: ' prtDestInfo.time
say 'Print device timeout: ' prtDestInfo.TimeOut
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Printer device name: IBM40191
Current user job printing: -none-
Printer logical address: LPT3
Current job id printing: -none-
Print device status: Processing
Job Comment: -none-
Device describtion: IBM 4019 LaserPrinter
Supported drivers: IBM4019.IBM 4019 LaserPrinter
Time current job printing: -none-
Print device timeout: 45
ΓòÉΓòÉΓòÉ 8.13. NETPRINTJOB Get Info ΓòÉΓòÉΓòÉ
The function returns information about a print job.
Syntax
MyRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
Parameters
The parameters specified are
'prtJobInfo' The REXX variable receiving the result. The variable is
divided into:
o prtJobInfo.JobId The print job id
o prtJobInfo.Priority The print job priority
o prtJobInfo.UserName The userid of the job submitting the job
o prtJobInfo.Position The job position in the print queue
o prtJobInfo.Status The status of the print job
o prtJobInfo.Submitted The time when the job was submitted
o prtJobInfo.Size The print job size
o prtJobInfo.Comment The print job comment
o prtJobInfo.Document The document name
o prtJobInfo.NotifyName Messaging alias for print alert
o prtJobInfo.DataType The data type of the submitted file
o prtJobInfo.Parms The parameters related to the print job
o prtJobInfo.StatusComment The status comment
o prtJobInfo.Queue The queue name
o prtJobInfo.QProcName The queue processor name
o prtJobInfo.QProcParms The queue processor parameters
o prtJobInfo.PrinterName The printer name
o prtJobInfo.Version The printer driver version
o prtJobInfo.DeviceName The device name
SrvName The server name
QueueName The Queue name
PrtJobId The Printer Job Id
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get Print job information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTJOB = 110
SrvName = '\\FSC30DCR'
QueueName = 'IBM4019L'
PrtJobId = 5
myRc = NetGetInfo(NETPRINTJOB, 'prtJobInfo', SrvName, QueueName, PrtJobId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if prtJobInfo.1 = '-none-' then do
say prtJobInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Job id: ' prtJobInfo.JobId
say 'Job priority: ' prtJobInfo.Priority
say 'Userid who submitted job: ' prtJobInfo.UserName
say 'Job position in Queue: ' prtJobInfo.Position
say 'Job status: ' prtJobInfo.Status
say 'Submitted at: ' prtJobInfo.Submitted
say 'Job size: ' prtJobInfo.Size
say 'Job comment: ' prtJobInfo.Comment
say 'Document name: ' prtJobInfo.Document
say 'Notify: ' prtJobInfo.NotifyName
say 'Data type: ' prtJobInfo.DataType
say 'Job parameters: ' prtJobInfo.Parms
say 'Job status comment: ' prtJobInfo.StatusComment
say 'Queue name: ' prtJobInfo.Queue
say 'Queue processor: ' prtJobInfo.QProcName
say 'Queue processor parameters: ' prtJobInfo.QProcParms
say 'The printer name: ' prtJobInfo.PrinterName
say 'Printer Driver version: ' prtJobInfo.Version
say 'Device Name: ' prtJobInfo.DeviceName
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Job id: 5
Job priority: 50
Userid who submitted job:
Job position in Queue: Next
Job status: Queued
Submitted at: Wed May 5 19:45:06 1993
Job size: 109320
Job comment: System
Document name: LS30BAS2.C
Notify:
Data type: PM_Q_RAW
Job parameters:
Job status comment:
Queue name: IBM4019L
Queue processor: PMPRINT
Queue processor parameters: CDP=850
The printer name:
Printer Driver version: 777
Device Name: IBM 4019 LaserPrinter
ΓòÉΓòÉΓòÉ 8.14. NETPRINTQUEUE Get Info ΓòÉΓòÉΓòÉ
The function returns information about a print queue.
Syntax
MyRc = NetGetInfo(NETPRINTJOB, 'prtQInfo', SrvName, QueueName)
Parameters
The parameters specified are
'prtQInfo' The REXX variable receiving the result. The variable is
divided into:
o prtQInfo.Priority The queue priority
o prtQInfo.StartTime The queue start time
o prtQInfo.UntilTime The queue until time
o prtQInfo.Type The queue type. A hexadecimal value, which is not
interpreted
o prtQInfo.SepFile The queue seperator file if any
o prtQInfo.PrProc The queue default queue processor
o prtQInfo.Parms The queue parameters
o prtQInfo.Comment The queue comment or description
o prtQInfo.Status The queue status. A hexadecimal value, which is not
interpreted
o prtQInfo.Jobs The number of jobs in the queue
o prtQInfo.Printers The print device connected to the queue
o prtQInfo.DriverName The default print driver
o prtQInfo.RemoteComputerName The remote computer name
o prtQInfo.RemoteQueueName The remote queue name
o prtQInfo.Version The printer driver version
o prtQInfo.DeviceName The device name
SrvName The server name
QueueName The Queue name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get Print queue information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETPRINTJOB = 120
SrvName = '\\FSC30DCR'
QueueName = 'IBM4019L'
myRc = NetGetInfo(NETPRINTJOB, 'prtQInfo', SrvName, QueueName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if prtJobInfo.1 = '-none-' then do
say prtJobInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Queue Priority: ' prtQInfo.Priority
say 'Queue start time: ' prtQInfo.StartTime
say 'Queue until time: ' prtQInfo.UntilTime
say 'Queue type: ' prtQInfo.Type
say 'Seperator File: ' prtQInfo.SepFile
say 'Default Queue processor: ' prtQInfo.PrProc
say 'Queue parameters: ' prtQInfo.Parms
say 'Queue description: ' prtQInfo.Comment
say 'Queue status: ' prtQInfo.Status
say 'Number of jobs in queue: ' prtQInfo.Jobs
say 'Printer connected: ' prtQInfo.Printers
say 'Default printer driver: ' prtQInfo.DriverName
say 'Computer Name at location: ' prtQInfo.RemoteComputerName
say 'Queue name at location: ' prtQInfo.RemoteQueueName
say 'Printer Driver version: ' prtQInfo.Version
say 'Device Name: ' prtQInfo.DeviceName
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Queue Priority: 5
Queue start time: No Restriction
Queue until time: No Restriction
Queue type: 0002
Seperator File:
Default Queue processor: PMPRINT
Queue parameters:
Queue description: IBM 4019 LaserPrinter
Queue status: 0001
Number of jobs in queue: 0
Printer connected: IBM40191
Default printer driver: IBM4019.IBM 4019 LaserPrinter
Computer Name at location:
Queue name at location:
Printer Driver version: 777
Device Name: IBM 4019 LaserPrinter
ΓòÉΓòÉΓòÉ 8.15. NETCHARDEV Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular serial device in a shared
serial device queue on a server.
Syntax
MyRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
Parameters
The parameters specified are
'charDevInfo' The REXX variable receiving the result. The variable is
divided into:
o charDevInfo.dev The device name
o charDevInfo.status The status of the device
o charDevInfo.username The current user name of the device
o charDevInfo.time The number of seconds the current application has been
connected to the serial device
SrvName The server name
DeviceName The name of the device
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get the serial device information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETCHARDEV = 130
SrvName = '\\ILIDC'
DeviceName = 'COM1'
myRc = NetGetInfo(NETCHARDEV, 'charDevInfo', SrvName, DeviceName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'The device name: ' charDevInfo.dev
say 'Device status: ' charDevInfo.status
say 'Current user name: ' charDevInfo.username
say 'Time in use: ' charDevInfo.time
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
The device name: COM1
Device status: Idle
Current user name: -none-
Time in use: 0
ΓòÉΓòÉΓòÉ 8.16. NETCHARDEVQ Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular serial device queue on a
server.
Syntax
MyRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
Parameters
The parameters specified are
'charQInfo' The REXX variable receiving the result. The variable is
divided into:
o charQInfo.dev The name of the serial device queue for which information
is returned
o charQInfo.priority The queue priority
o charQInfo.devs The names of the local devices in the pool
o charQInfo.numusers The number of users waiting in the device queue
o charQInfo.numahead The number of users ahead of the UserId specified in
the call the NetGetInfo(CHARDEVQ)
SrvName The server name
QueueName The name of the queue. This name is identical to the netname
UserId A userid
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get queue information for a serial device */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETCHARDEVQ = 140
SrvName = '\\ILIDC'
QueueName = 'SRVCOM'
UserId = 'LINDBERG'
myRc = NetGetInfo(NETCHARDEVQ, 'charQInfo', SrvName, QueueName, UserId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'Device name: ' charQInfo.dev
say 'Queue Priority: ' charQInfo.priority
say 'Queue server devices: ' charQInfo.devs
say 'Numbers users waiting: ' charQInfo.numusers
say 'Number users ahead of ' UserId ':' charQInfo.numahead
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Device name: SRVCOM
Queue Priority: 3
Queue server devices: COM1
Numbers users waiting: 0
Number users ahead of LINDBERG : Userid has no requests in the queue
ΓòÉΓòÉΓòÉ 8.17. NETSERVER Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular server.
Syntax
MyRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
Parameters
The parameters specified are
'serverInfo' The REXX variable receiving the result. The variable is
divided into:
o serverInfo.name The server name
o serverInfo.version_major The major version number (Version)
o serverInfo.version_minor The minor version number (Release)
o serverInfo.type The server type. This information is a hexadecimal value
and is not interpreted
o serverInfo.comment The server comment
o serverInfo.ulist_mtime The last time the users list was modified
o serverInfo.glist_mtime The last time the group list was modified
o serverInfo.alist_mtime The last time the access control list was modified
o serverInfo.users The maximum of users on the server
o serverInfo.disc The auto-disconnet value
o serverInfo.alerts The server alerts receiver table. The table can be
empty
o serverInfo.security The security type of the server
o serverInfo.auditing The auditing setting
o serverInfo.numadmin The maximum allowed number of administrators
o serverInfo.lanmask The order in which the network device drivers are
served. The value is uninterpreted
o serverInfo.hidden The server hidden attribute setting
o serverInfo.announce The network announce delta (in seconds), which
determines how often the server will be announced to other computers on
the network
o serverInfo.anndelta The random announce rate (in milliseconds)
o serverInfo.guestacct The guest account name
o serverInfo.userpath The path name to user directories
o serverInfo.chdevs The number of serial devices that can be shared on the
server
o serverInfo.chdevq The number of serial device queues that can coexist on
the server
o serverInfo.chdevjobs The number of serial device jobs that can be pending
on a server
o serverInfo.connections The maximum number of connections to netnames that
are allowed
o serverInfo.shares The maximum number of netnames a server can accommodate
o serverInfo.openfiles The number of files (file handles to for example
files or pipes) that can be opened at once
o serverInfo.sessopens The number of files that can be opened in one
session
o serverInfo.sessvcs The maximum number of virtual circuits per client
o serverInfo.sessreqs The number of simultaneous requests that a client can
make on any virtual circuit
o serverInfo.opensearch The number of searches that can be opened at once
o serverInfo.activelocks The number of file locks that can be active
o serverInfo.numreqbuf The number of server buffers that are provided
o serverInfo.sizreqbuf The size (in bytes) of each server buffer
o serverInfo.numbigbuf Number of 64KB server buffers that are provided
o serverInfo.numfiletasks Number of processes that can access the operating
system at one time
o serverInfo.alertsched The alert interval for notifying an administrator
of a network event
o serverInfo.erroralert The number of entries that can be written to the
error log file during a interval before notifying an administrator
o serverInfo.logonalert The number of failed logon attempts to allow a user
before notifying an administrator
o serverInfo.accessalert The number of failed file accesses to allow before
issuing an administrative alert
o serverInfo.diskalert The number of kilobytes of free disk space, at
which, an administrator must be notified that the free space is low
o serverInfo.maxauditsz Maximum audit file size
o serverInfo.srvheuristics The server heuristics settings
o serverInfo.auditedevents The audit events setting. This value is
unformatted and is presented hexadecimal
o serverInfo.autoprofile The server auto profile setting
o serverInfo.autopath The server autoprofile location
SrvName The server name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get server information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSERVER = 160
SrvName = '\\ILIDC'
myRc = NetGetInfo(NETSERVER, 'serverInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'Server name: ' serverInfo.name
say 'Major version (Version): ' serverInfo.version_major
say 'Minor version (Release): ' serverInfo.version_minor
say 'Server type: ' serverInfo.type
say 'Comment: ' serverInfo.comment
say 'Users list last changed: ' serverInfo.ulist_mtime
say 'Group list last changed: ' serverInfo.glist_mtime
say 'Access Control list last changed: ' serverInfo.alist_mtime
say 'Maximum number of users: ' serverInfo.users
say 'Auto-disconnect value: ' serverInfo.disc
say 'Send server alerts to: ' serverInfo.alerts
say 'Server security type: ' serverInfo.security
say 'Auditing setting: ' serverInfo.auditing
say 'Maximum number administrators: ' serverInfo.numadmin
say 'LAN mask setting: ' serverInfo.lanmask
say 'Server hidden attribute setting: ' serverInfo.hidden
say 'Server network announce: ' serverInfo.announce
say 'Random announce rate delta: ' serverInfo.anndelta
say 'Guest account name: ' serverInfo.guestacct
say 'Path to user directories: ' serverInfo.userpath
say 'Maximum shared serial devices: ' serverInfo.chdevs
say 'Maximum serial device queues: ' serverInfo.chdevq
say 'Maximum pending serial jobs: ' serverInfo.chdevjobs
say 'Maximum connections: ' serverInfo.connections
say 'Maximum shares: ' serverInfo.shares
say 'Maximum open file handles: ' serverInfo.openfiles
say 'Maximum session opens: ' serverInfo.sessopens
say 'Per Client maximum virtual circuits: ' serverInfo.sessvcs
say 'Maximum requests: ' serverInfo.sessreqs
say 'Maximum searches: ' serverInfo.opensearch
say 'Maximum locks: ' serverInfo.activelocks
say 'Number requester buffers: ' serverInfo.numreqbuf
say 'Requester buffer size: ' serverInfo.sizreqbuf
say 'Number big buffers: ' serverInfo.numbigbuf
say 'Number file tasks: ' serverInfo.numfiletasks
say 'alertsched value: ' serverInfo.alertsched
say 'erroralert value: ' serverInfo.erroralert
say 'logonalert value: ' serverInfo.logonalert
say 'accessalert value: ' serverInfo.accessalert
say 'diskalert value: ' serverInfo.diskalert
say 'Maximum auditing log file size: ' serverInfo.maxauditsz
say 'srvheuristics: ' serverInfo.srvheuristics
say 'Audit events flags: ' serverInfo.auditedevents
say 'Server auto profile setting: ' serverInfo.autoprofile
say 'Server autoprofile location: ' serverInfo.autopath
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Server name: ILIDC
Major version (Version): 3
Minor version (Release): 0
Server type: 0000002B
Comment: ILI netvork group Domain Controller
Users list last changed: Never modified or unknown
Group list last changed: Never modified or unknown
Access Control list last changed: Wed May 5 18:30:24 1993
Maximum number of users: 32
Auto-disconnect value: 120
Send server alerts to: -none-
Server security type: User-level
Auditing setting: Disabled
Maximum number administrators: 65535
LAN mask setting: 1
Server hidden attribute setting: Visible
Server network announce: 60
Random announce rate delta: 3000
Guest account name: GUEST
Path to user directories: -none-
Maximum shared serial devices: 2
Maximum serial device queues: 2
Maximum pending serial jobs: 6
Maximum connections: 128
Maximum shares: 24
Maximum open file handles: 250
Maximum session opens: 80
Per Client maximum virtual circuits: 1
Maximum requests: 50
Maximum searches: 50
Maximum locks: 64
Number requester buffers: 36
Requester buffer size: 4096
Number big buffers: 12
Number file tasks: 1
alertsched value: 5
erroralert value: 5
logonalert value: 5
accessalert value: 5
diskalert value: 5000
Maximum auditing log file size: 100
srvheuristics: 11110141111311001331
Audit events flags: 0
Server auto profile setting: Unknown
Server autoprofile location: SRVAUTO.PRO
ΓòÉΓòÉΓòÉ 8.18. NETSERVICE Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular network service that is
started.
Syntax
MyRc = NetGetInfo(NETSERVER, 'serviceInfo', SrvName, ServiceName)
Parameters
The parameters specified are
'serviceInfo' The REXX variable receiving the result. The variable is
divided into:
o serviceInfo.name The service name
o serviceInfo.status The service status. This is a uninterpreted
hexadecimal value
o serviceInfo.code The error codes when a service stops or fails to start
properly. The values are a primary and secondary code
o serviceInfo.pid The service process id
o serviceInfo.text The service text
SrvName The server name if remote
ServiceName The service name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get service information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSERVICE = 170
SrvName = '\\FSC30DCR'
ServiceName = 'ALERTER'
myRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'The service name: ' serviceInfo.name
say 'Service status: ' serviceInfo.status
say 'Service code: ' serviceInfo.code
say 'Process id: ' serviceInfo.pid
say 'Service text: ' serviceInfo.text
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
The service name: ALERTER
Service status: 13
Service code: 0
Process id: 67
Service text: -none-
ΓòÉΓòÉΓòÉ 8.19. NETSESSION Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular network service that is
started.
Syntax
MyRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
Parameters
The parameters specified are
'sessionInfo' The REXX variable receiving the result. The variable is
divided into:
o sessionInfo.cname The computer name
o sessionInfo.username The user name (Userid)
o sessionInfo.num_conns The number of connections that have been made
during the session
o sessionInfo.num_opens The number of opens that have been made during the
session
o sessionInfo.num_users The number of sessions that are established between
the server and req
o sessionInfo.time The number of seconds a session has been active
o sessionInfo.idle_time The number of seconds a session has been idle
o sessionInfo.user_flags The user flags
o sessionInfo.cltype_name Set the name of the client types
SrvName The server name if remote
ComputerName The computer name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get session information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSESSION = 180
SrvName = '\\FSCDC'
ComputerName = '\\FSC30DCR'
myRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'The computer name: ' sessionInfo.cname
say 'Userid: ' sessionInfo.username
say 'Connections made: ' sessionInfo.num_conns
say 'Number opens: ' sessionInfo.num_opens
say 'Sessions established: ' sessionInfo.num_users
say 'Session time: ' sessionInfo.time
say 'Idle time: ' sessionInfo.idle_time
say 'User flags: ' sessionInfo.user_flags
say 'Client type: ' sessionInfo.cltype_name
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
The computer name: FSC30DCR
Userid: FSCADMIN
Connections made: 3
Number opens: 1
Sessions established: 1
Session time: 176
Idle time: 0
User flags: Unknown
Client type: OS/2 LS 1.2
ΓòÉΓòÉΓòÉ 8.20. NETSHARE Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular shared resource on a
server.
Syntax
MyRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
Parameters
The parameters specified are
'shareInfo' The REXX variable receiving the result. The variable is
divided into:
o shareInfo.netname The network name of the resource
o shareInfo.type The share type (For example Serial Device)
o shareInfo.remark The share remark (Comment)
o shareInfo.max_uses The maximum number of concurrent connections that the
shared resource can accommodate
o shareInfo.current_uses The number of connections that are currently made
to the resource
o shareInfo.path The local path name of the shared resource. For disks, it
is the path being shared. For spooler queues, it is the name of the
spooler queue being shared. For serial device queues, it is a string of
one or more communication device names separated by spaces (For example,
COM1 COM2)
SrvName The server name if remote
NetName The network name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get share information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSHARE = 190
SrvName = '\\FSC30DCR'
NetworkName = 'FORALL'
myRc = NetGetInfo(NETSHARE, 'shareInfo', SrvName, NetworkName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'Network name: ' shareInfo.netname
say 'Share type: ' shareInfo.type
say 'Comment: ' shareInfo.remark
say 'Maximum uses: ' shareInfo.max_uses
say 'Current uses: ' shareInfo.current_uses
say 'Local resource path: ' shareInfo.path
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Network name: FORALL
Share type: Disk Drive
Comment: For all users
Maximum uses: 45
Current uses: 1
Local resource path: D:\APPS\BOOKS
ΓòÉΓòÉΓòÉ 8.21. NETSTATISTICS ΓòÉΓòÉΓòÉ
The function retrieves operating statistics for a service.
Syntax
MyRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', ComputerName, StatType)
Parameters
The parameters specified are
'statisticsInfo' The REXX variable receiving the result. The variable is
divided into two ways depending of the StatType parameter. If
StatType = 0 then the requester statistics are provided. If
StatType = 1 then the server statistics are provided. The
returned values for requester statistics are:
o statisticsInfo.start The time that statistics collection started or the
date or time that the statistics were last cleared
o statisticsInfo.numNCB_r The number of NCBs issued (redirector)
o statisticsInfo.numNCB_s The number of NCBs issued (server)
o statisticsInfo.numNCB_a The number of NCBs issued (application)
o statisticsInfo.fiNCB_r The number of NCBs that failed issue (redirector)
o statisticsInfo.fiNCB_s The number of NCBs that failed issue (server)
o statisticsInfo.fiNCB_a The number of NCBs that failed issue (application)
o statisticsInfo.fcNCB_r The number of NCBs that failed completion
(redirector)
o statisticsInfo.fcNCB_s The number of NCBs that failed completion (server)
o statisticsInfo.fcNCB_a The number of NCBs that failed completion
(application)
o statisticsInfo.sesstart The number of requester sessions started
o statisticsInfo.sessfailcon The number of requester session failures to
connect
o statisticsInfo.sessbroke The number of failures of requester sessions
o statisticsInfo.uses The number of requester uses
o statisticsInfo.usefail The number of requester use failures
o statisticsInfo.autorec The number of requester autoconnects
o statisticsInfo.bytessent_r The number of requester bytes sent to the
network. The representation will be floating point if the bytes send
exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd_r The number of requester bytes received from
the network. The representation will be floating point if the bytes
received exceeds 0xFFFFFFFF
o statisticsInfo.bytessent_s The number of server bytes sent to the
network. The representation will be floating point if the bytes send
exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd_s The number of server bytes received from the
network. The representation will be floating point if the bytes received
exceeds 0xFFFFFFFF
o statisticsInfo.bytessent_a The number of application bytes sent to the
network. The representation will be floating point if the bytes send
exceeds 0xFFFFFFFF
o statisticsInfo.bytesrcvd_a The number of application bytes received from
the network. The representation will be floating point if the bytes
received exceeds 0xFFFFFFFF
o statisticsInfo.reqbufneed The number of times the requester required a
request buffer but failed
o statisticsInfo.bigbufneed The number of times the requester required a
big buffer but failed
The returned values for server statistics are:
o statisticsInfo.start The time that statistics collection started or the
date or time that the statistics were last cleared
o statisticsInfo.fopens The number of server file opens. This includes
opens of named pipes
o statisticsInfo.devopens The number of server device opens
o statisticsInfo.jobsqueued The number of server print jobs spooled
o statisticsInfo.sopens The number of server session starts
o statisticsInfo.stimedout The number of server session autodisconnects
o statisticsInfo.serrorout The number of server sessions errored out
o statisticsInfo.pwerrors The number of server password violations
o statisticsInfo.permerrors The number of server access permission errors
o statisticsInfo.syserrors The number of server system errors
o statisticsInfo.bytessent The number of server bytes sent to the network.
The representation will be floating point if the bytes send exceeds
0xFFFFFFFF
o statisticsInfo.bytesrcvd The number of server bytes received from the
network. The representation will be floating point if the bytes received
exceeds 0xFFFFFFFF
o statisticsInfo.avresponse The average server response time in
milliseconds
o statisticsInfo.reqbufneed The number of times the server required a
request buffer but failed
o statisticsInfo.bigbufneed The number of times the server required a big
buffer but failed
ComputerName The server name if remote
StatType Using value 0 gives requester statistics. A value 1 gives
server statistics
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get statistics information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
SrvName = '\\FSC30DCR'
NETSTATISTICS = 195
REQ_STAT = 0
SRV_STAT = 1
/* Get the requester statistics */
myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, REQ_STAT)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if statisticsInfo.1 = '-none-' then do
say statisticsInfo.1
call DropLs30utFuncs
exit 0
end
say
say "Statistics req start: " statisticsInfo.start
say "Statistics req numNCB_r: " statisticsInfo.numNCB_r
say "Net Statistics numNCB_s: " statisticsInfo.numNCB_s
say "Net Statistics numNCB_a: " statisticsInfo.numNCB_a
say "Net Statistics fiNCB_r: " statisticsInfo.fiNCB_r
say "Net Statistics fiNCB_s: " statisticsInfo.fiNCB_s
say "Net Statistics fiNCB_a: " statisticsInfo.fiNCB_a
say "Net Statistics fcNCB_r: " statisticsInfo.fcNCB_r
say "Net Statistics fcNCB_s: " statisticsInfo.fcNCB_s
say "Net Statistics fcNCB_a: " statisticsInfo.fcNCB_a
say "Net Statistics sesstart: " statisticsInfo.sesstart
say "Net Statistics sessfailcon: " statisticsInfo.sessfailcon
say "Net Statistics sessbroke: " statisticsInfo.sessbroke
say "Net Statistics uses: " statisticsInfo.uses
say "Net Statistics usefail: " statisticsInfo.usefail
say "Net Statistics autorec: " statisticsInfo.autorec
say "Net Statistics bytessent_r: " statisticsInfo.bytessent_r
say "Net Statistics bytesrcvd_r: " statisticsInfo.bytesrcvd_r
say "Net Statistics bytessent_s: " statisticsInfo.bytessent_s
say "Net Statistics bytesrcvd_s: " statisticsInfo.bytesrcvd_s
say "Net Statistics bytessent_a: " statisticsInfo.bytessent_a
say "Net Statistics bytesrcvd_a: " statisticsInfo.bytesrcvd_a
say "Net Statistics reqbufneed: " statisticsInfo.reqbufneed
say "Net Statistics bigbufneed: " statisticsInfo.bigbufneed
/* The server statistics */
myRc = NetGetInfo(NETSTATISTICS, 'statisticsInfo', SrvName, SRV_STAT)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if statisticsInfo.1 = '-none-' then do
say statisticsInfo.1
call DropLs30utFuncs
exit 0
end
say
say "Statistics srv start: " statisticsInfo.start
say "Statistics srv fopens: " statisticsInfo.fopens
say "Statistics srv devopens: " statisticsInfo.devopens
say "Statistics srv jobsqueued: " statisticsInfo.jobsqueued
say "Statistics srv sopens: " statisticsInfo.sopens
say "Statistics srv stimedout: " statisticsInfo.stimedout
say "Statistics srv serrorout: " statisticsInfo.serrorout
say "Statistics srv pwerrors: " statisticsInfo.pwerrors
say "Statistics srv permerrors: " statisticsInfo.permerrors
say "Statistics srv syserrors: " statisticsInfo.syserrors
say "Statistics srv bytessent: " statisticsInfo.bytessent
say "Statistics srv bytesrcvd: " statisticsInfo.bytesrcvd
say "Statistics srv avresponse: " statisticsInfo.avresponse
say "Statistics srv reqbufneed: " statisticsInfo.reqbufneed
say "Statistics srv bigbufneed: " statisticsInfo.bigbufneed
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Statistics req start: Thu May 6 18:19:15 1993
Statistics req numNCB_r: 2213
Net Statistics numNCB_s: 31
Net Statistics numNCB_a: 1410
Net Statistics fiNCB_r: 0
Net Statistics fiNCB_s: 0
Net Statistics fiNCB_a: 0
Net Statistics fcNCB_r: 0
Net Statistics fcNCB_s: 0
Net Statistics fcNCB_a: 0
Net Statistics sesstart: 7
Net Statistics sessfailcon: 0
Net Statistics sessbroke: 3
Net Statistics uses: 23
Net Statistics usefail: 0
Net Statistics autorec: 0
Net Statistics bytessent_r: 2430724
Net Statistics bytesrcvd_r: 263720
Net Statistics bytessent_s: 320
Net Statistics bytesrcvd_s: 1019
Net Statistics bytessent_a: 73113
Net Statistics bytesrcvd_a: 90194
Net Statistics reqbufneed: 0
Net Statistics bigbufneed: 0
Statistics srv start: Thu May 6 20:19:21 1993
Statistics srv fopens: 0
Statistics srv devopens: 0
Statistics srv jobsqueued: 0
Statistics srv sopens: 2
Statistics srv stimedout: 0
Statistics srv serrorout: 0
Statistics srv pwerrors: 0
Statistics srv permerrors: 0
Statistics srv syserrors: 0
Statistics srv bytessent: 160
Statistics srv bytesrcvd: 5121
Statistics srv avresponse: 157
Statistics srv reqbufneed: 0
Statistics srv bigbufneed: 0
ΓòÉΓòÉΓòÉ 8.22. NETUSE Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a connection to a shared resource.
Syntax
MyRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
Parameters
The parameters specified are
'useInfo' The REXX variable receiving the result. The variable is
divided into:
o useInfo.local The local device name being redirected to the shared
resource
o useInfo.remote The UNC name of the remote resource being accessed. The
string has the following form \\servername\netname.
o useInfo.password This value is not available (N/A)
o useInfo.status The status of the connection
o useInfo.asg_type The resource type
o useInfo.refcount The number of files, directories, and other processes
that are open on the remote resource
o useInfo.usecount The number of uses
SrvName The server name if remote
NetworkName The network name.
o If the connection is a device name connection, then the name specified
must be the name of the local device
o If the connection is a UNC connection, then the name specified must be the
UNC name
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get net use information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSE = 270
SrvName = '\\FSC30DCR'
NetworkName = 'T:'
myRc = NetGetInfo(NETUSE, 'useInfo', SrvName, NetworkName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
say
say 'Local device name: ' useInfo.local
say 'UNC name: ' useInfo.remote
say 'Password: ' useInfo.password
say 'Connection status: ' useInfo.status
say 'Resource type: ' useInfo.asg_type
say 'Open count: ' useInfo.refcount
say 'Number uses: ' useInfo.usecount
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Local device name: T:
UNC name: \\FSC30DCR\FORALL
Password: N/A
Connection status: Connection valid
Resource type: Disk device
Open count: 1
Number uses: 1
ΓòÉΓòÉΓòÉ 8.23. NETAPPSEL Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about all types of applications contained in
the user's desktop application folders
Syntax
MyRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
Parameters
The parameters specified are
'appSelInfo' The REXX variable receiving the result. The variable is
divided into:
o appSelInfo.count The count of application selector entries returned
o appSelInfo.i.appname The application name. The variable i has a value 1
to appSelInfo.count
o appSelInfo.i.apptype The application type. The variable i, see above
SrvName The server name if remote
UserId The userid
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get application selector information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPPSEL = 32
SrvName = '\\ILIDC'
UserId = 'FMAM'
myRc = NetGetInfo(NETAPPSEL, 'appSelInfo', SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if appSelInfo.1 = '-none-' then do
say appSelInfo.1
call DropLs30utFuncs
exit 0
end
if appSelInfo.count <> 0 then do
say 'Number of entries: ' appSelInfo.count
do i=1 to appSelInfo.count
say
say 'Application entry: ' i
say 'Application Name: ' appSelInfo.i.appname
say 'Application type: ' appSelInfo.i.apptype
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 2
Application entry: 1
Application Name: ALLAPPS
Application type: Public OS/2 application
Application entry: 2
Application Name: THENEW
Application type: Public OS/2 application
ΓòÉΓòÉΓòÉ 8.24. NETUSERGROUPS Get Info ΓòÉΓòÉΓòÉ
The function lists the names of all groups in the user accounts subsystem (UAS)
database to which a particular user belongs. This function is identical to
NetEnumerate(NETUSERGROUPS).
Syntax
MyRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
Parameters
The parameters specified are
'userGroups' The REXX variable receiving the result. The variable is
divided into:
o userGroups.0 The number of groups in which the user has a entry
o userGroups.i The actual group names
SrvName The server name if remote
UserId The userid
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get the groups in which a user is defined */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSERGROUPS = 330
SrvName = '\\ILIDC'
UserId = 'FMAM'
myRc = NetGetInfo(NETUSERGROUPS, 'userGroups', SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if userGroups.1 = '-none-' then do
say userGroups.1
call DropLs30utFuncs
exit 0
end
if userGroups.0 <> 0 then do
say 'Number of entries: ' userGroups.0
say
do i=1 to userGroups.0
say 'Group Name: ' userGroups.i
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Number of entries: 3
Group Name: MANAGERS
Group Name: HR_PRINT
Group Name: USERS
ΓòÉΓòÉΓòÉ 8.25. NETUSER Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a particular account on a server.
Syntax
MyRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
Parameters
The parameters specified are
'userInfo' The REXX variable receiving the result. The variable is
divided into:
o userInfo.name The account name
o userInfo.comment The account comment
o userInfo.usr_comment The account comment which is a user-settable comment
o userInfo.full_name The full name of the user
o userInfo.priv The account privilege level
o userInfo.password_age The password age in seconds
o userInfo.home_dir The user home directory, if any
o userInfo.parms The user parameters
o userInfo.last_logon The last logon time
o userInfo.last_logoff The last logoff time
o userInfo.bad_pw_count The number of attempts to validate a bad password
o userInfo.num_logons The number of successful logons
o userInfo.logon_server The computer to handle logon requests for a user
o userInfo.country_code The country code for the user
o userInfo.code_page The country code page for the user
o userInfo.workstations The workstation restriction for the user
o userInfo.max_storage The maximum storage allotted for the home directory
o userInfo.unit_per_week The number of hours within a week (7 * 24 = 168)
o userInfo.restricted_hours Logon restriction on certain hours
o userInfo.i.logon_hours The logon hours allowed. 0 means 0 to 0:59, 1 1:00
to 1:59. The variable i has a value from 1 to 7, where 1 is Sunday, 2
Monday etc.. The logon_hours are only valid if userInfo.restricted_hours
differs from the value '-none-'
SrvName The server name if remote
UserId The userid
Note
The server name can be specified as '' for a local server or computer.
Example
/* Get the user account information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSER = 280
SrvName = '\\ILIDC'
UserId = 'FMAM'
myRc = NetGetInfo(NETUSER, 'userInfo', SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if userInfo.1 = '-none-' then do
say userInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'The account name: ' userInfo.name
say 'Comment: ' userInfo.comment
say 'User comment: ' userInfo.usr_comment
say 'Full name: ' userInfo.full_name
say 'Account privilege: ' userInfo.priv
say 'Password age: ' userInfo.password_age
say 'Home directory: ' userInfo.home_dir
say 'User parameters: ' userInfo.parms
say 'Last logon: ' userInfo.last_logon
say 'Last logoff: ' userInfo.last_logoff
say 'Bad password count: ' userInfo.bad_pw_count
say 'Number logons: ' userInfo.num_logons
say 'Logon Server: ' userInfo.logon_server
say 'Country Code: ' userInfo.country_code
say 'Code page: ' userInfo.code_page
say 'Workstations allowed: ' userInfo.workstations
say 'Max. disk storage: ' userInfo.max_storage
say 'Hours per week: ' userInfo.units_per_week
if userInfo.restricted_hours <> '-none-' then do
say
say 'Logon hours from Sunday = 1 to Saterday = 7'
say
do i=1 to 7
say 'Day: ' i 'Hours: ' userInfo.i.logon_hours
end
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
The account name: FMAM
Comment: Section Manager in N91
User comment: -none-
Full name: Section A Manager Mr Fm Am
Account privilege: User
Password age: 7445
Home directory: -none-
User parameters: -none-
Last logon: Unknown
Last logoff: Unknown
Bad password count: 1
Number logons: Unknown
Logon Server: \\*
Country Code: 000
Code page: 0
Workstations allowed: No Restriction
Max. disk storage: No Limit
Hours per week: 168
Logon hours from Sunday = 1 to Saterday = 7
Day: 1 Hours:
Day: 2 Hours: 8 9 10 11 12 13 14 15 16 17
Day: 3 Hours: 8 9 10 11 12 13 14 15 16 17
Day: 4 Hours: 8 9 10 11 12 13 14 15 16 17
Day: 5 Hours: 8 9 10 11 12 13 14 15 16 17
Day: 6 Hours: 8 9 10 11 12 13 14 15 16 17
Day: 7 Hours:
ΓòÉΓòÉΓòÉ 8.26. NETLOGONASN Get Info ΓòÉΓòÉΓòÉ
The function retrieves information about a user logon assignments.
Syntax
MyRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
Parameters
The parameters specified are
'logonAsnInfo' The REXX variable receiving the result. The variable is
divided into:
o logonAsnInfo.count The count of logon assignments. If this value is equal
or large than 1 then following values are assigned
o logonAsnInfo.i.alias The alias name assigned. The variable i has a value
from 1 to logonAsnInfo.count
o logonAsnInfo.i.type The alias type. The variable i has a value from 1 to
logonAsnInfo.count
o logonAsnInfo.i.device The local device. The variable i has a value from 1
to logonAsnInfo.count
SrvName The server name if remote
UserId The userid
Note
The server name can be specified as '' for a local server.
Example
/* Get the user logon assignments information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETLOGONASN = 52
SrvName = '\\ILIDC'
UserId = 'FMAM'
myRc = NetGetInfo(NETLOGONASN, 'logonAsnInfo', SrvName, UserId)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if logonAsnInfo.1 = '-none-' then do
say logonAsnInfo.1
call DropLs30utFuncs
exit 0
end
say 'The number of logon assigments are: ' logonAsnInfo.count
do i=1 to logonAsnInfo.count
say
say 'The Alias assigned: ' logonAsnInfo.i.alias
say 'Alias type: ' logonAsnInfo.i.type
say 'Device assigned: ' logonAsnInfo.i.device
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
The number of logon assigments are: 3
The Alias assigned: BOOKS
Alias type: Files alias
Device assigned: O
The Alias assigned: MYDEMO
Alias type: Files alias
Device assigned: P
The Alias assigned: SRVCOM
Alias type: Serial device alias
Device assigned: COM3
ΓòÉΓòÉΓòÉ 8.27. NETUSERMODALS Get Info ΓòÉΓòÉΓòÉ
The function gets global modals-related information for all users and groups in
the user accounts subsystem (UAS) database.
Syntax
MyRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
Parameters
The parameters specified are
'userModalsInfo' The REXX variable receiving the result. The variable is
divided into:
o userModalsInfo.min_passwd_len The minimum password length
o userModalsInfo.max_passwd_age The maximum password age in days
o userModalsInfo.min_passwd_age The minimum password age in days
o userModalsInfo.force_logoff The length of time (in seconds) after the
valid logon hours that the user should be forced off the network
o userModalsInfo.password_hist_len The length of the password history, that
is, the number of passwords in the history buffer that are scanned versus
the new password in a password change attempt
SrvName The server name if remote
Note
The server name can be specified as '' for a local server.
Example
/* Get user modals information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSERMODALS = 360
SrvName = '\\ILIDC'
myRc = NetGetInfo(NETUSERMODALS, 'userModalsInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if userModalsInfo.1 = '-none-' then do
say logonAsnInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Minimum password length: ' userModalsInfo.min_passwd_len
say 'Maximum password age: ' userModalsInfo.max_passwd_age
say 'Minimum password age: ' userModalsInfo.min_passwd_age
say 'Forced logoff time: ' userModalsInfo.force_logoff
say 'Password history length: ' userModalsInfo.password_hist_len
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Minimum password length: 4
Maximum password age: Unlimited
Minimum password age: No delay required
Forced logoff time: Never
Password history length: 8
ΓòÉΓòÉΓòÉ 8.28. NETWKSTA Get Info ΓòÉΓòÉΓòÉ
The function returns information about the configuration components of the
requester component.
Syntax
MyRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
Parameters
The parameters specified are
'wkstaInfo' The REXX variable receiving the result. The variable is
divided into:
o wkstaInfo.computername The computer name of the requester being queried
o wkstaInfo.username The user's name logged on the requester
o wkstaInfo.langroup The name of the domain to which the requester belongs
o wkstaInfo.ver_major The major software version (Version)
o wkstaInfo.ver_minor The minor software version (Release)
o wkstaInfo.logon_domain The name of the domain that the user is logged on
to
o wkstaInfo.oth_domains Listing of domains on which the machine is
currently enlisted
SrvName The server name if a remote server otherwise a null string
for the local computer.
Note
The server name can be specified as '' for a local server.
Example
/* Get wksta information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETWKSTA = 350
SrvName = '\\ILIDC'
myRc = NetGetInfo(NETWKSTA, 'wkstaInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if wkstaInfo.1 = '-none-' then do
say wkstaInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Computer Name: ' wkstaInfo.computername
say 'User Id logged on: ' wkstaInfo.username
say 'LAN Group: ' wkstaInfo.langroup
say 'Major version number: ' wkstaInfo.ver_major
say 'Minor version number: ' wkstaInfo.ver_minor
say 'Logon domain: ' wkstaInfo.logon_domain
say 'Other domains: ' wkstaInfo.oth_domains
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Computer Name: \\ILIDC
User Id logged on: LINDBERG
LAN Group: ILI
Major version number: 3
Minor version number: 0
Logon domain: ILI
Other domains: -none-
ΓòÉΓòÉΓòÉ 8.29. NETSERVERMODALS Get Info ΓòÉΓòÉΓòÉ
The function gets server modals-related information.
Syntax
MyRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
Parameters
The parameters specified are
'serverModalsInfo' The REXX variable receiving the result. The variable is
divided into:
o serModalsInfo.role The server role
o serModalsInfo.primary The name of the primary domain controller to which
the server belongs
SrvName The server name.
Note
The server name can be specified as '' for a local server.
Example
/* Get server modals information */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSERVERMODALS = 370
SrvName = '\\ILIDC'
myRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
if serverModalsInfo.1 = '-none-' then do
say serverModalsInfo.1
call DropLs30utFuncs
exit 0
end
say
say 'Server role: ' serverModalsInfo.role
say 'Domain Controller name: ' serverModalsInfo.primary
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Server role: Primary server in the domain
Domain Controller name: ILIDC
ΓòÉΓòÉΓòÉ 9. NetSetInfo ΓòÉΓòÉΓòÉ
The Net Set Information functions is a family of functions that can be called
with a number of parameters. The use of the NetSetInfo has minimum two
different parameters. The generic syntax is:
MyRc = NetSetInfo(option, stemvar, parm1, parm2, parm3)
MyRc = NetSetInfo(option, parm1, parm2, parm3)
The option parameter contains a value to determine what type or option has to
be deleted. An example would be the deletion of a user.
The parm1, parm2, parm3 parameters will be dependent on the performed option.
The MyRc is the return code that will have an value from the NetAdd() function.
If the call is successful the character '0' will be returned. Otherwise an
error code and descriptive text will be inserted by NetAdd.
The option parameter values are defined in Option parameter values.
ΓòÉΓòÉΓòÉ 9.1. NETACCESS Set Info ΓòÉΓòÉΓòÉ
The function modifies one or more Access Control Profiles for an existing
Access Control List for a resource.
Syntax
MyRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
Parameters
The parameters required are:
'ModifyACL' The REXX variable holding the values. The variable is divided
into
o ModifyACL.audit The auditing flags. The flags are defined as:
- A Audit all. When this bit is set, all access attempts will be
audited.
- O If O, audit successful file opens.
- W If W, audit successful file writes and successful directory creates.
- D If D, audit successful file deletes or truncates and successful
directory deletes.
- P If P, audit successful file and directory access control profile
change.
- o If o, audit failed file opens.
- w If w, audit failed file writes and failed directory creates.
- d If d, audit failed file deletes or truncates and failed directory
deletes.
- p If d, audit failed file and directory access control profile change.
- N or -none- No auditing is performed.
If no value is specied or ModifyACL.audit is not defined, existing
auditing flags are not modified
o ModifyACL.count The number of of access controls available for the
resource. The value can be 0 or undefined. In this case access control
profiles are not modified
o ModifyACL.i.ugname The user or group name. i is a value from 1 to
ModifyACL.count
o ModifyACL.i.access The access profile. i is specified as above. The
access control flags are as follows:
- N None
- R Read
- W Write
- C Create
- X Execute
- D Delete
- P Permissions
- G This is a Group permission. The G parameter is not required to be
specified
SrvName The server name
resourceName The resource name must be specified in the name format as
described below:
Resource Type Name Format
------------- -----------
Drive drive:
Path \path
Directory drive:pathname
File drive:pathname
UNC \\server\sharename\path
Pipe \pipe\pipename
Spooler Queue \print\queuename
Serial Device Queue \comm\chardevqueue
Note
The server name can be specified as '' for a local server.
Example
/* Modify existing Access Control Entry */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETACCESS = 10
SrvName = '\\ILIDC'
resourceName = 'D:\APPS\TEMP'
ModifyACL.count = 1
ModifyACL.1.ugname = 'CSUSERS'
ModifyACL.1.access = 'RWCD'
myRc = NetSetInfo(NETACCESS, 'ModifyACL', SrvName, resourceName)
if myRc <> '0' then do
say 'Got error from NetSetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Access Control Profile modified successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Access Control Profile modified successfully
ΓòÉΓòÉΓòÉ 9.2. NETALIAS Set Info ΓòÉΓòÉΓòÉ
The function modifies a certain alias definition parameter value.
Syntax
MyRc = NetSetInfo(NETALIAS, 'PARAMETER', parmValue, SrvName, AliasName)
Parameters
The parameters required are:
'PARAMETER' The parameter name of the alias value to be modified. The
parm values that causes a change of the alias definitions are
specified below. Only one parameter value can be changed at a
time. If the parameter is invalid or the parameter value is
unknown or in error no changes will occour.
o remark The alias comment or remark
o mode When the alias is shared. Accepted values are:
When shared Shared mode name
----------- ----------------
At server startup 'At server startup'
'STARTUP'
Shared by adminstrator 'By administrator'
'BYADMIN'
Shared by request to use 'At Requester use'
'DYNAMIC'
o maxuses The maximum number of users who can have redirection to the
resource identified by this alias
o path The path for files alias only
o priority The serial device priority
o device_pool The serial device pool
parmValue The value of the parameter that is being modified
SrvName The server name. In this case the domain controller name
AliasName The name of the alias
Note
The server name can be specified as '' for a local server.
Example
/* Modify existing Alias remark, maxuses and share mode */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETALIAS = 20
SrvName = '\\ILIDC'
AliasName = 'BOOKS'
aliasInfo.remark = 'Modified Alias for more uses'
aliasInfo.maxuses = 280
aliasInfo.mode = 'At Requester use'
myRc = NetSetInfo(NETALIAS, 'remark', aliasInfo.remark, SrvName, AliasName)
if myRc <> '0' then do
say 'Got error from NetSetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
myRc = NetSetInfo(NETALIAS, 'maxuses', aliasInfo.maxuses, SrvName, AliasName)
if myRc <> '0' then do
say 'Got error from NetSetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
myRc = NetSetInfo(NETALIAS, 'mode', aliasInfo.mode, SrvName, AliasName)
if myRc <> '0' then do
say 'Got error from NetSetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Alias definition modified successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Alias definition modified successfully
ΓòÉΓòÉΓòÉ 9.3. NETAPP Set Info ΓòÉΓòÉΓòÉ
The function modifies one of the application definition parameter value.
Syntax
MyRc = NetSetInfo(NETAPP, 'PARAMETER', parmValue, SrvName, AppName, UserId)
Parameters
The parameters required are:
'PARAMETER' The parameter name of the application value to be modified.
The parameter values that causes a change of the alias
definitions are specified below. Only one parameter value can
be changed at a time. If the parameter is invalid or the
parameter value is unknown or in error no changes will
occour.
o remark The application comment or remark
o command The command that starts the application
o command_parms The application start parameters
parmValue The value of the parameter that is being modified
SrvName The server name. In this case the domain controller name
AppName The name of the application
UserId The UserId must be specified for private application. For
public applications use the value ''
Note
The server name can be specified as '' for a local server.
Example
/* Modify existing Public application remark */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETAPP = 30
SrvName = '\\ILIDC'
AppName = 'BOOKREAD'
UserId = ''
appInfo.remark = 'IBM BookManager Read/2 1.2.1'
myRc = NetSetInfo(NETAPP, 'remark', appInfo.remark, SrvName, AppName, UserId)
if myRc <> '0' then do
say 'Got error from NetSetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say
say "Application remark modified successfully"
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Application remark modified successfully
ΓòÉΓòÉΓòÉ 9.4. NETUSERPASSWORD Set Info ΓòÉΓòÉΓòÉ
The function changes a user password.
Syntax
MyRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
Parameters
The parameters specified are:
SrvName The server name
UserId The userid to change to password on
OldPw The old password
NewPw The new password
Note
The server name can be specified as '' for a local server.
Example
/* Change a userid password */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETUSERPASSWORD = 260
SrvName = '\\ILIDC'
UserId = 'WS12345'
OldPw = 'PASSWORD'
NewPw = 'NEWPASS'
myRc = NetSetInfo(NETUSERPASSWORD, SrvName, UserId, OldPw, NewPw)
if myRc <> '0' then do
say 'Got error from NetSetInfo() ' myRc
call DropLs30utFuncs
exit 9
end
else do
say 'Changed Password successfully'
say
end
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Changed Password successfully
ΓòÉΓòÉΓòÉ 10. Option parameter values ΓòÉΓòÉΓòÉ
The option values defined are as follows:
NETACCESS 10
NETACCESSUSERPERMS 12
NETALIAS 20
NETAPP 30
NETAPPSEL 32
NETCONNECTION 40
NETLOGON 50
NETLOGONASN 52
NETFILE 60
NETGROUP 70
NETMESSAGENAME 80
NETBIOS 90
NETPRINTDEST 100
NETPRINTJOB 110
NETPRINTQUEUE 120
NETCHARDEV 130
NETCHARDEVQ 140
NETSERVERDISK 150
NETSERVER 160
NETSERVICE 170
NETSESSION 180
NETSHARE 190
NETSTATISTICS 195
NETACCESSDEL 240
NETACCESSADD 250
NETUSERPASSWORD 260
NETUSE 270
NETUSER 280
NETPRINTPORT 300
NETPRINTDRIVER 310
NETPRINTQPROC 320
NETUSERGROUPS 330
NETGROUPUSERS 340
NETWKSTA 350
NETUSERMODALS 360
NETSERVERMODALS 370
ΓòÉΓòÉΓòÉ 11. Sample REXX Procedures ΓòÉΓòÉΓòÉ
This chapter describes some REXX procedures that combines a number of
LS30UT.DLL functions into work related procedures
ΓòÉΓòÉΓòÉ 11.1. Monitor Number Shares ΓòÉΓòÉΓòÉ
This function monitors the number of shares on a server. The administrator
wanted to know if the MAXSHARES parameter was sufficient configured.
NUMSHARE Procedure
/* Display number shares on a server */
call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs
call SysLoadFuncs
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
NETSHARE = 190
SrvName = '\\FSCDC'
'@CLS'
signal on error name error
signal on halt name error
signal on syntax name error
call SysCurState OFF
do forever
myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call SysCurState ON
call DropLs30utFuncs
call SysDropFuncs
exit 9
end
if shareInfo.1 = '-none-' then do
say shareInfo.1
call SysCurState ON
call DropLs30utFuncs
call SysDropFuncs
exit 0
end
pos = SysCurPos(0,0)
say 'Time:' TIME('N') 'Num shares: ' shareInfo.0
call SysSleep 60
end
error:
call SysCurState ON
call DropLs30utFuncs
call SysDropFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
ΓòÉΓòÉΓòÉ 12. FASTService for OS/2 ΓòÉΓòÉΓòÉ
The IBM FASTService for OS/2 does not have a REXX interface. This chapter
describes a private interface that can be used to make use of some or most of
the FASTService Software Probes.
Refer to Software Probe APIs for High-Level Languages Programmer's Guide,
Release 2, LC38-7088.
ΓòÉΓòÉΓòÉ 12.1. FASTService interface ΓòÉΓòÉΓòÉ
The FASTService REXX API is a private implementation, which does follow the C
call API. The functions implemented are:
o EPVSTRT
o EPVOPTQ
o EPVOPTS
o EPVDUMP Currently not included. Memory leak problem
o EPVKEYW
o EPVMSG
o EPVQUIC
o EPVPROB
o EPVSTOP
The use of the functions is performed by a call to FASTService() with two
parameters. The parameters are:
o The FASTService function name value
o The parameter list, provided by a REXX variable
The call to FASTService will provide a return code. See below for an example:
VEPVSTRT = 10
rexxVar.product_id = 'THETHING'
rexxVar.product_version = '100'
/* More lines */
theRc = FASTService(VEPVSTRT, rexxVar)
/* Handle return code */
ΓòÉΓòÉΓòÉ 12.2. EPVSTRT ΓòÉΓòÉΓòÉ
Start using and define Probe global variables.
Syntax
MyRc = FASTService(VEPVSTRT, rexxVar)
Parameters
The parameters and default values are:
VEPVSTRT The implementation value is 10
rexxVar The values of the rexxVar are:
o rexxVar.handle The value must be 1. If not specified a default of 1 will
be used. The returned value must be supplied on all other calls to
FASTService
o rexxVar.language The value must be '01' for C interface. If not specified
a value of '01' will be used
o rexxVar.product_id The product id. A value must be specified. Otherwise a
default of 'LS30UTIL ' will be used
o rexxVar.product_version If not specified a value of '100 ' will be used
o rexxVar.product_long_name If not specied a value of 'REXX procedure' will
be used
o rexxVar.product_owner If not specied the value 'IBM' will be used
o rexxVar.ffst_version This must be specified as '1200'. If not specified
the value '1200' will be used
o rexxVar.application_id If not specied a default value of 'REXXAPI' will
be used
MyRc The FastService or LS30UT.DLL return code
Note
None.
Example
/* Start using FASTService */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
VEPVSTRT = 10
VEPVSTOP = 90
rexxVar.handle = 1
rexxVar.product_id = 'LS30UTIL ' /* 12 chars, with last 3 blanks */
rexxVar.product_version = '102 ' /* 5 chars, with last 2 blanks */
rexxVar.product_long_name = 'FASTService from LS30UT.DLL'
rexxVar.product_owner = 'IBM'
rexxVar.application_id = 'REXXAPI' /* Entry to PCT */
myRc = FASTService(VEPVSTRT, rexxVar)
if myRc <> '0' then do
say 'Got error from FASTService() ' myRc
myRc = FASTService(VEPVSTOP, rexxVar.handle)
call DropLs30utFuncs
exit 9
end
else do
say
say "Initiated FASTService successfully"
end
myRc = FASTService(VEPVSTOP, rexxVar.handle)
say 'EPVSTOP returned' myRc
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Initiated FASTService successfully
EPVSTOP returned 0
ΓòÉΓòÉΓòÉ 12.3. EPVOPTQ ΓòÉΓòÉΓòÉ
Turn output options on or off for quick probes.
Syntax
MyRc = FASTService(VEPVOPTQ, rexxVar)
Parameters
The parameters and default values are:
VEPVOPTQ The implementation value is 20
rexxVar The values of the rexxVar are:
o rexxVar.handle The handle value returned from EPVSTRT
o rexxVar.send_alert The value can either be '0' or '1'. The default value
is '1' (Send alert)
o rexxVar.log_event The value can either be '0' or '1'. The default value
is '1' (Create a local log entry)
o rexxVar.ffst_msgs This value does not apply for OS/2
MyRc The FastService or LS30UT.DLL return code
Note
See Sample FASTService Procedure.
ΓòÉΓòÉΓòÉ 12.4. EPVOPTS ΓòÉΓòÉΓòÉ
Turn output options on or off for probes and suppress dublicate dumps.
Syntax
MyRc = FASTService(VEPVOPTS, rexxVar)
Parameters
The parameters and default values are:
VEPVOPTS The implementation value is 30
rexxVar The values of the rexxVar are:
o rexxVar.handle The handle value returned from EPVSTRT
o rexxVar.send_alert The value can either be '0' or '1'. The default value
is '1' (Send alert)
o rexxVar.send_symp_str This value does not apply for OS/2
o rexxVar.log_event The value can either be '0' or '1'. The default value
is '1' (Create a local log entry)
o rexxVar.ffst_msgs This value does not apply for OS/2
o rexxVar.add_system_data The value can either be '0' or '1'. The default
value is '0' (Do not add extended data)
o rexxVar.suppress_dup_dump The value can either be '0' or '1'. The default
value is '1' (Suppress duplicate costomized dumps)
o rexxVar.keep_probe_data The value can either be '0' or '1'. The default
value is '0' (Do not keep probe data)
MyRc The FastService or LS30UT.DLL return code
Note
See Sample FASTService Procedure.
ΓòÉΓòÉΓòÉ 12.5. EPVDUMP ΓòÉΓòÉΓòÉ
Currently not included.
ΓòÉΓòÉΓòÉ 12.6. EPVKEYW ΓòÉΓòÉΓòÉ
Defines the primary symptom string.
Syntax
MyRc = FASTService(VEPVKEYW, rexxVar)
Parameters
The parameters and default values are:
VEPVKEYW The implementation value is 50
rexxVar The values of the rexxVar are:
o rexxVar.handle The handle value returned from EPVSTRT
o rexxVar.code_point_set The code points in the generic alert
o rexxVar.keyword1 The keyword to include in the primary symptom string
o rexxVar.keyword2 The second keyword to include in the primary symptom
string
o rexxVar.keyword3 The third keyword to include in the primary symptom
string
o rexxVar.keyword4 The fourth keyword to include in the primary symptom
string
MyRc The FastService or LS30UT.DLL return code
Note
See Sample FASTService Procedure.
ΓòÉΓòÉΓòÉ 12.7. EPVMSG ΓòÉΓòÉΓòÉ
Specify a message.
Syntax
MyRc = FASTService(VEPVMSG, rexxVar)
Parameters
The parameters and default values are:
VEPVMSG The implementation value is 60
rexxVar The values of the rexxVar are:
o rexxVar.handle The handle value returned from EPVSTRT
o rexxVar.path The path to the message file
o rexxVar.filename The message file name
o rexxVar.msg_id The message id
o rexxVar.log_msg The value can either be '0' or '1'. The default value is
'1' (Log the message in the message log)
o rexxVar.disp_msg The value can either be '0' or '1'. The default value is
'1' (Display the message in the message console)
o rexxVar.substitute1 Substitute input value number 1
o rexxVar.substitute2 Substitute input value number 2
o rexxVar.substitute3 Substitute input value number 3
o rexxVar.substitute4 Substitute input value number 4
MyRc The FastService or LS30UT.DLL return code
Note
See Sample FASTService Procedure.
ΓòÉΓòÉΓòÉ 12.8. EPVQUIC ΓòÉΓòÉΓòÉ
Issue a Quick probe.
Syntax
MyRc = FASTService(VEPVQUIC, rexxVar)
Parameters
The parameters and default values are:
VEPVQUIC The implementation value is 70
rexxVar The values of the rexxVar are:
o rexxVar.handle The handle value returned from EPVSTRT
o rexxVar.probe_id The probe identifier
MyRc The FastService or LS30UT.DLL return code
Note
See Sample FASTService Procedure.
ΓòÉΓòÉΓòÉ 12.9. EPVPROB ΓòÉΓòÉΓòÉ
Issue a probe.
Syntax
MyRc = FASTService(VEPVPROB, rexxVar)
Parameters
The parameters and default values are:
VEPVPROB The implementation value is 80
rexxVar The values of the rexxVar are:
o rexxVar.handle The handle value returned from EPVSTRT
o rexxVar.probe_id The probe identifier
o rexxVar.group_id The probe group identifier
o rexxVar.msg_id The probe message identifier in the primary symptom string
o rexxVar.unit_id The name of the code unit containing the probe
o rexxVar.probe_description The probe text information
o rexxVar.probe_type The probe type field
o rexxVar.severity The severity of the event
o rexxVar.major_error_code The major error code
o rexxVar.minor_error_code The minor error code
MyRc The FastService or LS30UT.DLL return code
Note
See Sample FASTService Procedure.
ΓòÉΓòÉΓòÉ 12.10. EPVSTOP ΓòÉΓòÉΓòÉ
Stop using and free Probe global variables.
Syntax
MyRc = FASTService(VEPVSTOP, handleValue)
Parameters
The parameters and default values are:
VEPVSTOP The implementation value is 90
handleValue The FASTService handle value which must be the returned value
from EPVSTRT
MyRc The FastService or LS30UT.DLL return code
Note
None
Example
/* Start using FASTService */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
VEPVSTRT = 10
VEPVSTOP = 90
rexxVar.handle = 1
rexxVar.product_id = 'LS30UTIL ' /* 12 chars, with last 3 blanks */
rexxVar.product_version = '102 ' /* 5 chars, with last 2 blanks */
rexxVar.product_long_name = 'FASTService from LS30UT.DLL'
rexxVar.product_owner = 'IBM'
rexxVar.application_id = 'REXXAPI' /* Entry to PCT */
myRc = FASTService(VEPVSTRT, rexxVar)
if myRc <> '0' then do
say 'Got error from FASTService() ' myRc
myRc = FASTService(VEPVSTOP, rexxVar.handle)
call DropLs30utFuncs
exit 9
end
else do
say
say "Initiated FASTService successfully"
end
myRc = FASTService(VEPVSTOP, rexxVar.handle)
say 'EPVSTOP returned' myRc
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Initiated FASTService successfully
EPVSTOP returned 0
ΓòÉΓòÉΓòÉ 12.11. EPV parameter values ΓòÉΓòÉΓòÉ
The FASTService REXX API parameter values are as follows:
VEPVSTRT 10
VEPVOPTQ 20
VEPVOPTS 30
VEPVDUMP 40
VEPVKEYW 50
VEPVMSG 60
VEPVQUIC 70
VEPVPROB 80
VEPVSTOP 90
ΓòÉΓòÉΓòÉ 12.12. Sample FASTService Procedure ΓòÉΓòÉΓòÉ
The following procedure was used to validate the FASTService interface to REXX.
Example
/* Test the FASTService REXX interface */
call RxFuncAdd 'LoadLs30utFuncs', 'LS30UT', 'LoadLs30utFuncs'
call LoadLs30utFuncs
VEPVSTRT = 10
VEPVOPTQ = 20
VEPVOPTS = 30
VEPVDUMP = 40
VEPVKEYW = 50
VEPVMSG = 60
VEPVQUIC = 70
VEPVPROB = 80
VEPVSTOP = 90
rexxVar.handle = 1
rexxVar.probe_id = 'PROBE001'
rexxVar.ffst_version = '1200'
rexxVar.keyword1 = 'KEYWORD/VALUE'
rexxVar.keyword2 = 'PRCS/ABGD--'
rexxVar.keyword3 = 'PRCS/AB0911'
rexxVar.keyword4 = '--KEYWRD1--'
rexxVar.language = '01'
rexxVar.major_error_code= 4444
rexxVar.minor_error_code= 5555
rexxVar.application_id = 'xxxx'
rexxVar.send_alert = '1'
rexxVar.log_event = '1'
rexxVar.add_system_data = '1'
rexxVar.keep_probe_data = '1'
rexxVar.code_point_set = '123'
rexxVar.probe_type = 'PROBETYPE '
rexxVar.group_id = 'GROUPID '
rexxVar.unit_id = 'UNIT_ID '
rexxVar.probe_description = 'This is a very very very long probe description'
rexxVar.product_id = 'TESTERPID '
rexxVar.product_long_name = 'THIS IS THE PRODUCT LONG NAME '
rexxVar.product_owner = 'PRODUCT OWNER '
rexxVar.product_version = '110 '
rexxVar.disp_msg = 'Y'
rexxVar.path = 'C:\OS2\SYSTEM\'
rexxVar.filename = 'OSO001.MSG '
rexxVar.msg_id = 'SYS0725E '
rexxVar.log_msg = '1'
rexxVar.substitute1 = 'PARM1 '
rexxVar.substitute2 = 'BAD DATA '
rexxVar.substitute3 = 'THIRD '
rexxVar.substitute4 = ' '
rexxVar.severity = '9'
rexxVar.suppress_dup_dump = 'N'
rexxVar.probe_type = '1'
myRc = FASTService(VEPVSTRT, rexxVar)
say 'Expected 0 got ' myRc
say 'Test the EPVOPTQ function'
myRc = FASTService(VEPVOPTQ, rexxVar)
say 'Expected 0 got ' myRc
say 'Test the EPVOPTQ function'
myRc = FASTService(VEPVOPTQ, rexxVar)
say 'Expected 0 got ' myRc
say 'Test the EPVOPTS function'
myRc = FASTService(VEPVOPTS, rexxVar)
say 'Expected -2027151 got ' myRc
say 'Test the EPVKEYW function'
myRc = FASTService(VEPVKEYW, rexxVar)
say 'Expected -2043251 got ' myRc
say 'Test the EPVKEYW function - second pass'
rexxVar1.handle = 0
rexxVar1.code_point_set = rexxVar.code_point_set
rexxVar1.keyword1 = ''
rexxVar1.keyword2 = ''
rexxVar1.keyword3 = ''
rexxVar1.keyword4 = ''
myRc = FASTService(VEPVKEYW, rexxVar1)
say 'Expected -3041051 got ' myRc
say 'Test the EPVKEYW function - third pass'
rexxVar1.handle = rexxVar.handle
rexxVar1.code_point_set = ''
rexxVar1.keyword1 = ''
rexxVar1.keyword2 = ''
rexxVar1.keyword3 = ''
rexxVar1.keyword4 = ''
myRc = FASTService(VEPVKEYW, rexxVar1)
say 'Expected 0 got ' myRc
say 'Test the EPVMSG function'
myRc = FASTService(VEPVMSG, rexxVar)
say 'Expected -2066151 got ' myRc
say 'Test the EPVMSG function - second pass'
rexxVar.disp_msg = '1'
rexxVar.substitute1 = ' '
rexxVar.substitute2 = ' '
rexxVar.substitute3 = ' '
rexxVar.substitute4 = ' '
myRc = FASTService(VEPVMSG, rexxVar)
say 'Expected 0 got ' myRc
say 'Test the EPVPROB function'
myRc = FASTService(VEPVPROB, rexxVar)
say 'Expected -2217302 got ' myRc
say 'Test the EPVPROB function - second pass'
rexxVar.probe_id = ''
rexxVar.major_error_code = ''
myRc = FASTService(VEPVPROB, rexxVar)
say 'Expected -3212056 got ' myRc
say 'Test the EPVPROB function - third pass'
rexxVar.probe_id = 'PROBE001'
rexxVar.major_error_code = 4444
myRc = FASTService(VEPVPROB, rexxVar)
say 'Expected -2217302 got ' myRc
myRc = FASTService(VEPVSTOP, rexxVar.handle)
say 'EPVSTOP returned' myRc
call DropLs30utFuncs
call RxFuncDrop 'LoadLs30utFuncs'
exit 0
Example Output
Expected 0 got 0
Test the EPVOPTQ function
Expected 0 got 0
Test the EPVOPTQ function
Expected 0 got 0
Test the EPVOPTS function
Expected -2027151 got -2027151 Could not perform EPVOPTS
Test the EPVKEYW function
Expected -2043251 got -2043251 Could not perform EPVKEYW
Test the EPVKEYW function - second pass
Expected -3041051 got -3041051 Could not perform EPVKEYW
Test the EPVKEYW function - third pass
Expected 0 got 0
Test the EPVMSG function
Expected -2066151 got -2066151 Could not perform EPVMSG
Test the EPVMSG function - second pass
Expected 0 got 0
Test the EPVPROB function
Expected -2217302 got -2217302 Could not perform EPVPROB
Test the EPVPROB function - second pass
Expected -3212056 got -3212056 Could not perform EPVPROB
Test the EPVPROB function - third pass
Expected -2217302 got -2217302 Could not perform EPVPROB
EPVSTOP returned 0