25+ Advanced SAS Interview Questions & Answers | TO GET HIRED
Advanced SAS Interview Questions and Answers

25+ Advanced SAS Interview Questions & Answers | TO GET HIRED

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Kannan (Senior Technical Manager )

(5.0) | 16547 Ratings 4801
  • SAS stands for ‘Statistical Analysis Systems’. It can be dated back to the 1970s, a software tool developed by SAS Institute.
  • It is a closed source analysis tool. A widely used analysis tool in the corporate world to make strategic decisions. A fun fact, SAS was used originally for statistics application in agriculture projects.
  • But now it’s used in various industries from media to retail, education, and finance, etc. In simple words, SAS Programming allows you to process a large chunk of raw data to manageable small sets of data, leading to results which help in decision making.
  • It helps us perform various statistical analysis variance, regression, and psychometric analysis. Some statistical techniques such as ANOVA procedures are specially strung in the SAS environment.
  • SAS Programming as a tool is very helpful for analytics. SAS is software which works in three simple processes. It gets data from various sources, cleans it and processes it. SAS programming language is one of the easiest procedural languages.
  • It has a simple syntax and various inbuilt libraries containing enormous features. For instance, it has features like plotting graphs, finding permutations and combinations and solving regression.

FREQUENTLY ASKED INTERVIEW QUESTIONS AND ANSWERS.

1.Explain what SAS informats?

Ans:

  • SAS INFORMATS are used to read, or input data from external files known as Flat Files ASCII files, text files or sequential files).
  • The informat will tell SAS on how to read data into SAS variables.

2 .What is the difference between %LOCAL and %GLOBAL?

Ans:

The %LOCAL that variable will be used only at the particular block only but in case of the %GLOBAL that variable will be used till the end of the SAS session

3 . What are SYMGET and SYMPUT?

Ans:

SYMPUT puts the value from a dataset into a macro variable where as SYMGET gets the value from the macro variable to the dataset.

4 . What system options would you use to help debug a macro?

Ans:

  • The SAS System offers users a number of useful system options to help debug macro issues and problems.
  • The results associated with using macro options are automatically displayed on the SAS Log.
  • Specific options related to macro debugging appear in alphabetical order in the table below.
  • MEMRPT. Specifies that memory usage statistics be displayed on the SAS Log.

5 . What are automatic variables for macro?

Ans:

  • Every time we invoke SAS, the macro processor automatically creates certain macro var.
  • eg. &sysdate, &sysday.

6 . What is call symput?

Ans:

  • CALL SYMPUT takes a value from a data step and assigns it to a macro variable.
  • I can then use this macro variable in later steps. To assign a value to a single macro variable,
  • We use CALL SYMPUT with this general form.
  • CALL SYMPUT (“macro-variable-name”, value);

7 . How are parameters passed to a macro?

Ans:

  • A macro variable defined in parentheses in a %MACRO statement is a macro parameter.
  • Macro parameters allow you to pass information into a macro.
  • Here is a simple example.

%macro plot (yvar= ,xvar= ); proc plot; plot &yvar*&xvar; run; %mend plot; %plot(age,sex)

8 . For what purposes have you used SAS macros?

Ans:

  • If we want to use a program step for executing to execute the same Proc step on multiple data sets.
  • We can accomplish repetitive tasks quickly and efficiently. A macro program can be reused many times.
  • Parameters passed to the macro program customize the results without having to change the code within the macro program.
  • Macros in SAS make a small change in the program and have SAS echo that change throughout that program.

9 . How would you define the end of a macro?

Ans:

The end of the macro is defined by %Mend Statement

10 . How would you identify a macro variable?

Ans:

with Ampersand (&) sign

11 . What is the maximum length of the macro variable?

Ans:

32 characters long.

12 . Mention what are the data types does SAS contain?

Ans:

The data types in SAS are Numeric and Character.

13 . Explain what Proc glm does?

Ans:

Proc glm performs simple and multiple regression, analysis of variance (ANOVAL), analysis of covariance, multivariate analysis of variance and repeated measure analysis of variance.

14 . Explain what is the use of PROC gplot?

Ans:

PROC gplot has more options and can create more colorful and fancier graphics.

15 . What is the difference between nodupkey and nodup options?

Ans:

The difference between the NODUP and NODUPKEY is that, NODUP compares all the variables in our dataset while NODUPKEY compares just the BY variables

16 . Two ways to select every second row in a data set

Ans:

  • data example;
  • set sashelp.class;
  • if mod(_n_,2) eq 0;
  • run;
  • MOD Function returns the remainder from the division of the first argument by the second argument. _N_ corresponds to each row.
  • The second row would be calculated like (2/2) which returns zero remainder.

data example1;

  • do i = 2 to nobs by 2;
  • set sashelp.class point=i nobs=nobs;
  • output;
  • end;
  • stop;
  • run;

17 . How to select every second row of a group

Ans:

Suppose we have a table sashelp.class. We want every second row by variable ‘sex’.

  • proc sort data = sashelp.class;
  • by sex;
  • run;
  • data example2 (drop = N);
  • set sashelp.class;
  • by sex;
  • if first.sex then N = 1;
  • else N +1;
  • if N = 2 then output;
  • run;

Tutorial . First. and Last. Variables

18 . How to calculate cumulative sum by group

Ans:

Create Sample Data

  • data abcd;
  • input x y;
  • cards;
  • 1 25
  • 1 28
  • 1 27
  • 2 23
  • 2 35
  • 2 34
  • 3 25
  • 3 29
  • ;
  • run; 

Cumulative Sum by Group

Cumulative Sum by X

data example3;

  • set abcd;
  • if first.x then z1 = y;
  • else z1 + y;
  • by x;
  • run;a

19 . Can both WHERE and IF statements be used for subsetting on a newly derived variable?

Ans:

  • SAS . WHERE vs. IF
  • No. Only IF statement can be used for subsetting when it is based on a newly derived variable.
  • WHERE statement would return an error “newly derived variable is not on file”.
  • Please note that WHERE Option can be used for subsetting on a newly created variable.

data example4

  • (where =(z <=50));
  • set abcd;
  • z = x*y;
  • run;

20 . Select the Second Highest Score with PROC SQL

Ans:

data example5;

  • input Name $ Score;
  • cards;
  • sam 75
  • dave 84
  • sachin 92
  • ram 91
  • ;
  • run;
  • proc sql;
  • select *

from example5

where score in (select max(score) from example5 where score not in (select max(score) from example5));

quit; 

Tutorial . Learn PROC SQL with 20 Examples

    Subscribe For Free Demo

    21 . Two ways to create a macro variable that counts the number of observations in a dataset

    Ans:

    • data _NULL_;
    • if 0 then set sashelp.class nobs=n;
    • call symputx(‘totalrows’,n);
    • stop;
    • run;
    • %put nobs=&totalrows.;
    • proc sql;
    • select count(*) into. nrows from sashelp.class;
    • quit;
    • %put nobs=%left(&nrows.);

    22 . Suppose you have data for employees. It comprises employees’ name, ID and manager ID. You need to find out the manager ‘s name against each employee ID.

    Ans:

    SQL. Self Join

    Create Sample Data

    data example2;

    • input Name $ ID ManagerID;
    • cards;
    • Smith 123 456
    • Robert 456  .
    • William 222 456
    • Daniel 777 222
    • Cook 383 222
    • ;
    • run;

    SQL Self Join

    • proc sql;
    • create table want as
    • select a.*, b.Name as Manager
    • from example2 as a left join example2 as b
    • on a.managerid = b.id;
    • quit;

    Data Step . Self Join 

    • proc sort data=example2 out=x;
    • by ManagerID;
    • run;
    • proc sort data=example2 out=y (rename=(Name=Manager ID=ManagerID ManagerID=ID));
    • by ID;
    • run;
    • data want;
    • merge x (in= a) y (in=b);
    • by managerid;
    • if a;
    • run;
    • Create a macro variable and store TomDick&Harry
    • Issue : When the value is assigned to the macro variable, the ampersand placed after TomDick may cause SAS to interpret it as a macro trigger and an warning message would be occurred.

    %let x = %NRSTR(TomDick&Harry);

    %PUT &x.;

    %NRSTR function is a macro quoting function which is used to hide the normal meaning of special tokens and other comparison and logical operators so that they appear as constant text as well as to mask the macro triggers ( %, &).

    23 . Difference between %STR and %NRSTR

    Ans:

    • Both %STR and %NRSTR functions are macro quoting functions which are used to hide the normal meaning of special tokens and other comparison and logical operators so that they appear as constant text.
    • The only difference is %NRSTR can mask the macro triggers ( %, &) whereas %STR cannot.

    24 . How to pass unmatched single or double quotations text in a macro variable?

    Ans:

    • %let eg  = %str(%’x);
    • %let eg2 = %str(x%”);
    • %put &eg;
    • %put &eg2;

    If the argument to %STR or %NRSTR contains an single or double quotation mark or an unmatched open or close parenthesis, precede each of these characters with a % sign.

    25 . How can we use COUNTW function in a macro?

    Ans:

    %let cntvar = %sysfunc(countw(&nvar));

    There are several useful Base SAS function that are not directly available in Macro, %Sysfunc enables those function to make them work in a macro.

    • %let x=temp;
    • %let n=3;
    • %let x3=result;
    • %let temp3 = result2;

     What %put &&x&n; and %put &&&x&n; would return?

    &&x&n . Two ampersands (&&) resolves to one ampersand (&) and scanner continues and then N resolves to 3 and then &x3 resolves to result.

    &&&x&n .  First two ampersands (&&) resolves to & and then X resolves to temp and then N resolves to 3. In last, &temp3 resolves to result2.

    26 . How to reference a macro variable in selection criteria?

    Ans:

    Use double quotes to reference a macro variable in a selection criteria. Single quotes would not work.

    27 . How to debug %IF %THEN statements in a macro code

    Ans:

    MLOGIC option will display how the macro variable resolved each time in the LOG file as TRUE or FALSE for %IF %THEN.

    28 . Difference between %EVAL and %SYSEVALF functions 

    Ans:

    • Both %EVAL and %SYSEVALF are used to perform mathematical and logical operation with macro variables. %let last = %eval (4.5+3.2); returns error as %EVAL cannot perform arithmetic calculations with operands that have the floating point values.
    • It is when the %SYSEVALF function comes into picture.
    • %let last2 = %sysevalf(4.5+3.2);
    • %put &last2;

    29 . What would be the value of i after the code below completes

    Ans:

    • data test;
    • set temp;
    • array nvars {3} x1-x3;
    • do i = 1 to 3;
    • if nvars{i} > 3 then nvars{i} =.;
    • end;
    • run;

    Answer is 4. It is because when the first time the loop processes, the value of count is 1; the second time, 2; and the third time, 3. At the beginning of the fourth iteration, the value of count is 4, which is found to be greater than the stop value of 3 so the loop stops. However, the value of i is now 4 and not 3, the last value before it would be greater than 3 as the stop value.

    30 . How to compare two tables with PROC SQL

    Ans:

    The EXCEPT operator returns rows from the first query that are not part of the second query.

    • proc sql;
    • select * from newfile
    • except
    • select * from oldfile;
    • quit;
    Course Curriculum

    Best JOB Oriented Advanced SAS Course to Enhance Your Skills

    Weekday / Weekend BatchesSee Batch Details

    31 . Selecting Random Samples with PROC SQL

    Ans:

    The RANUNI and OUTOBS functions can be used for selecting N random samples. The RANUNI function is used to generate random numbers.

    • proc sql outobs = 10;
    • create table tt as
    • select * from sashelp.class
    • order by ranuni(1234);
    • Quit;

    32 .   How to use NODUPKEY kind of operation with PROC SQL

    Ans:

    In PROC SORT, NODUPKEY option is used to remove duplicates based on a variable. In SQL, we can do it like this .

    • proc sql noprint;
    • create table tt (drop = row_num) as
    • select *, monotonic() as row_num
    • from readin
    • group by name
    • having row_num = min(row_num)
    • order by ID;
    • quit;

    33 . How to make SAS stop macro processing on Error

    Ans:

    Check out this link – Stop SAS Macro on Error

    34 . Count Number of Variables assigned in a macro variables

    Ans:

    • %macro nvars (ivars);
    • %let n=%sysfunc(countw(&ivars));
    • %put &n;
    • %mend;
    • %nvars (X1 X2 X3 X4);

    35 . Write a SAS Macro to extract Variable Names from a Dataset

    Ans:

    • *Selecting all the variables;
    • proc sql noprint;
    • select name into . vars separated by ” “
    • from dictionary.columns
    • where LIBNAME = upcase(“work”)
    • and MEMNAME = upcase(“predata”);
    • quit;

    The DICTIONARY.COLUMNS contains information such as name, type, length, and format, about all columns in the table. LIBNAME . Library Name, MEMNAME . Dataset Name

    %put variables = &vars.;

    36 . How would DATA STEP MERGE and PROC SQL JOIN works on the following datasets shown in the image below?

    Ans:

    Many to Many Merge

    • The DATA step does not handle many-to-many matching very well.
    • When we perform many to many merges. the result should be a cartesian (cross) product.
    • For example, if there are three records that match from one contributing data set to two records from the other, the resulting data set should have 3 × 2 = 6 records.
    • Whereas, PROC SQL creates a cartesian product in case of many to many relationship.

    37 . Write a macro to split data into N number of datasets

    Ans:

    38 . Store value in each row of a variable into macro variables

    Ans:

    • data _null_;
    • set sashelp.class ;
    • call symput(cats(‘x’,_n_),Name);
    • run;
    • %put &x1. &x2. &x3.;

    The CATS function is used to concatenate ‘x’ with _N_ (row index number) and removes leading and trailing spaces to the result.

    39 . Enlist the functions performed by SAS.

    Ans:

    SAS (Statistical Analysis System) has its own importance in every business domain.

    Enlisted below are some of the summarized functions that are performed by SAS.

    • Data Management and Project Management
    • Data Warehousing
    • Operational Research and decisional support
    • Information Retrieval and Quality Management
    • Business Planning
    • Statistical Analysis

    40 . What are the 3 components in SAS programming?

    Ans:

    The 3 components in SAS programming are.

    • Statements
    • Variables
    • Dataset

    41 . Enlist the syntax rules followed in SAS statements.

    Ans:

    The SAS program is written in the Editor Window. Here, it contains a series of statements followed by the proper syntax in an order for the SAS program to understand it.

    Some of the syntax rules that are followed in the case of Statement component of SAS are as follows.

    • The end of any statement is marked by a semicolon (;).
    • A semicolon is also used to separate multiple statements that appear on a single line.
    • SAS statements are not case sensitive and extra spacing before statements are automatically removed.
    • Comments can be included in the SAS program for statements in two different ways as.
    • A line beginning with an asterisk (*) and ending with a semicolon (;).
    • A line beginning with a forwarding slash and an asterisk (/*) and ending with an asterisk and a forward slash (*/).

    42 . What are the data types that SAS contains?

    Ans:

    ‘Numeric’ and ‘Character’ are the two types of data types which the SAS program contains.

    43 .What are PDV and their functions?

    Ans:

    Program Data Vector (PDV) is a logical concept and is defined as an area of memory where a data set is being built by SAS.

    Functions of PDV are as follows.

    • A database having one observation at one time is created.
    • The input buffer for holding the data from an external file is created at the time of compilation.
    • PDV contains two automatic variables namely, _N_ (displays the count of the data step that is being executed) and _ERROR_ (notifies the error that occurs at the time of execution).

    44 . What do you know about the SAS data set?

    Ans:

    SAS data set is basically referred to as the data that is available for analysis within a SAS program. SAS dataset is also referred to as the SAS data table.

    SAS data table consists of two parts.

    • Columns of variables
    • Rows of observations

    Useful information about the SAS data set can be summarized as follows.

    • SAS Dataset can read as well as it has built-in data sources for use like Excel, Access, etc.
    • The dataset which is used only in the current session run and discarded after the session ends is known as Temporary Dataset.
    • The Dataset that is stored for use in the future session is also known as the Permanent Dataset.
    • The built-in data set can be accessed using this path Libraries -> My Libraries->SASHELP.

    45 . Explain why double trailing @@ is used in Input Statements?

    Ans:

    During data step iteration, including double trailing @@ in Input statements implies that SAS should hold the current record for the purpose of execution of the next Input statement rather than switching onto the new record.

    46 . Explain the difference between NODUP and NODUPKEY options?

    Ans:

    For removing duplicate values from the table, PROC SORT is basically categorized between two options.

    • NODUP
    • NODUPKEY

    The difference between these two options can be seen below.

    NODUPKEY NODUP

    • Compares just the BY variable present in the dataset. Compares all the variables present in the dataset.
    • Removes duplicate options for the values of variable listed in BY statement. Identifies and eliminates duplicate observations.

    47 . Which command is used to perform sorting in the SAS program?

    Ans:

    • PROC SORT command is used for performing sorting, be it on a single variable or multiple variables.
    • This command is performed on the dataset where the new data set is created as a result of sorting but the original data set remains unchanged.
    • Sorting can be done in both ascending as well as descending order.

    48 . Differentiate INPUT and INFILE.

    Ans:

    Including an INFILE statement within the SAS programming identifies an external file that consists of the data, whereas including INPUT statement in SAS programming describes the variables used.

    49 . Explain the use of PROC print and PROC contents?

    Ans:

    • The PROC step of the SAS program is used to invoke built-in procedures for analyzing the data of the dataset.
    • PROC print. Ensures that the data present in the dataset are read correctly.
    • PROC contents. Displays the information about the SAS dataset.

    50 . Explain DATA_NULL_?

    Ans:

    As the name defines, DATA_NULL_ is a data step that actually does not create any data set.

    It is used for.

    • Creating macro variables.
    • Writing the output without any data set.
    Course Curriculum

    Gain An In-Depth Knowledge in Advanced SAS Training By Experts Trainers

    • Instructor-led Sessions
    • Real-life Case Studies
    • Assignments
    Explore Curriculum

    51 . How is the character variable converted into a numeric variable and vice versa?

    Ans:

    • Under SAS programming, there arise many tasks where a character value is to be converted into the numeric and in the same way, a numeric value is to be converted into a character value.
    • PUT() is used to convert numeric to character. In this case, the source format and source variable type must always be similar.

    52 . What is the purpose of _CHARACTER_ and _NUMERIC_?

    Ans:

    • In the current dataset, _CHARACTER_ defines all the character variables that are currently defined.
    • Example. To include all the character variables in PROC MEANS, the following statements are used.

    PROC MEANS;

    • Var_character_;
    • Run;
    • _NUMERIC_ defines all the numeric variables that are currently defined.

    Example. To include all the numeric variables in PROC MEANS, following statements are used.

    • PROC MEANS;>
    • Var_numeric_;
    • Run;

    53 . What commands are used in the case of including or excluding any specific variables in the data set?

    Ans:

    • DROP, KEEP, and data set options are used for this purpose.
    • The variable we want to remove from the data step is specified in the DROP statement.
    • The variable we want to retain from the data step is specified in the KEEP statement.

    54 . Differentiate between PROC MEANS and PROC SUMMARY.

    Ans:

    • The difference between PROC MEANS and PROC SUMMARY can be understood as follows.
    • PROC MEANS.                 
    • This procedure produces the printed report by default in the OUTPUT window.
    • PROC MEANS by default take all the numeric variables in the analysis.

    PROC SUMMARY.

    • This procedure includes the PRINT in the statement to produce the printed report.
    • PROC SUMMARY takes the variables into the statistical analysis that are described in VAR statement.

    55 . Explain the purpose of SUBSTR functions in SAS programming.

    Ans:

    • In SAS programming, whenever there is a requirement of the program to abstract a substring, the SUBSTR function is used in the case of a character variable.
    • When a start position and length are specified, then this function is used for abstracting character string.

    56 . Name and describe a few SAS character functions that are used for data cleaning in brief.

    Ans:

    • Few SAS character functions that are used for data cleaning are enlisted below.
    • Compress(char_string) function is used for removing blanks or some specified characters from a given string.
    • TRIM(str) function is used for removing trailing blanks from a given string.
    • LOWCASE(char_string) function is used for converting all the characters in a given string to lowercase.
    • UPCASE(char_string) function is used for converting all the characters in a given string to uppercase.
    • COMPBL(str) function is used for converting multiple blanks to a single blank.

    57 . Differentiate between CEIL and FlOOR functions.

    Ans:

    • CEIL  function is used for truncating numeric values where it displays the output as the smallest integer. By smallest integer, here means the integer value is greater than/equal to the argument.
    • Example. CEIL(12.85) will display output as 13.
    • FLOOR function is used for truncating numeric values where it displays the output as the greatest integer. By greatest integer, here means that the integer value is less than/equal to the argument.
    • Example. FLOOR(12.85) will display output as 12.

    58 . What are the ways in which Macro variables can be created in SAS programming?

    Ans:

    • Well a number of different techniques can be used to create macro variables in SAS programming.
    • Enlisted below are the five most commonly used methods.
    • %LET statement
    • Macro parameters (named as well as positional)
    • %DO statement (iterative)
    • INTO in PROC SQL
    • CALL SYMPUTX routine

    59 . Explain the purpose of the RETAIN statement.

    Ans:

    • As the meaning of the word ‘RETAIN’ signifies to keep the value once assigned, the purpose of the RETAIN statement is the same in SAS programming as it’s meaning implies.
    • Within a SAS program, when it is required to move from the current iteration to the next of the data step, at that time the RETAIN statement tells SAS to retain the values rather than set them to missing.

    60 . Which command is used to save logs in the external file?

    Ans:

    PROC PRINTTO command is used to save logs in the external file.

    61 . Mention some common errors that are usually committed in SAS programming.

    Ans:

    • Enlisted below are some of the common errors which are usually committed especially when you are new to this programming language.
    • The basic syntax includes a semicolon at the end of each statement and missing a semicolon is the most common mistake.
    • You skip checking the logs after submitting the program.
    • Commenting errors like failing to use comments where necessary or using comments in an inappropriate way.
    • Not using proper debugging methods.

    62 . Mention SAS system options to debug SAS macros.

    Ans:

    To help in tracking the macro code as well as the SAS code generated by the macros, some system options can be used.

    63 . Differentiate between SAS functions and SAS procedures.

    Ans:

    • The major differences can be discovered/understood by the case explained for both SAS functions and Procedures.

    Case.

    • For Function, argument value is supplied or say taken for calculation across the observation mentioned in the program statement whereas, in the case of Procedure, every observation is expected to have only one variable through which calculation is done as mentioned in the below example.

    64 . What do you know about SYMPUT and SYMGET?

    Ans:

    • The major differences between the two are mentioned below.
    • SYMPUT is used for storing the value of a data set into the macro variable whereas SYMGET is used for retrieving the value from the macro variable to the data set.

    65 . Explain the special input delimiters used in SAS programming.

    Ans:

    • The special input delimiters used in SAS programming are.
    1. DLM
    1. DSD
    • They are used in the statement ‘INFILE’ and DSD has the functionality of ignoring the delimiters that appear enclosed in quotation marks.

    66 . Which function is used to count the number of intervals between two SAS dates?

    Ans:

    Interval function INTCK is used for counting the number of intervals between two given SAS dates.

    67 . If you have CRT, if you have what you say, what did you say?

    Ans:

    • Yes, I have created a patient profile for my manager’s demands and statistics.
    • I use PROC contents and PROC SQL to create a list of simple patient with all information about a specific patient, including age, gender, race etc.

    68 . Have you created traffic files?

    Ans:

    • Yes, I have a copy of the proximity and the FDA. I have created SAS XPport files using the data form for submissions. These are version 5 files.
    • We use a database in each xport transport format, with the Lybin Engine and Proc Copy procedure. For version 5. Labels are 40 bytes, variable names are 8 bytes, and the character variables are 200 bytes.
    • Because SAS xport format complies with SAS 5 databases, these restrictions can be withheld by your copy process restrictions.

    Libnamesdtm “c. sdtm_data”; Libnamedmxport “c. dm.xpt”; Freak copy = In Sdtm; Out = dm; Dm; Run;

    69 . How do you write a test plan?

    Ans:

    • Before you write “test aim” you need to see for “operational notes”.
    • Functional notes are default dependent on “requirements”, so the requirements and functional notes to write a test plan should be clearly understood.

    70 . What is the difference between verification and validation?

    Ans:

    While verification and validation are close to the meaning, “verification” is more than just checking the accuracy or accuracy of a statement, or experimenting, while it also has a sense of “true” declaring a statement with a sign of official endorsement.

    Advanced SAA Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

    71 . What is Proc Cdisc?

    Ans:

    • It comes as part of the new SAS procedure and SAS 9.1.3, which is warm to the SAS 8.2 version.
    • PROC CDISC is a process (CDISC allows the XML files to be compatible with the CDISC ODM version 1.2 Schema, for more details on the SAS programming pharmaceutical manuscript.

    72 . Describe Sdtm?

    Ans:

    The CDISC’s Research Data Index Model (SDTM) was developed to obtain the standard submitted to the FDA.

    73 . What are the Mao Libraries?

    Ans:

    • Macro Libraries are libraries which store all the macros for the development of TLG for clinical trials.
    • These are necessary to control and manage macros. With the help of the INCLUDE statement; The macros stored in the Macro library are automatically called.

    74 . Why do you use ODS?

    Ans:

    • ODS (output delivery system) is typically used to generate output of tables, lists, and diagrams.
    • Creates ODS outputs in html, pdf and rtf formats.

    75 . What is Gret?

    Ans:

    If a case is filed by an NDA, the CRP should send it to the FDA.

    76 . How to create statistics using ProcSql?

    Ans:

    • Yes, we can create statistics like ST, SQL, N, average, average, max, at least, STD & SUM.
    • However, the SQL procedure does not compute the above statistics because it applies to PROC MEANS.

    77 . When using ProcSql?

    Ans:

    • All the functions in the DATA form for data formation and manipulation of data are called LLC.
    • Supports the procedure. Compared to the same results obtained from SQL and Data Form, PROC SQL requires less code, and more importantly it requires less time to run the code.

    78 . What is the procedure used to create a statement?

    Ans:

    Proc Report, proc table and data _null_.

    79 . What is the difference between Stratam and opinion in the project life?

    Ans:

    We refer to the BY statement with PROC LIFETEST to get individual analyzes in observations defined by BY variables.

    80 . What are the benefits of using sauces in Clinical Data Management?

    Ans:

    Need less hardware and fewer employees.

    81 . Explain the verification process?

    Ans:

    • The verification process is used to verify the output of the SAS program, which was created by the source programmer.
    • Write a program and write the output to the validator in this process.

    82 . Can you get some values that differ from data in a different software application? How are you doing it?

    Ans:

    Use a macro. with a% PUT statement.

    83 . If you have registered, will you get previous records in previous recordings?

    Ans:

    Using Ampersand Ident .

    84 . What is a value? Why do u calculate? What are the procedures you can use?

    Ans:

    • If greater than P-value 0.05, independent variables with independent variables can not be related to a relative constant relationship, or the independent variables group can not be credited to a reliable variable.
    • Whether independent variables predicted the band’s reliable speed, it is an overall assessment to assess independent independent variables that do not have any ability to calculate the independent variability.
    • We calculate p-value using PROC FREQ, PROC ANOVA, PROC GLM and PROC TTEST.

    85 . What do you usually do with Proc’s life test?

    Ans:

    • Prose life is used to obtain Kaplan-Meier and Life Table survival estimates (and layers).
    • ProcLifetest uses a tier statement, which compares the biometrics for different groups.

    86 . What would be the value of month at the end of data step execution and how many observations would be there?

    Ans:

    • Value of month would be 13  and No. of observations would be 1.
    • Because the output statement is not specified inside the do loop statement.
    • By Default, output statements will be written after the do loop end statement.

    87 . How do you use the do loop if you don’t know how many times should you execute the do loop?

    Ans:

    We can use do until or do while to specify the condition.

    88 . If reading a variable length file with fixed input, how would you prevent SAS from reading the next record if the last variable didn’t have a value?

    Ans:

    • By using the option MISSOVER in the infile statement.
    • If the input of some data lines are shorter than others then we use TRUNCOVER option in the infile statement

    89 . How would you create multiple observations from a single observation?

    Ans:

    • The double trailing not only prevents SAS from reading a new record into the input buffer when a new INPUT statement is encountered, but it also prevents the record from being released when the program returns to the top of the DATA step.
    • The trailing @ does not hold a record in the input buffer across iterations of the DATA step.
    • @@ hold a record across iterations of data step.
    • SAS will hold the line of data until it reaches either the end of the line or an INPUT statement that does not end with the trailing@@.

    90 . What is called a year cut off?

    Ans:

    • This value determines the start of a 100-year interval that SAS uses when it encounters a two-digit year.
    • With a YEARCUTOFF value of 1920, all two-digit years are in the interval from 1920 to 2019.
    • That is why the first date (8/10/65) is given the value 8/10/1965 and the second date (9/13/02) is given the value 9/13/2002.

    91 . How do you print all the numeric and character variables of a dataset?

    Ans:

    By using _numeric_ and _character_ , we can print all the numeric and character variables of the dataset.

    92 . What is a Program Data Vector?

    Ans:

    • It is a logical memory area where SAS reads observations one at a time to build the SAS dataset. When a program executes.
    • Data from raw file is read into Input buffer and then into PDV one observation at a time
    • The data/observation is directly read into PDV, when SAS is reading from a SAS dataset
    • At the end. from PDV, SAS writes the values to a SAS Output data set as a single observation
    • Along with data set variables and computed variables, the PDV contains two automatic variables, _N_ and _ERROR_

    sets up some automatic variables such as. _N_, _ERROR_, END=, IN=, FIRST, LAST, POINT=

    93 . How do you use the SAS Function with macro facility?

    Ans:

    Yes, by using the %SYSFUNC macro function.

    94 . What are compile time and run time quoting functions?

    Ans:

    Compile Time Quoting Functions:
    • %STR–masks commas, mnemonics, and unmatched quotation marks and parentheses.
    • %NRSTR–masks percent signs and ampersands in addition to the other special characters.

    Run Time Quoting Functions.-

    • %BQUOTE–masks special characters and mnemonics inresolved values during macro execution.
    • %SUPERQ–masks special characters and mnemonics during macro execution. However, it also prevents further resolution of any macros or macro variables.

    95 . How We Can Call Macros With In Data Step?

    Ans:

    • We can call the macro with
    • CALL SYMPUT,
    • Proc SQL ,
    • %LET statement. and macro parameters.

    96 . If You Use A Symput In A Data Step, When And Where Can You Use The Macro Variable?

    Ans:

    • The macro variable created by the CALL SYMPUT routine cannot be used in the same data step in which it got created.
    • Other than that we can use the macro variable at any time.

    97 . How do you sort a large dataset?

    Ans:

    • Make your data set smaller. eliminate all unnecessary variables and set the LENGTH of variables to be no more than necessary (e.g., 3 for dummy variables, 4 for integers, etc,).
    • These reduce the size of the file to be sorted dramatically & should always be done (if you haven’t already).
    • Since you only have 1.7 million records but the file is 4.5 GB, i’m guessing you might not have done this yet (or else the file is inherently very wide — see below).
    • With data files of this size you need to think hard about how to reduce file size.

    98 . What is SQL-Pass through Facility?

    Ans:

    • The SQL Procedure pass-through facility is an extension of the SQL procedure that enables you to send DBMS-specific statements to a DBMS and to retrieve DBMS data.
    • You specify DBMS SQL syntax instead of SAS SQL syntax when you use the pass-through facility.
    • You can use pass-through facility statements in a PROC SQL query or store them in a PROC SQL view.

    Are you looking training with Right Jobs?

    Contact Us
    Get Training Quote for Free