PreviousNext

Formal Task Objects

Some DCE environments might have special administration needs that are not strictly addressed by the standard DCE control program objects. While you could write and distribute informal scripts to meet this administration need, you would likely need to document their operation in some way. More importantly, though, a complicated operation might require the use of numerous options to precisely control the script's behavior. Rather than invent your own mechanisms to provide help information and handle complicated argument parsing operations, you could rely on the existing help system and the parseargs facility utilized by other formal task objects supplied with the dcecp program. This approach makes your script consistent with other dcecp objects.

Formal task objects build on the idea of the informal scripts presented previously with some important additions:

· An argument table at the beginning of the script defines operations as separate procedures within the script. An argument table can also define available options. A parseargs procedure is called to parse the arguments and options passed to the script when it is invoked.

· Help information for each operation is placed in the argument tables in the script. Other script users can get this information using standard dcecp help operations.

· Extensive error control is included because you cannot predict or control the conditions in which the script executes.

The rest of this section shows the general structures and conventions used in a formal task object. To aid our explanation, we use the dcecp user task object supplied with the DCE control program.

More:

A Model For Task Objects

Using the parseargs Procedure

Invoking Task Objects