Answer Posted / veerendar alugola
you can see the below example for a-z:
data ptcde;
input ptid $ test1 test2 test3 test4;
cards;
1102 56 65 66 70
1103 55 85 62 77
1104 85 71 59 66
1105 55 100 120 61
1106 90 58 65 63
;
run;
data abc;
set ptcde;
a=mean(of test1-test4);
run;
when you use a-z it will consider only the range variables.
You can find the below example for a--z;
data ptcde;
input ptid $ test1 abc def test4;
cards;
1102 56 65 66 70
1103 55 85 62 77
1104 85 71 59 66
1105 55 100 120 61
1106 90 58 65 63
;
run;
data abc;
set ptcde;
a=mean(of test1--test4);
run;
when you use a--z it will consider all the variables
irrespective of the series.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
what is SAS OPTIMIZATION?
what are some good sas programming practices for processing very large data sets? : Sas programming
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
what is the use of proc contents and proc print in sas? : Sas-administrator
what are 5 ways to perform a table lookup in sas? : Sas-administrator
How would you identify a macro variable?
what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi
what is the difference between floor and ceil functions in sas? : Sas-administrator
What is the difference between SAS functions and procedures?
what are the types of interactive display types? : Sas-bi
In sas admin differentiate between roles and capabilities? : sas-grid-administration
what is study design in while working with SAS? what are screening variables in SAS?
how the sas basic syntax style described? : Sas-administrator