Name: Batch timing: Date: The SAS data set named WORK.SALARY contains 10 observations for each department, currently ordered by DEPARTMENT.

Size: px
Start display at page:

Download "Name: Batch timing: Date: The SAS data set named WORK.SALARY contains 10 observations for each department, currently ordered by DEPARTMENT."

Transcription

1 Q1. The following SAS program is submitted: data work.total; set work.salary(keep = department wagerate); by department; if first.department then payroll = 0; payroll + wagerate; if last.department; The SAS data set named WORK.SALARY contains 10 observations for each department, currently ordered by DEPARTMENT. Which one of the following is true regarding the program above? A. The BY statement in the DATA step causes a syntax error. B. FIRST.DEPARTMENT & LAST.DEPARTMENT are variables in WORK.TOTAL dataset. C. The values of the variable PAYROLL represent the total for each department in the WORK.SALARY data set. D. The values of the variable PAYROLL represent a total for all values of WAGERATE in the WORK.SALARY data set. Answer: C. For every BY group we get the sum of wagerate in the Payroll variable for each department. Q2. The following SAS program is submitted:

2 data test; set sasuser.employees; if 2 le years_service le 10 then amount = 1000; else if years_service gt 10 then amount = 2000; else amount = 0; amount_per_year = years_service / amount; Which one of the following values does the variable AMOUNT_PER_YEAR contain if an employee has been with the company for one year? A. 0 B C D.. (missing numeric value) Answer : D (missing). It returns missing value as amount will be 0. SAS Log: NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing values. Q3. The contents of the raw data file NAMENUM are listed below: Joe xx

3 The following SAS program is submitted: data test; infile 'namenum'; input name $ number; Which one of the following is the value of the NUMBER variable? A. xx B. Joe C.. (missing numeric value) D. The value can not be determined as the program fails to execute due to errors. Answer : C. It is because number is defined as a numeric variable so it is expecting a numeric value but it reads xx, so number will be a missing value. Q4. How many of the following variable names will not produce errors in an assignment statement? variable var 1variable var1 #var _variable# A. 0 B. 1

4 C. 3 D. 6 Answer : C ; variable var var1. A variable cannot start with numeric or special characters except _. You also cannot use special characters anywhere in the name either though numeric values are allowed. Q5. Suppose the variable 'Unit_Cost_Price' (numeric) contains both missing and non missing values. What would the following code return? proc sort data=ecsql1.price_list; by Unit_Cost_Price; A. A new dataset work.price_list is created with Unit_Cost_Price sorted in ascending order with missing values at the bottom of the dataset B. The dataset ecsql1.price_list is sorted with Unit_Cost_Price sorted in descending order with missing values at the bottom of the dataset C. A new dataset work.price_list is created with Unit_Cost_Price sorted in descending order with missing values at the top of the dataset D. The dataset ecsql1.price_list is sorted with Unit_Cost_Price sorted in ascending order with missing values at the top of the dataset Answer : D. It is because missing values are considered as lowest values (ascending order; they will be top of the data set)

5 Q6. The following SAS program is submitted: dta work.il_corn; set corn.state_data; if state = 'Illinois'; The keyword "data" is misspelled above. What happens to this program during the compilation phase assuming "corn" is a valid libref? A. The program fails due to syntax errors B. The DATA step compiles but doesn't execute C. The DATA step compiles and executes D. None of the above Answer : C. It compiles and executes as SAS assumed that the 'dta' was data. But it leaves a warning in log window. The log shows the following error : WARNING 1-322: Assuming the symbol DATA was misspelled as dta. 141 Q7. Which of the following is a valid statement about the VALUE range in the PROC FORMAT procedure? It cannot be...

6 A. A single character or numeric value B. A range of character values C. A list of unique values separated by commas D. A combination of character and numeric values Answer : D. Q8. How many of the following statistics that PROC MEANS computes as default statistics? Standard deviation Range Count Minimum value Variance Mode A. 2 B. 3 C. 4 D. None of the above Answer : B. By default, PROC MEANS calculates count, mean, standard deviation, minimum and maximum value.

7 Q9. The following SAS program is submitted: data work.totalsales (keep = monthsales{12} ); set work.monthlysales (keep = year product sales); array monthsales {12} ; do i=1 to 12; monthsales{i} = sales; end; The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations. Which one of the following is the result of the above program? A. The program fails execution due to data errors. B. The program fails execution due to syntax errors. C. The program executes with warnings and creates the WORK.TOTALSALES data set. D. The program executes without errors or warnings and creates the WORK.TOTALSALES data set. Answer : B. The syntax issue lies in this line of code - keep = msales{12} To correct the syntax issue, replace keep = msales{12} with keep = msales1-msales12 See the errors in log window : 153 data work.totalsales(keep = msales{12} ) ;

8 ERROR : Variable name { is not valid. ERROR 23-7: Invalid value for the KEEP option. Q10. The following SAS program is submitted: data work.accounting; set work.dept1 work.dept2; A character variable named JOBCODE exists in both the WORK.DEPT1 and WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set. Which one of the following is the length of the variable JOBCODE in the output data set? A. 5 B. 7 C. 8 D. 12 Answer : Since SAS checks the variable Job_code in DEPT1 for the first time of length of 5 Bytes. it sets the length to be 5. All the values that are read from DEPT2 are truncated to Chars. Q11. Which one of the following SAS statements renames two variables?

9 A. set work.dept1 work.dept2(rename = (jcode = jobcode) (sal = salary)); B. set work.dept1 work.dept2(rename = (jcode = jobcode sal = salary)); C. set work.dept1 work.dept2(rename = jcode = jobcode sal = salary); D. set work.dept1 work.dept2(rename = (jcode jobcode) (sal salary)); Answer: B. The syntax for RENAME is as follows : RENAME=(old-name-1=new-name-1 old-name-2=new-name-2... old-name-n=newname-n) Q12. A raw data record is shown below: 07Jan2002 Which one of the following informats would read this value and store it as a SAS date value? A. date9. B. ddmonyy9. C. ddmmmyy9. D. ddmmmyyyy9. Answer : A Q13. What does data _null_ mean? data _null_ ;

10 This statement produces: A. no SAS dataset B. a SAS dataset named null C. a SAS dataset named _null_ D. the largest possible dataset Answer : A. The data _null_ does not produce a dataset. It is used mainly for the following purposes : 1. To create macro variables with call symput 2. To create customized reports with PUT statements writing to external files. Q14. The following SAS program is submitted: data _null_; set old (keep = prod sales1 sales2); file 'file-specification'; put sales1 sales2; Which one of the following default delimiters separates the fields in the raw data file created? A. : (colon) B. (space) C., (comma) D. ; (semicolon) Answer : B. Since no delimiter is specified at the end of the "file", the default delimiter space will be used.

11 Q15. Which one of the following statements is true regarding the name of a SAS array? A. It is saved with the data set. B. It can be used in procedures. C. It exists only for the duration of the DATA step. D. It can be the same as the name of a variable in the data set. Answer : C. Q16. The SASDATA.BANKS data set has five observations when the following SAS program is submitted: libname sasdata 'SAS-data-library'; data allobs; set sasdata.banks; capital=0; do year = 2000 to 2020 by 5; capital + ((capital+2000) * rate); output; end; How many observations will the ALLOBS data set contain? A. 5 B. 15 C. 20 D. 25

12 Answer : D. Banks has 5 observations and then the do loop outputs for (20/5 + 1) times. Therefore 5*(20/5 + 1) = 25 is the observation count. Q17. The following SAS SORT procedure step generates an output data set: proc sort data = sasuser.houses out = report; by style; In which library is the output data set stored? A.WORK B.REPORT. C.HOUSES D.SASUSER Answer : A. If library name is not specified then the data will be stored in temporary dataset i.e. WORK. Q18. The SAS data set named WORK.TEST is listed below:

13 Which one of the following SAS programs created this data set? A. data work.test; capacity = 150; if 100 le capacity le 200 then airplanetype = 'Large' and staff = 10; else airplanetype = 'Small' and staff = 5; B. data work.test; capacity = 150; if 100 le capacity le 200 then do; airplanetype = 'Large'; staff = 10; end; else do; airplanetype = 'Small'; staff = 5; end; C. data work.test; capacity = 150;

14 if 100 le capacity le 200 then do; airplanetype = 'Large'; staff = 10; else do; airplanetype = 'Small'; staff = 5; end; D. data work.test; capacity = 150; if 100 le capacity le 200 then; airplanetype = 'Small'; staff = 5; else; airplanetype = 'Large'; staff = 10; Answer : B. The problem with the options A,C and D is highlighted below in bold. A. data work.test; capacity = 150; if 100 le capacity le 200 then airplanetype = 'Large' and staff = 10; else airplanetype = 'Small' and staff = 5;

15 Log : NOTE: Variable staff is uninitialized. C. data work.test; capacity = 150; if 100 le capacity le 200 then do; airplanetype = 'Large'; staff = 10; else /*end missing for if do loop*/ do; airplanetype = 'Small'; staff = 5; end; Log : ERROR : There was 1 unclosed DO block. NOTE: The SAS System stopped processing this step because of errors. D. data work.test; capacity = 150;

16 if 100 le capacity le 200 then; airplanetype = 'Small'; staff = 5; else; /* there is no if associated with this else */ airplanetype = 'Large'; staff = 10; Log : ERROR : No matching IF-THEN clause Q19. The following SAS program is submitted: data work.flights; destination = 'CPH'; select(destination); when('lhr') city = 'London'; when('cph') city = 'Copenhagen'; otherwise; end; Which one of the following is the value of the CITY variable? A. London B. Copenh

17 C. Copenhagen D. ' ' (missing character value) Answer : B. Notice that the LENGTH statement in the SELECT group has not been specified. Remember that without the LENGTH statement, values for Group might be truncated, as the first value for Group (London) is not the longest possible value. city = 'London' - It contains 6 characters. 'Copenhagen' will be truncated to 6 characters i..e Copenh. Q20. A raw data file is listed below: John McCloskey June Rosesette Tineke Jones 9 37 The following SAS program is submitted using the raw data file as input: data work.homework; infile 'file-specification'; input name $ age height; if age LE 10; How many observations will the WORK.HOMEWORK data set contain? A. 0

18 B. 2 C. 3 D. No data set is created as the program fails to execute due to errors. Answer : C. The data set homework will have missing values under the age variable. The name has a blank in it so we need to use the & list modifier to read the data, also when using this we have to make sure that the data are at least two spaces apart. As SAS considers missing values smaller than 10 in age variable so it has included all the three observation in the data set. The corrected code is as follows: Data homewo; input fname$ lname $ age height; if age LE 10; datalines; John McCloskey June Rosesette Tineke Jones 9 37 ; run

19 Q21. The following SAS program is submitted: data work.one; x = 3; y = 2; z = x ** y; Which one of the following is the value of the variable Z in the output data set? A. 6 B. 9 C.. (missing numeric value) D. The program fails to execute due to errors. Answer: B. ** = exponentiation X**Y raise X to the power of Y So 3 to the power of 2 = 9 Q22. The following SAS program is submitted: data work.new; length word $7; amount = 7; if amount = 5 then word = 'CAT';

20 else if amount = 7 then word = 'DOG'; else word = 'NONE!!!'; amount = 5; Which one of the following represents the values of the AMOUNT and WORD variables? A. amount word 5 DOG B. amount word 5 CAT C. amount word 7 DOG D. amount word 7 ' ' (missing character value) Answer : A. When SAS reads in the iterations in sequence, it first writes 7 to the variable 'amount' in PDV. Then it reads through the condition and writes 'DOG' for variable 'word' in PDV. Then it again encounters the value 5 and writes to 'Amount' in PDV. Q23. The following SAS program is submitted: data _null_;

21 set old; put sales1 sales2; Where is the output written? A. the SAS log B. the raw data file that was opened last C. the SAS output window or an output file D. the data set mentioned in the DATA statement Answer : A. Q24. The following SAS program is submitted: data work.report; set work.sales_info; if qtr(sales_date) ge 3; The SAS data set WORK.SALES_INFO has one observation for each month in the year 2000 and the variable SALES_DATE which contains a SAS date value for each of the twelve months. How many of the original twelve observations in WORK.SALES_INFO are written to the WORK.REPORT data set? Answer : C. The qtr (quarter) values of each of the months (July through December) 7,8,9,10,11,12 is 3,3,3,4,4,4..Therefore 6 obs are included in the final dataset.

22 Q25. The following SAS DATA step is submitted: data sasdata.atlanta sasdata.boston work.portland work.phoenix; set company.prdsales; if region = 'NE' then output boston; if region = 'SE' then output atlanta; if region = 'SW' then output phoenix; if region = 'NW' then output portland; Which one of the following is true regarding the output data sets? A. No library references are required. B. The data sets listed on all the IF statements require a library reference. C. The data sets listed in the last two IF statements require a library reference. D. The data sets listed in the first two IF statements require a library reference. Answer : D. The datasets in the first two IF statements require "sasdata" libref. Q26. The following SAS program is submitted: proc sort data=work.employee; by descending fname; proc sort data=work.salary; by descending fname; data work.empdata; merge work.employee work.salary; by fname;

23 Which one of the following statements explains why the program failed execution? A. The SORT procedures contain invalid syntax. B. The merged data sets are not permanent SAS data sets. C. The data sets were not merged in the order by which they were sorted. D. The RUN statements were omitted after each of the SORT procedures. Answer : C. The two proc sorts are arranged in descending order. However, the merge is in ascending order. Hence, the two data sets won't be merged. In merge if you choose to sort by descending then you must use descending with merge statement otherwise it will not merge because of reason ( C ). It does not matter if you sort by ascending order. Q27. Which one of the following is true of the SUM statement in a SAS DATA step program? A. It is only valid in conjunction with a SUM function. B. It is not valid with the SET, MERGE and UPDATE statements. C. It adds the value of an expression to an accumulator variable and ignores missing values. D. It does not retain the accumulator variable value from one iteration of the SAS DATA step to the next. Answer : C.

24 Q28. The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below: WORK.EMPLOYEE fname age Bruce 30 Dan 40 Dan WORK.SALARY fname salary Bruce Bruce The following SAS program is submitted: data work.empdata; merge work.employee work.salary; by fname; totsal + salary; How many variables are output to the WORK.EMPDATA data set? A. 3 B. 4 C. 5 D. No variables are output to the data set as the program fails to execute due to errors.

25 Answer : B. The variables are: Fname, age, salary and totsal. Note: Obs will not be counted here. Q29. The following SAS program is submitted: data work.sets; do until (prod gt 6); prod + 1; end; Which one of the following is the value of the variable PROD in the output data set? A. 5 B. 6 C. 7 D. 8 Answer : C. Because of prod + 1 statement, SAS compiler will assume a retain prod 0; statement. First loop => prod = 1 => (1 gt 6) => false, loop continues Second loop => prod = 2 => (2 gt 6) => false, loop continues... last loop => prod = 7 => (7 gt 6) => true, do until loop exits and pdv writes prod value of 7 to output dataset.

26 Q30. Which of the following is not an error identified during the compilation phase? A) Quotation marks are unbalances B) No RUN statement in the step C) An option is invalid D) Semicolons are missing in statements Answer : B. Q31. The following SAS program is submitted: libname rawdata1 'location of SAS data library'; filename rawdata2 'location of raw data file'; data work.testdata; infile input sales1 sales2; Which one of the following is needed to complete the program correctly? A. rawdata1 B. rawdata2 C. 'rawdata1' D. 'rawdata2' Answer: B. Since we have already initialized the path with a filename, we do not have to include quotation again.

27 Q32. The following SAS program is submitted and reads 100 records from a raw data file: data work.total; infile 'file-specification' end = eof; input name $ salary; totsal + salary; Which one of the following IF statements writes the last observation to the output data set? A. if end = 0; B. if eof = 0; C. if end = 1; D. if eof = 1; Answer : D. End is a sas keyword which will become true when SAS reads last record of a dataset. This value you cannot use directly in your program, so we create a alias name eof (end of file), but you can name it anything. EOF will carry the same value as internal variable END. So as we know 1=true and 0= false. if EOF = 1; will output only the last observation. Q33. In the following SAS program, the input data files are sorted by the NAMES variable: libname temp 'SAS-data-library';

28 data temp.sales; merge temp.sales work.receipt; by names; Which one of the following results occurs when this program is submitted? A. The program executes successfully and a temporary SAS data set is created. B. The program executes successfully and a permanent SAS data set is created. C. The program fails execution because the same SAS data set is referenced for both read and write operations. D. The program fails execution because the SAS data sets on the MERGE statement are in two different libraries. Answer : B. temp is declared as a permanent library so permanent dataset will be created. Q34. The contents of two SAS data sets named EMPLOYEE and SALARY are listed below: data emplsal; merge employee (in=ine) salary(in=ins); by name; if ine and ins;

29 How many observation are in EMPLSAL dataset? A. 4 B. 3 c. 2 D. 1 Answer : A. Run the following SAS code and see what you got in the EMPSAL dataset: data salary; input name $ salary; datalines; Bruce Bruce Dan Dan. ; data employee; input name $ age; datalines; Bruce 30 Dan 35 ; data emplsal;

30 merge employee (in=ine) salary(in=ins); by name; if ine and ins; Q35. The following SAS program is submitted: data work.products; Product_Number = 5461; Item = '1001'; Item_Reference = Item'/'Product_Number; Which one of the following is the value of the variable ITEM_REFERENCE in the output data set? A. 1001/5461 B. 1001/ 5461 C.. (missing numeric value) D. The value can not be determined as the program fails to execute due to errors. Answer : D. Since there is no concatenate symbol between Item and Product_Number. Q36. The following SAS program is submitted: libname sasdata 'SAS-data-library'; data test; set sasdata.chemists (keep = job_code); if job_code = 'chem3' then description = 'Senior Chemist';

31 The variable JOB_CODE is a character variable with a length of 6 bytes. Which one of the following is the length of the variable DESCRIPTION in the output data set? A. 6 bytes B. 8 bytes C. 14 bytes D. 200 bytes Answer : C. The length of 'Senior Chemist' is 14. Q37. Which one of the following is true of the RETAIN statement in a SAS DATA step program? A. It can be used to assign an initial value to _N_. B. It is only valid in conjunction with a SUM function. C. It has no effect on variables read with the SET, MERGE and UPDATE statements. D. It adds the value of an expression to an accumulator variable and ignores missing values. Answer : C. The RETAIN statement - is a compile-time only statement that creates variables if they do not already exist - initializes the retained variable to missing before the first execution of the DATA step if you do not supply an initial value - has no effect on variables that are read with SET, MERGE, or UPDATE statements.

32 Q38. The following SAS program is submitted: data work.test; Title = 'A Tale of Two Cities, Charles J. Dickens'; Word = scan(title,3,','); Which one of the following is the value of the variable WORD in the output data set? A. T B. of C. Dickens D. ' ' (missing character value) Answer : D. Q39. Which one of the following is true when SAS encounters a data error in a DATA step? A. The DATA step stops executing at the point of the error, and no SAS data set is created. B. A note is written to the SAS log explaining the error, and the DATA step continues to execute. C. A note appears in the SAS log that the incorrect data record was saved to a separate

33 SAS file for further examination. D. The DATA step stops executing at the point of the error, and the resulting DATA set contains observations up to that point. Answer : B. If it's a syntax error then the A occurs. If it's an error with invalid data then B will occur. If it's a problem with merging two or more datasets, then D will occur. Q40. The SAS data set EMPLOYEE_INFO is listed below: IDNumber Expenses The following SAS program is submitted: proc sort data = employee_info; Which one of the following BY statements completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value? A. by Expenses IDNumber; B. by IDNumber Expenses;

34 C. by ascending (IDNumber Expenses); D. by ascending IDNumber ascending Expenses; Answer : B. By default SAS will sort data in ascending order. IDNumber should be specified before Expenses as we want IDNUMBER to be sorted in ascending.

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!  We offer free update service for one year PASS4TEST IT Certification Guaranteed, The Easy Way! \ http://www.pass4test.com We offer free update service for one year Exam : A00-201 Title : SAS base programming exam Vendors : SASInstitute Version

More information

Which one of the following is needed to display the standard deviation with only two decimal places?

Which one of the following is needed to display the standard deviation with only two decimal places? Question: 1 proc means data = sasuser.houses std mean max; var sqfeet Which one of the following is needed to display the standard deviation with only two decimal places? A. Add the option MAXDEC = 2 to

More information

SASInstitute A SAS Base Programming. Download Full Version :

SASInstitute A SAS Base Programming. Download Full Version : SASInstitute A00-201 SAS Base Programming Download Full Version : https://killexams.com/pass4sure/exam-detail/a00-201 Answer: B QUESTION: 129 options pageno = 1; proc print data = sasuser.houses; proc

More information

Exam Name: SAS Base Programming for SAS (r) 9 Exam Type: SAS Exam Code: A Total Questions: 127

Exam Name: SAS Base Programming for SAS (r) 9 Exam Type: SAS Exam Code: A Total Questions: 127 Question: 1 The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent label of Asking Price. Which SAS program temporarily replaces the label Asking Price with the label

More information

MATH 707-ST: Introduction to Statistical Computing with SAS and R. MID-TERM EXAM (Writing part) Fall, (Time allowed: TWO Hours)

MATH 707-ST: Introduction to Statistical Computing with SAS and R. MID-TERM EXAM (Writing part) Fall, (Time allowed: TWO Hours) MATH 707-ST: Introduction to Statistical Computing with SAS and R MID-TERM EXAM (Writing part) Fall, 2013 (Time allowed: TWO Hours) Highlight your answer clearly for each question. There is only one correct

More information

SAS Institue EXAM A SAS Base Programming for SAS 9

SAS Institue EXAM A SAS Base Programming for SAS 9 SAS Institue EXAM A00-211 SAS Base Programming for SAS 9 Total Questions: 70 Question: 1 After a SAS program is submitted, the following is written to the SAS log: What issue generated the error in the

More information

Exam Questions A00-211

Exam Questions A00-211 Exam Questions A00-211 SAS Base Programming for SAS Â 9 https://www.2passeasy.com/dumps/a00-211/ 1.The following SAS program is submitted: data work.flights; destination= CPH select(destination); when(

More information

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX KillTest Q&A Exam : A00-211 Title : SAS Base Programming for SAS 9 Version : V9.02 1 / 10 1.The following SAS program is submitted: data work.flights; destination= CPH select(destination); when( L H ±)ci

More information

Exam Name: SAS Base Programming for SAS 9

Exam Name: SAS Base Programming for SAS 9 Vendor: SAS Exam Code: A00-211 Exam Name: SAS Base Programming for SAS 9 Version: DEMO QUESTION 1 Given the SAS data set AGES: AGES AGE --------- The variable AGE contains character values. data subset;

More information

STATION

STATION ------------------------------STATION 1------------------------------ 1. Which of the following statements displays all user-defined macro variables in the SAS log? a) %put user=; b) %put user; c) %put

More information

Creation of SAS Dataset

Creation of SAS Dataset Creation of SAS Dataset Contents SAS data step Access to PC files Access to Oracle Access to SQL 2 SAS Data Step Contents Creating SAS data sets from raw data Creating and managing variables 3 Creating

More information

Contents. Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs

Contents. Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs SAS Data Step Contents Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs 2 Overview Introduction This section teaches you what happens "behind

More information

informats in Reading Date and Time Values the colon-format modifier in Reading Free-Format Data.

informats in Reading Date and Time Values the colon-format modifier in Reading Free-Format Data. 1.A raw data file is listed below. 1---+----10---+----20---+--- son Frank 01/31/89 daughter June 12-25-87 brother Samuel 01/17/51 The following program is submitted using this file as input: data work.family;

More information

work.test temp.test sasuser.test test

work.test temp.test sasuser.test test DSCI 325 Midterm Practice Test Spring 2017 Name: 1. Consider the following four names used to create a SAS data set: work.test temp.test sasuser.test test How many of these will be stored as permanent

More information

Accessing Data and Creating Data Structures. SAS Global Certification Webinar Series

Accessing Data and Creating Data Structures. SAS Global Certification Webinar Series Accessing Data and Creating Data Structures SAS Global Certification Webinar Series Accessing Data and Creating Data Structures Becky Gray Certification Exam Developer SAS Global Certification Michele

More information

Base and Advance SAS

Base and Advance SAS Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS

More information

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2 SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110

More information

Test-king.A questions. SAS Institute A SAS Base Programming for SAS (r) 9

Test-king.A questions. SAS Institute A SAS Base Programming for SAS (r) 9 Test-king.A00-211.246 questions Number: A00-211 Passing Score: 800 Time Limit: 120 min File Version: 6.3 http://www.gratisexam.com/ SAS Institute A00-211 SAS Base Programming for SAS (r) 9 These are the

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

Contents. Generating data with DO loops Processing variables with arrays

Contents. Generating data with DO loops Processing variables with arrays Do-to & Array Contents Generating data with DO loops Processing variables with arrays 2 Generating Data with DO Loops Contents Introduction Constructing DO loops Do loop execution Counting do loop iterations

More information

Chapter 2: Getting Data Into SAS

Chapter 2: Getting Data Into SAS Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data

More information

Merge Processing and Alternate Table Lookup Techniques Prepared by

Merge Processing and Alternate Table Lookup Techniques Prepared by Merge Processing and Alternate Table Lookup Techniques Prepared by The syntax for data step merging is as follows: International SAS Training and Consulting This assumes that the incoming data sets are

More information

SAS PROGRAM EFFICIENCY FOR BEGINNERS. Bruce Gilsen, Federal Reserve Board

SAS 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 information

SAS PROGRAM EFFICIENCY FOR BEGINNERS. Bruce Gilsen, Federal Reserve Board

SAS 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 information

Bruce Gilsen, Federal Reserve Board

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 information

Introduction to SAS Statistical Package

Introduction to SAS Statistical Package Instructor: Introduction to SAS Statistical Package Biostatistics 140.632 Lecture 1 Lucy Meoni lmeoni@jhmi.edu Teaching Assistant : Sorina Eftim seftim@jhsph.edu Lecture/Lab: Room 3017 WEB site: www.biostat.jhsph.edu/bstcourse/bio632/default.htm

More information

DATA Step Debugger APPENDIX 3

DATA Step Debugger APPENDIX 3 1193 APPENDIX 3 DATA Step Debugger Introduction 1194 Definition: What is Debugging? 1194 Definition: The DATA Step Debugger 1194 Basic Usage 1195 How a Debugger Session Works 1195 Using the Windows 1195

More information

Using an ICPSR set-up file to create a SAS dataset

Using an ICPSR set-up file to create a SAS dataset Using an ICPSR set-up file to create a SAS dataset Name library and raw data files. From the Start menu, launch SAS, and in the Editor program, write the codes to create and name a folder in the SAS permanent

More information

Debugging 101 Peter Knapp U.S. Department of Commerce

Debugging 101 Peter Knapp U.S. Department of Commerce Debugging 101 Peter Knapp U.S. Department of Commerce Overview The aim of this paper is to show a beginning user of SAS how to debug SAS programs. New users often review their logs only for syntax errors

More information

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS

More information

April 4, SAS General Introduction

April 4, SAS General Introduction PP 105 Spring 01-02 April 4, 2002 SAS General Introduction TA: Kanda Naknoi kanda@stanford.edu Stanford University provides UNIX computing resources for its academic community on the Leland Systems, which

More information

CHAPTER 7 Using Other SAS Software Products

CHAPTER 7 Using Other SAS Software Products 77 CHAPTER 7 Using Other SAS Software Products Introduction 77 Using SAS DATA Step Features in SCL 78 Statements 78 Functions 79 Variables 79 Numeric Variables 79 Character Variables 79 Expressions 80

More information

ECLT 5810 SAS Programming - Introduction

ECLT 5810 SAS Programming - Introduction ECLT 5810 SAS Programming - Introduction Why SAS? Able to process data set(s). Easy to handle multiple variables. Generate useful basic analysis Summary statistics Graphs Many companies and government

More information

Chapter 1 The DATA Step

Chapter 1 The DATA Step Chapter 1 The DATA Step 1.1 Structure of SAS Programs...1-3 1.2 SAS Data Sets... 1-12 1.3 Creating a Permanent SAS Data Set... 1-18 1.4 Writing a SAS DATA Step... 1-24 1.5 Creating a DATA Step View...

More information

Statements. Previous Page Next Page. SAS 9.2 Language Reference: Dictionary, Third Edition. Definition of Statements. DATA Step Statements

Statements. Previous Page Next Page. SAS 9.2 Language Reference: Dictionary, Third Edition. Definition of Statements. DATA Step Statements Page 1 of 278 Previous Page Next Page SAS 9.2 Language Reference: Dictionary, Third Edition Statements Definition of Statements DATA Step Statements Global Statements ABORT Statement ARRAY Statement Array

More information

Contents. About This Book...1

Contents. About This Book...1 Contents About This Book...1 Chapter 1: Basic Concepts...5 Overview...6 SAS Programs...7 SAS Libraries...13 Referencing SAS Files...15 SAS Data Sets...18 Variable Attributes...21 Summary...26 Practice...28

More information

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!  We offer free update service for one year PASS4TEST \ http://www.pass4test.com We offer free update service for one year Exam : A00-212 Title : SAS Advanced Programming Exam for SAS 9 Vendor : SASInstitute Version : DEMO Get Latest & Valid A00-212

More information

IT 433 Final Exam. June 9, 2014

IT 433 Final Exam. June 9, 2014 Page 1 of 10 IT 433 Final Exam June 9, 2014 Part A: Multiple Choice Questions about SAS. Circle the most correct answer for each question. You may give an optional reason for each answer; if the answer

More information

Essentials of PDV: Directing the Aim to Understanding the DATA Step! Arthur Xuejun Li, City of Hope National Medical Center, Duarte, CA

Essentials of PDV: Directing the Aim to Understanding the DATA Step! Arthur Xuejun Li, City of Hope National Medical Center, Duarte, CA PharmaSUG 2013 - Paper TF17 Essentials of PDV: Directing the Aim to Understanding the DATA Step! Arthur Xuejun Li, City of Hope National Medical Center, Duarte, CA ABSTRACT Beginning programmers often

More information

TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE

TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE Handy Tips for the Savvy Programmer SAS PROGRAMMING BEST PRACTICES Create Readable Code Basic Coding Recommendations» Efficiently choosing data for processing»

More information

David Beam, Systems Seminar Consultants, Inc., Madison, WI

David Beam, Systems Seminar Consultants, Inc., Madison, WI Paper 150-26 INTRODUCTION TO PROC SQL David Beam, Systems Seminar Consultants, Inc., Madison, WI ABSTRACT PROC SQL is a powerful Base SAS Procedure that combines the functionality of DATA and PROC steps

More information

Stat Wk 3. Stat 342 Notes. Week 3, Page 1 / 71

Stat Wk 3. Stat 342 Notes. Week 3, Page 1 / 71 Stat 342 - Wk 3 What is SQL Proc SQL 'Select' command and 'from' clause 'group by' clause 'order by' clause 'where' clause 'create table' command 'inner join' (as time permits) Stat 342 Notes. Week 3,

More information

Reading data in SAS and Descriptive Statistics

Reading data in SAS and Descriptive Statistics P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows

More information

T.I.P.S. (Techniques and Information for Programming in SAS )

T.I.P.S. (Techniques and Information for Programming in SAS ) Paper PO-088 T.I.P.S. (Techniques and Information for Programming in SAS ) Kathy Harkins, Carolyn Maass, Mary Anne Rutkowski Merck Research Laboratories, Upper Gwynedd, PA ABSTRACT: This paper provides

More information

Syntax Conventions for SAS Programming Languages

Syntax Conventions for SAS Programming Languages Syntax Conventions for SAS Programming Languages SAS Syntax Components Keywords A keyword is one or more literal name components of a language element. Keywords are uppercase, and in reference documentation,

More information

BASICS BEFORE STARTING SAS DATAWAREHOSING Concepts What is ETL ETL Concepts What is OLAP SAS. What is SAS History of SAS Modules available SAS

BASICS BEFORE STARTING SAS DATAWAREHOSING Concepts What is ETL ETL Concepts What is OLAP SAS. What is SAS History of SAS Modules available SAS SAS COURSE CONTENT Course Duration - 40hrs BASICS BEFORE STARTING SAS DATAWAREHOSING Concepts What is ETL ETL Concepts What is OLAP SAS What is SAS History of SAS Modules available SAS GETTING STARTED

More information

10 The First Steps 4 Chapter 2

10 The First Steps 4 Chapter 2 9 CHAPTER 2 Examples The First Steps 10 Invoking the Query Window 11 Changing Your Profile 11 ing a Table 13 ing Columns 14 Alias Names and Labels 14 Column Format 16 Creating a WHERE Expression 17 Available

More information

SAS CURRICULUM. BASE SAS Introduction

SAS CURRICULUM. BASE SAS Introduction SAS CURRICULUM BASE SAS Introduction Data Warehousing Concepts What is a Data Warehouse? What is a Data Mart? What is the difference between Relational Databases and the Data in Data Warehouse (OLTP versus

More information

Objectives Reading SAS Data Sets and Creating Variables Reading a SAS Data Set Reading a SAS Data Set onboard ia.dfwlax FirstClass Economy

Objectives Reading SAS Data Sets and Creating Variables Reading a SAS Data Set Reading a SAS Data Set onboard ia.dfwlax FirstClass Economy Reading SAS Data Sets and Creating Variables Objectives Create a SAS data set using another SAS data set as input. Create SAS variables. Use operators and SAS functions to manipulate data values. Control

More information

SAS Programming Basics

SAS Programming Basics SAS Programming Basics SAS Programs SAS Programs consist of three major components: Global statements Procedures Data steps SAS Programs Global Statements Procedures Data Step Notes Data steps and procedures

More information

Welcome to Top 10 SAS Functions

Welcome to Top 10 SAS Functions Welcome to Top 10 SAS Functions Goal and Agenda By the end of this meeting, you will understand 10 key SAS functions purpose, value and features. What are SAS functions? Why use them? Use Case Manipulating

More information

SAS/ACCESS Data Set Options

SAS/ACCESS Data Set Options 43 CHAPTER 4 SAS/ACCESS Data Set Options Introduction 43 SAS/ACCESS Data Set Options 43 Introduction This chapter describes the SAS/ACCESS options that you can specify on a SAS data set in the form SAS/ACCESS-libref.dbms_table_name.

More information

Stat 302 Statistical Software and Its Applications SAS: Working with Data

Stat 302 Statistical Software and Its Applications SAS: Working with Data 1 Stat 302 Statistical Software and Its Applications SAS: Working with Data Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 26, 2015 2 Outline Chapter 7 in

More information

The Three I s of SAS Log Messages, IMPORTANT, INTERESTING, and IRRELEVANT William E Benjamin Jr, Owl Computer Consultancy, LLC, Phoenix AZ.

The Three I s of SAS Log Messages, IMPORTANT, INTERESTING, and IRRELEVANT William E Benjamin Jr, Owl Computer Consultancy, LLC, Phoenix AZ. ABSTRACT Paper TT_14 The Three I s of SAS Log Messages, IMPORTANT, INTERESTING, and IRRELEVANT William E Benjamin Jr, Owl Computer Consultancy, LLC, Phoenix AZ. I like to think that SAS error messages

More information

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200;

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200; Randy s SAS hints, updated Feb 6, 2014 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, first version: March 8, 2013 ***************; 2. Don

More information

Effectively Utilizing Loops and Arrays in the DATA Step

Effectively Utilizing Loops and Arrays in the DATA Step Paper 1618-2014 Effectively Utilizing Loops and Arrays in the DATA Step Arthur Li, City of Hope National Medical Center, Duarte, CA ABSTRACT The implicit loop refers to the DATA step repetitively reading

More information

17. Reading free-format data. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 386

17. Reading free-format data. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 386 17. Reading free-format data 386 Reading free format data: The list input A raw dataset is free-format when it is not arranged in fixed fields. -> Fields are separated by a delimiter List input allows

More information

DSCI 325 Practice Midterm Questions Spring In SAS, a statement must end

DSCI 325 Practice Midterm Questions Spring In SAS, a statement must end DSCI 325 Practice Midterm Questions Spring 2016 1. In SAS, a statement must end a. with a colon b. with a semicolon c. in a new line d. with the command RUN 2. Which of the following is a valid variable

More information

How to Think Through the SAS DATA Step

How to Think Through the SAS DATA Step How to Think Through the SAS DATA Step Ian Whitlock, Kennett Square, PA Abstract You are relatively new to SAS and interested in writing SAS code. You have probably written DATA step code; some works,

More information

Automated Checking Of Multiple Files Kathyayini Tappeta, Percept Pharma Services, Bridgewater, NJ

Automated Checking Of Multiple Files Kathyayini Tappeta, Percept Pharma Services, Bridgewater, NJ PharmaSUG 2015 - Paper QT41 Automated Checking Of Multiple Files Kathyayini Tappeta, Percept Pharma Services, Bridgewater, NJ ABSTRACT Most often clinical trial data analysis has tight deadlines with very

More information

Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3

Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3 Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3 Bruce Gilsen, Federal Reserve Board, Washington, DC ABSTRACT SAS Versions 9.2 and 9.3 contain many interesting

More information

Conditional Formatting

Conditional Formatting Microsoft Excel 2013: Part 5 Conditional Formatting, Viewing, Sorting, Filtering Data, Tables and Creating Custom Lists Conditional Formatting This command can give you a visual analysis of your raw data

More information

Insertions, Deletions, and Updates

Insertions, Deletions, and Updates Insertions, Deletions, and Updates Lecture 5 Robb T. Koether Hampden-Sydney College Wed, Jan 24, 2018 Robb T. Koether (Hampden-Sydney College) Insertions, Deletions, and Updates Wed, Jan 24, 2018 1 / 17

More information

Tips & Tricks. With lots of help from other SUG and SUGI presenters. SAS HUG Meeting, November 18, 2010

Tips & Tricks. With lots of help from other SUG and SUGI presenters. SAS HUG Meeting, November 18, 2010 Tips & Tricks With lots of help from other SUG and SUGI presenters 1 SAS HUG Meeting, November 18, 2010 2 3 Sorting Threads Multi-threading available if your computer has more than one processor (CPU)

More information

Taming a Spreadsheet Importation Monster

Taming a Spreadsheet Importation Monster SESUG 2013 Paper BtB-10 Taming a Spreadsheet Importation Monster Nat Wooding, J. Sargeant Reynolds Community College ABSTRACT As many programmers have learned to their chagrin, it can be easy to read Excel

More information

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority SAS 101 Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23 By Tasha Chapman, Oregon Health Authority Topics covered All the leftovers! Infile options Missover LRECL=/Pad/Truncover

More information

Other Data Sources SAS can read data from a variety of sources:

Other Data Sources SAS can read data from a variety of sources: Other Data Sources SAS can read data from a variety of sources: Plain text files, including delimited and fixed-column files Spreadsheets, such as Excel Databases XML Others Text Files Text files of various

More information

Overview of Data Management Tasks (command file=datamgt.sas)

Overview of Data Management Tasks (command file=datamgt.sas) Overview of Data Management Tasks (command file=datamgt.sas) Create the March data set: To create the March data set, you can read it from the MARCH.DAT raw data file, using a data step, as shown below.

More information

FSEDIT Procedure Windows

FSEDIT Procedure Windows 25 CHAPTER 4 FSEDIT Procedure Windows Overview 26 Viewing and Editing Observations 26 How the Control Level Affects Editing 27 Scrolling 28 Adding Observations 28 Entering and Editing Variable Values 28

More information

2. Don t forget semicolons and RUN statements The two most common programming errors.

2. Don t forget semicolons and RUN statements The two most common programming errors. Randy s SAS hints March 7, 2013 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, March 8, 2013 ***************; 2. Don t forget semicolons and

More information

DBLOAD Procedure Reference

DBLOAD Procedure Reference 131 CHAPTER 10 DBLOAD Procedure Reference Introduction 131 Naming Limits in the DBLOAD Procedure 131 Case Sensitivity in the DBLOAD Procedure 132 DBLOAD Procedure 132 133 PROC DBLOAD Statement Options

More information

SAS and Data Management Kim Magee. Department of Biostatistics College of Public Health

SAS and Data Management Kim Magee. Department of Biostatistics College of Public Health SAS and Data Management Kim Magee Department of Biostatistics College of Public Health Review of Previous Material Review INFILE statement data bp; infile c:\sas\bp.csv dlm=, ; input clinic $ dbp1 sbp1

More information

QUEST Procedure Reference

QUEST Procedure Reference 111 CHAPTER 9 QUEST Procedure Reference Introduction 111 QUEST Procedure Syntax 111 Description 112 PROC QUEST Statement Options 112 Procedure Statements 112 SYSTEM 2000 Statement 114 ECHO ON and ECHO

More information

Program Validation: Logging the Log

Program Validation: Logging the Log Program Validation: Logging the Log Adel Fahmy, Symbiance Inc., Princeton, NJ ABSTRACT Program Validation includes checking both program Log and Logic. The program Log should be clear of any system Error/Warning

More information

STAT:5400 Computing in Statistics

STAT:5400 Computing in Statistics STAT:5400 Computing in Statistics Introduction to SAS Lecture 18 Oct 12, 2015 Kate Cowles 374 SH, 335-0727 kate-cowles@uiowaedu SAS SAS is the statistical software package most commonly used in business,

More information

SAS/FSP 9.2. Procedures Guide

SAS/FSP 9.2. Procedures Guide SAS/FSP 9.2 Procedures Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2008. SAS/FSP 9.2 Procedures Guide. Cary, NC: SAS Institute Inc. SAS/FSP 9.2 Procedures

More information

Basic Concept Review

Basic Concept Review Basic Concept Review Quiz Using the Programming Workspace Referencing Files and Setting Options Editing and Debugging SAS Programs End of Review SAS Format Format Formats are variable

More information

MARK CARPENTER, Ph.D.

MARK CARPENTER, Ph.D. MARK CARPENTER, Ph.D. Module 1 : THE DATA STEP (1, 2, 3) Keywords : DATA, INFILE, INPUT, FILENAME, DATALINES Procedures : PRINT Pre-Lecture Preparation: create directory on your local hard drive called

More information

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces

More information

USING SAS SOFTWARE TO COMPARE STRINGS OF VOLSERS IN A JCL JOB AND A TSO CLIST

USING SAS SOFTWARE TO COMPARE STRINGS OF VOLSERS IN A JCL JOB AND A TSO CLIST USING SAS SOFTWARE TO COMPARE STRINGS OF VOLSERS IN A JCL JOB AND A TSO CLIST RANDALL M NICHOLS, Mississippi Dept of ITS, Jackson, MS ABSTRACT The TRANSLATE function of SAS can be used to strip out punctuation

More information

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval Epidemiology 9509 Principles of Biostatistics Chapter 3 John Koval Department of Epidemiology and Biostatistics University of Western Ontario What we will do today We will learn to use use SAS to 1. read

More information

Macros I Use Every Day (And You Can, Too!)

Macros I Use Every Day (And You Can, Too!) Paper 2500-2018 Macros I Use Every Day (And You Can, Too!) Joe DeShon ABSTRACT SAS macros are a powerful tool which can be used in all stages of SAS program development. Like most programmers, I have collected

More information

The data step allows for creation, assembly and modification of SAS data sets.

The data step allows for creation, assembly and modification of SAS data sets. The data step allows for creation, assembly and modification of SAS data sets. Sources of information include existing SAS data sets, database files, spreadsheets and other raw data files. Like a procedure,

More information

Beginning Tutorials DATE HANDLING IN THE SAS SYSTEM. Bruce Gilsen, Federal Reserve Board

Beginning Tutorials DATE HANDLING IN THE SAS SYSTEM. Bruce Gilsen, Federal Reserve Board DATE HANDLING IN THE SAS SYSTEM Bruce Gilsen, Federal Reserve Board 1. Introduction A calendar date can be represented in the SAS system as a SAS date value, a special representation of a calendar date

More information

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Basic Topics: Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Review ribbon terminology such as tabs, groups and commands Navigate a worksheet, workbook, and multiple workbooks Prepare

More information

Getting Information from a Table

Getting Information from a Table ch02.fm Page 45 Wednesday, April 14, 1999 2:44 PM Chapter 2 Getting Information from a Table This chapter explains the basic technique of getting the information you want from a table when you do not want

More information

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid:

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid: 1 STRINGS Objectives: How text data is internally represented as a string Accessing individual characters by a positive or negative index String slices Operations on strings: concatenation, comparison,

More information

Getting Your Data into SAS The Basics. Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield

Getting Your Data into SAS The Basics. Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield Getting Your Data into SAS The Basics Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield Outline Getting data into SAS -Entering data directly into SAS -Creating SAS

More information

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC Introduction to SAS Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC cmurray-krezan@salud.unm.edu 20 August 2018 What is SAS? Statistical Analysis System,

More information

Demystifying Inherited Programs

Demystifying Inherited Programs Demystifying Inherited Programs Have you ever inherited a program that leaves you scratching your head trying to figure it out? If you have not, chances are that some time in the future you will. While

More information

Beginning Tutorials. Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

Beginning Tutorials. Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California ABSTRACT SAS/FSP is a set of procedures used to perform full-screen interactive

More information

Using SAS Files CHAPTER 3

Using SAS Files CHAPTER 3 55 CHAPTER 3 Using SAS Files Introduction to SAS Files 56 What Is a SAS File? 56 Types of SAS Files 57 Using Short or Long File Extensions in SAS Libraries 58 SAS Data Sets (Member Type: Data or View)

More information

SAS Data Libraries. Definition CHAPTER 26

SAS Data Libraries. Definition CHAPTER 26 385 CHAPTER 26 SAS Data Libraries Definition 385 Library Engines 387 Library Names 388 Physical Names and Logical Names (Librefs) 388 Assigning Librefs 388 Associating and Clearing Logical Names (Librefs)

More information

RESTRICTING AND SORTING DATA

RESTRICTING AND SORTING DATA RESTRICTING AND SORTING DATA http://www.tutorialspoint.com/sql_certificate/restricting_and_sorting_data.htm Copyright tutorialspoint.com The essential capabilities of SELECT statement are Selection, Projection

More information

Vendor: SAS Institute. Exam Code: A Exam Name: SAS Advanced Programming Exam for SAS 9. Version: Demo

Vendor: SAS Institute. Exam Code: A Exam Name: SAS Advanced Programming Exam for SAS 9. Version: Demo Vendor: SAS Institute Exam Code: A00-212 Exam Name: SAS Advanced Programming Exam for SAS 9 Version: Demo QUESTION 1 Data sasuser.history; Set sasuser.history(keep=state x y Rename = (state=st)); Total=sum(x,y);

More information

Command Interpreters. command-line (e.g. Unix shell) On Unix/Linux, bash has become defacto standard shell.

Command Interpreters. command-line (e.g. Unix shell) On Unix/Linux, bash has become defacto standard shell. Command Interpreters A command interpreter is a program that executes other programs. Aim: allow users to execute the commands provided on a computer system. Command interpreters come in two flavours:

More information

Introduction OR CARDS. INPUT DATA step OUTPUT DATA 8-1

Introduction OR CARDS. INPUT DATA step OUTPUT DATA 8-1 Introduction Thus far, all the DATA step programs we have seen have involved reading and writing only SAS data sets. In this chapter we will present techniques to read and write external or "raw" files

More information

What Is New in CSI-Data-Miner 6.0A and B?

What Is New in CSI-Data-Miner 6.0A and B? Data-Miner 6.0A "Auto" and "Task" mode scripts Data-Miner will now run in either "Auto" mode or "Task" mode. Auto is the way that previous versions of Data-Miner have operated with reading and writing

More information

INTRODUCTION SAS Prepared by A. B. Billings West Virginia University May 1999 (updated August 2006)

INTRODUCTION SAS Prepared by A. B. Billings West Virginia University May 1999 (updated August 2006) INTRODUCTION To SAS Prepared by A. B. Billings West Virginia University May 1999 (updated August 2006) 1 Getting Started with SAS SAS stands for Statistical Analysis System. SAS is a computer software

More information

Chapter 2 INTERNAL SORTS. SYS-ED/ Computer Education Techniques, Inc.

Chapter 2 INTERNAL SORTS. SYS-ED/ Computer Education Techniques, Inc. Chapter 2 INTERNAL SORTS SYS-ED/ Computer Education Techniques, Inc Objectives You will learn: Sorting - role and purpose Advantages and tradeoffs associated with an internal and external sort How to code

More information