i have a null dataset with 10 variables; i want to print only
name of the varibales in log window and also output window.how
can we do this one?
Answers were Sorted based on User's Feedback
Answer / kumar
if we want variables in output window
data _null_;
file print;
put @5 'name' @20 'age' @30 'sex';
run;
if we want in log window
data _null_;
put @5 'name' @20 'age' @30 'sex';
run;
| Is This Answer Correct ? | 13 Yes | 3 No |
Answer / sasuser
Hi Guys,
Following is the solution:
data _null_;
set sashelp.vcolumn ;
where libname='SASHELP' and memname='CLASS';
file print;
putlog Name @@;
put Name @@;
run;
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / sas user
* To print in log window
data _null_;
put x1= \
x2= \
x10= \;
run;
* To print on output window:
data _null_;
file print;
put x1= \
x2= \
x10= \;
run;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rohit acharya
The variables of the empty dataset can be easily viewed in the output window with the help of proc contents
| Is This Answer Correct ? | 0 Yes | 0 No |
what is program data vector? : Sas-administrator
what is treatment emergent events and treatment emregent adverse event
which stats created by proc means that are not created by proc summary or vice versa?
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?
Give an example where SAS fails to convert character value to numeric value automatically?
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation
WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS FUNCTION?
Can you excute a macro within a macro? Describe.
Difference between sum function and using “+” operator?
how to handle in stream data containing semicolon in it?
Have you ever linked SAS code? If so, describe the link and any required statements used to either process the code or the step itself.
Under what circumstances would you code a SELECT construct instead of IF statements?