DATA Step, Macro, Functions and more

new to sas - i m tryin to find a title and output of the following code

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

new to sas - i m tryin to find a title and output of the following code

data txns; do amt = 40000, 42000, 48000;
output;
end;
run;
data process;
set txns; if amt >= 50000 then do;
%let title_suffix = NOTE: Large Transaction Amounts!!;
large_tran_flag = 'Y';
end;
run; title "Transaction Report &title_suffix";
proc print data = process:
run;
 
 
another one :
 
Given the following array, how would you total the values
 
array abc(5) ( 12 5 . 17 20);

Accepted Solutions
Solution
‎03-03-2016 06:41 AM
Super User
Posts: 19,792

Re: new to sas - i m tryin to find a title and output of the following code

Posted in reply to chann1313

Welcome to SAS and the forum. 

 

You can download SAS University Edition, a free learning edition, and run your code to see the expected outcome. 

 

Additionally, the first programming and statistics course are free. 

 

I don't think your first code is valid. 

The answer to your second can vary, the sum function is most likely what they're looking for. 

 

Also, please don't post the same question multiple times. 

View solution in original post


All Replies
Solution
‎03-03-2016 06:41 AM
Super User
Posts: 19,792

Re: new to sas - i m tryin to find a title and output of the following code

Posted in reply to chann1313

Welcome to SAS and the forum. 

 

You can download SAS University Edition, a free learning edition, and run your code to see the expected outcome. 

 

Additionally, the first programming and statistics course are free. 

 

I don't think your first code is valid. 

The answer to your second can vary, the sum function is most likely what they're looking for. 

 

Also, please don't post the same question multiple times. 

Super User
Super User
Posts: 7,955

Re: new to sas - i m tryin to find a title and output of the following code

Posted in reply to chann1313
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 160 views
  • 0 likes
  • 3 in conversation