LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 9 May 2002 13:25:16 -0400
Reply-To:   diskin.dennis@KENDLE.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   diskin.dennis@KENDLE.COM
Subject:   Re: Date macro in a title for proc print
Comments:   To: Dave Meyer <dmeyer@HOAGHOSPITAL.ORG>
Content-type:   text/plain; charset=us-ascii

Dave,

You're doing too much work to accomplish a really simple operation. Your Data work.PLAY1 ; Set work.PLAY1 ; %LET date = PUT(TODAY(),DDMMYY10.); RUN; does Nothing at all.

Try: TITLE2 "Report run on: %sysfunc(today(),ddmmyy10.)" ;

HTH, Dennis Diskin

From: Dave Meyer <dmeyer@HOAGHOSPITAL.ORG>@LISTSERV.UGA.EDU> on 05/09/2002 01:09 PM

Please respond to Dave Meyer <dmeyer@HOAGHOSPITAL.ORG>

Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>

To: SAS-L@LISTSERV.UGA.EDU cc:

Subject: Date macro in a title for proc print

Hello SAS-Lers, Is there a way to put the current date into the title when printing a summary data set????? - I have been trying with no sucess. Thanks for any advice anyone can give me, Dave

PS What about renaming the output data set with the current date?

Example of what I have tried for the title:

DATA WORK.PLAY1; INPUT Cost SALESMAN $ TYPE $ MODEL_Yr IDCode $ DEAL_NUM SALE_DT MMDDYY10.; DATALINES; 48000 Joe ACURA 1999 2345 2345 01/01/2001 28000 Ben FORD 1999 2345 2345 04/01/2001 23000 Sue FORD 1994 2344 2345 05/02/2000 ; RUN;

Data work.PLAY1 ; Set work.PLAY1 ; %LET date = PUT(TODAY(),DDMMYY10.); RUN;

PROC SORT DATA = work.PLAY1 OUT = Tresults.PLAY1; BY SALESMAN DESCENDING Cost; RUN;

PROC PRINT DATA = Tresults.PLAY1 NOOBS LABEL; OPTIONS NODATE PAGENO=1; BY SALESMAN ; VAR Cost SALESMAN TYPE MODEL_Yr IDCode DEAL_NUM ; TITLE1 "Play Data Report" ; TITLE2 "Report run on: &date" ; RUN ;

-- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG


Back to: Top of message | Previous page | Main SAS-L page