Date: Wed, 12 Apr 2000 21:43:00 +0100
Reply-To: peter.crawford@DB.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Crawford <peter.crawford@DB.COM>
Subject: Assign date to keyboard macro in v8 Editor?
Content-type: text/plain; charset=us-ascii
even before the enhanced editor, I have just the trick !
First I need this %now() macro in the paths defined by the sasautos option
%macro now() /cmd stmt ;
%sysfunc( datetime(), datetime )
%mend now ;
(You may want to vary the length of the datetime format to suit what you want,
or replace datetime with date.)
Then, on an icon and function key, I place the command
c ' ' "%now "
It works nearly everywhere I can edit !
The next blank gets replaced by a timestamp.
If dmkeys apply within enhanced editor, this should function there.
Let me know if it works, please..
Regards
Peter Crawford
Datum: 12.04.2000 17:06
An: SAS-L@listserv.uga.edu
Betreff: Assign date to keyboard macro in v8 Editor?
Nachrichtentext:
Hello SAS-L,
Is it possible to assign the current date (or date SAS system invoked) to a
keyboard macro and then use this macro to insert the date in a SAS program? This
would be very useful when writing a large program over time and keeping a
comment log of modifications within the code. Simply hit the hot key combo and
today's date is inserted, as in :
/* 12/04/2000 - <type your comment here> */
Can this be done in the Enhanced Editor?
I am using SAS v8 on Win NT.
Thanks in advance!
Tim
Tim Williams
Computer Specialist
OAO Corporation
Corvallis, OR
williams.tim@epa.gov