In SAS how to read the variable values having different
formats.
eg:mar99,mar1999 (in a single variable)
Answers were Sorted based on User's Feedback
Answer / sankar
data ss;
input name$ s anydtdte9.;
cards;
sankar mar99
mahesh mar1999
run;
proc print data=ss;
format s date9.;
run;
| Is This Answer Correct ? | 13 Yes | 2 No |
Answer / poornima
To read the data with mar99 and mar1999, we use eurdfmyw.
informat.
This informat is used to read the data with only month and
year.
eg:
data m;
input n date eurdfmy7.;
format date eurdfmy7.;
cards;
12 mar99
45 mar1999
45 sep98
run;
proc print data=m;
run;
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / chiranjeevi
data code;
input name$ dob monyy7.;
cards;
a mar99
b mar1999
run;
proc print data=code;
format dob monyy7.;
run;
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / shaik
data m;
input n date monyy7.;
format date monyy7.;
cards;
12 mar99
45 mar1999
45 sep98
run;
we will get output;
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / vijay
for the informats/formats in the question i.e. DATEw.
ones.. we can use the above 2 informats
if the data is in MMDDYYYYw. fashion use EURDFDTw.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / svm
For Date Time check here,
http://www.sfu.ca/sasdoc/sashtml/lrcon/zenid-63.htm
| Is This Answer Correct ? | 1 Yes | 0 No |
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
What is the role of unrestrictive users? : sas-grid-administration
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
what do the pad and dim functions do? : Sas programming
What is the purpose of _error_?
Explain by-group processing?
How do you debug and test your SAS programs?
what is the prob plot in clinical domain
In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single variable)
8 Answers GSK GlaxoSmithKline,
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
Does SAS ?Translate? (compile) or does it ?Interpret?? Explain.
What is by-group processing?