8 7 1 DEFINE_PTY Parameters

LANSA Technical

8.7.1 DEFINE_PTY Parameters

NAME

SET

GET

DESC

ACCESS

HELP

NAME

NAME is the unique name of a property. It can be up to 20 characters long.

SET

SET specifies what happens when an owner component sets the value of this property.

*NONE

Indicates that an owner component cannot set the value of this property.

*AUTO and component name

Indicates that an owner component can set the value of this property. The value which is passed to this property is automatically assigned to the component specified in this parameter.

*REFERENCE #variable

Sets a reference to the component defined in the variable. The variable must be defined as *DYNAMIC.

Property Routine

Indicates that an owner component of this component can set the value using a property routine. The routine is specified using the PTYROUTINE command in the form which owns the property.

This option is used only when the value returned has to be derived or formatted.

 

GET

GET specifies what happens when an owner component retrieves the value of this property.

*NONE

Indicates that other components cannot query the value of this property.

*AUTO and  component name

Indicates that the current value of the component specified in this parameter is returned to the component querying the information.

*REFERENCE #variable

Returns a reference to the component defined in the variable. The variable must be defined as *DYNAMIC.

*COLLECTION #CollectionVariable

Returns a read-only reference to the collection specified in #CollectionVariable.

You can use these kinds of properties to access a collection to do look-ups or to loop through the collection contents. This property does not allow you to change the contents of the collection.

Property Routine

Indicates that a value will be determined by a property routine. The routine must be specified in the component using the PTYROUTINE command.

This option is used only when the value returned has to be derived or formatted.

 

DESC

Use the DESC parameter to write a brief description for the property. It can be 40 characters long.

ACCESS

This parameter supports one of the options from the list *PUBLIC, *PROTECT and *PRIVATE.

HELP

Use the HELP parameter to write a longer description for a property. The help text can be viewed using the Features option of the Help menu. It can be 250 characters long.