B) Mean Function: This function returns the arithmetic mean (average) and ignores the missing value. E.G: Var=MEAN (var1, var2, var3 varn);
|
|
- Rudolf Burke
- 7 years ago
- Views:
Transcription
1 SAS-INTERVIEW QUESTIONS 1. What SAS statements would you code to read an external raw data file to a DATA step? Ans: Infile and Input statements are used to read external raw data file to a Data Step. 2. How do you read in the variable that you need? Ans: If we want to read a particular variable in a set of SAS data set, we can mention the variable we want in the INPUT statement. 3. Are you familiar with special input delimiters? How are they used? Ans: Yes, we have special delimiters like DLM and DSD in SAS. Both these delimiters can be used in the infile statement The DLM can read the commas and spaces as data delimiters. You may choose any delimiters you wish with this option. You can choose multiple character such as DLM= XX for your delimiter. The DSD option allows you to treat two consecutive delimiters as containing a missing value. 4. 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: We can use MISS OVER option in the INFILE statement 5. What is the difference between an informat and a format? Name three informat or format? Ans: An informat is an instruction that SAS uses to read data values into a variable A format is an instruction that SAS uses to write data values The three informat are: - A) Date informat B) Character informat c) Numeric informat The three Formats are:-
2 A) Date format B) Character Format C) Numeric Format 6. Name and describe three SAS function that u have used, if any? Ans: A) SUM Function: It adds the variable together by ignoring the missing values if any E.G: Var=SUM (var1, var2 varn); Var1= SUM (1,., 3) = 4 B) Mean Function: This function returns the arithmetic mean (average) and ignores the missing value. E.G: Var=MEAN (var1, var2, var3 varn); C) SUBSTR Function: The SUBSTR function extracts a portion of the character data values based on how many characters are designated for retrieval. E.G: Var=SUBSTR (var, start<, number of characters); Var1=SUBSTR (ASHOK, 1, 3) In the above example the SUBSTR function takes String ASHOK cuts from start-point (1) till number of Characters (3) and stores ASH in Var1 7. How would you code the criteria to restrict the output to be produced? Ans: ods output close; 8. What is the purpose of trailing@? How would you use them? Ans: The is also known as column pointer By using the trailing@, in the INPUT statement gives you ability to read a part of your raw data line, test it, and then decide how to read additional data from the same record. The single tells the SAS system to hold the line. The double tells the SAS system to Hold the line more strongly. NOTE : An INPUT statement ending instructs the program to release the current raw data line only when there are no
3 data values left to be read from that line. The therefore, hold the input record even across multiple iteration of the data step. 9. Under what circumstances would you code a SELECT construct instead of IF statement? Ans: Especially if you are recoding a variable into a large number of categories. 10. What statement do you code to tell SAS that it is to write to an external file? Ans: Filename fileref path ; File fileref; Put _all_ /* will write all the variables. */ Or put the variables which you require. 11. If reading an external file to produce an external file, what shortcut to write record without coding every single variable on the record? Ans: Put _all _ 12. If you do not want any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set? Ans: By using DATA _NULL_ the desired output is a file and not a SAS dataset. 13. What is the one statement to set the criteria of a data that can be coded in any step? Ans: Options statement 14. Have you ever-linked SAS code? If so, describe the like and any required statement used to either process the code or the step itself. Ans : The link statement tells SAS to jump immediately To the statement label that is indicated in the Label statement and to continue executing statements from that point until a RETURN statement is executed. The RETURN statement ends program control to the statement immediately following the LINK statement.
4 Note: The LINK statement and the destination must be in the same DATA step. The destination is identified by a statement label in the LINK statement. 15. How would you include common or reuse code to be Processed along with your statement? Ans: By using %Include 16. When looking for the data contained in a character string of 150 bytes, which function is the best to locate that data: scan, index or indexc? Ans: Scan 17. If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables? Ans: Use keep = option; 18. Code a PROC SORT on a data set containing state, district and country as the primary variable, along with several numeric variables. Ans: PROC SORT data-set-name; BY state district country; Run; 19. How would you delete duplicate observation? Ans: There are three ways to delete duplicate observations in a dataset 1) Proc sort data=sas-data-set nodups; by var; run; 2) Proc sql; Create sas-data-set as select * from old_sas_data_set where var=distinct(var); quit; 3)Data clean; Set temp; By group; If first.group and last.group then Run;
5 20. How would you code a merge that will keep only the observation that have matches form both sets? Ans: By using the IN internal variable in the merge statement. DATA NEW; MERGE ONE_TEMP (IN=ONE) TWO_TEMP (IN=TWO); BY NAME; IF ONE=1 AND TWO=1; RUN; 21. What is the Program Data Vector (PDV)? What are their functions? Ans: Program Data Vector is the temporary holding area. For example The WHERE statement is may be more efficient then the sub setting If (especially if you are taking a very small sunset from a large file) because it checks on the validity of the condition to see if the observation is to be kept or not. This temporary holding area is called the program data vector (PDV). 22. Does SAS Translate (compile) or does it Interpret? Explain. Ans: When you submit a DATA step for execution, SAS checks the syntax of the SAS statements and compiles them, that is, automatically translates the statements into machine code. In this phase, SAS identifies the type and length of each new variable, and determines whether a type conversion is necessary for each subsequent reference to a variable. 23. At compile time when a SAS data set is read, what items are created? Ans: At compile time SAS creates the following A) Input Buffer B) Program Data Vector(pdv) C) Descriptor information 24. Name statements that are recognized at compile time
6 Only? Ans: Drop Keep e.t.c 25. Identify statement whose placement in the DATA step is critical Ans: Input Statement. 26. Name statements that function at both compile and execution time. 27. Name statements that are execution only. 28. In the flow of the DATA step processing, what is the first action in a typical DATA step? Ans: SAS first performs Syntax check. 29. What is _n_? Ans: This is nothing but a implicit variable created by SAS during data processing. It gives the total number Of records SAS has iterated in a dataset. It is Available only for data step and not for procs. E.G: If we want to find every third record in a Dataset then we can use the _n_ as follows Data new-sas-data-set; Set old; If mod (_n_, 3) =1 then; Run; Note: If we use a where clause to subset the _n_ Will not yield the required result. BASE SAS: 30. What is the effect of the OPTION statement ERROR=1? Ans: If the particular data step has one or more errors then end the processing 31. What s the difference between VAR A1 A4 and VAR A1--A4?
7 32. What do the SAS log messages numeric values have been converted to character mean? Ans: If we try some character function on the numeric values the SAS will automatically convert the numeric variable into character variable. 33. Why is a STOP statement needed for a POINT=option on a SET statement? Ans: Because POINT= reads only the specified observations, SAS cannot detect an end-of-file condition as itwould if the file were being read sequentially. Because detecting an end-offile condition terminates a DATA step automatically, failure to substitute another means of terminating the DATA step when you use POINT= can cause the DATA step to go into a continuous loop. NOTE: You cannot use the POINT= option with any of the following: BY statement WHERE statement WHERE= data set option transport format data sets sequential data sets (on tape or disk) a table from another vendor's relational database management system. 34. How do you control the number of observation and /or variable read or write? Ans: By specifying obs option 35. Approximately what date is represented by the SAS date value of 730? Ans: 1 January How would remove a format that has been permanently associated with a variable. Ans: By Using proc datasets library= somelibrary; Modify sasdataset; Run; 37. What does the RUN statement do?
8 Ans: The run statement executes the statement. 38. Why SAS considered self-documenting? Ans: when a sas-data-set is created SAS creates the Descriptor portion and the data portion of the Data set. The descriptor portion contains the Details like when the dataset was created, no. of Observations, no. of variables e.t.c. Hence SAS is Considered self documenting. 39. Briefly describe 5 ways to do a table lookup in SAS. Ans: 1) Simple table lookup (merging (merge (including IN=OPTION) and sub setting IF statement) 2) Simple table lookup (formats (PROC FORMAT AND PUT function). 3) Looking up with two variable (merging (merge (including IN=OPTION) and sub setting IF statement) 4) Looking up with two variable ((formats (PROC FORMAT, PUT AND INPUT Function) 5) A two-way Looking table (merge statement using two variables). 40. What are some good SAS programming practices for processing vary large data set? Ans: For vary large data set with many variables we can make use of arrays in the SAS systerm. 41. How would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 Variable? Ans: Using Proc Transpose and also do with the sas arrays. 44. What are _numeric_ and _character_ and what do they do?
9 Ans: If we want to do a particular task for all the numeric variable we can use the _numeric_ and same as if we want to do a particular task for all the character variable we can use the _character_ 46. What is the order of application for output data set option, input data set option and SAS statement? Ans: INPUT data set option, SAS statement option and then OUTPUT option. 47. What is the order of evaluation of the comparison operators: + - * /** ()? Missing Value: 56. How many missing values are available? When might you use them? Ans: Two missing values are available in SAS, they are numeric and character. 57. How do you test for missing values? Ans: We can test the missing values by using NMISS option in the input statement 58. How are numeric and character missing values represented internally? Ans: The numeric missing values represented as dots(.) and the character missing values represented as blank FUNCTIONS: 59. What is the significance of the OF in X=SUM (OF a1-a4, a6, a9);? 60. What do the PUT and INPUT function do? Ans: The PUT function is used to identify the logic Problem Which piece of code is executed and not executed what the current value of the particular variable and what the current value of the all variable.
10 INPUT function: The traditional use is the reread a character variable with a numeric format, execute a character-to-numeric conversion. The character to numeric conversion function; INPUT (variable, informat-name) The INPUT function converts the character variable to numeric Salary=input (EMP_SALARY, dollar7.); Character value Numeric value EMP_SALARY SALARY $85, Rename the assigning variable we cannot have the same name. Like: EMP_SALARY=input (EMP_SALARY, dollar7.); The numeric to character conversion function PUT (variable, informat-name); newphone=put (phone, 7); numeric value character value PHONE PHONE Which date advances a date, time or date/time value by a given interval? 62. What do the MOD and INT function do? Ans: MOD function is very useful if suppose you want to select every third observation from SAS data set. Example= data third; Set old; If mod(_n_,3)=1; Run; The INT function retunes the integer portion of an argument. To truncate a number (drop off the fractional part), you use the INT function.
11 63. In ARRAY processing, what does the DIM function do? Ans: DIM is the dimension function. This returns the length of the array (i.e. the number of variable in the list). 64. How would you determine the number of missing or nonmissing value in computation? Ans: We can use the N option for the number of NON- MISSING values and NMISS option for the number of MISSING values. 65. What is the difference between: X=a+b+c+d; and X=SUM (a, b, c, d);? Ans: If we use SUM (a, b, c, d) it will ignore the missing Values if any and compute the sum. For E.G SUM(1,.,2,3)=6 X= = MISSING. 66. There is a field containing a date. It needs to be displayed in the format ddmonyy if it s before 1975, dd mon ccyy if it s after 1985, and as disco years if its between 1975 and How would you accomplish this in data step code? Using only PROC FORMAT. 67. In the following DATA step, what is needed for fraction to print to the log Ans: data _null_; X=1/3; if X=.333 then ; put fraction ; run; 68. What is the difference between calculating the mean using the mean function and PROC MEANS? Ans: The mean function returns the mean of the non-missing values in the variable list. Actually, you may not have figured out the importance of the way the MEAN function deals with the missing values, and this is quit important.if you calculate SCORE by simply
12 adding up all the item and dividing by 50 as follows SCORE=(item1 +item2+item3+..+item50)/50; You would be in big trouble if any of the items had missing values. When SAS statement tries to do arithmetic operation on missing values, the result is always missing. PROCs: 69. If you were given several SAS data sets you were unfamiliar with, how would you find out the variable names and formats of each dataset? Ans: I can use the contents Procedure of all in the libname and see all the variable name and formats of each data set EG: PROC CONTENTS DATA=LIBREF._ALL_; RUN; 70. How would you keep SAS from overlaying the SAS set with its sorted version? Ans: By creating a new dataset after sorting by specifying Out = new sas dataset 71. In PROC PRINT, can you print only variable that begin with the letter A Ans: Yes we can print variable which begin with the letter A by using the WHERE statement in the PROC PRINT statement WHERE (VARIABLE NAME) LIKE A% ; Or WHERE (VARIABLE NAME =: A ; 72. What are some differences between PROC SUMMARY and PROC MEANS? Ans: 1) PROC MEANS produces subgroup statistics only when a BY statement is used and the input data has been previously sorted (use PROC SORT) by the BY variables.proc SUMMARY automatically produces
13 statistics for all subgroups, giving you all the information in one run that you would get by repeatedly sorting a data set by the variables that define each subgroup and running PROC MEANS/. 2) PROC SUMMARY does not produce any information in your output so you will always need to use the OUTPUT statement to create a new data set and use PROC PRINT to see the computed statistics. PROC FREQ: 73. Code the table statement for a single-level (most common) frequency. Ans The statement for single-level. DATA MAR.FREQTEST; SET BAS.AMPERS; PROC FREQ DATA =MAR.FREQTEST; TABLE AGE; RUN; 74. Code the table statement to produce a multi-level frequency. Ans: The statement for multilevel. DATA MAR.FREQTEST; SET BAS.AMPERS; PROC FREQ DATA =MAR.FREQTEST; TABLE AGE * gender; RUN; 75. Name the option to produce a frequency line items rather that a table. 76. Produce output from a frequency. Restrict the printing of the table.
14 PROC MEANS: 77. Code a PROC MEANS that shows both summed and averaged output of the data. 78. Code the option that will allow MEANS to include missing numeric data to be included in the report. 79. Code the MEANS to produce output to be used later. 80. Do you use PROC REPORT or PROC TABULATE? Which do you prefer? Explain. MERGING/UPDATING : 81. What happens in a one-on-one merge? When would you use one? Ans:If you want to merge two data set that have different variable and only one variable as a common variable with that unique variable we can merge the data set with one-on-one merge. 82. How would you combine 3 or more tables with different structures? 83. What is the problem with merging two data set that have variable with the same name but different data? Ans:The second data set value will overwrite the value of the first data set. 84. When would you choose to MERGE two data sets together and when would you SET two data sets? Ans: If we want to create a dataset as an exact copy of The old dataset without any bothering about which Dataset is going to contribute to the new dataset Then we will use set statement. If we want to control the contribution of the old Datasets to the new dataset then we will use the Merge statement 85. Which data set is the controlling data set in the MERGE statement? Ans: The second final dataset after the merge statement.
15 86. How do the IN= variable improve the capability of a MERGE? Ans: IN is a implicit variable in SAS which helps in controlling which dataset needs to contribute to the new dataset 87. Explain the message MERGE HAS ONE OR MORE DATASETS WITH REPEATS OF BY VARIABLE. COSTOMIZED REPORT WRITING: 88. What is the purpose of the statement DATA_NULL_? Ans: Use the keyword _NULL_, which allows the power of the DATA step without creating a data set. 89. What is the pound sign used for the DATA _NULL_? 90. What is the purpose of using the N=PS option? Ans: Specifying N=PS in the FILE statement allows the output pointer to write on any line of the current output MACRO: 91. What system option would you use to help debug a macro? Ans: Symbolgen Mlogic Mprint 92. Describe how you would create a macro variable? Ans: %let var=value; 93. How do you identify a macro variable? 94. How do you define the end of a macro? Ans: %mend 95. How do you assign a macro variable to a SAS variable? Ans: Using CallSymput
16 96. 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 97. How long can a macro variable be? A token? Ans: Till it passes to the word scanner. 98. If you use a SYMPUT in a DATA step, when and where can you use the macro variable? Ans: It can be used outside the scope of dataset and will Be globally available How would you code a macro statement to produce information on the SAS log? Ans: %put Statement
From The Little SAS Book, Fifth Edition. Full book available for purchase here.
From The Little SAS Book, Fifth Edition. Full book available for purchase here. Acknowledgments ix Introducing SAS Software About This Book xi What s New xiv x Chapter 1 Getting Started Using SAS Software
More informationNine Steps to Get Started using SAS Macros
Paper 56-28 Nine Steps to Get Started using SAS Macros Jane Stroupe, SAS Institute, Chicago, IL ABSTRACT Have you ever heard your coworkers rave about macros? If so, you've probably wondered what all the
More informationPreparing your data for analysis using SAS. Landon Sego 24 April 2003 Department of Statistics UW-Madison
Preparing your data for analysis using SAS Landon Sego 24 April 2003 Department of Statistics UW-Madison Assumptions That you have used SAS at least a few times. It doesn t matter whether you run SAS in
More informationTHE POWER OF PROC FORMAT
THE POWER OF PROC FORMAT Jonas V. Bilenas, Chase Manhattan Bank, New York, NY ABSTRACT The FORMAT procedure in SAS is a very powerful and productive tool. Yet many beginning programmers rarely make use
More informationProgramming Tricks For Reducing Storage And Work Space Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA.
Paper 23-27 Programming Tricks For Reducing Storage And Work Space Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA. ABSTRACT Have you ever had trouble getting a SAS job to complete, although
More informationEXST SAS Lab Lab #4: Data input and dataset modifications
EXST SAS Lab Lab #4: Data input and dataset modifications Objectives 1. Import an EXCEL dataset. 2. Infile an external dataset (CSV file) 3. Concatenate two datasets into one 4. The PLOT statement will
More informationTales from the Help Desk 3: More Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board
Tales from the Help Desk 3: More Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board INTRODUCTION In 20 years as a SAS consultant at the Federal Reserve Board, I have seen SAS users make
More informationHow to Reduce the Disk Space Required by a SAS Data Set
How to Reduce the Disk Space Required by a SAS Data Set Selvaratnam Sridharma, U.S. Census Bureau, Washington, DC ABSTRACT SAS datasets can be large and disk space can often be at a premium. In this paper,
More informationReshaping & Combining Tables Unit of analysis Combining. Assignment 4. Assignment 4 continued PHPM 672/677 2/21/2016. Kum 1
Reshaping & Combining Tables Unit of analysis Combining Reshaping set: concatenate tables (stack rows) merge: link tables (attach columns) proc summary: consolidate rows proc transpose: reshape table Hye-Chung
More informationMore Tales from the Help Desk: Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board
More Tales from the Help Desk: Solutions for Simple SAS Mistakes Bruce Gilsen, Federal Reserve Board INTRODUCTION In 20 years as a SAS consultant at the Federal Reserve Board, I have seen SAS users make
More informationReading Delimited Text Files into SAS 9 TS-673
Reading Delimited Text Files into SAS 9 TS-673 Reading Delimited Text Files into SAS 9 i Reading Delimited Text Files into SAS 9 Table of Contents Introduction... 1 Options Available for Reading Delimited
More informationThe Program Data Vector As an Aid to DATA step Reasoning Marianne Whitlock, Kennett Square, PA
PAPER IN09_05 The Program Data Vector As an Aid to DATA step Reasoning Marianne Whitlock, Kennett Square, PA ABSTRACT The SAS DATA step is easy enough for beginners to produce results quickly. You can
More informationData Presentation. Paper 126-27. Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs
Paper 126-27 Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs Tugluke Abdurazak Abt Associates Inc. 1110 Vermont Avenue N.W. Suite 610 Washington D.C. 20005-3522
More informationCHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases
3 CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases About This Document 3 Methods for Accessing Relational Database Data 4 Selecting a SAS/ACCESS Method 4 Methods for Accessing DBMS Tables
More informationTechnical Paper. Reading Delimited Text Files into SAS 9
Technical Paper Reading Delimited Text Files into SAS 9 Release Information Content Version: 1.1July 2015 (This paper replaces TS-673 released in 2009.) Trademarks and Patents SAS Institute Inc., SAS Campus
More information5. Crea+ng SAS Datasets from external files. GIORGIO RUSSOLILLO - Cours de prépara+on à la cer+fica+on SAS «Base Programming»
5. Crea+ng SAS Datasets from external files 107 Crea+ng a SAS dataset from a raw data file 108 LIBNAME statement In most of cases, you may want to assign a libref to a certain folder (a SAS library) LIBNAME
More informationUsing Macros to Automate SAS Processing Kari Richardson, SAS Institute, Cary, NC Eric Rossland, SAS Institute, Dallas, TX
Paper 126-29 Using Macros to Automate SAS Processing Kari Richardson, SAS Institute, Cary, NC Eric Rossland, SAS Institute, Dallas, TX ABSTRACT This hands-on workshop shows how to use the SAS Macro Facility
More informationPROC SQL for SQL Die-hards Jessica Bennett, Advance America, Spartanburg, SC Barbara Ross, Flexshopper LLC, Boca Raton, FL
PharmaSUG 2015 - Paper QT06 PROC SQL for SQL Die-hards Jessica Bennett, Advance America, Spartanburg, SC Barbara Ross, Flexshopper LLC, Boca Raton, FL ABSTRACT Inspired by Christianna William s paper on
More informationUSING PROCEDURES TO CREATE SAS DATA SETS... ILLUSTRATED WITH AGE ADJUSTING OF DEATH RATES 1
USING PROCEDURES TO CREATE SAS DATA SETS... ILLUSTRATED WITH AGE ADJUSTING OF DEATH RATES 1 There may be times when you run a SAS procedure when you would like to direct the procedure output to a SAS data
More informationPaper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois
Paper 70-27 An Introduction to SAS PROC SQL Timothy J Harrington, Venturi Partners Consulting, Waukegan, Illinois Abstract This paper introduces SAS users with at least a basic understanding of SAS data
More informationA Gentle Introduction to Hash Tables. Kevin Martin, Kevin.Martin2@va.gov Dept. of Veteran Affairs July 15, 2009
A Gentle Introduction to Hash Tables Kevin Martin, Kevin.Martin2@va.gov Dept. of Veteran Affairs July 15, 2009 ABSTRACT Most SAS programmers fall into two categories. Either they ve never heard of hash
More informationSAS PROGRAM EFFICIENCY FOR BEGINNERS. Bruce Gilsen, Federal Reserve Board
SAS PROGRAM EFFICIENCY FOR BEGINNERS Bruce Gilsen, Federal Reserve Board INTRODUCTION This paper presents simple efficiency techniques that can benefit inexperienced SAS software users on all platforms.
More informationLabels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY
Paper FF-007 Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY ABSTRACT SAS datasets include labels as optional variable attributes in the descriptor
More informationAN INTRODUCTION TO MACRO VARIABLES AND MACRO PROGRAMS Mike S. Zdeb, New York State Department of Health
AN INTRODUCTION TO MACRO VARIABLES AND MACRO PROGRAMS Mike S. Zdeb, New York State Department of Health INTRODUCTION There are a number of SAS tools that you may never have to use. Why? The main reason
More informationHow To Understand The Power Of Sas
Learning SAS by Example A Programmer s Guide Ron Cody SAS Press From Learning SAS by Example. Full book available for purchase here. Contents List of Programs xv Preface xxix Acknowledgments xxxi Part
More informationDescribing and Retrieving Data with SAS formats David Johnson, DKV-J Consultancies, Holmeswood, England
Paper 55-28 Describing and Retrieving Data with SAS formats David Johnson, DKV-J Consultancies, Holmeswood, England ABSTRACT For many business users, the format procedure might be their favourite SAS procedure.
More informationDBF Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 7
97 CHAPTER 7 DBF Chapter Note to UNIX and OS/390 Users 97 Import/Export Facility 97 Understanding DBF Essentials 98 DBF Files 98 DBF File Naming Conventions 99 DBF File Data Types 99 ACCESS Procedure Data
More informationInnovative Techniques and Tools to Detect Data Quality Problems
Paper DM05 Innovative Techniques and Tools to Detect Data Quality Problems Hong Qi and Allan Glaser Merck & Co., Inc., Upper Gwynnedd, PA ABSTRACT High quality data are essential for accurate and meaningful
More informationMacros from Beginning to Mend A Simple and Practical Approach to the SAS Macro Facility
Macros from Beginning to Mend A Simple and Practical Approach to the SAS Macro Facility Michael G. Sadof, MGS Associates, Inc., Bethesda, MD. ABSTRACT The macro facility is an important feature of the
More informationThe SET Statement and Beyond: Uses and Abuses of the SET Statement. S. David Riba, JADE Tech, Inc., Clearwater, FL
The SET Statement and Beyond: Uses and Abuses of the SET Statement S. David Riba, JADE Tech, Inc., Clearwater, FL ABSTRACT The SET statement is one of the most frequently used statements in the SAS System.
More informationIntroduction to SAS Informats and Formats
CHAPTER 1 Introduction to SAS Informats and Formats 1.1 Chapter Overview... 2 1.2 Using SAS Informats... 2 1.2.1 INPUT Statement... 3 1.2.2 INPUT Function... 7 1.2.3 INPUTN and INPUTC Functions... 8 1.2.4
More informationPaper 109-25 Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation
Paper 109-25 Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation Abstract This paper discusses methods of joining SAS data sets. The different methods and the reasons for choosing a particular
More informationFlat Pack Data: Converting and ZIPping SAS Data for Delivery
Flat Pack Data: Converting and ZIPping SAS Data for Delivery Sarah Woodruff, Westat, Rockville, MD ABSTRACT Clients or collaborators often need SAS data converted to a different format. Delivery or even
More informationLab Experience 17. Programming Language Translation
Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly
More informationPreparing Real World Data in Excel Sheets for Statistical Analysis
Paper DM03 Preparing Real World Data in Excel Sheets for Statistical Analysis Volker Harm, Bayer Schering Pharma AG, Berlin, Germany ABSTRACT This paper collects a set of techniques of importing Excel
More information1. Base Programming. GIORGIO RUSSOLILLO - Cours de prépara+on à la cer+fica+on SAS «Base Programming»
1. Base Programming GIORGIO RUSSOLILLO Cours de prépara+on à la cer+fica+on SAS «Base Programming» 9 What is SAS Highly flexible and integrated soiware environment; you can use SAS for: GIORGIO RUSSOLILLO
More informationQuick Start to Data Analysis with SAS Table of Contents. Chapter 1 Introduction 1. Chapter 2 SAS Programming Concepts 7
Chapter 1 Introduction 1 SAS: The Complete Research Tool 1 Objectives 2 A Note About Syntax and Examples 2 Syntax 2 Examples 3 Organization 4 Chapter by Chapter 4 What This Book Is Not 5 Chapter 2 SAS
More informationPaper 2917. Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA
Paper 2917 Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA ABSTRACT Creation of variables is one of the most common SAS programming tasks. However, sometimes it produces
More information1 Checking Values of Character Variables
1 Checking Values of Character Variables Introduction 1 Using PROC FREQ to List Values 1 Description of the Raw Data File PATIENTS.TXT 2 Using a DATA Step to Check for Invalid Values 7 Describing the VERIFY,
More informationBefore You Begin... 2 Running SAS in Batch Mode... 2 Printing the Output of Your Program... 3 SAS Statements and Syntax... 3
Using SAS In UNIX 2010 Stanford University provides UNIX computing resources on the UNIX Systems, which can be accessed through the Stanford University Network (SUNet). This document provides a basic overview
More informationImporting Excel Files Into SAS Using DDE Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA
Importing Excel Files Into SAS Using DDE Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA ABSTRACT With the popularity of Excel files, the SAS user could use an easy way to get Excel files
More informationC H A P T E R 1 Introducing Data Relationships, Techniques for Data Manipulation, and Access Methods
C H A P T E R 1 Introducing Data Relationships, Techniques for Data Manipulation, and Access Methods Overview 1 Determining Data Relationships 1 Understanding the Methods for Combining SAS Data Sets 3
More informationChapter 1 Overview of the SQL Procedure
Chapter 1 Overview of the SQL Procedure 1.1 Features of PROC SQL...1-3 1.2 Selecting Columns and Rows...1-6 1.3 Presenting and Summarizing Data...1-17 1.4 Joining Tables...1-27 1-2 Chapter 1 Overview of
More informationEffective Use of SQL in SAS Programming
INTRODUCTION Effective Use of SQL in SAS Programming Yi Zhao Merck & Co. Inc., Upper Gwynedd, Pennsylvania Structured Query Language (SQL) is a data manipulation tool of which many SAS programmers are
More informationDemonstrating a DATA Step with and without a RETAIN Statement
1 The RETAIN Statement Introduction 1 Demonstrating a DATA Step with and without a RETAIN Statement 1 Generating Sequential SUBJECT Numbers Using a Retained Variable 7 Using a SUM Statement to Create SUBJECT
More informationThe Power of CALL SYMPUT DATA Step Interface by Examples Yunchao (Susan) Tian, Social & Scientific Systems, Inc., Silver Spring, MD
Paper 052-29 The Power of CALL SYMPUT DATA Step Interface by Examples Yunchao (Susan) Tian, Social & Scientific Systems, Inc., Silver Spring, MD ABSTRACT AND INTRODUCTION CALL SYMPUT is a SAS language
More informationAN INTRODUCTION TO THE SQL PROCEDURE Chris Yindra, C. Y. Associates
AN INTRODUCTION TO THE SQL PROCEDURE Chris Yindra, C Y Associates Abstract This tutorial will introduce the SQL (Structured Query Language) procedure through a series of simple examples We will initially
More informationTrade Flows and Trade Policy Analysis. October 2013 Dhaka, Bangladesh
Trade Flows and Trade Policy Analysis October 2013 Dhaka, Bangladesh Witada Anukoonwattaka (ESCAP) Cosimo Beverelli (WTO) 1 Introduction to STATA 2 Content a. Datasets used in Introduction to Stata b.
More informationDatabase Programming with PL/SQL: Learning Objectives
Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs
More informationSAS Certified Base Programmer for SAS 9 A00-211. SAS Certification Questions and Answers with explanation
SAS BASE Certification 490 Questions + 50 Page Revision Notes (Free update to new questions for the Same Product) By SAS Certified Base Programmer for SAS 9 A00-211 SAS Certification Questions and Answers
More informationData management and SAS Programming Language EPID576D
Time: Location: Tuesday and Thursdays, 11:00am 12:15 pm Drachman Hall A319 Instructors: Angelika Gruessner, MS, PhD 626-3118 (office) Drachman Hall A224 acgruess@azcc.arizona.edu Office Hours: Monday Thursday
More informationSAS/ACCESS 9.3 Interface to PC Files
SAS/ACCESS 9.3 Interface to PC Files Reference SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2011. SAS/ACCESS 9.3 Interface to Files: Reference.
More informationIntroduction to SAS on Windows
https://udrive.oit.umass.edu/statdata/sas1.zip Introduction to SAS on Windows for SAS Versions 8 or 9 October 2009 I. Introduction...2 Availability and Cost...2 Hardware and Software Requirements...2 Documentation...2
More informationCreating External Files Using SAS Software
Creating External Files Using SAS Software Clinton S. Rickards Oxford Health Plans, Norwalk, CT ABSTRACT This paper will review the techniques for creating external files for use with other software. This
More informationA Method for Cleaning Clinical Trial Analysis Data Sets
A Method for Cleaning Clinical Trial Analysis Data Sets Carol R. Vaughn, Bridgewater Crossings, NJ ABSTRACT This paper presents a method for using SAS software to search SAS programs in selected directories
More informationCounting the Ways to Count in SAS. Imelda C. Go, South Carolina Department of Education, Columbia, SC
Paper CC 14 Counting the Ways to Count in SAS Imelda C. Go, South Carolina Department of Education, Columbia, SC ABSTRACT This paper first takes the reader through a progression of ways to count in SAS.
More informationThe programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
More information3.GETTING STARTED WITH ORACLE8i
Oracle For Beginners Page : 1 3.GETTING STARTED WITH ORACLE8i Creating a table Datatypes Displaying table definition using DESCRIBE Inserting rows into a table Selecting rows from a table Editing SQL buffer
More informationAutomated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc
Paper 039-29 Automated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc ABSTRACT This paper highlights the programmable aspects of SAS results distribution using electronic
More informationA Macro to Create Data Definition Documents
A Macro to Create Data Definition Documents Aileen L. Yam, sanofi-aventis Inc., Bridgewater, NJ ABSTRACT Data Definition documents are one of the requirements for NDA submissions. This paper contains a
More informationOracle SQL. Course Summary. Duration. Objectives
Oracle SQL Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row and column data
More informationAlternatives to Merging SAS Data Sets But Be Careful
lternatives to Merging SS Data Sets ut e Careful Michael J. Wieczkowski, IMS HELTH, Plymouth Meeting, P bstract The MERGE statement in the SS programming language is a very useful tool in combining or
More informationCoding for Posterity
Coding for Posterity Rick Aster Some programs will still be in use years after they are originally written; others will be discarded. It is not how well a program achieves its original purpose that makes
More informationHandling Missing Values in the SQL Procedure
Handling Missing Values in the SQL Procedure Danbo Yi, Abt Associates Inc., Cambridge, MA Lei Zhang, Domain Solutions Corp., Cambridge, MA ABSTRACT PROC SQL as a powerful database management tool provides
More information1 Introduction. 2 An Interpreter. 2.1 Handling Source Code
1 Introduction The purpose of this assignment is to write an interpreter for a small subset of the Lisp programming language. The interpreter should be able to perform simple arithmetic and comparisons
More informationManaging Tables in Microsoft SQL Server using SAS
Managing Tables in Microsoft SQL Server using SAS Jason Chen, Kaiser Permanente, San Diego, CA Jon Javines, Kaiser Permanente, San Diego, CA Alan L Schepps, M.S., Kaiser Permanente, San Diego, CA Yuexin
More informationEXTRACTING DATA FROM PDF FILES
Paper SER10_05 EXTRACTING DATA FROM PDF FILES Nat Wooding, Dominion Virginia Power, Richmond, Virginia ABSTRACT The Adobe Portable Document File (PDF) format has become a popular means of producing documents
More informationTraining/Internship Brochure Advanced Clinical SAS Programming Full Time 6 months Program
Training/Internship Brochure Advanced Clinical SAS Programming Full Time 6 months Program Domain Clinical Data Sciences Private Limited 8-2-611/1/2, Road No 11, Banjara Hills, Hyderabad Andhra Pradesh
More informationPharmaSUG 2013 - Paper MS05
PharmaSUG 2013 - Paper MS05 Be a Dead Cert for a SAS Cert How to prepare for the most important SAS Certifications in the Pharmaceutical Industry Hannes Engberg Raeder, inventiv Health Clinical, Germany
More informationOracle Database 12c: Introduction to SQL Ed 1.1
Oracle University Contact Us: 1.800.529.0165 Oracle Database 12c: Introduction to SQL Ed 1.1 Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,
More informationProgramming Idioms Using the SET Statement
Programming Idioms Using the SET Statement Jack E. Fuller, Trilogy Consulting Corporation, Kalamazoo, MI ABSTRACT While virtually every programmer of base SAS uses the SET statement, surprisingly few programmers
More informationAN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL
Paper CC01 AN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL Russ Lavery, Contractor for K&L Consulting Services, King of Prussia, U.S.A. ABSTRACT The primary purpose of this paper is to provide a generic DDE
More informationHOW TO USE SAS SOFTWARE EFFECTIVELY ON LARGE FILES. Juliana M. Ma, University of North Carolina
INTRODUCTION HOW TO USE SAS SOFTWARE EFFECTIVELY ON LARGE FILES The intent of this tutorial was to present basic principles worth remembering when working with SAS software and large files. The paper varies
More informationInstant Interactive SAS Log Window Analyzer
ABSTRACT Paper 10240-2016 Instant Interactive SAS Log Window Analyzer Palanisamy Mohan, ICON Clinical Research India Pvt Ltd Amarnath Vijayarangan, Emmes Services Pvt Ltd, India An interactive SAS environment
More informationPharmaSUG 2015 - Paper QT26
PharmaSUG 2015 - Paper QT26 Keyboard Macros - The most magical tool you may have never heard of - You will never program the same again (It's that amazing!) Steven Black, Agility-Clinical Inc., Carlsbad,
More informationCommonly Used Excel Functions. Supplement to Excel for Budget Analysts
Supplement to Excel for Budget Analysts Version 1.0: February 2016 Table of Contents Introduction... 4 Formulas and Functions... 4 Math and Trigonometry Functions... 5 ABS... 5 ROUND, ROUNDUP, and ROUNDDOWN...
More informationThat Mysterious Colon (:) Haiping Luo, Dept. of Veterans Affairs, Washington, DC
Paper 73-26 That Mysterious Colon (:) Haiping Luo, Dept. of Veterans Affairs, Washington, DC ABSTRACT The colon (:) plays certain roles in SAS coding. Its usage, however, is not well documented nor is
More informationSPSS: Getting Started. For Windows
For Windows Updated: August 2012 Table of Contents Section 1: Overview... 3 1.1 Introduction to SPSS Tutorials... 3 1.2 Introduction to SPSS... 3 1.3 Overview of SPSS for Windows... 3 Section 2: Entering
More informationTable Lookups: From IF-THEN to Key-Indexing
Paper 158-26 Table Lookups: From IF-THEN to Key-Indexing Arthur L. Carpenter, California Occidental Consultants ABSTRACT One of the more commonly needed operations within SAS programming is to determine
More informationNew Tricks for an Old Tool: Using Custom Formats for Data Validation and Program Efficiency
New Tricks for an Old Tool: Using Custom Formats for Data Validation and Program Efficiency S. David Riba, JADE Tech, Inc., Clearwater, FL ABSTRACT PROC FORMAT is one of the old standards among SAS Procedures,
More informationEverything you wanted to know about MERGE but were afraid to ask
TS- 644 Janice Bloom Everything you wanted to know about MERGE but were afraid to ask So you have read the documentation in the SAS Language Reference for MERGE and it still does not make sense? Rest assured
More informationSAS Hints. data _null_; infile testit pad missover lrecl=3; input answer $3.; put answer=; run; May 30, 2008
SAS Hints Delete tempary files Determine if a file exists Direct output to different directy Errs (specify # of errs f SAS to put into log) Execute Unix command from SAS Generate delimited file with no
More informationPART-A Questions. 2. How does an enumerated statement differ from a typedef statement?
1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members
More informationSources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
More informationKEYWORDS ARRAY statement, DO loop, temporary arrays, MERGE statement, Hash Objects, Big Data, Brute force Techniques, PROC PHREG
Paper BB-07-2014 Using Arrays to Quickly Perform Fuzzy Merge Look-ups: Case Studies in Efficiency Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT Merging two data sets when
More informationAnalyzing the Server Log
87 CHAPTER 7 Analyzing the Server Log Audience 87 Introduction 87 Starting the Server Log 88 Using the Server Log Analysis Tools 88 Customizing the Programs 89 Executing the Driver Program 89 About the
More informationUsing DDE and SAS/Macro for Automated Excel Report Consolidation and Generation
Using DDE and SAS/Macro for Automated Excel Report Consolidation and Generation Mengxi Li, Sandra Archer, Russell Denslow Sodexho Campus Services, Orlando, FL Abstract Each week, the Sodexho Campus Services
More informationTips for Constructing a Data Warehouse Part 2 Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA
Tips for Constructing a Data Warehouse Part 2 Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA ABSTRACT Ah, yes, data warehousing. The subject of much discussion and excitement. Within the
More informationS P S S Statistical Package for the Social Sciences
S P S S Statistical Package for the Social Sciences Data Entry Data Management Basic Descriptive Statistics Jamie Lynn Marincic Leanne Hicks Survey, Statistics, and Psychometrics Core Facility (SSP) July
More informationIntroduction to SAS Functions
Paper 57 Introduction to SAS Functions Neil Howard, Independent Consultant, Charlottesville, VA Abstract A FUNCTION returns a value from a computation or system manipulation that requires zero or more
More informationTips, Tricks, and Techniques from the Experts
Tips, Tricks, and Techniques from the Experts Presented by Katie Ronk 2997 Yarmouth Greenway Drive, Madison, WI 53711 Phone: (608) 278-9964 Web: www.sys-seminar.com Systems Seminar Consultants, Inc www.sys-seminar.com
More informationOracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to
More informationThe entire SAS code for the %CHK_MISSING macro is in the Appendix. The full macro specification is listed as follows: %chk_missing(indsn=, outdsn= );
Macro Tabulating Missing Values, Leveraging SAS PROC CONTENTS Adam Chow, Health Economics Resource Center (HERC) VA Palo Alto Health Care System Department of Veterans Affairs (Menlo Park, CA) Abstract
More informationAP Computer Science Java Mr. Clausen Program 9A, 9B
AP Computer Science Java Mr. Clausen Program 9A, 9B PROGRAM 9A I m_sort_of_searching (20 points now, 60 points when all parts are finished) The purpose of this project is to set up a program that will
More informationJava Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
More informationUsing SAS With a SQL Server Database. M. Rita Thissen, Yan Chen Tang, Elizabeth Heath RTI International, RTP, NC
Using SAS With a SQL Server Database M. Rita Thissen, Yan Chen Tang, Elizabeth Heath RTI International, RTP, NC ABSTRACT Many operations now store data in relational databases. You may want to use SAS
More informationCDW DATA QUALITY INITIATIVE
Loading Metadata to the IRS Compliance Data Warehouse (CDW) Website: From Spreadsheet to Database Using SAS Macros and PROC SQL Robin Rappaport, IRS Office of Research, Washington, DC Jeff Butler, IRS
More informationLet the CAT Out of the Bag: String Concatenation in SAS 9 Joshua Horstman, Nested Loop Consulting, Indianapolis, IN
Paper S1-08-2013 Let the CAT Out of the Bag: String Concatenation in SAS 9 Joshua Horstman, Nested Loop Consulting, Indianapolis, IN ABSTRACT Are you still using TRIM, LEFT, and vertical bar operators
More informationImporting Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC
ABSTRACT PharmaSUG 2012 - Paper CC07 Importing Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC In Pharmaceuticals/CRO industries, Excel files are widely use for data storage.
More informationGetting started with the Stata
Getting started with the Stata 1. Begin by going to a Columbia Computer Labs. 2. Getting started Your first Stata session. Begin by starting Stata on your computer. Using a PC: 1. Click on start menu 2.
More information