Program Header Template

#1
Hi all:

I'm trying to create a standard program header template. I've had luck in SAS EG using a keyboard macro shortcut. When I execute my custom keyboard shortcut,
the header is automatically printed. It looks something like this:


/***********************
Programmer:
Program:
Date:
************************;

What I'm interested in is populating those descriptions with actual information, possibly from SAS system macro variables.

For example, if I were to resolve &_CLIENTUSERID, this would give me the user name of the person in the session. Can I some how auto-populate the "Programmer:" field with this information?
I took a look at the list of functions in the Keyboard Shortcut Macro facility and I can't find any that could be of use besides auto-generating the Date.

One function I did see was "paste from clipboard" which got me thinking I can somehow store the value of the SAS system macro variable and insert it into the shortcut.

Any thoughts are appreciated

cheers,
 

Stu

New Member
#2
You could create a macro that automatically generates the desired information, then can copy/paste the result into your program from the log.

Code:
%macro header;
	%put %str(/)%str(***********************);
	%put %str(Program: );
	%put %str(Programmer:) &sysuserid;
	%put %str(Date:) &sysdate9.;
	%put %str(***********************)%str(;);
%mend;

%header;