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

Code a PROC SORT on a data set containing State, District and County as the primary variables, along with several numeric variables.

7 Answers   Accenture,


what is the difference between the SAS v8 and SAS v9?

7 Answers   TCS,


how do u validate sas program

3 Answers   Accenture,


What is PDV?

0 Answers  


Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager

0 Answers  






what is hierarchy flattening? : Sas-di

0 Answers  


What are the data types does SAS contain?

0 Answers  


what are the methods that you would employ to fine tune your SQL extract process using SAS/Access or Proc SQL?

1 Answers  


Briefly explain input and put function?

0 Answers  


What are the difference between ceil and floor functions in sas?

0 Answers  


What is the work of tranwrd function?

0 Answers  


Explain the use of proc gplot? : sas-grid-administration

0 Answers  


Categories