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 (June 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 24 Jun 2002 13:05:18 -0700
Reply-To:     JSD <jsdavid1@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         JSD <jsdavid1@HOTMAIL.COM>
Organization: http://groups.google.com/
Subject:      Using a var value in a subsequent data step
Content-Type: text/plain; charset=ISO-8859-1

Greetings,

I am stuck on particular block of code. Here is a snippet of some code that I am currently working with.

/********************************************************** proc means data=formatting; var overall_length; output out=formatting2 max(overall_length) = max_length; run; quit;

data mydata; length myvar $max_length.; /* <- stuck here */ set formatting2; myvar = my_other_var; run; quit;

************************************************************/

I get hung up in the data step. In the above proc the "max_length" var in the formatting2 data set will be of variable length. I would like to adjust the length of "myvar" to the value of the "max_length" var.

For example, if the value of the "max_length" var was 27, the length arument in the subsequent data step would be $27.

Any help or suggestions would be appreciated.

Thanks,

JSD


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