Date: Tue, 11 Jul 2000 17:05:32 GMT
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Organization: Deja.com - Before you buy.
Subject: Reformatting variables using metadata: need SQL and/or MACRO help
Okay, I'm feeling lazy. My hope is that someone has done this before.
My problem: I have two datasets
(1) metatdata including variable names, and their appropriate formats;
(2) raw data for these variables, all formatted as $200.
I want to use the metadata to create a third dataset with the variables
all properly formatted.
Some sample data:
VARNAME VARTYPE VARLEN VARDEC
var1 char 10
var2 numb 8 2
What I want is a dataset 3 where VAR1 is formatted as $10. and VAR2 is
formatted as 8.2
Any suggestions? I suspect this is a candidate for PROC SQL and/or a
creative macro. Anyone have any code for something like this?
Sent via Deja.com http://www.deja.com/
Before you buy.