naveen


{ City } delhi
< Country > india
* Profession * nathupur
User No # 94970
Total Questions Posted # 5
Total Answers Posted # 18

Total Answers Posted for My Questions # 15
Total Views for My Questions # 34334

Users Marked my Answers as Correct # 16
Users Marked my Answers as Wrong # 29
Questions / { naveen }
Questions Answers Category Views Company eMail

I am looking to buy a sas advance book. So any one can guide me that which one i should buy.

SAS 1658

you have a data set like this. data qqq; input name $ total; cards; qq 22 ww 33 qq 22 ee 44 rr 33 ww 44 ; run; and you want output like this......... name total qq 22 ww 44 Do it by data set step.

6 SAS 8716

how to read raw data in sas. Do it manually and throw the programming.

WNS,

1 SAS 6994

create macros---you have 365 number of data and you need to merge it throw the macros,,,,,, data file1; input a @@; cards; 1 2 3 4 ; run; data file2; input a @@; cards; 5 6 7 8 ; run; data file3; input a @@; cards; 9 10 11 12 ; run;data file4; input a @@; cards; 13 14 15 16 ; run;

WNS,

6 SAS 11070

if you have 365 no of data set and each one having different variable from each other. how will you read by creating macros and create a single data set.

2 SAS 5896




Answers / { naveen }

Question { 10456 }

How would you code a merge that will keep only the
observations that have matches from both sets?


Answer

data qqq;
merge aaa(in=a) bbb(in=b);
if a and b;
run;

Is This Answer Correct ?    1 Yes 0 No

Question { HCL, 12013 }

If i doest required Cumilative frequency in my table,
generated by using PROC FREQ what i had to do?


Answer

proc freq data=xxx;
tables name/out=hosp (drop=percent);
run;

Is This Answer Correct ?    0 Yes 0 No


Question { 8841 }

What is difference between sas rename and lable?


Answer

Rename= Which is change the permanently variable name in
dataset.
Label= Which is change the variable name only in output
windows.

Is This Answer Correct ?    4 Yes 1 No

Question { 5914 }

What r all the reporting procedures...?


Answer

proc print
proc report
proc summary
proc tabulate
proc means
proc freq

Is This Answer Correct ?    2 Yes 0 No

Question { Accenture, 10058 }

if i having variables named a b c d e f ,how to find total of
each variable ????give syntax...??


Answer

proc print data=qqq;
sum a b c;
or
sum _all_;
run;

Is This Answer Correct ?    1 Yes 0 No

Question { 10297 }

You have a data set of 100 observations,how can you
restrict the output so that the output has only data from
row no. 10 to row no. 20


Answer

Options Firstobs=10 obs
=20;
Proc print data = xxx;
Run;

Is This Answer Correct ?    0 Yes 0 No

Question { ABC, 35135 }

how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?


Answer

Proc sql;
Select salary
From
Where salary in (select max
(salary) from
Where salary <(select max
(salary) from
));
Quit;
For second salary
calculation

If salary is not repeted
then
Proc sort data= xxx;
By salary;
Run;
Options firstobs =5;
Proc print data = xxx;
Var salary;
Run;

Is This Answer Correct ?    4 Yes 2 No

Question { Quintiles, 20748 }

How to convert .xls file into CSV format?


Answer

in excel just go on file then press save as and then click
on save type there you will find out csv comma delimiter,

Is This Answer Correct ?    0 Yes 0 No

Question { TNS, 10860 }

How to get any kind of data in SAS? Is it possible to take
data from notepad in SAS?


Answer

Data sample_accounts;
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
CARDS;
1234670 11-Sep-04 Z 2000
1234671 12-Sep-04 3000
1234672 13-Sep-04 Z 2500
1234673 14-Sep-04 T 3200
1234674 15-Sep-04 8000
run;

filename myfile "C:\Mydata\sample_accounts.txt";
data qqq;
infile myfile dlm=' ';
input Account OpenDate $ StatusCode $ CreditLimit;
run;

Is This Answer Correct ?    0 Yes 0 No

Question { CTS, 11473 }

i have a data set with 20 observations i want label from
8 to 15 observations ? how you create this one.


Answer

option firstobs=8 obs=20;
proc print data=c label;
label sex=sir;
run;

Is This Answer Correct ?    0 Yes 0 No

Question { 4723 }

How to get the repeated values by using sql in sas ?


Answer

proc sql;
select name count
from
group by name;
quit;

Is This Answer Correct ?    0 Yes 1 No

Question { Satyam, 5398 }

how to delete the duplicate columns permanently in SQL


Answer

data aaa;
input P_Id LastName $ FirstName $ City $;
cards;
1 Hansen Ola Sandnes
2 Svendson Tove Sandnes
3 Pettersen Kari Stavanger
;
run;
proc sql;
select distnict(city)
from aaa;
quit;

Is This Answer Correct ?    0 Yes 1 No

Question { Satyam, 12145 }

how can get the first and last observations in a dataset
using Proc SQl?


Answer

proc sql;
select first(orderprise)
from xxx;
quit;

Is This Answer Correct ?    0 Yes 1 No

Question { GSK, 4977 }

i have a dataset with var1,var2,var3; i want to upload the
titles for the variables . How can we?


Answer

proc print data=ttt;
title "abcd";
var var1 var2 var3;
run;

Is This Answer Correct ?    1 Yes 10 No

Question { 13144 }

In PROC PRINT, can you print only variables that begin with
the letter “A”?


Answer

proc print data=abc;
var name;
where name contains="A";
run;

Is This Answer Correct ?    0 Yes 8 No

 [1]   2    Next