
- by Handson
- June 14, 2025
SAS Programmer Interview Questions and Answers (Company-Wise)
TCS (Tata Consultancy Services)
Role: Clinical SAS Programmer
Q1. What is the difference between PROC MEANS and PROC SUMMARY?
A: Both are used for statistical analysis. PROC MEANS displays output by default; PROC SUMMARY requires an explicit PRINT statement to display results.
Q2. What is the difference between MISOVER and TRUNCOVER in INFILE?
A: MISOVER sets missing values and doesn’t move to the next record if the current one is short; TRUNCOVER reads the partial record into variables and doesn’t fill with missing.
Q3. What does @@ do in an INPUT statement?
A: It holds the data line across multiple iterations within a single DATA step.
Cognizant (CTS)
Role: SAS Analyst / Clinical SAS Programmer
Q1. How to merge multiple datasets with different observation counts?
A: Use MERGE with a sorted BY variable; unmatched records get missing values. Use IN= flags to keep track of rows from each dataset.
Q2. Which PROC would you use for dataset comparison?
A: PROC COMPARE – highlights variable-level differences, metadata mismatches, and value discrepancies.
Q3. How do you validate your SAS programs?
A: Code review, log checking, comparison with raw data, peer review, and dual programming.
Q4. How do you convert character to numeric and vice versa?
A:
- Character to Numeric: input(var, $char10.);
- Numeric to Character: put(var, 8.);
Accenture
Role: SAS Reporting Analyst / Banking & Risk Analytics
Q1. How do you use PROC SQL in SAS?
A: Used to query datasets similarly to SQL.
Example:
proc sql;
select age, count(*) from patients group by age;
quit;
Q2. How do you create a report with dynamic titles?
A: Use CALL SYMPUTX in a DATA step to create macro variables and refer to them in the TITLE statement.
Q3. Explain use of SAS system options like OBS=, LINESIZE=, PAGESIZE=
A: These control limits and output formatting: OBS=100 limits rows, LINESIZE=80 sets output width, etc.
IQVIA
Role: Clinical SAS Programmer
Q1. What is the purpose of Define.xml in a clinical submission?
A: Provides metadata for datasets submitted to regulatory authorities, detailing the structure and origin of data.
Q2. Explain SDTM domains like DM, AE, VS.
A:
- DM (Demographics): Patient-level info
- AE (Adverse Events): Event records
- VS (Vital Signs): Vital parameters like BP
Q3. How do you derive Treatment Emergent Adverse Events (TEAE)?
A: By comparing AE Start Date with First Dose Date and checking if the event occurred after treatment began.
Q4. How do you identify changed records between consecutive months?
A: Sort by ID and month, then use lag variables to detect differences.
Labcorp / Covance
Role: Senior SAS Programmer – ADaM Specialist
Q1. What is the difference between raw data and ADaM data?
A: Raw data comes from CRFs (e.g. SDTM format); ADaM is derived for analysis purposes.
Q2. How do you create ADSL datasets?
A: Merge subject-level information from SDTM datasets (e.g., DM, EX, AE) using subject ID.
Q3. What is traceability in ADaM?
A: The ability to trace derived variables back to raw sources via metadata and Define.xml.
Q4. Explain PARAM, PARAMCD, AVAL, and AVALC in ADaM.
A:
- PARAM: Full description
- PARAMCD: Short code
- AVAL: Numeric value
- AVALC: Character value
Pfizer / Novartis / Sanofi (via CROs like ICON, PPD)
Role: Senior SAS Programmer / Statistical Programmer II
Q1. What are TLFs in SAS Clinical Programming?
A: TLFs stand for Tables, Listings, and Figures – core deliverables in statistical reporting.
Q2. How do you transpose data for TLFs?
A: Use PROC TRANSPOSE to adjust data layout as required by reporting formats.
Q3. How do you QC a Table output?
A: Reproduce using independent code, validate against SAP, perform log checks and peer reviews.
Q4. How do you handle partial dates in clinical data?
A: Assign default values (e.g., 01 for day) and flag imputed values using --DTCFL.
Infosys
Role: SAS Programmer / Reporting Analyst
Q1. How do you schedule and automate SAS jobs?
A: Use batch mode, Windows Scheduler, EG Scheduler, or macros with %INCLUDE.
Q2. How do you debug macro code?
A: Use options: MPRINT, SYMBOLGEN, MLOGIC to trace execution.
Syneos Health
Role: SAS Programmer – Oncology Study
Q1. How do you derive the Date of Death?
A: Use data from DM, AE/DS; pick the latest known death-related date.
Q2. How do you handle partial dates?
A: Impute missing components and flag with imputation status variables.
GSK Pharma
Role: Clinical SAS Programmer – Global Trials
Q1. How do you manage programming for global multicenter studies?
A: Use modular code templates, maintain metadata control, and follow GSK-specific SDTM/ADaM compliance SOPs.
Q2. What tools apart from SAS are you familiar with?
A: Pinnacle 21, JReview, Medidata Rave, and GSK internal reporting platforms.
Q3. Describe your experience with define.xml and annotated CRFs.
A: Familiar with linking define.xml metadata to annotated CRFs and using Pinnacle 21 for validation.
EY (Ernst & Young)
Role: Healthcare Analytics Consultant (SAS Based)
Q1. How do you use SAS for business insights in health data?
A: Use SAS for data preparation, merging claims and EHR data, predictive modeling using PROC REG, PROC LOGISTIC, and visualizations.
Q2. Describe a data pipeline you’ve built.
A: Used SAS DI Studio to pull, transform, and load large datasets into an enterprise data warehouse. Scheduled automated reporting using macros.
Q3. How do you ensure regulatory compliance in your analytics project?
A: Follow GxP, HIPAA policies; audit trails in SAS logs, and document all scripts via version control.
ZS Associates / EXL Analytics
Role: SAS + Excel + Power BI Analyst (Non-Clinical)
Q1. How do you use SAS with Excel and Power BI?
A: Export SAS outputs as CSV/Excel using PROC EXPORT; load in Power BI for visualization.
Q2. What is your experience with Excel formulas for SAS data?
A: Use VLOOKUP, PIVOT, INDEX-MATCH to analyze exported SAS data files.
General Technical Questions
Q1. Difference between INPUT vs INFILE statements?
A: INFILE points to external files; INPUT reads data according to a specified format.
Q2. Difference between Informat and Format?
A: Informat: reads raw data; Format: writes output in a readable format.
Q3. What is DROP vs KEEP?
A: Used to include/exclude variables from datasets during processing.
Q4. How do you ensure traceability and accuracy in SAS coding?
A: Use code versioning, macro validation, PROC COMPARE, log scanning, and documentation.