9.14 Params Collection

This collection returns all the categories of the server configuration parameters that can be set.

There are 13 categories, each with a category number, (1 Communication, 2 Memory, 3 File caching, 4 Directory caching, and so on). Each category, in turn, has settable parameters. For example, Communication has parameters such as Maximum Packed Receive and Minimum Packet Receive Buffer. To view the categories and their parameters, type set at the server prompt.

9.14.1 Get method

Returns the ParamObject specified by the SettableName parameter. If the Category number is specified, the sequence number must also be specified.

Syntax

object.Get( 
   SettableName As String)

or

object.Get( 
   CategoryNumber As Integer, 
   [SequenceNumber As Integer])

Parameters

SettableName

The settable parameter name.

CategoryNumber

The settable parameter category number.

SequenceNumber

Optional. The settable parameter sequence number.

Return Values

ParamObject.

Example

This example returns the ParamObject specified by the SettableName parameter.

set srv = createobject ("ucx:Server") 
set srvparams = srv.Params 
set paramObj = Srvparams.Get ("TimeSync Add Time Source") 
     Print("Name is :" & paramObj.Name & " Value is " & paramObj.Value)

9.14.2 GetCategoryName method

Returns the category name associated with the specified CategoryNumber.

Syntax

object.GetCategoryName( 
   CategoryNumber As Integer)

Parameters

CategoryNumber

The category number associated with the name.

Return Values

String.

Example

This example returns the category name for category 1.

set srv = createobject ("ucx:Server") 
set srvparams = srv.Params 
catName = Srvparams.GetCategoryName(1) 
print("Category name is "& catName)

9.14.3 GetObjects method

Returns all ParamObjects for the specified category.

Syntax

object.GetObjects( 
   CategoryNumber As Integer) 
   [,CrossCategory As Boolean])

Parameters

CategoryNumber

The category number for which the information is to be retrieved.

CrossCategory

Optional. If set to TRUE, retrieves information across categories (default=FALSE).

Return Values

ParamObjects.

Example

This example returns all ParamObjects for category 1.

set srv = createobject ("ucx:Server") 
set srvparams = srv.Params 
set paramObjs = srvparams.GetObjects(1) 
paramObjs.Reset 
while (paramObjs.HasMoreElements=TRUE) 
     set paramObj=paramObjs.Next 
     print ("Name is " & paramObj.Name & " Value is " & paramObj.Value) 
wend

9.14.4 Set method

Sets the value for the specified parameter object.

Syntax

object.Set( 
   SettableName As String, 
   Value As AnyType)

Parameters

SettableName

The settable parameter name.

CategoryNumber

The settable parameter value.

Return Values

ParamObject.

Example

This example sets the value for Minimum Cache File Buffers to 26 if the current value is less than 25. If the current value is greater than 25, this example sets the value to 25.

set srv = createobject ("ucx:Server") 
set srvparams = srv.Params 
set paramObj = Srvparams.Get ("Minimum File Cache Buffers") 
     Print("Current value of Minimum Cache File Buffers is: " & paramobj.value 
if ( paramobj.value>25 ) then 
     newval=25 
else 
     newval=26 
endif 
srvparams.Set("Minimum File Cache Buffers", newval) 
set paramObj = Srvparams.Get ("Minimum File Cache Buffers") 
print "New value of Minimum File Cache Buffers is: " &paramobj.value