As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Macro Used Real Time

From sasCommunity
Jump to: navigation, search

Q: How do I add an elapsed-time note used real time to my macro?

A: Add these statements to your macro:

Author: Ronald_J._Fehd

Note: macro names in lower case for port to any linux/unix system.

%MACRO mymacro
      (data =
)/ des = 'site: description: purpose:'
 /*  ** store source /* */
;/* modifications:
Who date description
RJF 2012-July-09 added datetime-stamp @ end
**************** */
%local _C_TimeStart _C_TimeEnd;
%let   _C_TimeStart = %sysfunc(datetime(),hex16.);

At the end of the macro add these statements to write the note:

%let _C_TimeEnd = %sysfunc(datetime(),hex16.);     
%Put note: &SysMacroName used real time %sysfunc
%mend mymacro;


note: CALLMACR used real time  0:00:00.016


This trick is used by macros:

--Ronald_J._Fehd macro.maven == the radical programmer 14:30, 12 May 2012 (EDT)