Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
63Activity
0 of .
Results for:
No results containing your search query
P. 1
SAS Interview Questions and Answers 1

SAS Interview Questions and Answers 1

Ratings: (0)|Views: 3,100 |Likes:
Published by SASTechies

Learn SAS programming, SAS slides, SAS tutorials, SAS certification, SAS Sample Code, SAS Macro examples,SAS video tutorials, SAS ebooks, SAS tutorials, SAS tips and Techniques, Base SAS and Advanced SAS certification, SAS interview Questions and answers, Proc SQL, SAS syntax, Advanced SAS, Quick links, SAS Documentation, SAS Addin to Microsoft office, Oracle, ODS HTML, ODS Clinical trials, Financial Industry, Question and Answers, SAS Resumes, SAS Blogs
http://sastechies.blogspot.com, http://www.sastechies.com

Learn SAS programming, SAS slides, SAS tutorials, SAS certification, SAS Sample Code, SAS Macro examples,SAS video tutorials, SAS ebooks, SAS tutorials, SAS tips and Techniques, Base SAS and Advanced SAS certification, SAS interview Questions and answers, Proc SQL, SAS syntax, Advanced SAS, Quick links, SAS Documentation, SAS Addin to Microsoft office, Oracle, ODS HTML, ODS Clinical trials, Financial Industry, Question and Answers, SAS Resumes, SAS Blogs
http://sastechies.blogspot.com, http://www.sastechies.com

More info:

Published by: SASTechies on Nov 30, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/19/2013

pdf

text

original

 
What SAS statements would you code to read an external raw data file to a DATA step?
We use SAS statements –FILENAME – to specify the location of the fileINFILE -Identifies an external file to read with an INPUT statementINPUT – to specify the variables that the data is identified with. 
How do you read in the variables that you need?
Using Input statement with column /line pointers, informats and length specifiers.
Are you familiar with special input delimiters? How are they used?
DLM, DSD are the special input delimiters… DELIMITER=
delimiter(s)
specifies an alternate delimiter (other than a blank) to be used for LIST inputDSD (delimiter-sensitive data)specifies that when data values are enclosed in quotation marks, delimiters within the value betreated as character data. The DSD option changes how SAS treats delimiters when you useLIST input and sets the default delimiter to a comma. When you specify DSD, SAS treats twoconsecutive delimiters as a missing value and removes quotation marks from character valueshttp://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000146932.htm#a000177189 
If reading a variable length file with fixed input, how would you prevent SAS from reading thenext record if the last variable didn't have a value?
Options MISSOVER and TRUNCOVER options..MISSOVER
 
prevents an INPUT statement from reading a new input data record if it does not find values inthe current input line for all the variables in the statement. When an INPUT statement reachesthe end of the current input data record, variables without any values assigned are set tomissing.TRUNCOVERoverrides the default behavior of the INPUT statement when an input data record is shorter thanthe INPUT statement expects. By default, the INPUT statement automatically reads the nextinput data record. TRUNCOVER enables you to read variable-length records when somerecords are shorter than the INPUT statement expects. Variables without any values assignedare set to missing. http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000146932.htm#a000177189 
What is the difference between an informat and a format? Name three informats or formats
.INFORMAT Statement-Associates informats with variables
 
It’sbasically used in an input / SQL create table statements to read external file raw data or data that isnot in a SAS format. http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000178244.htm eg: commaw. datew. Wordatew. dollarw. $varyinglengthw.FORMAT Statement
 
Associates formats with variables
 
It’sbasically used in a datastep format / SQL select / Procedure format statements to output SAS data toa file/report etc.Formats can look-like informats but are differentiated as to which statement they are used in…
 
Name and describe three SAS functions that you have used, if any?
The most common functions that would be used are-Conversion functions - Input / Put / int / ceil / floor Character functions - Scan / substr / index / Left / trim / compress / cat / catx / upcase,lowcaseArithmetic functions - Sum / abs /Attribute info functions – Attrn / lengthDataset – open / close / existDirectory - dexist / dopen / dclose / dcreate / dinfoFile functions – fexist / fopen/ filename / fileref SQL functions – coalesce / count / sum/ meanDate functions – date / today / datdif / datepart / datetime / intck / mdyArray functions – dim http://sastechies.com/SASfunctions.php 
How would you code the criteria to restrict the output to be produced?
In view of in-sufficient clarity as to what the interviewer refers to – Global statement – options obs=;Dataset options – obs=Proc SQL - NOPRINT option for reporting / inobs= , outobs= for SQL select

Activity (63)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
ramgopaltks liked this
Robin Blue liked this
Mohd_Dalib_9673 liked this
Sampad Sekhar liked this
Kirti Reddy liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->