The SAS Output Delivery System and reporting techniques

Proc Print question

Reply
Occasional Contributor
Posts: 16

Proc Print question

Is it possible with Proc Print to change the label of a one of the variable being printed to the &SYSDATE? I've been try to accomplish this but have had no success. Any ideas on how to change the varialbe name to the system date? Below is an example of what i'm attempting to do

PROC SORT DATA=ALL;
BY DESCENDING GBUSED;

PROC PRINT DATA=ALL NOOBS;
VAR HLQ GBUSED;
LABEL GBUSED='&SYSDATE';
Super Contributor
Posts: 359

Re: Proc Print question

PROC PRINT DATA=ALL NOOBS label;
VAR HLQ GBUSED;
LABEL GBUSED="&SYSDATE";


Use the label option and macros inside single quotes don't resolve.
Contributor
Posts: 74

Re: Proc Print question

proc print data=all label;
label GBUSED="&sysdate";
run;
Occasional Contributor
Posts: 16

Re: Proc Print question

Wonderful, thank you all for your help, im upset with myself that it was that easy. Thanks again for your help, i really appreciate it.
Ask a Question
Discussion stats
  • 3 replies
  • 125 views
  • 0 likes
  • 3 in conversation