-format Option for DSEE Commands:
-format
Changes the format of history command output.
Format
-format control_string
Description
A number of the show commands that display information stored in library
databases take the -format option. When you use -format, you can change the way
that the command formats the information it displays.
The -format option takes as its argument a quoted control string that specifies
what you want the output to look like. The control string can contain both
literal text (which the command will simply add to the output) and directives
(which the command will use to determine where the information it displays
should appear in the output). An example of a control string containing only a
directive follows:
DSEE> show elements -format "%ele"
The result of this command is a single column listing of the names of all the
elements in the current library.
ct.pas
ftx.pas
ftx.asm
ld.asm
shot.pas
As you can see, the directive %ele acts as a variable for an element name. When
you issue a command with -format option, the DSEE facility writes out each piece
of the command's information as a single line.
You can combine literal strings and directives to produce scripts of DSEE
commands. Consider the following example:
DSEE> show elements ?*.pas -format "build %ele" >builder.dse
This command would produce a file named builder.dse that contained the
following:
build ct.pas
build ftx.pas
build shot.pas
Later, using input redirection, you can execute the commands listed in
builder.dse:
DSEE> <builder.dse
Each directive in a control string is preceded by a percent sign (%). The DSEE
facility is case-insensitive when handling control string directives; you can
enter them in uppercase or lowercase.
There are two types of directives: context directives and command directives.
Context directives serve as variables for aspects of your current working
context, such as the current library or the current model. There are three
context directives:
%lib The current library pathname
%model The current system model
%system The current system
Command directives serve as variables for the information generated by the
command you are invoking. The directive in the examples above %ele is one of
the nine command directives. Here are all nine:
%bleaf A branch leaf name (e.g., branch_3)
%bpath A branch pathname (e.g., branch_1/branch_2/branch__3)
%date The date on which a DSEE operation was performed
%ele An element name
%lod A line of descent (e.g., math.ins/branch_1/branch_2/branch_3)
%oper A DSEE operation (e.g., reserve)
%vname A version name
%vnum A version number
%who The executor of a DSEE operation in
"person.project.organization.node" format (e.g., ann.ops.eng.45)
As mentioned above, the DSEE facility generates a newline control character at
the end of the control string. To embed a newline within a control string, use
the character sequence %/ (percent sign, slash).
To embed a percent sign within a control string, use two percent signs (%%).