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 (July 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 14 Jul 2005 17:50:19 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: SIMPLE MACRO QUESTION: THANKS and follow-up
Comments: To: "Kevin F. Spratt" <Kevin.F.Spratt@DARTMOUTH.EDU>

Kevin,

Hopefully, the following will provide a sufficient example of how you can use proc sql to obtain labels from SASHELP.VCOLUMN and put them into macro variables.

Art

data dataset1; input id 1-3 q1 5-5 q2 7-7 q3 9-9 q4 11-11 q5 13-13; label q1 = 'Landfill' q2 = 'Mall' q3 = 'Willingness' q4 = 'Gender' q5 = 'Income'; datalines; 001 1 2 1 1 4 002 1 1 1 2 3 003 4 4 2 1 2 004 2 3 1 1 4 005 1 1 1 1 1 006 1 1 1 1 4 007 2 2 2 2 1 run; PROC SQL noprint; select label into :L1-:L5 from SASHELP.VCOLUMN where upcase(libname) = "WORK" and upcase(memname) = "DATASET1" and upcase(name) in ('Q1','Q2','Q3','Q4','Q5'); quit; %put &L1; %put &L2; %put &L3; %put &L4; %put &L5; -------------- On Thu, 14 Jul 2005 16:43:24 -0400, Kevin F. Spratt <Kevin.F.Spratt@DARTMOUTH.EDU> wrote:

>Now: how could i get the labels associated with the predictors into the >titles? > >I know, always pushing for more!


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