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 (January 1997, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 30 Jan 1997 13:51:14 -0400
Reply-To:   Michael Stuart <mstuart@PRUDENTIAL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Michael Stuart <mstuart@PRUDENTIAL.COM>
Subject:   Re: Proc Sort Variable in the Title?
Comments:   cc: COLLICR1@MAIL.STATE.WI.US
Content-Type:   multipart/mixed; Boundary="0__=99CDoIA7mFPb9aXzP9fQHwaLzu7AnfGODyocllrOV5JnerriJTyKpydG"

Craig -- you can use a BYVAL keyword in the title statement. Here's an example I found ... this example uses it with a PROC PRINT instead of PROC REPORT, but it should work the same. Look at the code in the TITLE2 statement.

PROC SORT DATA=WORK.RANKED ; BY STATE_CD LIFERANK ;

PROC PRINT DATA=WORK.RANKED NOOBS U L ; BY STATE_CD ; PAGEBY STATE_CD ; VAR LIFERANK REG_CD AGCY_OFF LAST_NAM CONTR_NU LIF_NFCC LIF_NPOL PNC_NFCC PNC_NPOL ; LABEL LIFERANK = 'RANK' REG_CD = 'REGION' AGCY_OFF = 'AGENCY' LAST_NAM = 'REP' CONTR_NU = 'CONTRACT NUMBER' LIF_NFCC = 'LIFE NPF COMMS' LIF_NPOL = 'LIFE NPF POLS' PNC_NFCC = 'P&C NPF COMMS' PNC_NPOL = 'P&C NPF POLS' ; FORMAT LIF_NFCC PNC_NFCC DOLLAR9. LIF_NPOL PNC_NPOL 9. ; TITLE1 'WESTERN OPERATIONS - TOP PRODUCERS BY STATE' ; TITLE2 'YEAR-END 1994 RESULTS, STATE = #BYVAL(STATE_CD)' ;

Note: I also set the option 'NOBYLINE' in my options statement, that prevents the automatic printing of a line in your output indicating the value of the current BY variable.

(Embedded image moved COLLICR1 @ MAIL.STATE.WI.US to file: Thursday January 30, 1997 01:02 PM PIC23937.PCX)

Please respond to COLLICR1@MAIL.STATE.WI.US To: SAS-L @ UGA.CC.UGA.EDU cc: (bcc: Michael Stuart/M&P/Prudential) Subject: Proc Sort Variable in the Title?

Is there a way to get a proc sort variable in the title for every page of the report? I am able to get something close to what I want by using a by variable, but I'd like to make it more 'pretty' by actually adding it to the title. Any ideas would be appreciated.

Here is my current code using the by variable:

PROC REPORT DATA=DATASETS NOWINDOWS; TITLE 'DATASET REFERENCE REPORT'; BY DSNAME; COLUMNS MEMBER DATE USERID ACTMOD EXECMOD RDRTIME; DEFINE MEMBER/GROUP WIDTH=8 ORDER=FORMATTED 'MEMBER'; DEFINE DATE/GROUP WIDTH=9 FORMAT=DATE9. 'DATE'; DEFINE USERID/GROUP WIDTH=8 ORDER=FORMATTED 'USERID'; DEFINE ACTMOD/GROUP WIDTH=8 ORDER=FORMATTED 'ACTIVE PGM'; DEFINE EXECMOD/GROUP WIDTH=8 ORDER=FORMATTED 'EXEC PGM'; DEFINE RDRTIME/ANALYSIS N WIDTH=8 FORMAT=8. 'REF COUNT'; RUN;

Thank You in Advance, Craig Collins (collicr1@mail.state.wi.us) State of Wisconsin, Info-Tech Services


PIC23937.PCX [application/octet-stream]


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