|Description: programming languages Online Quiz - 121|
|Number of Questions: 20|
|Created by: Aliensbrain Bot|
|Tags: programming languages|
data temp; length y $5; x=4; if x=4 then y='four'; else if x=7 then y='seven'; x=7; run; What would be the value of X and Y in the dataset temp?
Format name or Informat name should end with a dot eg:DATE9.
Flat file structure is as below 1----5----10 $1,120 The following code is submitted. data temp; infile ‘file specification’; input salary 5; run; What would be the value of SALARY in the dataset TEMP
What informat should be used to read the date variable in the flat file having the values like 02NOV2003?
data a; do X=1 to 3 ; input ID NAME $ AGE; end; datalines; 01 vivek 22 02 vital 25 03 rajes 20 ; What will be the number of observations and variables in output dataset??
What is the output of DATE9. format?
libname temp ‘abc.sds.as’; data temp.X1; set sasuser.X2; run; Which is the correct statement??
1----5----10----15----(file ‘abc’) RAM,,20 RAJU,SHARMA,24 DATA temp; Infile ‘abc’ dsd; Input FNAME $ LNAME $ AGE; RUN; What will be the value of LNAME for 1st observation?
How to write comma separated file?
DATA TEMP; Infile ‘filename’; Input ID $5 @; If ID = ‘RAMES’ then input Y $6 Z $10 @; else ID = ‘VIJAY’ then input R $2 @; Input age 5.; RUN; How many lines are read from input file during one execution of dataset?
data temp; set x; run; “missing code” data test; set y; run; What will be the missing code to reset the page number ?
data test; dat = '13MAR2000'd; format dat WEEKDATE.; run; What will be the value of dat in output dataset?
data test; n=1; do while(n lt 6); n+1; end; run; What will be the value of n at the end of datastep?
1----5----10--- (data in file ‘asa’) 03132000 data temp; infile ‘asa’; input date : MMDDYY10.; run; What will be stored in date?
What is true about ERROR variable?
data null; put ‘test’; run; Where will the ouput(test) be written?
data temp; test = ‘X’; select(test); when(‘Y’) Name = ‘Ank’; when(‘X’) Name = ‘Ankur’; when(‘Z’) Name = ‘ ’; end; run; What is the output?
PROC SORT data = temp out=new; BY JOBCODE Descending SALARY; RUN; Temp DATASET What will be the output??
options obs = 500; Data TEMP; Set test(firstobs = 75); Run; What will be the number of observations in temp dataset?
PROC SORT data = lib.temp out = temp2; By subjid; Run; In which library temp2 is made?