My SAS Tutorials

Saturday 24 November 2012

Interview questions: SAS interview question and answers



1) Which data functions advances a date time or data/time values by a given interval?

A.. INTNX
2) How can call macros within data step?

A.. We can call the macro with call-symputx
3) In the flow of data step processing, what is the first action in a typical data step?

A.. when you submit a data step , SAS process the data step and then creates a new SAS data set. (Creation of input buffer and PDV) compilation phase and execution phase.
4) How do you identify a macro variable?

A.. Ampersand (&)
5) What are SAS/Access and SAS/Connect?

A.. SAS/Access only process through the database like oracles, SQL-server, Ms-Access etc. SAS/Connect only use server connections.
6) What is the one statement to set the criteria of data that can be coded in any step?

A.. Options statement, Label statements, Keep/Drop Statements.
7) What is the purpose of using the N=PS option?

A.. the N=Ps option creates a buffer in memory which is large enough to store PS lines and enables a page to be formatted randomly prior to it being printed.
8) What are the scrubbing procedures in SAS?

A.. Proc sort with nodupkey option, because it will eliminate the duplicate values.
9) What are the new features included in the new versions of SAS?

A.. the main advantage of version 9 is faster execution of applications and centralized access of date and support.
10) What difference did you find among version 6, 8 and 9?
A. Architecture is fundamentally different from any prior version of SAS. In the SAS 9 architecture, SAS relies on a new component, the metadata server, to provide an information layer between the programs and the data they access. Metadata, such as security permission for SAs libraries and where the various SAs servers are running, are maintained in a common repository.
11) What are the advantages of using SAS clinical data management? Why should not we use other software products in managing clinical data?

A.. ADVANTAGES OF USING A SAS-BASED SYSTEM: Less hardware is required. A typical SAS based system can utilize a standard file server to store its databases and does not require one or more dedicated servers to handle the application load. PC SAS can easily be used to handle processing, while data access is left to the file server. Additionally, as presented, later in this paper, it is possible to use the SAS product SAS/ Share to provide a dedicated server to handle data transactions.
Fewer personnel are required. Systems that use complicated database software often the hiring of one or more DBA’s who make sure the database software is running, make changes to the structure of the database, etc. these individuals often require special training or background experience in the particular database application being used, typically oracle. Additionally, consultants are often required to set up the system studies since dedicated serves and specific expertise requirements often complicate the process. Users with even casual SAS experience can set up studies. Programmer can build the structure of the database and design screens. Organizations that re involved in data management almost always have at least one SAS programmer already on staff. He has understanding of how actually system works, which would allow them to extend the functionality of directly accessing SAS data from outside of the system. Speed of setup is dramatically reduced. By keeping studies on a local file server and making the database and screen design process extremely simple and intuitive, setup time is reduced from weeks to days. All phases of the data management process become homogeneous. From entry to analysis, data reside in SAS data sets, often the end goal of every data management group. Additionally, SAS users are involved in each step, instead of having specialist from different area hand off pieces of studies during the projects life cycle.
No data conversion is required. Since the data reside in SAS data sets natively, no conversion programs need to be written. Data review can happen during the data entry process, on the master databases. As long as records are marked as being double-keyed, data review personnel can run edit check programs and build queries on some patients while others are still being entered. Tables and listing can be generated on live data. This helps speed up the development of table and listing programs and allows programmers to avoid having to make continual copies or extracts of the data during testing.
12) What has been your most common programming mistake?

A.. I remember missing semicolon and not checking log after submitting program, not using debugging tech and not using Fsview option vigorously are my common programming errors I made when I started learning SAS and in my initial projects.
13) Have you ever had to follow SOPs or Programming guidelines?

A.. SOP describes the process to assure that standard coding activities, which produce tables, listing and graphs, functions and /or edit checks, are conducted in accordance with industry standards are appropriately documented.
14) Name several ways to achieve efficiency in your program. Explain trade – off?
A. Efficiency and performance strategies can be classified into 5 different areas. 

Data Storage Elapsed time Input / Output Memory CPU time and elapsed time base line measurements. Efficiency improving techniques: Using keep and drop statements to retain necessary variables. Use macros for reducing the code. Using if-then/else statements to process data programming. Use sql procedure to reduce number of programming steps. Using of length statements to reduce the variable size for reducing the data storage.
15) What other SAS products have you used and consider yourself proficient in using?
A. Data _null_ statements, proc means, proc report, proc tabulate, proc freq, and proc print, proc Univariate etc.
16) What is the significance of the ‘OF’ in x=sum (of a1-a4, a6,a9);
A. If don’t use the OF function it might not be interpreted as we expect. For example the function above calculates the sum of a1 minus a4 plus a6 and a9 and not the whole sum of a1 toa4 &a6 and a9. It is true for mean option also.
16) What do the put and input function do?
A. Input function converts character data values to numeric values. Put function converts numeric values to character values. Ex: for input: input (source, informat) 


Now prepare your Base SAS and Advance SAS Certification Exams with Online Mock tests:  http://exam.sankhyana.com



For training related info kindly mail us at info@sankhyana.com
Sankhyana Consultancy Services
www.sankhyana.com


Thursday 15 November 2012

SAS Interview Questions I


 SAS interview Questions

1)      Can merge statement give output without BY statement? Give at least one example on it.
2)      If I have following two data sets.
    New
a
b
1
2
3
4
5
6

Test
a
b
3
5
1
6
5
7

I am submitting following code.( Assume that NEW and TEST Data sets will be sorted by A and B variable.)

Data nete;
  Merge new test;
  By a b;
Run;
What will be my output?

3)      Difference with Data step Merge and SQL join with example.
4)      How to define Merging, concatenating and Appending.
5)      Assume that you have 50 observation in one data set and 3000 observation in another data set. If you use DATA step Merge to combine the data sets, how many observations are read from the larger data set (i.e. second data set)?
6)      Why we use Index? Is it necessary to make it?
7)      When you use SET statement with multiple data sets, suppose variable salary defined in one data set contain type character and salary defined in another data set contain type numeric. Did my SET statement work without error?
8)      What is interleaving?
9)      How do you insert comments in Macro?



For training related info kindly mail us at info@sankhyana.com
Sankhyana Consultancy Services
www.sankhyana.com

ICON Interview Questions


Interview Questions asked By ICON:
1)       Tell me about yourself.
2)      What you did after graduation and how SAS?
3)      What have you learned in Base SAS?
4)      What is Data step and Proc step?
5)      Define Data statement.
6)      What are Drop= and Keep= options and can they be used in proc step?
7)      We save our word files in .doc format, excel files in .xls format, can you tell me the format to save SAS Dataset?
8)      Can you tell me about substring function and its syntax?
9)      Use of Input and put function.
10)   Explain retain statement.
11)  What is merging .
12)   If we write 2 set data set names in the set statement, what will happen?
13)   Can I merge 3 datasets and if yes, tell me the syntax.
14)  Difference between merging and concatenating.
15)  Difference between Like operator and contains operator.
16)   nodupkey and nodups.
17)   Proc Transpose.
18)  Proc SQL syntax.
19)  What have you done previously?
20)  Use and syntax of PROC Format .
21)  What functions do you study during your training?
22)  What is the difference between functions and proc?
23)  Explain any one function.
24)  Difference between WHERE and IF.
25)  Questions on format and informat.
26)  I have a raw data file, where date format is date9. Now I want to read raw data file to SAS data set what should we do?
27)  Questions on raw data file.
28)  How to create macro variables?
29)  If we have a raw data file and we use where condition then what happen?
30)  What is the use of compress function?
31)  What project you have done?
32)  What is the difference between merge statement and PROC Sql join?
33)  What is NODUP and what is NODUPKEY?


Now prepare your Base SAS and Advance SAS Certification Exams with Online Mock tests:  http://exam.sankhyana.com




For training related info kindly mail us at info@sankhyana.com
Sankhyana Consultancy Services
www.sankhyana.com