The %PERFSTRT and %PERFSTOP
macros can be nested in other %PERFSTRT and %PERFSTOP macros. When
nested, each %PERFSTOP macro that is initiated is paired with the
currently active %PERFSTRT macro. In the following figure, there are
three %PERFSTRT and %PERFSTOP macro pairs. The first %PERFSTOP macro
terminates the transaction for the third %PERFSTRT macro, and so on.
The following code creates nested macro pairs:
/*
* Enable ARM subsystem; if needed, set the _armexec=1
*/
%let _armexec=1;
%PERFINIT(APPNAME='SAS 9.3 Studio Test Application');
%PERFSTRT(TXNNAME='SAS 9.3 Studio Transaction One');
%PERFSTRT(TXNNAME='First Nested Macro Pair');
%PERFSTRT(TXNNAME='Second Nested Macro Pair');
/*
* *
SAS code that represents a discrete unit of work,
* *
*/
%PERFSTOP; /* PERFSTOP for the Second Nested Macro Pair */
%PERFSTOP; /* PERFSTOP for the First Nested Macro Pair */
%PERFSTOP; /* PERFSTOP for the SAS 9.3 Studio Transaction One */
%PERFEND;