SAS (Statistical Analysis System) Questions and Answers
SAS (Statistical Analysis System) Questions and Answers: Submit Your Question
ELEMENTS.MOST COMMMON ELEMENTS IN SAS CATALOG ARE 'FORMAT'
'SOURCE' OUTPUT,LOG EC.
PROC FORMAT IS USED TO CREATE THE FORMAT AND STORE THEN
IN THE SASCATALOG.
proc format library=SMA;
FORMAT NAME 'REGION' IS STORED IN CATALOG IN 'SMA' LIBRARY
TO KNOW THE CONTENTS OR TO MOVE THE CONTENTS OF ASA CATALOG
USE THE PROCEDURE 'PROC CATALOG'
|Is This Answer Correct?||7 Yes||0 No|
2 :: Suppose 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?data sm;
input name $ number;
dataset in created without observations but the dataset has
|Is This Answer Correct?||3 Yes||3 No|
3 :: What is validvarname and varnum? why we are using this options; explain with a syntax for this options?The following example shows how the Pass-Through Facility
connect to oracle as tables(user=USERID orapw=passward
create table lab as
select lab_rslt, lab_test
from connection to oracle
(select "laboratory result$", "laboratory test$"
When we check the Output we observe that the variables in
the DBMS column is changed to upper case as well as V7
(default option) converts those variables into UPPERCASE
variables. Ex: " laboratory result$" becomes LAB_RSLT and "
laboratory test$" becomes LAB_TEST
VARNUM returns the number of a variable's position in a SAS
data set, or 0 if the variable is not in the SAS data set.
This is the same variable number that is next to the
variable in the output from PROC CONTENTS.
|Is This Answer Correct?||1 Yes||0 No|
4 :: Suppose a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we need to pick the observations random order like
100obs,500obs,1020obs,1890obs,2565obs like that i need 100 obs in random order? how can we create this one?
do slice = 100,500,1890,256,...100th;
set source point=slice;
|Is This Answer Correct?||2 Yes||1 No|
proc print data=xxx ;
var A: ;
This will list all variables start with letter A.
|Is This Answer Correct?||4 Yes||11 No|