property Command

Ad hoc attributes, called Properties, can be assigned to an administrative object by business administrators with Property access. Properties allow links to exist between administrative definitions that are not already associated.

For conceptual information on this command, see MQL Concepts: Administrative Properties.

This page discusses:

User Level

Business Administrator

Add Property

Properties can be created and attached to an object at the same time using the add property command. A property must have a name and be “on” an object. It can, optionally, define a link to another administrative object using the “to” clause. This command, therefore, takes two forms, with and without the “to” clause. The length of property names are a maximum of 255 characters.

Syntax

add property NAME on ADMIN_TYPE ADMIN_NAME [system] 
to ADMIN_TYPE ADMIN_NAME [system]] [value VALUE];
  • NAME is the name of the new property.
  • ADMIN_TYPE is the keyword for an administrative or workspace object:
    association index program site
    attribute inquiry query store
    command location relationship table
    filter menu role toolset
    form page rule type
    format person server vault
    group policy set
  • ADMIN_NAME is the name of the administrative object instance.
  • to ADMIN_TYPE ADMIN_NAME is optional.
  • system is used only when adding properties on/to system tables.
  • VALUE is a string value of the property. The “value” clause is optional. The value string can contain up to 2gb of data.

For creation and subsequent identification (modification, deletion, and so on) purposes, a property with a “to” clause is identified by the following arguments:

  • The property NAME
  • The “on” ADMIN_TYPE ADMIN_NAME
  • The “to” ADMIN_TYPE ADMIN_NAME

While a property without a “to” clause is identified by only:

  • The property NAME
  • The “on” ADMIN_TYPE ADMIN_NAME

For example, Programs are associated to Formats inherently, since they make up part of the Format definition. But let’s say we want to add a Format property to a Program definition to indicate the type of environment required to execute it. We could add a property to a program as follows:

add property Format on Program Perlscript to Format Perl value yes;

A Format property could be added to other Programs as well. And other perl programs would be added “to” the Perl Format. However, the properties are unique in that the “on” object would differ.

Adding Properties to Administrative Definitions

A property can be added to an administrative object in these ways:

  • Using the property command, as shown above.
  • When an administrative object or workspace object is created, using the property clause with the add command.
    add ADMIN_TYPE ADMIN_NAME add property NAME [to ADMIN_TYPE ADMIN_NAME] [value VALUE];
  • Using the modify command for administrative/workspace objects.
    add ADMIN_TYPE ADMIN_NAME add property NAME [to ADMIN_TYPE ADMIN_NAME] [value VALUE];

For example, the following are equivalent to the command given above:

add program Perlscript add property Format to Format Perl value yes;
modify program Perlscript add property Format to Format Perl value yes;

Adding Properties to User Workspace Items

Properties can be added to the logged on user’s personal workspace objects. For example, the following adds the date property to the set MYSET:

add property Date to set Myset value 4/19/99;

Workspace objects include filters, queries, tables, sets, and toolsets.

List Property

Properties can be listed with the list property command, which takes the following forms.

list property [system] [on ADMIN_TYPE ADMIN_NAME] [to ADMIN} [name NAME] [value VALUE];
list property [system] [user person USER_NAME];
list property [system] [user all];
  • The system option lists the system-defined properties. Without it, only user-defined properties are listed.
  • The user option is for workspace properties. If all is indicated as the user, all properties on all Persons’ workspace items will be displayed. USER_NAME is the name of the person.

When listing properties, keep these rules in mind:

  • All properties on an administrative object or on a user’s workspace objects can be listed.
  • Currently only person users have workspace objects.
  • The On and User clauses cannot be used together.
  • The all keyword goes with the User clause—either a Person or all is specified.

To list all user properties:

list property;

This command lists all user properties on all non-workspace objects.

To list both system and user properties:

list property system;

To list user properties on an administrative object:

list property on ADMIN_TYPE ADMIN_NAME;

ADMIN_TYPE ADMIN_NAME here could be a workspace object (table, set, and so on) of the current user, or a non-workspace object.

To list all properties of a person's workspace objects:

list property system user person USER_NAME;

Print Property

The properties of administrative objects are selectable, using the following syntax.

print ADMIN_TYPE ADMIN_NAME select property;

The above will list all user properties associated with the specified administrative object, including their name, their “to” object, and their values. To further refine the list you can also select the following:

property.name
property.value
property.to

For example:

MQL<12>print program Perlscript select property;
program   Perlscript
     property = Format to Format Perl value 4
MQL<13>print program Perlscript select property.name;
program   Perlscript
     property[Format].name = Format
MQL<14>print program Perlscript select property.value;
program   Perlscript
     property[Format].value = 4
MQL<15>print program Perlscript select property.to;
program   Perlscript
     property[Format].to = Format Perl

Modify Property

The value of a property can be modified using either the modify property or modify ADMIN commands. The length of property names are a maximum of 255 characters.

modify property NAME on ADMIN_TYPE ADMIN_NAME [to ADMIN_TYPE ADMIN_NAME] [value VALUE];
modify ADMIN_TYPE ADMIN_NAME property NAME [to ADMIN_TYPE ADMIN_NAME] [value VALUE];

This command creates the property if it does not exist or modifies its value if it does. If other changes are required (for example, changing any ADMIN values) the property should be deleted and redefined.

Delete Property

Properties can be deleted with either of the following commands.

delete property NAME on ADMIN_TYPE ADMIN_NAME [to ADMIN_TYPE ADMIN_NAME];
modify ADMIN_TYPE ADMIN_NAME remove property NAME [to ADMIN_TYPE ADMIN_NAME];