How would you code the criteria to restrict the output to be
produced?
Answers were Sorted based on User's Feedback
use _null_ in data statemnet when u dont want to create
dataset.to restrict the output to be produced, close the
ods listing destination and this is default destination
and you can also restrict the output using no print option
in some procs such as means,sql,etc...
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / ganesh
In my view use noprint option to restrict the output to be
produce
data g;
input name$ no sal;
datalines;
a 1 2500
b 2 3500
;
proc print data=g noprint;
run;
| Is This Answer Correct ? | 11 Yes | 2 No |
Answer / akilan
In Jothi Sankar's answer,
First Choice is correct.
In second choice instead of 'OUT', have to use 'THEN OUTPUT'
Third choice is not correct one.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / linus
1.obs is one option.
2.in input statement we can restrict the variables we need.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sanjeev
proc sql;
select * from sashelp.class;
quit;
gives you an output.
proc sql noprint;
select * from sashelp.class;
quit;
no errors and output is restricted.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sumalatha.ch
_null_ this is not give any output.and nowid option.
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / jothi sankar
--> Using VAR can restrict which varibles have to be output
--> Using differnt data sets for each main condition
Eg:
DATA
MyData2
MyData3
MyData4
;
SET MyData1;
if Dept = 'Computer' OUT MyData2;
else if Dept = 'Electronic' OUT MyData3;
else if Dept = 'Chemical' OUT MyData4;
RUN;
--> Using PRINTEM for viewing datas individually
| Is This Answer Correct ? | 1 Yes | 6 No |
What do the SAS log messages "numeric values have been converted to character" mean?
if x=round(26.3,10)-1 then x= how much and how explain?
What is the pound sign used for the DATA _NULL_?
How to test the debugging in sas?
what is the usage for assigning error=1 in a dataset ?
What is the difference between %local and %global? : sas-macro
What is the use of %include statement?
Briefly explain input and put function?
how do we mail reports from SAS environment to our team leader
what is option year cuttoff in sas
Mention what is the difference between nodupkey and nodup options?
In the following DATA step, what is needed for ‘fraction’ to print to the log? data _null_; x=1/3; if x=.3333 then put ‘fraction’; run;