Starting and controlling trace

The trace facility provides three distinct modes of use:

Subcommand Mode
Trace is started with a shell command (trace) and carries on a dialog with the user through subcommands. The workload being traced must be provided by other processes, because the original shell process is in use.
Command Mode
Trace is started with a shell command (trace -a) that includes a flag which specifies that the trace facility is to run asynchronously. The original shell process is free to run ordinary commands, interspersed with trace-control commands.
Application-Controlled Mode
Trace is started with the trcstart() subroutine and controlled by subroutine calls such as trcon() and trcoff() from an application program.