![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Introduction
Command Calling ConventionsAll commands are accessible from the UNIX shell through the Apex command interpreter. To execute a command, type:
%apexcommand arguments
Although all command specifications show options preceding arguments, they can be interspersed. All options are processed before any arguments and apply to the entire operation.
For example, to create a subsystem, type:
%apex create_subsystem foo
The command interpreter will have exit status "1" if any errors or negative messages were emitted during execution, otherwise the exit status would be "0". Note that if there is partial success (for example, a combination of positive and negative or error messages), the error status would be "1".
Commands are also generally available through the simple command name. Thus, you can also create a subsystem using the command:
%create_subsystem foo
Command Output ConventionsOutput Message Kinds
Output messages from Apex commands are typically preceded by the current time and by a three character prefix which specifies the kind of message that is being emitted. For example, warning and error messages are identified by the prefixes "!!!" and "***"respectively. The complete set of message prefixes are provided in Table 1.
An example of command output is shown below. In this typical example, auxiliary messages are used to echo the command line and denote completion, a positive message announces the successful completion of the operation for one object, an error message describes the reason for a failure and a negative message announces that the operation was unsuccessful for the object involved in the error.
07:59:10 ::: [apex check_out foo bar] 07:59:11 +++ "foo": check_out was successful 07:59:12 *** "bar": The file is already checked out 07:59:12 ++* "bar": check_out was unsuccessful 07:59:12 ::: [apex check_out has finished]
Output Filtering
Command output may be filtered on the basis of the message kind. For example, filters can be set so that only warning and error messages are emitted. The output filter for a command is changed by setting the -output_filter option (alias: -of). The option is used to specify the kinds of messages that will be reported. Message kinds not specified are not reported, however text messages (i.e., messages with no prefix) are always shown.
The value of the -output_filter option is a sequence of tokens separated by spaces or the `+' character in which each token is either the name of a message kind (for example, error), a three character message prefix (for example., "***"), or one of the special tokens given in Table 2.
Table 2 Special Output Filter Tokens
Token Meaning
none show no kinds
all all kinds, except for debug
errors Negative+Error+Internal_Error+Exception
progress errors+Positive
warnings progress+Warning
The special tokens provide a short-hand for common sets of message kinds which are often used together.
The default value of -output_filter is all. The default value of -output_filter may be changed by setting the APEX_OUTPUT_FILTER environment variable.
Symbolic Link Usage
Use symbolic links to files and directories to navigate to objects through the GUI. However, using symbolic links as arguments to Apex commands is not supported unless the symbolic link has been created by Apex to manage remote storage for subsystems or views. Applying Apex commands to symbolic links that were not created by Apex will have unpredictable results.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2002, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |