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



In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

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

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

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

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

Answer / ok

In SAS v9 you can try the ANYDTDTEw. Informat

Is This Answer Correct ?    7 Yes 1 No

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

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

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

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

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

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

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

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

In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single va..

Answer / ravi_kumar

anydtdtew.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SAS Interview Questions

what is the basic structure sas administrator? : Sas-administrator

0 Answers  


what is program data vector? : Sas-administrator

0 Answers  


Name statements that are execution only?

7 Answers  


Dear all, proc means data=dsn noprint completetypes; class trtmntgroup /preloadfmt; output out=tot n=n; format trtmntgroup trtf. ; by vstgrp descending severity; run; This is the code I used for AE table. I got the values without giving the variable ‘trtmntgroup(numeric)’ in var statement. And if I give the var statement for that variable i’m getting the same values.How is that possible? What is the difference between class and var statement? Could any one explain me how does proc means work at the back end. And what is the difference between _freq_ value and N value in proc means. Thanks and regards, Rajesh.

1 Answers  


Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager

0 Answers  






wt is a-z and a--z?

3 Answers   Accenture,


i have one dataset data l; input name: $ 25; cards; manoj is a good boy to krishna krishna is a god boy to malli malli is good boy to ramana ques: here i want "manoj" observations nubers

3 Answers   SAS,


Hi Jeevan/Akshara I have tried to contact SASI Vats for latest Advanced SAS Programming Certification Dumps (A00-212) but have not got any response. I would highly and gratefully appreciate your assistance in this regard. If you guys have access to this, would you be kind enough to forward it to me ? I would abide by all the terms you have for this. Please, note my email id: upretigopi@yahoo.com Preti Sharma

0 Answers  


How would you remove a format that has been permanently associated with a variables?

3 Answers  


what are scrubing procedures in SAS?

1 Answers   Oracle,


What Proc glm does?

0 Answers  


how will you locate the sas platform applications? : Sas-bi

0 Answers  


Categories