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

Answers were Sorted based on User's Feedback



Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want..

Answer / sureshkv

data char;
set master;
keep _character_;
run;
data num;
set master;
keep _numeric_;
run;

Is This Answer Correct ?    1 Yes 0 No

Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want..

Answer / 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

More SAS Interview Questions

How do you download a flat file from Mainframe to your local PC using SAS?

3 Answers  


What is SAS? is it a software just for use or we can creat something over there?

5 Answers   Cognizant,


diff between nodup rec and ondup key???

3 Answers   AON, Sciformix,


How do you read in the variables that you need?

9 Answers   Accenture,


what is portability of sas programmes?

2 Answers   Capital One,






How do I CREATE an external dataset with sas code? I would like to create within a sascode a non-exsistent textfile on the host. So I am not forced to create the file befor filling it.

2 Answers  


How do you debug macros?

3 Answers   Accenture,


how do u identify a macro variable

5 Answers  


what is treatment emergent events and treatment emregent adverse event

0 Answers  


in ods is there any lib's

2 Answers   SAS,


If you?re not wanting any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set?

1 Answers  


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

0 Answers   L&T,


Categories