In PROC PRINT, can you print only variables that begin with
the letter “A”?
Answers were Sorted based on User's Feedback
Answer / hsong001
Use the idea of variable list (varlist) wildcard :
e.g.,
proc print data=xxx ;
var A: ;
run ;
This will list all variables start with letter A.
| Is This Answer Correct ? | 16 Yes | 6 No |
Answer / henry
proc print data=sashelp.class;
var height weight;
where upcase(substr(name,1,1))='A';
run;
| Is This Answer Correct ? | 1 Yes | 3 No |
PROC PRINT DATA = X;
WHERE SUBSTR(NAME,1,1) = 'A';
RUN;
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / naveen
proc sql;
select *
from qqq
where name contains "A";
quit;
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / sunil chilaka
Dear fndz to print only variables that begin with
the letter "A" we can use
keep=option
| Is This Answer Correct ? | 2 Yes | 7 No |
What is the maximum and minimum length of macro variable
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.
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.
How could you generate test data with no input data?
what are validation tools that are used in sas? : Sas-administrator
what are all the reports you generated in your recent project?
0 Answers Accenture, Quintiles,
How do you put an elephant in the refrigerator?
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
What does error:1 mean?
what is the use of proc contents and proc print in sas? : Sas-administrator
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
What are the limitations for memory allocation for SAS variables