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

What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

0 Answers  


How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

0 Answers  


what is ae onset date n what is RDS

0 Answers   Accenture,


i have a dataset with var1,var2,var3; i want to upload the titles for the variables . How can we?

1 Answers   GSK,


what is hierarchy flattening? : Sas-di

0 Answers  






Name and describe three SAS functions that you have used, if any?

2 Answers  


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?

16 Answers  


what is the difference between x=substr(name,1,2); and substr(name,1,2)='x';

3 Answers   HSBC,


What is the difference Using & and && in the macro variables

5 Answers   Accenture,


Explain how you can debug and test your SAS program?

0 Answers  


State the difference between INFORMAT and FORMAT ?

0 Answers  


Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated

1 Answers  


Categories