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



i have a null dataset with 10 variables; i want to print only name of the varibales in log window ..

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

i have a null dataset with 10 variables; i want to print only name of the varibales in log window ..

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

i have a null dataset with 10 variables; i want to print only name of the varibales in log window ..

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

i have a null dataset with 10 variables; i want to print only name of the varibales in log window ..

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

i have a null dataset with 10 variables; i want to print only name of the varibales in log window ..

Answer / solasa

data sm;
input name $ number;
datalines;
run;

dataset in created without observations but the dataset has
varibles.

Is This Answer Correct ?    4 Yes 6 No

i have a null dataset with 10 variables; i want to print only name of the varibales in log window ..

Answer / guest

using proc print statement

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More SAS Interview Questions

how do u validate sas program

3 Answers   Accenture,


what are the scrubbing procedures in sas? : Sas programming

0 Answers  


Does SAS ?Translate? (compile) or does it ?Interpret?? Explain.

10 Answers  


How do you put an elephant in the refrigerator?

6 Answers   Oracle,


in data set200 observation how to take 110,150,170 using sql procedure?

7 Answers   Accenture,


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

0 Answers  


What is data _null_?

0 Answers  


What is the difference between SAS Data step and SAS PROC SQL, and which is better?

1 Answers   TCS,


how to generate means for every subject;

4 Answers   Mind Tree,


Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 900 250 3 300 300 a 400 250 b 500 320 c 800 650 x 200 190 y 900 250 z 300 180 i want create new dataset having id and paid_amount who are paid high amount comparing amount. ex: 1d paid_amount 3 300 c 650 x 190

3 Answers  


what is sas data set?

0 Answers  


I am having a stored process.it needs to route my report to both hthml and Xls.By default SP routes to html.I used the PRINTTO to route the html to Xls.BUt it createsthe file not but no content was written to file(0KB)?how can i do it?

1 Answers  


Categories