PreviousNext

Most Recent Operation Argument Name (_n)

The _n variable holds the name or names used as an argument to the most recent control program operation. Most DCE control program objects take a name or a list of names as an argument. Those that don't include endpoint, attrlist, uuid, name, utc, and the miscellaneous dcecp commands dcecp_initInterp, login, logout, errtext, quit, resolve, and shell.

The name is usually the third argument in a dcecp operation as shown in the following directory operation.

dcecp> directory create /.:/sales/printers/text_printers
dcecp>

Once set, you can use $_n in subsequent operations in place of the name argument. For example, you could modify a directory attribute for the /.:/sales/printers/text_printers directory created in the preceding example.

dcecp> directory mod $_n -change {CDS_Convergence low}
dcecp>

The _n variable can also hold a list of names, as when you perform a directory service operation on more than one name. For instance, you could create several directories and then decide to modify an attribute.

dcecp> directory create {
> /.:/sales/printers/text_printers
> /.:/sales/printers/graphics_printers
> /.:/sales/printers/colorgraphics_printers }
dcecp>

A subsequent directory service operation can simply use the _n variable in place of the name or list of names:

dcecp> directory modify $_n -change {CDS_convergence high}
dcecp>