SAS Character Functions quick revision for Interview

  use a LENGTH statement to set the desired length of a character variable use the concatenation operator (| |) to join two or more character strings use the COMPBL function to convert multiple blanks in a character string to a single blank use the COMPRESS function to remove characters from a string use the VERIFY function to check that certain values are present in a character variable use the TRIM function to remove the trailing blanks from a character string use the SUBSTR function to select a subset of consecutive characters from a larger string use the SUBSTR...

Read More

SAS Stats/ SAS Data Science Topics

Commonly Used Statistical Procedures in SAS PROC MEANS   There are over 30 different statistics you can request with the MEANS procedure.  If you don’t specify any options, PROC MEANS will print the number of non-missing values, the mean, the standard deviation, and the minimum and maximum values for each variable.   The VAR statement specifies which numeric variables to use in the analysis. If it is absent, SAS uses all numeric variables.   If you use the PROC MEANS statement with no other statements, then you will get statistics for all observations and all numeric variable in your...

Read More

Base SAS and SAS Programmer Interview Questions and Tips

Base SAS and SAS Programmer Interview Questions and Tips-Top  SAS Interview Questions & Answers 1.Difference between do while and do until 2.Proc Report Vs Proc Print 3.Proc Append 4.SAS Formats Vs SAS Informats 5.Special input delimiters 6.Default statistics Displayed for Proc Means  7.Proc Means Vs Proc Freq Vs Proc Univariate 8.Compress data set using system options or data set options (COMPRESS=yes or COMPRESS=binary) 9.How to Compress a Table in SAS? 10.CROSSLIST option in  TABLES statement? 11.How would you delete Observations(Duplicate observations)? Proc sort……nodups; proc sql..use distinct in Select 12.What is Tabulate.?Why we use it.? Which type of output we get from Tabulate.? 13.In...

Read More

Base SAS Certification Questions on YEARCUTOFF option

Question 1. In order for the date values 05May1955 and 04Mar2046 to be read correctly, what value must the YEARCUTOFF= option have? a. a value between 1947 and 1954, inclusive b. 1955 or higher c. 1946 or higher d. any value Question 2:- Which time span is used to interpret two-digit year values if the YEARCUTOFF= option is set to 1950? a. 1950-2049 b. 1950-2050 c. 1949-2050 d. 1950-2000...

Read More

Base SAS Certification Question- Array

The following SAS program is submitted: data work.totalsales; set work.monthlysales(keep = year product sales); retain monthsales {12} ; array monthsales {12} ; do i = 1 to 12; monthsales{i} = sales; end; cnt + 1; monthsales{cnt} = sales; run; The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations. Which one of the following is the result of the above program? A. The program fails execution due to data errors. B. The program fails execution due to syntax errors. C. The program runs with warnings and creates the...

Read More

Base SAS Certification Question- Data Error ,Syntax Error

The following SAS program is submitted: data work.totalsales (keep = monthsales{12} ); set work.monthlysales (keep = year product sales); array monthsales {12} ; do i=1 to 12; monthsales{i} = sales; end; run; The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations. Which one of the following is the result of the above program? A. The program fails execution due to data errors. B. The program fails execution due to syntax errors. C. The program executes with warnings and creates the WORK.TOTALSALES data set. D. The program executes...

Read More

Base SAS Certification Question- Data Error output

The contents of the raw data file AMOUNT are listed below: ——–10——-20——-30 $1,234 The following SAS program is submitted: data test; infile ‘amount’; input @1 salary 6.; if _error_ then description = ‘Problems’; else description = ‘No Problems’; run; Which one of the following is the value of the DESCRIPTION variable? A. Problems B. No Problems C. ‘ ‘ (missing character value) D. The value can not be determined as the program fails to execute due to...

Read More
  • 1
  • 2