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 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 25 Jan 2008 13:13:34 -0600
Reply-To:   "data _null_," <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_," <datanull@GMAIL.COM>
Subject:   Re: How to identify which one is Charact or Numeric?
Comments:   To: Melodyp <pearsonmelody@gmail.com>
In-Reply-To:   <08ca075b-7bfe-4b1e-9ae8-318f84777198@k2g2000hse.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1

The EXPORT/IMPORT trick will work at least with test data. It is not the best. PROC IMPORT is takes a long time.

dm 'clear log; clear output;'; data work.test; array chr[381] $8 (381*'Hello'); array num[300] $8; do _n_ = 1 to dim(num); num[_n_]=put(ranuni(0),best8.); end; do _n_ = 1 to 1e3; output; end; run; proc print data=_last_(obs=2); run; filename ft56f001 temp lrecl=32707; proc export data=work.test outfile=ft56f001 dbms=dlm; delimiter=','; run; proc import datafile=ft56f001 out=work.test2 replace dbms=dlm; delimiter=','; guessingrows=1000; run; proc contents varnum; run;

On Jan 25, 2008 12:30 PM, Melodyp <pearsonmelody@gmail.com> wrote: > Hello everyone! > I have a big file contains both charact variables and numerical > variables, but all of these variables are read into SAS as Charact. > > I need to let SAS to select those contains letters vaiables as charact > so that I don't need to convert later. Is there anybody can help me on > this? It will be very tidious to read variable by variables, as I have > total 681 variables. > > Thank you in advance >


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