data test2; set sasuser.furnture; if finish='oak'; if price<100 then delete; TotalPrice+price; drop price; run; proc print data=test2 noobs; run;
data test2; set sasuser.furnture; if finish='oak' and price<200; TotalPrice+price; drop price; run; proc print data=test2 noobs; run;
data test2; set sasuser.furnture; if finish='oak' and price<200 then delete; TotalPrice+price; drop price; run; proc print data=test2 noobs; run;
data test2; set sasuser.furnture; if finish='oak' and price<100 then do; TotalPrice+price; drop price; end; run; proc print data=test2 noobs; run;
data credit; infile creddata; input Account $ 1-5 Name $ 7-25 Type $ 27 Transact $ 29-35 Amount 37-50; label amount='Amount of Loan'; format amount dollar12.2; run; proc print data=credit label; label amount='Total Amount Loaned'; format amount comma10.; run;
if finlexam>=95 and (research='A' or (project='A' and present='A')) then Grade='A+';
finlexam>=95
research='A'
project='A' and present='A'
research='A' or (project='A' and present='A')
data work.newnums; infile numbers; input Tens 2-3; Count+tens; run;
data work.newnums; infile numbers; input Tens 2-3; retain Count 100; count+tens; run;
Status
|
Type
|
Count
|
Action
|
Control
|
---|---|---|---|---|
OK
|
3
|
12
|
E
|
Go
|
if status='OK' and type=3 then Count+1; if status='S' or action='E' then Control='Stop';
Count = 12 Control = Go
Count = 13 Control =Stop
Count = 12 Control =Stop
Count = 13 Control = Go
if code='1' then Type='Fixed'; if code='2' then Type='Variable'; if code^='1' and code^='2' then Type='Unknown';
if code='1' then Type='Fixed'; else if code='2' then Type='Variable'; else Type='Unknown';
if code='1' then Type='Fixed'; if code='2' then Type='Variable'; else Type='Unknown';
if code='1' then type='Fixed'; else code='2' and type='Variable'; else type='Unknown';
if code='1' and type='Fixed'; then code='2' and type='Variable'; else type='Unknown';
data finance.newloan; set finance.records; TotLoan+payment; if code='1' then Type='Fixed'; else Type='Variable'; length type $ 10; run;
data clinic.stress(drop=timemin timesec); infile tests; input ID $ 1-4 Name $ 6-25 RestHR 27-29 MaxHR 31-33 RecHR 35-37 TimeMin 39-40 TimeSec 42-43 Tolerance $ 45; TotalTime=(timemin*60)+timesec; SumSec+totaltime; run;
proc print data=clinic.stress; label totaltime='Total Duration of Test'; format timemin 5.2; drop sumsec; run;
proc print data=clinic.stress(keep=totaltime timemin); label totaltime='Total Duration of Test'; format timemin 5.2; run;
data clinic.stress; infile tests; input ID $ 1-4 Name $ 6-25 RestHR 27-29 MaxHR 31-33 RecHR 35-37 TimeMin 39-40 TimeSec 42-43 Tolerance $ 45; TotalTime=(timemin*60)+timesec; keep id totaltime tolerance; run;