Hi im new to sas. I have a file with some charecter variables and some numeric variables
now i want to load charecter variables into one datastep and numeric variables into another data step pls let me know
Thanks

Answer Posted / chaudhary_1989

data a;
infile "C:Documents and SettingssasadmDesktopSASMacro est1.txt" firstobs=2;
input num1 num2 num3 c1$ c2$ num4 c3$;
run;

data b;
set a;
keep _numeric_;
run;

data c;
set a;
keep _character_;
run;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is SAS OPTIMIZATION?

1813


What is the use of stop statement?

640


Given an unsorted data set, how to read the last observation to a new data set?

832


How do dates work in SAS data?

682


which date functions advances a date time or date/time value by a given interval? : Sas programming

533






What is the general format of function in sas? : sas-grid-administration

564


Tell me more about the parameters in macro? : sas-macro

584


what are the considerations when picking a SAS/STAT procedure?

2896


What are the default statistics that proc means produce?

599


how could you generate test data with no input data? : Sas programming

619


How many data types are there in SAS?

630


how to do user inputs and command line arguments in sas?

2428


what is treatment emergent events and treatment emregent adverse event

1937


What function CATX syntax does?

689


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1467