Clinical SAS interview questions usually test six areas: Base SAS (the DATA step, PDV, MERGE, BY-group processing, WHERE vs IF, missing values, dates), SAS procedures (SORT, FREQ, MEANS, TRANSPOSE, SQL, REPORT), macros, CDISC standards (SDTM domains, SUPPQUAL, ADSL, BDS variables), TLFs and validation (mock shells, double programming, PROC COMPARE, Define-XML), and short scenarios such as deriving baseline or a treatment-emergent flag. Many companies also give a written or live coding test.
Key takeaways
- Expect Base SAS, procedures, macros, CDISC, TLFs, validation and scenarios.
- Explain why, not just what: the PDV, compile vs execute, WHERE vs IF.
- For CDISC questions, say “as defined in the SAP” for baselines and flags.
- Know one end-to-end project well: raw data → SDTM → ADaM → TLFs.
- Practise a timed coding test in SAS OnDemand for Academics.
On this page ⌄
How clinical SAS interviews work
CROs and pharma companies usually hire clinical SAS programmers in a few steps. The order varies, but expect:
- 1
Screening or HR round
Your degree, your SAS training and project, notice period and shift flexibility.
- 2
Technical round
The clinical SAS interview questions below: Base SAS, macros, CDISC and TLFs.
- 3
Coding test
Write code on paper, in a shared editor or in SAS: merges, derivations, a small table.
- 4
Manager or client round
How you validate work, meet timelines and communicate issues.
Base SAS interview questions
11. What is the difference between a DATA step and a PROC step?
A DATA step reads, creates and changes data, row by row. A PROC step runs a ready-made procedure on a dataset, such as sorting (PROC SORT) or summarising (PROC MEANS).
22. What is the PDV?
The Program Data Vector is the area in memory where SAS builds one observation at a time during a DATA step. It also holds the automatic variables _N_ (the iteration count) and _ERROR_.
33. What happens in the compilation and execution phases?
In compilation, SAS checks syntax and builds the PDV and the descriptor of the output dataset. In execution, it runs the step once per observation, reading data into the PDV and writing it out.
44. What is the difference between WHERE and IF?
WHERE filters observations before they enter the PDV, so it is efficient but can only use variables that already exist in the input. A subsetting IF works after the data is in the PDV, so it can use variables created in the same step.
55. How does MERGE work, and what does IN= do?
MERGE with a BY statement joins datasets by key; both must be sorted (or indexed) by the BY variables. IN= creates a temporary flag showing whether a dataset contributed to the current row, so you can keep, for example, only subjects present in both datasets.
66. What are FIRST. and LAST. variables?
With a BY statement, SAS creates FIRST.var and LAST.var flags that equal 1 on the first and last row of each BY group. They are used to pick the first or last record per subject or to count within groups.
77. What does RETAIN do?
It keeps a variable’s value from one iteration of the DATA step to the next instead of resetting it to missing. It is used for running totals or carrying a value forward.
88. How does SAS treat missing values?
A numeric missing is shown as a dot and sorts lower than any number, so a condition like “value < 5” is true for missing values unless you exclude them. A character missing is a blank.
99. How are dates stored in SAS?
As numbers: the count of days since 1 January 1960. Formats such as DATE9. or an ISO 8601 format only change how the number is displayed.
1010. What is the difference between the INPUT and PUT functions?
INPUT converts character to numeric using an informat, for example a date string into a SAS date. PUT converts a value to character using a format.
SAS procedures and PROC SQL questions
1111. Which procedures do you use most in clinical programming?
PROC SORT, PROC FREQ (counts and percentages), PROC MEANS or PROC SUMMARY (descriptive statistics), PROC TRANSPOSE, PROC SQL, PROC REPORT for tables, and PROC COMPARE for validation.
1212. What does NODUPKEY do in PROC SORT?
It keeps only the first observation for each unique combination of BY variables and removes the rest. NODUPRECS removes only rows that are completely identical to the one before.
1313. When would you use PROC SQL instead of MERGE?
When joining tables that are not sorted, joining on different variable names or conditions, doing many-to-many joins, or creating summary values in one step. MERGE is often clearer for one-to-one or one-to-many joins by subject.
1414. What does PROC TRANSPOSE do?
It turns rows into columns or columns into rows — for example, turning one row per lab test into one row per subject with a column for each test, or the reverse.
1515. How do you create an RTF table output?
Use ODS RTF to open the destination, PROC REPORT to lay out the table with titles and footnotes, and ODS RTF CLOSE at the end.
SAS macro interview questions
1616. Why are macros used in clinical programming?
To reuse code for repeated work — the same table for many lab parameters or the same check across many domains — so programs are shorter, consistent and easier to maintain.
1717. What is the difference between %LET and CALL SYMPUTX?
%LET assigns a macro variable value when the code is compiled. CALL SYMPUTX assigns it from data during DATA step execution, and removes leading and trailing blanks.
1818. How do you debug a macro?
Turn on the options MPRINT (shows the generated code), MLOGIC (shows the macro’s logic) and SYMBOLGEN (shows how macro variables resolve), then read the log.
1919. What is the difference between a local and a global macro variable?
A global variable exists for the whole session. A local variable exists only while the macro that created it runs. Use %LOCAL inside macros to avoid overwriting global values by mistake.
SDTM and ADaM interview questions
2020. What is the difference between SDTM and ADaM?
SDTM organises the collected data into standard domains with few derivations. ADaM creates analysis-ready datasets from SDTM, adding baselines, changes and flags, and must be traceable back to SDTM. See SDTM and ADaM explained.
2121. Name some SDTM domains and their classes.
DM (demographics, special-purpose), AE and MH (events), CM and EX (interventions), LB and VS (findings), and TS (trial design).
2222. What are USUBJID and --SEQ?
USUBJID is the unique subject identifier across the whole submission. --SEQ (such as AESEQ) is a sequence number that uniquely identifies each record for a subject within a domain.
2323. Where do you put data that has no standard SDTM variable?
In a supplemental qualifier dataset, SUPP-- (for example SUPPAE), linked to the parent record. RELREC is used to describe relationships between records in different domains.
2424. What is ADSL, and why is it built first?
ADSL is the subject-level ADaM dataset, one row per subject, holding treatment variables such as TRT01P and TRT01A, population flags such as SAFFL, and key dates. Other ADaM datasets take these variables from it.
2525. Explain PARAMCD, AVAL, BASE and CHG.
In a BDS dataset, PARAMCD is the short parameter code, AVAL the analysis value, BASE the baseline value and CHG the change from baseline (AVAL minus BASE).
2626. What are Define-XML and Pinnacle 21?
Define-XML is the metadata file that describes every dataset, variable, code list and derivation. Pinnacle 21 is a widely used tool that checks datasets against CDISC and FDA validation rules before submission.
TLF and validation interview questions
2727. What is a mock shell?
A blank template of a table, listing or figure, with titles, columns and footnotes, prepared from the statistical analysis plan (SAP) before the data is final. Programmers build outputs to match it.
2828. How do you validate a table?
Usually by independent double programming: a second programmer writes separate code from the same specifications, and the two results are compared — for datasets often with PROC COMPARE. Differences are investigated and resolved, and the log is checked for errors, warnings and notes.
2929. What do you check in the SAS log?
Errors, warnings and notes such as “uninitialized variable”, “missing values were generated”, “MERGE statement has more than one data set with repeats of BY values” and character-to-numeric conversions. A clean log is expected in clinical work.
Scenario-based clinical SAS interview questions
Explain your logic step by step. Panels value a clear method and a mention of the SAP as much as the code.
3030. How would you derive a baseline value for a lab test?
Follow the SAP’s definition. A common one is the last non-missing value on or before the first dose. Sort by subject, parameter and date, keep records up to the first dose date from ADSL, take the last one with FIRST./LAST. processing, flag it with ABLFL = “Y”, and merge BASE back to all post-baseline records to compute CHG.
3131. How would you flag treatment-emergent adverse events?
Use the SAP’s definition. Typically an AE is treatment-emergent if it starts on or after the first dose (or worsens after it), within the window the SAP sets after the last dose. Merge first and last dose dates from ADSL into ADAE, compare with the AE start date, handle partial dates as the SAP specifies, and set TRTEMFL = “Y”.
3232. A subject appears in AE but not in DM. What do you do?
Do not drop or invent data. Report it as a data issue to data management, document it, and check how the specifications say such records should be handled. Every subject in a domain should exist in DM.
HR and project questions
- “Tell me about your project.” Walk through raw data → SDTM → ADaM → TLFs: which domains you mapped, one derivation you wrote and how you validated it.
- “Why clinical SAS?” Link your degree (pharmacy, life sciences, statistics) to the work: trial knowledge plus careful data logic.
- “How do you handle a deadline when outputs do not match?” Explain how you investigate differences, communicate early and document the fix.
How to prepare for clinical SAS interview questions
- Practise coding by hand and in SAS: merges, FIRST./LAST., RETAIN, PROC TRANSPOSE and a simple macro.
- Know one study end to end: a DM, AE and LB mapping, ADSL and one BDS dataset, and three TLFs.
- Read the SDTMIG and ADaMIG sections for the domains in your project.
- Use free SAS: SAS OnDemand for Academics runs in a browser. See what is clinical SAS for a starting plan.
- Consider certification: clinical SAS certification explains the exams employers recognise.
Interview-ready with BCRI
BCRI’s Clinical SAS course online is a 3 months live online programme (₹38,000) covering Base and Advanced SAS, CDISC SDTM and ADaM, TLFs, Define-XML and Pinnacle 21, with project work, mock interviews, recordings and placement assistance.
FAQs
What questions are asked in a clinical SAS interview?
Base SAS (DATA step, PDV, MERGE, WHERE vs IF, dates), procedures and PROC SQL, macros, CDISC SDTM and ADaM, TLFs and validation, and scenarios such as deriving baseline or treatment-emergent flags. Many companies add a coding test.
Is there a coding test in clinical SAS interviews?
Often, yes. You may write code on paper, in a shared editor or in SAS — typically merges, derivations or a small summary table.
Do freshers need SAS certification to clear interviews?
Not always, but a SAS certification and a clear end-to-end project help freshers stand out. Employers focus on practical skills.
How should I prepare for SDTM and ADaM interview questions?
Learn the main domains and ADaM structures, practise mapping DM, AE and LB, build ADSL and one BDS dataset, and be ready to explain how you validated them.
What is the most common clinical SAS interview question?
Questions on the difference between SDTM and ADaM, WHERE vs IF, and MERGE vs PROC SQL come up very often, along with “explain your project”.