<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3911719273486645161</id><updated>2011-11-27T16:42:13.072-08:00</updated><category term='SAS'/><category term='Products'/><category term='Character Functions'/><category term='Language'/><category term='Basic Concepts'/><title type='text'>SAS Certification</title><subtitle type='html'>Interview Questions and Answers (FAQ's)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-5720292466878916566</id><published>2009-08-19T07:23:00.000-07:00</published><updated>2009-08-19T07:23:00.527-07:00</updated><title type='text'>What Is a Published Document?</title><content type='html'>After you have completed an analysis, you might want to share the results with others at your site. Published documents are Excel, Word, or PowerPoint documents that are saved to a common repository.&lt;br /&gt;Publishing your documents to a common repository has the following benefits:&lt;br /&gt;§  The workbooks, documents, and presentations in this repository can be opened by others at your site.&lt;br /&gt;§  When you publish the workbook, document, or presentation to the metadata repository, information about all the data sources is saved to the repository. Storing this metadata in the repository enables you to perform an impact analysis on a document. Impact analysis enables you to see where a data source came from and the items that depend on this source. This analysis enables you to know how changing a data source might affect other documents.&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;To publish a document, your site administrator must have installed SAS Web Report Studio on the same metadata server. If you cannot publish documents, contact your site administrator. D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-5720292466878916566?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/5720292466878916566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=5720292466878916566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/5720292466878916566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/5720292466878916566'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2009/08/what-is-published-document.html' title='What Is a Published Document?'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-5639698413102060930</id><published>2009-08-18T07:22:00.000-07:00</published><updated>2009-08-18T07:22:00.316-07:00</updated><title type='text'>Sending Results from Excel</title><content type='html'>After you performed your initial analysis of the company’s 2006 sales data in Excel, your managers asked you to create a short presentation for the yearly sales meeting. This presentation should include the following:&lt;br /&gt;§  the total sales for each product&lt;br /&gt;§  the average sales, inventory, and returns for each product&lt;br /&gt;From Excel, you can select the results from the Shoe Sales 2006 workbook to send to Word or to PowerPoint. When you select the SAS content to send, the current results for that analysis are automatically displayed in Word or PowerPoint. To make sure that the most up-to-date results are displayed in Word or PowerPoint, you should refresh the analysis after the results are sent to these applications.&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;You can send only SAS content from Excel to Word or PowerPoint. Any formatting or text changes that you made to the SAS content are not sent. Only the results are re-opened in Word or PowerPoint.&lt;br /&gt;You cannot send a SAS data source or data in an Excel worksheet. Word and PowerPoint are unable to open and read an Excel data source. Additionally, you cannot send a PivotTable report to Word or PowerPoint. D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-5639698413102060930?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/5639698413102060930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=5639698413102060930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/5639698413102060930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/5639698413102060930'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2009/08/sending-results-from-excel.html' title='Sending Results from Excel'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-6832552641851614605</id><published>2009-08-17T07:21:00.000-07:00</published><updated>2009-08-17T07:21:00.172-07:00</updated><title type='text'>Accessibility Features of the SAS Add-In for Microsoft Office</title><content type='html'>The SAS Add-In for Microsoft Office includes accessibility and compatibility features that improve usability of the product for users with disabilities. These features are related to accessibility standards for electronic information technology adopted by the U.S. Government under Section 508 of the U.S. Rehabilitation Act of 1973, as amended. For more information about the accessibility of the SAS Add-In for Microsoft, see the online Help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-6832552641851614605?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/6832552641851614605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=6832552641851614605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/6832552641851614605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/6832552641851614605'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2009/08/accessibility-features-of-sas-add-in.html' title='Accessibility Features of the SAS Add-In for Microsoft Office'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-2200395318762706062</id><published>2009-08-16T07:20:00.000-07:00</published><updated>2009-08-16T07:20:00.460-07:00</updated><title type='text'>Benefits to Using the SAS Add-In for Microsoft Office</title><content type='html'>Most of the SAS add-in functionality is identical in Excel, Word, and PowerPoint; for example, you can run analyses and reports in all three applications.&lt;br /&gt;The SAS add-in extends the functionality in Excel, Word, and PowerPoint by enabling you to complete the following tasks:&lt;br /&gt;§  Access SAS data sources as the input data for your analysis. You can view any SAS data source or any data source available from your SAS server (including databases such as Oracle, Teradata, and DB2).&lt;br /&gt;§  Perform more sophisticated analysis and computations than what is available in Microsoft Excel. For example, one of the sophisticated analyses that SAS provides is the Canonical Correlation task. This task enables you to examine the relationship between a linear combination of a set of X variables and a linear combination of a set of Y variables. You might run a canonical correlation analysis to determine the degree of correspondence between a set of job characteristics and a set of measures of employee satisfaction. This extends the correlation analysis that is available in Excel. You can run these sophisticated analyses and computations in Excel, Word, or PowerPoint.&lt;br /&gt;§  Run custom analyses that were developed by others at your company. Using the SAS add-in, you can also access programs, which are called SAS Stored Processes. These programs are customized SAS code that is developed by business analysts or your IT department. Running these programs enables you to quickly generate a custom report without writing any SAS code.&lt;br /&gt;§  Refresh the content in the Excel worksheet, Word document, or PowerPoint presentation on demand or automatically at a specified time. Scheduling when the content is refreshed enables you to have the most up-to-date data and reports when you need it.&lt;br /&gt;§  Publish the results to a central location. By publishing a document, you can share it with others without having to e-mail it. If you publish the document to a metadata repository, then you can perform an impact analysis on the document. Impact analysis enables you to see where a data source came from and the items that are dependent on this source. This analysis enables you to know how changing a data source might affect other documents.&lt;br /&gt;Additional functionality is available in Excel. In Microsoft Excel, you can also complete the following tasks:&lt;br /&gt;§  Access and view data sources that exceed the 65,536 record limitation in Excel. The SAS add-in does its processing on the server, which enables it to by-pass the record limitation in Excel.&lt;br /&gt;§  Copy data to a SAS server. You can copy an Excel data source or a SAS data source to the SAS server. After a data source is copied to a SAS server, it becomes a SAS data set. This enables you to share Excel data with Word and PowerPoint users at your site. This functionality also enables Excel users to update information in a SAS data source and upload it to the SAS server.&lt;br /&gt;§  Send the results from an analysis that you ran in Excel to a Word document or PowerPoint presentation. For example, you ran analysis of your company’s sales for this year, and now you need to give a presentation of the results. Using this functionality in Excel, you can select which results to include in a PowerPoint presentation. This saves you time because you only need to run the analysis once.&lt;br /&gt;This book explores some of the basic tasks that you can perform in Excel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-2200395318762706062?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/2200395318762706062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=2200395318762706062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/2200395318762706062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/2200395318762706062'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2009/08/benefits-to-using-sas-add-in-for.html' title='Benefits to Using the SAS Add-In for Microsoft Office'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-4607250147187450551</id><published>2009-08-15T07:18:00.000-07:00</published><updated>2009-08-15T07:20:28.149-07:00</updated><title type='text'>What Is the SAS Add-In for Microsoft Office?</title><content type='html'>The SAS Add-In for Microsoft Office extends the functionality of Microsoft Excel, Microsoft Word, and Microsoft PowerPoint by enabling you to access SAS analytics and SAS reporting functionality without any SAS programming experience. The SAS add-in is designed for users who are familiar with these Microsoft Office programs but who might be new to SAS.&lt;br /&gt;The SAS add-in includes approximately 80 SAS tasks that enable you to perform a variety of analyses. Examples of analyses that you can perform include linear and nonlinear regressions, multivariate analyses, time series analyses, one-way frequencies, and summary statistics. The SAS add-in enables you to refresh these analyses so that your results include the most up-to-date information. You can also easily share the results with others at your site.&lt;br /&gt;When the SAS add-in is installed on your computer, a SAS menu and the SAS Analysis Tools toolbar are automatically integrated into Excel, Word, and PowerPoint. (In Excel, the SAS Data Tools toolbar is also available.) The menu and toolbars enable you to access the SAS analytics and reporting functionality directly from these Microsoft Office programs without having to open a separate SAS interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-4607250147187450551?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/4607250147187450551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=4607250147187450551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/4607250147187450551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/4607250147187450551'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2009/08/what-is-sas-add-in-for-microsoft-office.html' title='What Is the SAS Add-In for Microsoft Office?'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-3332701335873508857</id><published>2008-09-15T00:20:00.000-07:00</published><updated>2008-12-23T21:47:39.060-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAS'/><category scheme='http://www.blogger.com/atom/ns#' term='Character Functions'/><title type='text'>Functions That Change the Case of Characters 5</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;UPCASE 6&lt;/div&gt;&lt;div&gt;LOWCASE 7&lt;/div&gt;&lt;div&gt;PROPCASE 9&lt;/div&gt;&lt;div&gt;Functions That Remove Characters from Strings 11&lt;/div&gt;&lt;div&gt;COMPBL 11&lt;/div&gt;&lt;div&gt;COMPRESS 13&lt;/div&gt;&lt;div&gt;Functions That Search for Characters 16&lt;/div&gt;&lt;div&gt;ANYALNUM 17 NOTUPPER 27&lt;/div&gt;&lt;div&gt;ANYALPHA 18 FIND 29&lt;/div&gt;&lt;div&gt;ANYDIGIT 19 FINDC 31&lt;/div&gt;&lt;div&gt;ANYPUNCT 20 INDEX 34&lt;/div&gt;&lt;div&gt;ANYSPACE 21 INDEXC 36&lt;/div&gt;&lt;div&gt;NOTALNUM 24 INDEXW 39&lt;/div&gt;&lt;div&gt;NOTALPHA 25 VERIFY 41&lt;/div&gt;&lt;div&gt;NOTDIGIT 26&lt;/div&gt;&lt;div&gt;Functions That Extract Parts of Strings 43&lt;/div&gt;&lt;div&gt;SUBSTR 43&lt;/div&gt;&lt;div&gt;SUBSTRN 49&lt;/div&gt;&lt;div&gt;Functions That Join Two or More Strings Together 51&lt;/div&gt;&lt;div&gt;CALL CATS 52 CATS 57&lt;/div&gt;&lt;div&gt;CALL CATT 53 CATT 58&lt;/div&gt;&lt;div&gt;CALL CATX 53 CATX 59&lt;/div&gt;&lt;div&gt;CAT 56&lt;/div&gt;&lt;div&gt;2 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Functions That Remove Blanks from Strings 61&lt;/div&gt;&lt;div&gt;LEFT 61 TRIMN 66&lt;/div&gt;&lt;div&gt;RIGHT 63 STRIP 68&lt;/div&gt;&lt;div&gt;TRIM 64&lt;/div&gt;&lt;div&gt;Functions That Compare Strings (Exact and "Fuzzy" Comparisons) 70&lt;/div&gt;&lt;div&gt;COMPARE 70 COMPLEV 76&lt;/div&gt;&lt;div&gt;CALL COMPCOST 73 SOUNDEX 81&lt;/div&gt;&lt;div&gt;COMPGED 74 SPEDIS 84&lt;/div&gt;&lt;div&gt;Functions That Divide Strings into "Words" 89&lt;/div&gt;&lt;div&gt;SCAN 89&lt;/div&gt;&lt;div&gt;SCANQ 90&lt;/div&gt;&lt;div&gt;CALL SCAN 95&lt;/div&gt;&lt;div&gt;CALL SCANQ 98&lt;/div&gt;&lt;div&gt;Functions That Substitute Letters or Words in Strings 100&lt;/div&gt;&lt;div&gt;TRANSLATE 100&lt;/div&gt;&lt;div&gt;TRANWRD 103&lt;/div&gt;&lt;div&gt;Functions That Compute the Length of Strings 105&lt;/div&gt;&lt;div&gt;LENGTH 105&lt;/div&gt;&lt;div&gt;LENGTHC 106&lt;/div&gt;&lt;div&gt;LENGTHM 106&lt;/div&gt;&lt;div&gt;LENGTHN 107&lt;/div&gt;&lt;div&gt;Functions That Count the Number of Letters or Substrings in a String 109&lt;/div&gt;&lt;div&gt;COUNT 109&lt;/div&gt;&lt;div&gt;COUNTC 111&lt;/div&gt;&lt;div&gt;Miscellaneous String Functions 113&lt;/div&gt;&lt;div&gt;MISSING 113&lt;/div&gt;&lt;div&gt;RANK 115&lt;/div&gt;&lt;div&gt;REPEAT 117&lt;/div&gt;&lt;div&gt;REVERSE 119&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 3&lt;/div&gt;&lt;div&gt;Introduction&lt;/div&gt;&lt;div&gt;A major strength of SAS is its ability to work with character data. The SAS character&lt;/div&gt;&lt;div&gt;functions are essential to this. The collection of functions and call routines in this chapter&lt;/div&gt;&lt;div&gt;allow you to do extensive manipulation on all sorts of character data.&lt;/div&gt;&lt;div&gt;SAS users who are new to Version 9 will notice the tremendous increase in the number of&lt;/div&gt;&lt;div&gt;SAS character functions. You will also want to review the next chapter on Perl regular&lt;/div&gt;&lt;div&gt;expressions, another way to process character data.&lt;/div&gt;&lt;div&gt;Before delving into the realm of character functions, it is important to understand how SAS&lt;/div&gt;&lt;div&gt;stores character data and how the length of character variables gets assigned.&lt;/div&gt;&lt;div&gt;Storage Length for Character Variables&lt;/div&gt;&lt;div&gt;It is in the compile stage of the DATA step that SAS variables are determined to be character&lt;/div&gt;&lt;div&gt;or numeric, that the storage lengths of SAS character variables are determined, and that the&lt;/div&gt;&lt;div&gt;descriptor portion of the SAS data set is written. The program below will help you to&lt;/div&gt;&lt;div&gt;understand how character storage lengths are determined:&lt;/div&gt;&lt;div&gt;Program 1.1: How SAS determines storage lengths of character variables&lt;/div&gt;&lt;div&gt;DATA EXAMPLE1;&lt;/div&gt;&lt;div&gt;INPUT GROUP $&lt;/div&gt;&lt;div&gt;@10 STRING $3.;&lt;/div&gt;&lt;div&gt;LEFT = 'X '; *X AND 4 BLANKS;&lt;/div&gt;&lt;div&gt;RIGHT = ' X'; *4 BLANKS AND X;&lt;/div&gt;&lt;div&gt;SUB = SUBSTR(GROUP,1,2);&lt;/div&gt;&lt;div&gt;REP = REPEAT(GROUP,1);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABCDEFGH 123&lt;/div&gt;&lt;div&gt;XXX 4&lt;/div&gt;&lt;div&gt;Y 5&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The purpose of this program is not to demonstrate SAS character functions. That is why the&lt;/div&gt;&lt;div&gt;functions in this program are not highlighted as they are in all the other programs in this&lt;/div&gt;&lt;div&gt;book. Let's look at each of the character variables created in this DATA step. To see the&lt;/div&gt;&lt;div&gt;storage length for each of the variables in data set EXAMPLE1, let's run PROC&lt;/div&gt;&lt;div&gt;CONTENTS. Here is the program:&lt;/div&gt;&lt;div&gt;4 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.2: Running PROC CONTENTS to determine storage lengths&lt;/div&gt;&lt;div&gt;PROC CONTENTS DATA=EXAMPLE1 VARNUM;&lt;/div&gt;&lt;div&gt;TITLE "PROC CONTENTS for Data Set EXAMPLE1";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;The VARNUM option requests the variables to be in the order that they appear in the SAS&lt;/div&gt;&lt;div&gt;data set, rather than the default, alphabetical order. The output is shown next:&lt;/div&gt;&lt;div&gt;-----Variables Ordered by Position-----&lt;/div&gt;&lt;div&gt;# Variable Type Len&lt;/div&gt;&lt;div&gt;ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ&lt;/div&gt;&lt;div&gt;1 GROUP Char 8&lt;/div&gt;&lt;div&gt;2 STRING Char 3&lt;/div&gt;&lt;div&gt;3 LEFT Char 5&lt;/div&gt;&lt;div&gt;4 RIGHT Char 5&lt;/div&gt;&lt;div&gt;5 SUB Char 8&lt;/div&gt;&lt;div&gt;6 REP Char 200&lt;/div&gt;&lt;div&gt;First, GROUP is read using list input. No informat is used, so SAS will give the variable the&lt;/div&gt;&lt;div&gt;default length of 8. Since STRING is read with an informat, the length is set to the informat&lt;/div&gt;&lt;div&gt;width of 3. LEFT and RIGHT are both created with an assignment statement. Therefore the&lt;/div&gt;&lt;div&gt;length of these two variables is equal to the number of bytes in the literals following the&lt;/div&gt;&lt;div&gt;equal sign. Note that if a variable appears several times in a DATA step, its length is&lt;/div&gt;&lt;div&gt;determined by the first reference to that variable.&lt;/div&gt;&lt;div&gt;For example, beginning SAS programmers often get in trouble with statements such as:&lt;/div&gt;&lt;div&gt;IF SEX = 1 THEN GENDER = 'MALE';&lt;/div&gt;&lt;div&gt;ELSE IF SEX = 2 THEN GENDER = 'FEMALE';&lt;/div&gt;&lt;div&gt;The length of GENDER in the two lines above is 4, since the statement in which the variable&lt;/div&gt;&lt;div&gt;first appears defines its length.&lt;/div&gt;&lt;div&gt;There are several ways to make sure a character variable is assigned the proper length.&lt;/div&gt;&lt;div&gt;Probably the best way is to use a LENGTH statement. So, if you precede the two lines&lt;/div&gt;&lt;div&gt;above with the statement:&lt;/div&gt;&lt;div&gt;LENGTH GENDER $ 6;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 5&lt;/div&gt;&lt;div&gt;the length of GENDER will be 6, not 4. Some lazy programmers will "cheat" by adding two&lt;/div&gt;&lt;div&gt;blanks after MALE in the assignment statement (me, never!). Another trick is to place the&lt;/div&gt;&lt;div&gt;line for FEMALE first.&lt;/div&gt;&lt;div&gt;So, continuing on to the last two variables. You see a length of 8 for the variable SUB. As&lt;/div&gt;&lt;div&gt;you will see later in this chapter, the SUBSTR (substring) function can extract some or all of&lt;/div&gt;&lt;div&gt;one string and assign the result to a new variable. Since SAS has to determine variable&lt;/div&gt;&lt;div&gt;lengths in the compile stage and since the SUBSTR arguments that define the starting point&lt;/div&gt;&lt;div&gt;and the length of the substring could possibly be determined in the execution stage (from&lt;/div&gt;&lt;div&gt;data values, for example), SAS does the logical thing: it gives the variable defined by the&lt;/div&gt;&lt;div&gt;SUBSTR function the longest length it possibly could—the length of the string from which&lt;/div&gt;&lt;div&gt;you are taking the substring.&lt;/div&gt;&lt;div&gt;Finally, the variable REP is created by using the REPEAT function. As you will find out&lt;/div&gt;&lt;div&gt;later in this chapter, the REPEAT function takes a string and repeats it as many times as&lt;/div&gt;&lt;div&gt;directed by the second argument to the function. Using the same logic as the SUBSTR&lt;/div&gt;&lt;div&gt;function, since the length of REP is determined in the compile stage and since the number of&lt;/div&gt;&lt;div&gt;repetitions could vary, SAS gives it a default length of 200. A note of historical interest:&lt;/div&gt;&lt;div&gt;Prior to Version 7, the maximum length of character variables was 200. With the coming of&lt;/div&gt;&lt;div&gt;Version 7, the maximum length of character variables was increased to 32,767. SAS made a&lt;/div&gt;&lt;div&gt;very wise decision to leave the default length for situations such as the REPEAT function&lt;/div&gt;&lt;div&gt;described here, at 200. The take-home message is that you should always be sure that you&lt;/div&gt;&lt;div&gt;know the storage lengths of your character variables.&lt;/div&gt;&lt;div&gt;Functions That Change the Case of Characters&lt;/div&gt;&lt;div&gt;Two old functions, UPCASE and LOWCASE, change the case of characters. A new&lt;/div&gt;&lt;div&gt;function (as of Version 9), PROPCASE (proper case) capitalizes the first letter of each word.&lt;/div&gt;&lt;div&gt;6 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Function: UPCASE&lt;/div&gt;&lt;div&gt;Purpose: To change all letters to uppercase.&lt;/div&gt;&lt;div&gt;Note: The corresponding function LOWCASE changes uppercase to&lt;/div&gt;&lt;div&gt;lowercase.&lt;/div&gt;&lt;div&gt;Syntax: UPCASE(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the argument.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABCxyz"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;UPCASE(CHAR) "ABCXYZ"&lt;/div&gt;&lt;div&gt;UPCASE("a1%m?") "A1%M?"&lt;/div&gt;&lt;div&gt;Program 1.3: Changing lowercase to uppercase for all character variables&lt;/div&gt;&lt;div&gt;in a data set&lt;/div&gt;&lt;div&gt;***Primary function: UPCASE&lt;/div&gt;&lt;div&gt;***Other function: DIM;&lt;/div&gt;&lt;div&gt;DATA MIXED;&lt;/div&gt;&lt;div&gt;LENGTH A B C D E $ 1;&lt;/div&gt;&lt;div&gt;INPUT A B C D E X Y;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;M f P p D 1 2&lt;/div&gt;&lt;div&gt;m f m F M 3 4&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;DATA UPPER;&lt;/div&gt;&lt;div&gt;SET MIXED;&lt;/div&gt;&lt;div&gt;ARRAY ALL_C[*] _CHARACTER_;&lt;/div&gt;&lt;div&gt;DO I = 1 TO DIM(ALL_C);&lt;/div&gt;&lt;div&gt;ALL_C[I] = UPCASE(ALL_C[I]);&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 7&lt;/div&gt;&lt;div&gt;DROP I;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=UPPER NOOBS;&lt;/div&gt;&lt;div&gt;TITLE 'Listing of Data Set UPPER';&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Remember that upper- and lowercase values are represented by different internal codes, so if&lt;/div&gt;&lt;div&gt;you are testing for a value such as Y for a variable and the actual value is y, you will not get&lt;/div&gt;&lt;div&gt;a match. Therefore it is often useful to convert all character values to either upper- or&lt;/div&gt;&lt;div&gt;lowercase before doing your logical comparisons. In this program, _CHARACTER_ is used&lt;/div&gt;&lt;div&gt;in the array statement to represent all the character variables in the data set MIXED.&lt;/div&gt;&lt;div&gt;Inspection of the listing below verifies that all lowercase values were changed to uppercase.&lt;/div&gt;&lt;div&gt;Listing of Data Set UPPER&lt;/div&gt;&lt;div&gt;A B C D E X Y&lt;/div&gt;&lt;div&gt;M F P P D 1 2&lt;/div&gt;&lt;div&gt;M F M F M 3 4&lt;/div&gt;&lt;div&gt;Function: LOWCASE&lt;/div&gt;&lt;div&gt;Purpose: To change all letters to lowercase.&lt;/div&gt;&lt;div&gt;Syntax: LOWCASE(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Note: The corresponding function UPCASE changes lowercase to&lt;/div&gt;&lt;div&gt;uppercase.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the argument.&lt;/div&gt;&lt;div&gt;8 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABCxyz"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;LOWCASE(CHAR) "abcxyz"&lt;/div&gt;&lt;div&gt;LOWCASE("A1%M?") "a1%m?"&lt;/div&gt;&lt;div&gt;Program 1.4: Program to capitalize the first letter of the first and last&lt;/div&gt;&lt;div&gt;name (using SUBSTR)&lt;/div&gt;&lt;div&gt;***Primary functions: LOWCASE, UPCASE&lt;/div&gt;&lt;div&gt;***Other function: SUBSTR (used on the left and right side of the equal&lt;/div&gt;&lt;div&gt;sign);&lt;/div&gt;&lt;div&gt;DATA CAPITALIZE;&lt;/div&gt;&lt;div&gt;INFORMAT FIRST LAST $30.;&lt;/div&gt;&lt;div&gt;INPUT FIRST LAST;&lt;/div&gt;&lt;div&gt;FIRST = LOWCASE(FIRST);&lt;/div&gt;&lt;div&gt;LAST = LOWCASE(LAST);&lt;/div&gt;&lt;div&gt;SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));&lt;/div&gt;&lt;div&gt;SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ronald cODy&lt;/div&gt;&lt;div&gt;THomaS eDISON&lt;/div&gt;&lt;div&gt;albert einstein&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=CAPITALIZE NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set CAPITALIZE";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Before we get started on the explanation, I should point out that as of Version 9, the&lt;/div&gt;&lt;div&gt;PROPCASE function capitalizes the first letter of each word in a string. However, it&lt;/div&gt;&lt;div&gt;provides a good demonstation of the LOWCASE and UPCASE functions and this method&lt;/div&gt;&lt;div&gt;will still be useful for SAS users using earlier versions of SAS software.&lt;/div&gt;&lt;div&gt;This program capitalizes the first letter of the two character variables FIRST and LAST.&lt;/div&gt;&lt;div&gt;The same technique could have other applications. The first step is to set all the letters to&lt;/div&gt;&lt;div&gt;lowercase using the LOWCASE function. The first letter of each name is then turned back&lt;/div&gt;&lt;div&gt;to uppercase using the SUBSTR function (on the right side of the equal sign) to select the&lt;/div&gt;&lt;div&gt;first letter in the first and last names, and the UPCASE function to capitalize it. The&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 9&lt;/div&gt;&lt;div&gt;SUBSTR function on the left side of the equal sign is used to place this letter in the first&lt;/div&gt;&lt;div&gt;position of each of the variables. The listing below shows that this program worked as&lt;/div&gt;&lt;div&gt;desired:&lt;/div&gt;&lt;div&gt;Listing of Data Set CAPITALIZE&lt;/div&gt;&lt;div&gt;FIRST LAST&lt;/div&gt;&lt;div&gt;Ronald Cody&lt;/div&gt;&lt;div&gt;Thomas Edison&lt;/div&gt;&lt;div&gt;Albert Einstein&lt;/div&gt;&lt;div&gt;Function: PROPCASE&lt;/div&gt;&lt;div&gt;Purpose: To capitalize the first letter of each word in a string.&lt;/div&gt;&lt;div&gt;Syntax: PROPCASE(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the argument.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABCxyz"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;PROPCASE(CHAR) "Abcxyz"&lt;/div&gt;&lt;div&gt;PROPCASE("a1%m?") "A1%m?"&lt;/div&gt;&lt;div&gt;PROPCASE("mr. george w. bush") "Mr. George W. Bush"&lt;/div&gt;&lt;div&gt;Program 1.5: Capitalizing the first letter of each word in a string&lt;/div&gt;&lt;div&gt;***Primary function: PROPCASE;&lt;/div&gt;&lt;div&gt;DATA PROPER;&lt;/div&gt;&lt;div&gt;INPUT NAME $60.;&lt;/div&gt;&lt;div&gt;NAME = PROPCASE(NAME);&lt;/div&gt;&lt;div&gt;10 SAS Functions by Example&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ronald cODy&lt;/div&gt;&lt;div&gt;THomaS eDISON&lt;/div&gt;&lt;div&gt;albert einstein&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=PROPER NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set PROPER";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this program, you use the PROPCASE function to capitalize the first letter of the first and&lt;/div&gt;&lt;div&gt;last names. The listing is shown below:&lt;/div&gt;&lt;div&gt;Listing of Data Set PROPER&lt;/div&gt;&lt;div&gt;NAME&lt;/div&gt;&lt;div&gt;Ronald Cody&lt;/div&gt;&lt;div&gt;Thomas Edison&lt;/div&gt;&lt;div&gt;Albert Einstein&lt;/div&gt;&lt;div&gt;Program 1.6: Alternative program to capitalize the first letter of each&lt;/div&gt;&lt;div&gt;word in a string&lt;/div&gt;&lt;div&gt;***First and last name are two separate variables.&lt;/div&gt;&lt;div&gt;DATA PROPER;&lt;/div&gt;&lt;div&gt;INFORMAT FIRST LAST $30.;&lt;/div&gt;&lt;div&gt;INPUT FIRST LAST;&lt;/div&gt;&lt;div&gt;LENGTH NAME $ 60;&lt;/div&gt;&lt;div&gt;CALL CATX(' ', NAME, FIRST, LAST);&lt;/div&gt;&lt;div&gt;NAME = PROPCASE(NAME);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ronald cODy&lt;/div&gt;&lt;div&gt;THomaS eDISON&lt;/div&gt;&lt;div&gt;albert einstein&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=PROPER NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set PROPER";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 11&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this alternative program, the CATX call routine is used to concatenate the first and last&lt;/div&gt;&lt;div&gt;name with a blank as the separator character. The PROPCASE function is then used the&lt;/div&gt;&lt;div&gt;same way as above. The listing is identical to the listing above.&lt;/div&gt;&lt;div&gt;Functions That Remove Characters from Strings&lt;/div&gt;&lt;div&gt;COMPBL (compress blanks) can replace multiple blanks with a single blank. The&lt;/div&gt;&lt;div&gt;COMPRESS function can remove not only blanks, but also any characters you specify from&lt;/div&gt;&lt;div&gt;a string.&lt;/div&gt;&lt;div&gt;Function: COMPBL&lt;/div&gt;&lt;div&gt;Purpose: To replace all occurrences of two or more blanks with a single blank&lt;/div&gt;&lt;div&gt;character. This is particularly useful for standardizing addresses and names&lt;/div&gt;&lt;div&gt;where multiple blanks may have been entered.&lt;/div&gt;&lt;div&gt;Syntax: COMPBL(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the argument.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples CHAR = "A C XYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;COMPBL(CHAR) "A C XYZ"&lt;/div&gt;&lt;div&gt;COMPBL("X Y Z LAST") "X Y Z LAST"&lt;/div&gt;&lt;div&gt;12 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.7: Using the COMPBL function to convert multiple blanks to a&lt;/div&gt;&lt;div&gt;single blank&lt;/div&gt;&lt;div&gt;***Primary function: COMPBL;&lt;/div&gt;&lt;div&gt;DATA SQUEEZE;&lt;/div&gt;&lt;div&gt;INPUT #1 @1 NAME $20.&lt;/div&gt;&lt;div&gt;#2 @1 ADDRESS $30.&lt;/div&gt;&lt;div&gt;#3 @1 CITY $15.&lt;/div&gt;&lt;div&gt;@20 STATE $2.&lt;/div&gt;&lt;div&gt;@25 ZIP $5.;&lt;/div&gt;&lt;div&gt;NAME = COMPBL(NAME);&lt;/div&gt;&lt;div&gt;ADDRESS = COMPBL(ADDRESS);&lt;/div&gt;&lt;div&gt;CITY = COMPBL(CITY);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;RON CODY&lt;/div&gt;&lt;div&gt;89 LAZY BROOK ROAD&lt;/div&gt;&lt;div&gt;FLEMINGTON NJ 08822&lt;/div&gt;&lt;div&gt;BILL BROWN&lt;/div&gt;&lt;div&gt;28 CATHY STREET&lt;/div&gt;&lt;div&gt;NORTH CITY NY 11518&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=SQUEEZE;&lt;/div&gt;&lt;div&gt;TITLE 'Listing of Data Set SQUEEZE';&lt;/div&gt;&lt;div&gt;ID NAME;&lt;/div&gt;&lt;div&gt;VAR ADDRESS CITY STATE ZIP;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Each line of the addresses was passed through the COMPBL function to replace any&lt;/div&gt;&lt;div&gt;sequence of two or more blanks to a single blank. A listing of data set SQUEEZE is shown&lt;/div&gt;&lt;div&gt;below:&lt;/div&gt;&lt;div&gt;Listing of Data Set SQUEEZE&lt;/div&gt;&lt;div&gt;NAME ADDRESS CITY STATE ZIP&lt;/div&gt;&lt;div&gt;RON CODY 89 LAZY BROOK ROAD FLEMINGTON NJ 08822&lt;/div&gt;&lt;div&gt;BILL BROWN 28 CATHY STREET NORTH CITY NY 11518&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 13&lt;/div&gt;&lt;div&gt;Function: COMPRESS&lt;/div&gt;&lt;div&gt;Purpose: To remove specified characters from a character value.&lt;/div&gt;&lt;div&gt;Syntax: COMPRESS(character-value &lt;,'compress-list'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;compress-list is an optional list of the characters you want to remove.&lt;/div&gt;&lt;div&gt;If this argument is omitted, the default character to be removed is a blank. If&lt;/div&gt;&lt;div&gt;you include a list of values to remove, only those characters will be&lt;/div&gt;&lt;div&gt;removed. If a blank is not included in the list, blanks will not be removed.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the argument.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;In the examples below, CHAR = "A C123XYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;COMPRESS("A C XYZ") "ACXYZ"&lt;/div&gt;&lt;div&gt;COMPRESS("(908) 777-1234"," (-)") "9087771234"&lt;/div&gt;&lt;div&gt;COMPRESS(CHAR,"0123456789") "A CXYZ"&lt;/div&gt;&lt;div&gt;Program 1.8: Removing dashes and parentheses from phone numbers&lt;/div&gt;&lt;div&gt;***Primary function: COMPRESS;&lt;/div&gt;&lt;div&gt;DATA PHONE_NUMBER;&lt;/div&gt;&lt;div&gt;INPUT PHONE $ 1-15;&lt;/div&gt;&lt;div&gt;PHONE1 = COMPRESS(PHONE);&lt;/div&gt;&lt;div&gt;PHONE2 = COMPRESS(PHONE,'(-) ');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;(908)235-4490&lt;/div&gt;&lt;div&gt;(201) 555-77 99&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=PHONE_NUMBER;&lt;/div&gt;&lt;div&gt;TITLE 'Listing of Data Set PHONE_NUMBER';&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;14 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;For the variable PHONE1, the second argument is omitted from the COMPRESS function;&lt;/div&gt;&lt;div&gt;therefore, only blanks are removed. For PHONE2, left and right parentheses, dashes, and&lt;/div&gt;&lt;div&gt;blanks are listed in the second argument so all of these characters are removed from the&lt;/div&gt;&lt;div&gt;character value. You can verify this by inspecting the listing below:&lt;/div&gt;&lt;div&gt;Listing of Data Set PHONE_NUMBER&lt;/div&gt;&lt;div&gt;Obs PHONE PHONE1 PHONE2&lt;/div&gt;&lt;div&gt;1 (908)235-4490 (908)235-4490 9082354490&lt;/div&gt;&lt;div&gt;2 (201) 555-77 99 (201)555-7799 2015557799&lt;/div&gt;&lt;div&gt;Converting Social Security Numbers to Numeric Form&lt;/div&gt;&lt;div&gt;Here is another example where the COMPRESS function makes it easy to convert a standard&lt;/div&gt;&lt;div&gt;social security number, including the dashes, to a numeric value.&lt;/div&gt;&lt;div&gt;Program 1.9: Converting social security numbers from character to&lt;/div&gt;&lt;div&gt;numeric&lt;/div&gt;&lt;div&gt;***Primary function: COMPRESS&lt;/div&gt;&lt;div&gt;***Other function: INPUT;&lt;/div&gt;&lt;div&gt;DATA SOCIAL;&lt;/div&gt;&lt;div&gt;INPUT @1 SS_CHAR $11.&lt;/div&gt;&lt;div&gt;@1 MIKE_ZDEB COMMA11.;&lt;/div&gt;&lt;div&gt;SS_NUMERIC = INPUT(COMPRESS(SS_CHAR,'-'),9.);&lt;/div&gt;&lt;div&gt;SS_FORMATTED = SS_NUMERIC;&lt;/div&gt;&lt;div&gt;FORMAT SS_FORMATTED SSN.;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;123-45-6789&lt;/div&gt;&lt;div&gt;001-11-1111&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=SOCIAL NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set SOCIAL";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 15&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The COMPRESS function is used to remove the dashes from the social security number and&lt;/div&gt;&lt;div&gt;the INPUT function does the character to numeric conversion.&lt;/div&gt;&lt;div&gt;It should be noted here that the social security number, including dashes, can be read directly&lt;/div&gt;&lt;div&gt;into a numeric variable using the comma11. informat. This trick was brought to light by&lt;/div&gt;&lt;div&gt;Mike Zdeb in a NESUG workshop in Buffalo in the Fall of 2002. Here, the variable&lt;/div&gt;&lt;div&gt;SS_FORMATTED is set equal to the variable SS_NUMERIC so that you can see the effect&lt;/div&gt;&lt;div&gt;of adding the SSN. format. (Note: SSN. is equivalent to SSN11.) This format prints numeric&lt;/div&gt;&lt;div&gt;values with leading zeros and dashes in the proper places, as you can see in the listing&lt;/div&gt;&lt;div&gt;below:&lt;/div&gt;&lt;div&gt;Listing of Data Set SOCIAL&lt;/div&gt;&lt;div&gt;SS_CHAR MIKE_ZDEB SS_NUMERIC SS_FORMATTED&lt;/div&gt;&lt;div&gt;123-45-6789 123456789 123456789 123-45-6789&lt;/div&gt;&lt;div&gt;001-11-1111 1111111 1111111 001-11-1111&lt;/div&gt;&lt;div&gt;Counting the Number of Digits in a Character String&lt;/div&gt;&lt;div&gt;This program computes the number of numerals (i.e., digits) in a string by a novel method.&lt;/div&gt;&lt;div&gt;It uses the COMPRESS function to remove all digits from the string and then subtracts the&lt;/div&gt;&lt;div&gt;resulting length from the original length for the computation.&lt;/div&gt;&lt;div&gt;Program 1.10: Counting the number of numerals in a string&lt;/div&gt;&lt;div&gt;***Primary functions: COMPRESS, LENGTHN;&lt;/div&gt;&lt;div&gt;DATA COUNT;&lt;/div&gt;&lt;div&gt;INPUT STRING $20.;&lt;/div&gt;&lt;div&gt;ONLY_LETTERS = COMPRESS(STRING,'0123456789');&lt;/div&gt;&lt;div&gt;NUM_NUMERALS = LENGTHN(STRING) - LENGTHN(ONLY_LETTERS);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABC123XYZ&lt;/div&gt;&lt;div&gt;XXXXX&lt;/div&gt;&lt;div&gt;12345&lt;/div&gt;&lt;div&gt;1234X&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;16 SAS Functions by Example&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=COUNT NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set COUNT";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This is an interesting application of the COMPRESS function. By computing the length of&lt;/div&gt;&lt;div&gt;the string before and after removing the numerals, this program sets the difference in the&lt;/div&gt;&lt;div&gt;lengths to the number of numerals in the original string. Notice the use of the LENGTHN&lt;/div&gt;&lt;div&gt;function instead of the LENGTH function. When the COMPRESS function operates on the&lt;/div&gt;&lt;div&gt;third observation (all digits), the result is a null string. The LENGTH function returns a&lt;/div&gt;&lt;div&gt;value of 1 in this situation; the LENGTHN function returns a value of 0. See LENGTH and&lt;/div&gt;&lt;div&gt;LENGTHN function descriptions for a detailed explanation.&lt;/div&gt;&lt;div&gt;Listing of Data Set COUNT&lt;/div&gt;&lt;div&gt;ONLY_ NUM_&lt;/div&gt;&lt;div&gt;STRING LETTERS NUMERALS&lt;/div&gt;&lt;div&gt;ABC123XYZ ABCXYZ 3&lt;/div&gt;&lt;div&gt;XXXXX XXXXX 0&lt;/div&gt;&lt;div&gt;12345 5&lt;/div&gt;&lt;div&gt;1234X X 4&lt;/div&gt;&lt;div&gt;Functions That Search for Characters&lt;/div&gt;&lt;div&gt;Functions in this category allow you to search a string for specific characters or for a&lt;/div&gt;&lt;div&gt;character category (such as a digit). Some of these functions can also locate the first position&lt;/div&gt;&lt;div&gt;in a string where a character does not meet a particular specification. Quite a few of the&lt;/div&gt;&lt;div&gt;functions in this section are new to Version 9 and they provide some new and useful&lt;/div&gt;&lt;div&gt;capabilities.&lt;/div&gt;&lt;div&gt;The "ANY" functions (ANYALNUM, ANYALPHA, ANYDIGIT,&lt;/div&gt;&lt;div&gt;ANYPUNCT, and ANYSPACE)&lt;/div&gt;&lt;div&gt;This group of functions is described together because of the similarity of their use. New as&lt;/div&gt;&lt;div&gt;of Version 9, these functions return the location of the first alphanumeric, letter, digit,&lt;/div&gt;&lt;div&gt;punctuation, or space in a character string. Note that there are other "ANY" functions&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 17&lt;/div&gt;&lt;div&gt;besides those presented here—these are the most common ones (see the SAS OnlineDoc 9.1&lt;/div&gt;&lt;div&gt;for a complete list). The functionality of this group of functions is similar to many of the&lt;/div&gt;&lt;div&gt;Perl regular expressions that are also available in Version 9.&lt;/div&gt;&lt;div&gt;It is important to note that it may be necessary to use the TRIM function (or STRIP function)&lt;/div&gt;&lt;div&gt;with the ANY and NOT functions since leading or, especially, trailing blanks will affect the&lt;/div&gt;&lt;div&gt;results. For example, if X = "ABC " (ABC followed by three blanks), Y =&lt;/div&gt;&lt;div&gt;NOTALNUM(X) will be 4, the location of the first blank. Therefore, you may want to&lt;/div&gt;&lt;div&gt;routinely use TRIM (or STRIP) like this:&lt;/div&gt;&lt;div&gt;Y = NOT or ANY function(TRIM(X));&lt;/div&gt;&lt;div&gt;Note that there are a group of similar functions NOTALPHA, NOTDIGIT, etc. that work in&lt;/div&gt;&lt;div&gt;a similar manner and are described together later in the next section. One program example&lt;/div&gt;&lt;div&gt;follows the description of these five functions.&lt;/div&gt;&lt;div&gt;Function: ANYALNUM&lt;/div&gt;&lt;div&gt;Purpose: To locate the first occurrence of an alphanumeric character (any upper- or&lt;/div&gt;&lt;div&gt;lowercase letter or number) and return its position. If none is found, the&lt;/div&gt;&lt;div&gt;function returns a 0. With the use of an optional parameter, this function&lt;/div&gt;&lt;div&gt;can begin searching at any position in the string and can also search from&lt;/div&gt;&lt;div&gt;right to left, if desired.&lt;/div&gt;&lt;div&gt;Syntax: ANYALNUM(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;18 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;ANYALNUM(STRING) 1 (the position of "A")&lt;/div&gt;&lt;div&gt;ANYALNUM("??$$%%") 0 (no alpha-numeric characters)&lt;/div&gt;&lt;div&gt;ANYALNUM(STRING,5) 5 (the position of "1")&lt;/div&gt;&lt;div&gt;ANYALNUM(STRING,-4) 3 (the position of "C")&lt;/div&gt;&lt;div&gt;ANYALNUM(STRING,6) 6 (the position of "2")&lt;/div&gt;&lt;div&gt;Function: ANYALPHA&lt;/div&gt;&lt;div&gt;Purpose: To locate the first occurrence of an alpha character (any upper- or lowercase&lt;/div&gt;&lt;div&gt;letter) and return its position. If none is found, the function returns a 0. With&lt;/div&gt;&lt;div&gt;the use of an optional parameter, this function can begin searching at any&lt;/div&gt;&lt;div&gt;position in the string and can also search from right to left, if desired.&lt;/div&gt;&lt;div&gt;Syntax: ANYALPHA(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 19&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;ANYALPHA(STRING) 1 (position of "A")&lt;/div&gt;&lt;div&gt;ANYALPHA("??$$%%") 0 (no alpha characters)&lt;/div&gt;&lt;div&gt;ANYALPHA(STRING,5) 10 (position of "x")&lt;/div&gt;&lt;div&gt;ANYALPHA(STRING,-4) 3 (position of "C")&lt;/div&gt;&lt;div&gt;ANYALPHA(STRING,6) 10 (position of "x")&lt;/div&gt;&lt;div&gt;Function: ANYDIGIT&lt;/div&gt;&lt;div&gt;Purpose: To locate the first occurrence of a digit (numeral) and return its position. If&lt;/div&gt;&lt;div&gt;none is found, the function returns a 0. With the use of an optional&lt;/div&gt;&lt;div&gt;parameter, this function can begin searching at any position in the string and&lt;/div&gt;&lt;div&gt;can also search from right to left, if desired.&lt;/div&gt;&lt;div&gt;Syntax: ANYDIGIT(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;20 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;ANYDIGIT(STRING) 5 (position of "1")&lt;/div&gt;&lt;div&gt;ANYDIGIT("??$$%%") 0 (no digits)&lt;/div&gt;&lt;div&gt;ANYDIGIT(STRING,5) 5 (position of "1")&lt;/div&gt;&lt;div&gt;ANYDIGIT(STRING,-4) 0 (no digits from position 4 to 1)&lt;/div&gt;&lt;div&gt;ANYDIGIT(STRING,6) 6 (position of "2")&lt;/div&gt;&lt;div&gt;Function: ANYPUNCT&lt;/div&gt;&lt;div&gt;Purpose: To locate the first occurrence of a punctuation character and return its&lt;/div&gt;&lt;div&gt;position. If none is found, the function returns a 0. With the use of an&lt;/div&gt;&lt;div&gt;optional parameter, this function can begin searching at any position in the&lt;/div&gt;&lt;div&gt;string and can also search from right to left, if desired.&lt;/div&gt;&lt;div&gt;In the ASCII character set, the following characters are considered&lt;/div&gt;&lt;div&gt;punctuation:&lt;/div&gt;&lt;div&gt;! " # $ % &amp;amp; ' ( ) * + , - . / : ;&lt;/div&gt;&lt;div&gt;&lt; = &gt; ? @ [ \ ] ^ _ ` { | } ~&lt;/div&gt;&lt;div&gt;Syntax: ANYPUNCT(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 21&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "A!C 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;ANYPUNCT(STRING) 2 (position of "!")&lt;/div&gt;&lt;div&gt;ANYPUNCT("??$$%%") 1 (position of "?")&lt;/div&gt;&lt;div&gt;ANYPUNCT(STRING,5) 9 (position of "?")&lt;/div&gt;&lt;div&gt;ANYPUNCT(STRING,-4) 2 (starts at position 4 and goes left, position&lt;/div&gt;&lt;div&gt;of "!" )&lt;/div&gt;&lt;div&gt;ANYPUNCT(STRING,-3) 2 (starts at "C" and goes left, position of "!")&lt;/div&gt;&lt;div&gt;Function: ANYSPACE&lt;/div&gt;&lt;div&gt;Purpose: To locate the first occurrence of a white space character (a blank, horizontal&lt;/div&gt;&lt;div&gt;or vertical tab, carriage return, linefeed, and form-feed) and return its&lt;/div&gt;&lt;div&gt;position. If none is found, the function returns a 0. With the use of an&lt;/div&gt;&lt;div&gt;optional parameter, this function can begin searching at any position in the&lt;/div&gt;&lt;div&gt;string and can also search from right to left, if desired.&lt;/div&gt;&lt;div&gt;Syntax: ANYSPACE(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;22 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;ANYSPACE(STRING) 4 (position of the first blank)&lt;/div&gt;&lt;div&gt;ANYSPACE("??$$%%") 0 (no spaces)&lt;/div&gt;&lt;div&gt;ANYSPACE(STRING,5) 8 (position of the second blank)&lt;/div&gt;&lt;div&gt;ANYSPACE(STRING,-4) 4 (position of the first blank)&lt;/div&gt;&lt;div&gt;ANYSPACE(STRING,6) 8 (position of the second blank)&lt;/div&gt;&lt;div&gt;Program 1.11: Demonstrating the “ANY” character functions&lt;/div&gt;&lt;div&gt;***Primary functions: ANYALNUM, ANYALPHA, ANYDIGIT, ANYPUNCT, and&lt;/div&gt;&lt;div&gt;ANYSPACE;&lt;/div&gt;&lt;div&gt;DATA ANYWHERE;&lt;/div&gt;&lt;div&gt;INPUT STRING $CHAR20.;&lt;/div&gt;&lt;div&gt;ALPHA_NUM = ANYALNUM(STRING);&lt;/div&gt;&lt;div&gt;ALPHA_NUM_9 = ANYALNUM(STRING,-999);&lt;/div&gt;&lt;div&gt;ALPHA = ANYALPHA(STRING);&lt;/div&gt;&lt;div&gt;ALPHA_5 = ANYALPHA(STRING,-5);&lt;/div&gt;&lt;div&gt;DIGIT = ANYDIGIT(STRING);&lt;/div&gt;&lt;div&gt;DIGIT_9 = ANYDIGIT(STRING,-999);&lt;/div&gt;&lt;div&gt;PUNCT = ANYPUNCT(STRING);&lt;/div&gt;&lt;div&gt;SPACE = ANYSPACE(STRING);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Once upon a time 123&lt;/div&gt;&lt;div&gt;HELP!&lt;/div&gt;&lt;div&gt;987654321&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=ANYWHERE NOOBS HEADING=H;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set ANYWHERE";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Each of these “ANY” functions works in a similar manner, the only difference being in the&lt;/div&gt;&lt;div&gt;types of character values it is searching for. The two statements using a starting value&lt;/div&gt;&lt;div&gt;of –999 demonstrate an easy way to search from right to left, without having to know the&lt;/div&gt;&lt;div&gt;length of the string (assuming that you don't have any strings longer than 999, in which case&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 23&lt;/div&gt;&lt;div&gt;you could choose a larger number). Functions such as ANYALPHA and ANYDIGIT can be&lt;/div&gt;&lt;div&gt;very useful for extracting values from strings where the positions of digits or letters are not&lt;/div&gt;&lt;div&gt;fixed. An alternative to using this group of functions would be the Perl regular expressions.&lt;/div&gt;&lt;div&gt;See the following chapter for a complete discussion of regular expressions. Notice in the&lt;/div&gt;&lt;div&gt;listing below that the position of the first space in lines two and three are 6 and 10,&lt;/div&gt;&lt;div&gt;respectively. These are the positions of the first trailing blank in each of the two strings&lt;/div&gt;&lt;div&gt;(remember that the length of STRING is 20).&lt;/div&gt;&lt;div&gt;Listing of Data Set ANYWHERE&lt;/div&gt;&lt;div&gt;ALPHA_ ALPHA_&lt;/div&gt;&lt;div&gt;STRING NUM NUM_9 ALPHA ALPHA_5 DIGIT DIGIT_9 PUNCT SPACE&lt;/div&gt;&lt;div&gt;Once upon a time 123 1 20 1 4 18 20 0 5&lt;/div&gt;&lt;div&gt;HELP! 1 4 1 4 0 0 5 6&lt;/div&gt;&lt;div&gt;987654321 1 9 0 0 1 9 0 10&lt;/div&gt;&lt;div&gt;Program 1.12: Using the functions ANYDIGIT and ANYSPACE to find the&lt;/div&gt;&lt;div&gt;first number in a string&lt;/div&gt;&lt;div&gt;***Primary functions: ANYDIGIT and ANYSPACE&lt;/div&gt;&lt;div&gt;***Other functions: INPUT and SUBSTR;&lt;/div&gt;&lt;div&gt;DATA SEARCH_NUM;&lt;/div&gt;&lt;div&gt;INPUT STRING $60.;&lt;/div&gt;&lt;div&gt;START = ANYDIGIT(STRING);&lt;/div&gt;&lt;div&gt;END = ANYSPACE(STRING,START);&lt;/div&gt;&lt;div&gt;IF START NE 0 THEN&lt;/div&gt;&lt;div&gt;NUM = INPUT(SUBSTR(STRING,START,END-START),9.);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;This line has a 56 in it&lt;/div&gt;&lt;div&gt;two numbers 123 and 456 in this line&lt;/div&gt;&lt;div&gt;No digits here&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=SEARCH_NUM NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set SEARCH_NUM";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;24 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program identifies the first number in any line of data that contains a numeric value&lt;/div&gt;&lt;div&gt;(followed by one or more blanks). The ANYDIGIT function determines the position of the&lt;/div&gt;&lt;div&gt;first digit of the number; the ANYSPACE function searches for the first blank following the&lt;/div&gt;&lt;div&gt;number (the starting position of this search is the position of the first digit). The SUBSTR&lt;/div&gt;&lt;div&gt;function extracts the digits (starting at the value of START with a length determined by the&lt;/div&gt;&lt;div&gt;difference between END and START). Finally, the INPUT function performs the character&lt;/div&gt;&lt;div&gt;to numeric conversion. Inspect the listing below to see that this program works as expected.&lt;/div&gt;&lt;div&gt;Listing of Data Set SEARCH_NUM&lt;/div&gt;&lt;div&gt;STRING START END NUM&lt;/div&gt;&lt;div&gt;This line has a 56 in it 17 19 56&lt;/div&gt;&lt;div&gt;two numbers 123 and 456 in this line 13 16 123&lt;/div&gt;&lt;div&gt;No digits here 0 0 .&lt;/div&gt;&lt;div&gt;The "NOT" functions (NOTALNUM, NOTALPHA, NOTDIGIT, and&lt;/div&gt;&lt;div&gt;NOTUPPER)&lt;/div&gt;&lt;div&gt;This group of functions is similar to the "ANY" functions (such as ANYALNUM,&lt;/div&gt;&lt;div&gt;ANYALPHA, etc.) except that the function returns the position of the first character value&lt;/div&gt;&lt;div&gt;that is not a particular value (alphanumeric, character, digit, or uppercase character). Note&lt;/div&gt;&lt;div&gt;that this is not a complete list of the "NOT" functions. See the SAS OnlineDoc 9.1 for a&lt;/div&gt;&lt;div&gt;complete list.&lt;/div&gt;&lt;div&gt;As with the "ANY" functions, there is an optional parameter that specifies where to start the&lt;/div&gt;&lt;div&gt;search and in which direction to search.&lt;/div&gt;&lt;div&gt;Function: NOTALNUM&lt;/div&gt;&lt;div&gt;Purpose: To determine the position of the first character in a string that is not an&lt;/div&gt;&lt;div&gt;alphanumeric (any upper- or lowercase letter or a number). If none is found,&lt;/div&gt;&lt;div&gt;the function returns a 0. With the use of an optional parameter, this function&lt;/div&gt;&lt;div&gt;can begin searching at any position in the string and can also search from&lt;/div&gt;&lt;div&gt;right to left, if desired.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 25&lt;/div&gt;&lt;div&gt;Syntax: NOTALNUM(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;NOTALNUM(STRING) 4 (position of the 1st blank)&lt;/div&gt;&lt;div&gt;NOTALNUM("Testing123") 0 (all alpha-numeric values)&lt;/div&gt;&lt;div&gt;NOTALNUM("??$$%%") 1 (position of the "?")&lt;/div&gt;&lt;div&gt;NOTALNUM(STRING,5) 8 (position of the 2nd blank)&lt;/div&gt;&lt;div&gt;NOTALNUM(STRING,-6) 4 (position of the 1st blank)&lt;/div&gt;&lt;div&gt;NOTALNUM(STRING,8) 9 (position of the "?")&lt;/div&gt;&lt;div&gt;Function: NOTALPHA&lt;/div&gt;&lt;div&gt;Purpose: To determine the position of the first character in a string that is not an&lt;/div&gt;&lt;div&gt;upper- or lowercase letter (alpha character). If none is found, the function&lt;/div&gt;&lt;div&gt;returns a 0. With the use of an optional parameter, this function can begin&lt;/div&gt;&lt;div&gt;searching at any position in the string and can also search from right to left,&lt;/div&gt;&lt;div&gt;if desired.&lt;/div&gt;&lt;div&gt;26 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Syntax: NOTALPHA(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;NOTALPHA(STRING) 4 (position of 1st blank)&lt;/div&gt;&lt;div&gt;NOTALPHA("ABCabc") 0 (all alpha characters)&lt;/div&gt;&lt;div&gt;NOTALPHA("??$$%%") 1 (position of first "?")&lt;/div&gt;&lt;div&gt;NOTALPHA(STRING,5) 5 (position of "1")&lt;/div&gt;&lt;div&gt;NOTALPHA(STRING,-10) 9 (start at position 10 and search left, position&lt;/div&gt;&lt;div&gt;of "?")&lt;/div&gt;&lt;div&gt;NOTALPHA(STRING,2) 4 (position of 1st blank)&lt;/div&gt;&lt;div&gt;Function: NOTDIGIT&lt;/div&gt;&lt;div&gt;Purpose: To determine the position of the first character in a string that is not a digit.&lt;/div&gt;&lt;div&gt;If none is found, the function returns a 0. With the use of an optional&lt;/div&gt;&lt;div&gt;parameter, this function can begin searching at any position in the string and&lt;/div&gt;&lt;div&gt;can also search from right to left, if desired.&lt;/div&gt;&lt;div&gt;Syntax: NOTDIGIT(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 27&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;NOTDIGIT(STRING) 1 (position of "A")&lt;/div&gt;&lt;div&gt;NOTDIGIT("123456") 0 (all digits)&lt;/div&gt;&lt;div&gt;NOTDIGIT("??$$%%") 1 (position of "?")&lt;/div&gt;&lt;div&gt;NOTDIGIT(STRING,5) 8 (position of 2nd blank)&lt;/div&gt;&lt;div&gt;NOTDIGIT(STRING,-6) 4 (position of 1st blank)&lt;/div&gt;&lt;div&gt;NOTDIGIT(STRING,6) 8 (position of 2nd blank)&lt;/div&gt;&lt;div&gt;Function: NOTUPPER&lt;/div&gt;&lt;div&gt;Purpose: To determine the position of the first character in a string that is not an&lt;/div&gt;&lt;div&gt;uppercase letter. If none is found, the function returns a 0. With the use of&lt;/div&gt;&lt;div&gt;an optional parameter, this function can begin searching at any position in&lt;/div&gt;&lt;div&gt;the string and can also search from right to left, if desired.&lt;/div&gt;&lt;div&gt;Syntax: NOTUPPER(character-value &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number (starting from the left-most position in the&lt;/div&gt;&lt;div&gt;28 SAS Functions by Example&lt;/div&gt;&lt;div&gt;string). If the start value is positive, the search goes from left to right; if the&lt;/div&gt;&lt;div&gt;value is negative, the search goes from right to left. A negative value larger&lt;/div&gt;&lt;div&gt;than the length of the string results in a scan from right to left, starting at the&lt;/div&gt;&lt;div&gt;end of the string. If the value of start is a positive number longer than the&lt;/div&gt;&lt;div&gt;length of the string, or if it is 0, the function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC 123 ?xyz_n_"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;NOTUPPER("ABCDabcd") 5 (position of "a")&lt;/div&gt;&lt;div&gt;NOTUPPER("ABCDEFG") 0 (all uppercase characters)&lt;/div&gt;&lt;div&gt;NOTUPPER(STRING) 4 (position of 1st blank)&lt;/div&gt;&lt;div&gt;NOTUPPER("??$$%%") 1 (position of "?")&lt;/div&gt;&lt;div&gt;NOTUPPER(STRING,5) 5 (position of "1")&lt;/div&gt;&lt;div&gt;NOTUPPER(STRING,-6) 6 (position of "2")&lt;/div&gt;&lt;div&gt;NOTUPPER(STRING,6) 6 (position of "2")&lt;/div&gt;&lt;div&gt;Program 1.13: Demonstrating the "NOT" character functions&lt;/div&gt;&lt;div&gt;***Primary functions: NOTALNUM, NOTALPHA, NOTDIGIT, AND NOTUPPER;&lt;/div&gt;&lt;div&gt;DATA NEGATIVE;&lt;/div&gt;&lt;div&gt;INPUT STRING $5.;&lt;/div&gt;&lt;div&gt;NOT_ALPHA_NUMERIC = NOTALNUM(STRING);&lt;/div&gt;&lt;div&gt;NOT_ALPHA = NOTALPHA(STRING);&lt;/div&gt;&lt;div&gt;NOT_DIGIT = NOTDIGIT(STRING);&lt;/div&gt;&lt;div&gt;NOT_UPPER = NOTUPPER(STRING);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABCDE&lt;/div&gt;&lt;div&gt;abcde&lt;/div&gt;&lt;div&gt;abcDE&lt;/div&gt;&lt;div&gt;12345&lt;/div&gt;&lt;div&gt;:#$%&amp;amp;&lt;/div&gt;&lt;div&gt;ABC&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=NEGATIVE NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set NEGATIVE";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 29&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This straightforward program demonstrates each of the "NOT" character functions. As with&lt;/div&gt;&lt;div&gt;most character functions, be careful with trailing blanks. Notice that the last observation&lt;/div&gt;&lt;div&gt;("ABC") contains only three characters but since STRING is read with a $5. informat, there&lt;/div&gt;&lt;div&gt;are two trailing blanks following the letters 'ABC'. That is the reason you obtain a value of 4&lt;/div&gt;&lt;div&gt;for all the functions except NOTDIGIT, which returns a 1 (the first character is not a digit).&lt;/div&gt;&lt;div&gt;A listing of the data set NEGATIVE is shown next:&lt;/div&gt;&lt;div&gt;Listing of Data Set NEGATIVE&lt;/div&gt;&lt;div&gt;NOT_ALPHA_ NOT_ NOT_ NOT_&lt;/div&gt;&lt;div&gt;STRING NUMERIC ALPHA DIGIT UPPER&lt;/div&gt;&lt;div&gt;ABCDE 0 0 1 0&lt;/div&gt;&lt;div&gt;abcde 0 0 1 1&lt;/div&gt;&lt;div&gt;abcDE 0 0 1 1&lt;/div&gt;&lt;div&gt;12345 0 1 0 1&lt;/div&gt;&lt;div&gt;:#$%&amp;amp; 1 1 1 1&lt;/div&gt;&lt;div&gt;ABC 4 4 1 4&lt;/div&gt;&lt;div&gt;FIND and FINDC&lt;/div&gt;&lt;div&gt;This pair of functions shares some similarities to the INDEX and INDEXC functions. FIND&lt;/div&gt;&lt;div&gt;and INDEX both search a string for a given substring. FINDC and INDEXC both search for&lt;/div&gt;&lt;div&gt;individual characters. However, both FIND and FINDC have some additional capability&lt;/div&gt;&lt;div&gt;over their counterparts. For example, this pair of functions has the ability to declare a&lt;/div&gt;&lt;div&gt;starting position for the search, the direction of the search, and to ignore case or trailing&lt;/div&gt;&lt;div&gt;blanks.&lt;/div&gt;&lt;div&gt;Function: FIND&lt;/div&gt;&lt;div&gt;Purpose: To locate a substring within a string. With optional arguments, you can&lt;/div&gt;&lt;div&gt;define the starting point for the search, the direction of the search, and&lt;/div&gt;&lt;div&gt;ignore case or trailing blanks.&lt;/div&gt;&lt;div&gt;Syntax: FIND(character-value, find-string &lt;,'modifiers'&gt;&lt;/div&gt;&lt;div&gt;&lt;,start&gt;)&lt;/div&gt;&lt;div&gt;30 SAS Functions by Example&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;find-string is a character variable or string literal that contains one or&lt;/div&gt;&lt;div&gt;more characters that you want to search for. The function returns the first&lt;/div&gt;&lt;div&gt;position in the character-value that contains the find-string. If&lt;/div&gt;&lt;div&gt;the find-string is not found, the function returns a 0.&lt;/div&gt;&lt;div&gt;The following modifiers (in upper- or lowercase), placed in single or double&lt;/div&gt;&lt;div&gt;quotation marks, may be used with FIND:&lt;/div&gt;&lt;div&gt;i ignore case.&lt;/div&gt;&lt;div&gt;t ignore trailing blanks in both the character variable and the findstring.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number. If the value is positive, the search goes from&lt;/div&gt;&lt;div&gt;left to right; if the value is negative, the search goes from right to left. A&lt;/div&gt;&lt;div&gt;negative value larger than the length of the string results in a scan from right&lt;/div&gt;&lt;div&gt;to left, starting at the end of the string. If the value of start is a positive&lt;/div&gt;&lt;div&gt;number longer than the length of the string, or if it is 0, the function returns&lt;/div&gt;&lt;div&gt;a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "Hello hello goodbye" and STRING2 =&lt;/div&gt;&lt;div&gt;"hello"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;FIND(STRING1, STRING2) 7&lt;/div&gt;&lt;div&gt;FIND(STRING1, STRING2, 'I') 1&lt;/div&gt;&lt;div&gt;FIND(STRING1,"bye") 17&lt;/div&gt;&lt;div&gt;FIND("abcxyzabc","abc",4) 7&lt;/div&gt;&lt;div&gt;FIND(STRING1, STRING2, "i", -99) 7&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 31&lt;/div&gt;&lt;div&gt;Function: FINDC&lt;/div&gt;&lt;div&gt;Purpose: To locate a character that appears or does not appear within a string. With&lt;/div&gt;&lt;div&gt;optional arguments, you can define the starting point for the search, the&lt;/div&gt;&lt;div&gt;direction of the search, to ignore case or trailing blanks, or to look for&lt;/div&gt;&lt;div&gt;characters except the ones listed.&lt;/div&gt;&lt;div&gt;Syntax: FINDC(character-value, find-characters&lt;/div&gt;&lt;div&gt;&lt;,'modifiers'&gt; &lt;,start&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;find-characters is a list of one or more characters that you want to&lt;/div&gt;&lt;div&gt;search for.&lt;/div&gt;&lt;div&gt;The function returns the first position in the character-value that&lt;/div&gt;&lt;div&gt;contains one of the find-characters. If none of the characters are&lt;/div&gt;&lt;div&gt;found, the function returns a 0. With an optional argument, you can have&lt;/div&gt;&lt;div&gt;the function return the position in a character string of a character that is not&lt;/div&gt;&lt;div&gt;in the find-characters list.&lt;/div&gt;&lt;div&gt;modifiers (in upper- or lowercase), placed in single or double quotation&lt;/div&gt;&lt;div&gt;marks, may be used with FINDC as follows:&lt;/div&gt;&lt;div&gt;i ignore case.&lt;/div&gt;&lt;div&gt;t ignore trailing blanks in both the character variable and the&lt;/div&gt;&lt;div&gt;find-characters.&lt;/div&gt;&lt;div&gt;v count only characters that are not in the list of find characters.&lt;/div&gt;&lt;div&gt;o process the modifiers and find characters only once to a specific&lt;/div&gt;&lt;div&gt;call to the function. In subsequent calls, changes to these&lt;/div&gt;&lt;div&gt;arguments will have no effect.&lt;/div&gt;&lt;div&gt;start is an optional parameter that specifies the position in the string to&lt;/div&gt;&lt;div&gt;begin the search. If it is omitted, the search starts at the beginning of the&lt;/div&gt;&lt;div&gt;string. If it is non-zero, the search begins at the position in the string of the&lt;/div&gt;&lt;div&gt;absolute value of the number. If the value is positive, the search goes from&lt;/div&gt;&lt;div&gt;32 SAS Functions by Example&lt;/div&gt;&lt;div&gt;left to right; if the value is negative, the search goes from right to left. A&lt;/div&gt;&lt;div&gt;negative value larger than the length of the string results in a scan from right&lt;/div&gt;&lt;div&gt;to left, starting at the end of the string. If the value of start is a positive&lt;/div&gt;&lt;div&gt;number longer than the length of the string, or if it is 0, the function returns&lt;/div&gt;&lt;div&gt;a 0.&lt;/div&gt;&lt;div&gt;Note: You can switch the positions of start and modifiers and the&lt;/div&gt;&lt;div&gt;function will work the same.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "Apples and Books" and STRING2 = "abcde"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;FINDC(STRING1, STRING2) 5&lt;/div&gt;&lt;div&gt;FINDC(STRING1, STRING2, 'i') 1&lt;/div&gt;&lt;div&gt;FINDC(STRING1,"aple",'vi') 6&lt;/div&gt;&lt;div&gt;FINDC("abcxyzabc","abc",4) 7&lt;/div&gt;&lt;div&gt;Program 1.14: Using the FIND and FINDC functions to search for strings&lt;/div&gt;&lt;div&gt;and characters&lt;/div&gt;&lt;div&gt;***Primary functions: FIND and FINDC;&lt;/div&gt;&lt;div&gt;DATA FIND_VOWEL;&lt;/div&gt;&lt;div&gt;INPUT @1 STRING $20.;&lt;/div&gt;&lt;div&gt;PEAR = FIND(STRING,"Pear");&lt;/div&gt;&lt;div&gt;POS_VOWEL = FINDC(STRING,"aeiou",'I');&lt;/div&gt;&lt;div&gt;UPPER_VOWEL = FINDC(STRING,"aeiou");&lt;/div&gt;&lt;div&gt;NOT_VOWEL = FINDC(STRING,"AEIOU",'IV');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;XYZABCabc&lt;/div&gt;&lt;div&gt;XYZ&lt;/div&gt;&lt;div&gt;Apple and Pear&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=FIND_VOWEL NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set FIND_VOWEL";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 33&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The FIND function returns the position of the characters "Pear" in the variable STRING.&lt;/div&gt;&lt;div&gt;Since the i modifier is not used, the search is case-sensitive. The first use of the FINDC&lt;/div&gt;&lt;div&gt;function looks for any upper- or lowercase vowel in the string (because of the i modifier).&lt;/div&gt;&lt;div&gt;The next statement, without the i modifier, locates only lowercase vowels. Finally, the v&lt;/div&gt;&lt;div&gt;modifier in the last FINDC function reverses the search to look for the first character that is&lt;/div&gt;&lt;div&gt;not a vowel (upper- or lowercase because of the i modifier).&lt;/div&gt;&lt;div&gt;Program 1.15: Demonstrating the o modifier with FINDC&lt;/div&gt;&lt;div&gt;***Primary function: FINDC;&lt;/div&gt;&lt;div&gt;DATA O_MODIFIER;&lt;/div&gt;&lt;div&gt;INPUT STRING $15.&lt;/div&gt;&lt;div&gt;@16 LOOK_FOR $1.;&lt;/div&gt;&lt;div&gt;POSITION = FINDC(STRING,LOOK_FOR,'IO');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Capital A here A&lt;/div&gt;&lt;div&gt;Lower a here X&lt;/div&gt;&lt;div&gt;Apple B&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=O_MODIFIER NOOBS HEADING=H;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set O_MODIFIER";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In the first call to FINDC, the value of LOOK_FOR is an uppercase A. Since the o modifier&lt;/div&gt;&lt;div&gt;was used, changing the value of LOOK_FOR in the next two observations has no effect—&lt;/div&gt;&lt;div&gt;the function continues to look for the letter A. Note that another use of FINDC in this&lt;/div&gt;&lt;div&gt;DATA step would not be affected by the previous use of the o modifier, even if the name of&lt;/div&gt;&lt;div&gt;the variable (in this case POSITION) were the same. The o modifier is most likely useful in&lt;/div&gt;&lt;div&gt;reducing processing time when looping through multiple strings, looking for the same string&lt;/div&gt;&lt;div&gt;with the same modifiers. The listing of data set O_MODIFIER below shows that, even&lt;/div&gt;&lt;div&gt;though the LOOK_FOR value was changed to X in the second observation and B in the third&lt;/div&gt;&lt;div&gt;observation, the function continues to search for the letter A.&lt;/div&gt;&lt;div&gt;34 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Listing of Data Set O_MODIFIER&lt;/div&gt;&lt;div&gt;STRING LOOK_FOR POSITION&lt;/div&gt;&lt;div&gt;Capital A here A 2&lt;/div&gt;&lt;div&gt;Lower a here X 7&lt;/div&gt;&lt;div&gt;Apple B 1&lt;/div&gt;&lt;div&gt;INDEX, INDEXC, and INDEXW&lt;/div&gt;&lt;div&gt;This group of functions all search a string for a substring of one or more characters. INDEX&lt;/div&gt;&lt;div&gt;and INDEXW are similar, the difference being that INDEXW looks for a word (defined as a&lt;/div&gt;&lt;div&gt;string bounded by spaces or the beginning or end of the string) while INDEX simply&lt;/div&gt;&lt;div&gt;searches for the designated substring. INDEXC searches for one or more individual&lt;/div&gt;&lt;div&gt;characters and always searches from right to left. Note that these three functions are all&lt;/div&gt;&lt;div&gt;case-sensitive.&lt;/div&gt;&lt;div&gt;Function: INDEX&lt;/div&gt;&lt;div&gt;Purpose: To locate the starting position of a substring in a string.&lt;/div&gt;&lt;div&gt;Syntax: INDEX(character-value, find-string)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;find-string is a character variable or string literal that contains the&lt;/div&gt;&lt;div&gt;substring for which you want to search.&lt;/div&gt;&lt;div&gt;The function returns the first position in the character-value that&lt;/div&gt;&lt;div&gt;contains the find-string. If the find-string is not found, the&lt;/div&gt;&lt;div&gt;function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING = "ABCDEFG"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 35&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;INDEX(STRING,'C') 3 (the position of the 'C')&lt;/div&gt;&lt;div&gt;INDEX(STRING,'DEF') 4 (the position of the 'D')&lt;/div&gt;&lt;div&gt;INDEX(STRING,'X') 0 (no "X" in the string)&lt;/div&gt;&lt;div&gt;INDEX(STRING,'ACE') 0 (no "ACE" in the string)&lt;/div&gt;&lt;div&gt;Program 1.16: Converting numeric values of mixed units (e.g., kg and lbs)&lt;/div&gt;&lt;div&gt;to a single numeric quantity&lt;/div&gt;&lt;div&gt;***Primary functions: COMPRESS, INDEX, INPUT&lt;/div&gt;&lt;div&gt;***Other function: ROUND;&lt;/div&gt;&lt;div&gt;DATA HEAVY;&lt;/div&gt;&lt;div&gt;INPUT CHAR_WT $ @@;&lt;/div&gt;&lt;div&gt;WEIGHT = INPUT(COMPRESS(CHAR_WT,'KG'),8.);&lt;/div&gt;&lt;div&gt;IF INDEX(CHAR_WT,'K') NE 0 THEN WEIGHT = 2.22 * WEIGHT;&lt;/div&gt;&lt;div&gt;WEIGHT = ROUND(WEIGHT);&lt;/div&gt;&lt;div&gt;DROP CHAR_WT;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;60KG 155 82KG 54KG 98&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=HEAVY NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set HEAVY";&lt;/div&gt;&lt;div&gt;VAR WEIGHT;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The data lines contain numbers in kilograms, followed by the abbreviation KG or in pounds&lt;/div&gt;&lt;div&gt;(no units used). As with most problems of this type, when you are reading a combination of&lt;/div&gt;&lt;div&gt;numbers and characters, you usually need to first read the value as a character. Here the&lt;/div&gt;&lt;div&gt;COMPRESS function is used to remove the letters KG from the character value. The&lt;/div&gt;&lt;div&gt;INPUT function does its usual job of character to numeric conversion. If the INDEX&lt;/div&gt;&lt;div&gt;function returns any value other than a 0, the letter K was found in the string and the&lt;/div&gt;&lt;div&gt;WEIGHT value is converted from KG to pounds. Finally, the value is rounded to the nearest&lt;/div&gt;&lt;div&gt;pound, using the ROUND function. The listing of data set HEAVY follows:&lt;/div&gt;&lt;div&gt;36 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Listing of Data Set HEAVY&lt;/div&gt;&lt;div&gt;WEIGHT&lt;/div&gt;&lt;div&gt;133&lt;/div&gt;&lt;div&gt;155&lt;/div&gt;&lt;div&gt;182&lt;/div&gt;&lt;div&gt;120&lt;/div&gt;&lt;div&gt;98&lt;/div&gt;&lt;div&gt;Function: INDEXC&lt;/div&gt;&lt;div&gt;Purpose: To search a character string for one or more characters. The INDEXC&lt;/div&gt;&lt;div&gt;function works in a similar manner to the INDEX function, with the&lt;/div&gt;&lt;div&gt;difference being it can be used to search for any one in a list of character&lt;/div&gt;&lt;div&gt;values.&lt;/div&gt;&lt;div&gt;Syntax: INDEXC(character-value, 'char1','char2','char3',&lt;/div&gt;&lt;div&gt;...)&lt;/div&gt;&lt;div&gt;INDEXC(character-value, 'char1char2char3. . .')&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;char1, char2, ... are individual character values that you wish to&lt;/div&gt;&lt;div&gt;search for in the character-value.&lt;/div&gt;&lt;div&gt;The INDEXC function returns the first occurrence of any of the char1 ,&lt;/div&gt;&lt;div&gt;char2, etc., values in the string. If none of the characters is found, the&lt;/div&gt;&lt;div&gt;function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING = "ABCDEFG"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 37&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;INDEXC(STRING,'F','C','G') 3 (position of the "C")&lt;/div&gt;&lt;div&gt;INDEXC(STRING, 'FCG') 3 (position of the "C")&lt;/div&gt;&lt;div&gt;INDEXC(STRING,'FCG') 3 (position of the "C")&lt;/div&gt;&lt;div&gt;INDEXC(STRING,'X','Y','Z') 0 (no "X", "Y", or "Z" in STRING)&lt;/div&gt;&lt;div&gt;Note: It makes no difference if you list the search characters as 'ABC' or&lt;/div&gt;&lt;div&gt;'A','B','C'.&lt;/div&gt;&lt;div&gt;Program 1.17: Searching for one of several characters in a character&lt;/div&gt;&lt;div&gt;variable&lt;/div&gt;&lt;div&gt;***Primary function: INDEXC;&lt;/div&gt;&lt;div&gt;DATA CHECK;&lt;/div&gt;&lt;div&gt;INPUT TAG_NUMBER $ @@;&lt;/div&gt;&lt;div&gt;***If the tag number contains an X, Y, or Z, it indicates&lt;/div&gt;&lt;div&gt;an international destination, otherwise, the destination&lt;/div&gt;&lt;div&gt;is domestic;&lt;/div&gt;&lt;div&gt;IF INDEXC(TAG_NUMBER,'X','Y','Z') GT 0 THEN&lt;/div&gt;&lt;div&gt;DESTINATION = 'INTERNATIONAL';&lt;/div&gt;&lt;div&gt;ELSE DESTINATION = 'DOMESTIC';&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;T123 TY333 1357Z UZYX 888 ABC&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=CHECK NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set CHECK";&lt;/div&gt;&lt;div&gt;ID TAG_NUMBER;&lt;/div&gt;&lt;div&gt;VAR DESTINATION;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Rather than use three statements using the INDEX function, you can use the INDEXC&lt;/div&gt;&lt;div&gt;function, which allows you to check for any one of a number of character values. Here, if an&lt;/div&gt;&lt;div&gt;X, Y, or Z is found in the variable TAG_NUMBER, the function returns a number greater&lt;/div&gt;&lt;div&gt;than 0 and DESTINATION will be set to INTERNATIONAL. As you can see in the listing&lt;/div&gt;&lt;div&gt;below, this use of the INDEXC function works as advertised.&lt;/div&gt;&lt;div&gt;38 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Listing of Data Set CHECK&lt;/div&gt;&lt;div&gt;TAG_&lt;/div&gt;&lt;div&gt;NUMBER DESTINATION&lt;/div&gt;&lt;div&gt;T123 DOMESTIC&lt;/div&gt;&lt;div&gt;TY333 INTERNATIONAL&lt;/div&gt;&lt;div&gt;1357Z INTERNATIONAL&lt;/div&gt;&lt;div&gt;UZYX INTERNATIONAL&lt;/div&gt;&lt;div&gt;888 DOMESTIC&lt;/div&gt;&lt;div&gt;ABC DOMESTIC&lt;/div&gt;&lt;div&gt;Program 1.18: Reading dates in a mixture of formats&lt;/div&gt;&lt;div&gt;***Primary function: INDEXC&lt;/div&gt;&lt;div&gt;***Other function: INPUT;&lt;/div&gt;&lt;div&gt;***Note: Version 9 has some enhanced date reading ability;&lt;/div&gt;&lt;div&gt;***Program to read mixed dates;&lt;/div&gt;&lt;div&gt;DATA MIXED_DATES;&lt;/div&gt;&lt;div&gt;INPUT @1 DUMMY $15.;&lt;/div&gt;&lt;div&gt;IF INDEXC(DUMMY,'/-:') NE 0 THEN DATE = INPUT(DUMMY,MMDDYY10.);&lt;/div&gt;&lt;div&gt;ELSE DATE = INPUT(DUMMY,DATE9.);&lt;/div&gt;&lt;div&gt;FORMAT DATE WORDDATE.;&lt;/div&gt;&lt;div&gt;DROP DUMMY;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;10/21/1946&lt;/div&gt;&lt;div&gt;06JUN2002&lt;/div&gt;&lt;div&gt;5-10-1950&lt;/div&gt;&lt;div&gt;7:9:57&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=MIXED_DATES NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set MIXED_DATES";&lt;/div&gt;&lt;div&gt;VAR DATE;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this somewhat trumped-up example, dates are entered either in mm/dd/yyyy or&lt;/div&gt;&lt;div&gt;ddMONyyyy form. Also, besides a slash, dashes and colons are used. Any string that&lt;/div&gt;&lt;div&gt;includes either a slash, dash, or colon is a date that needs the mmddyy10. informat.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 39&lt;/div&gt;&lt;div&gt;Otherwise, the date9. informat is used. A list of the data set MIXED_DATES is shown&lt;/div&gt;&lt;div&gt;below:&lt;/div&gt;&lt;div&gt;Listing of Data Set MIXED_DATES&lt;/div&gt;&lt;div&gt;DATE&lt;/div&gt;&lt;div&gt;October 21, 1946&lt;/div&gt;&lt;div&gt;June 6, 2002&lt;/div&gt;&lt;div&gt;May 10, 1950&lt;/div&gt;&lt;div&gt;July 9, 1957&lt;/div&gt;&lt;div&gt;Function: INDEXW&lt;/div&gt;&lt;div&gt;Purpose: To search a string for a word, defined as a group of letters separated on both&lt;/div&gt;&lt;div&gt;ends by a word boundary (a space, the beginning of a string, end of the&lt;/div&gt;&lt;div&gt;string). Note that punctuation is not considered a word boundary.&lt;/div&gt;&lt;div&gt;Syntax: INDEXW(character-value, find-string)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;find-string is the word for which you want to search.&lt;/div&gt;&lt;div&gt;The function returns the first position in the character-value that&lt;/div&gt;&lt;div&gt;contains the find-string. If the find-string is not found, the&lt;/div&gt;&lt;div&gt;function returns a 0.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "there is a the here" and&lt;/div&gt;&lt;div&gt;STRING2 = "end in the."&lt;/div&gt;&lt;div&gt;Function Result&lt;/div&gt;&lt;div&gt;INDEXW(STRING1,"the") 12 (the word "the")&lt;/div&gt;&lt;div&gt;INDEXW("ABABAB","AB") 0 (no word boundaries around "AB")&lt;/div&gt;&lt;div&gt;INDEXW(STRING1,"er") 0 (not a word)&lt;/div&gt;&lt;div&gt;INDEXC(STRING2,"the") 0 (punctuation is not a word boundary)&lt;/div&gt;&lt;div&gt;40 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.19: Searching for a word using the INDEXW function&lt;/div&gt;&lt;div&gt;***Primary functions: INDEX and INDEXW;&lt;/div&gt;&lt;div&gt;DATA FIND_WORD;&lt;/div&gt;&lt;div&gt;INPUT STRING $40.;&lt;/div&gt;&lt;div&gt;POSITION_W = INDEXW(STRING,"the");&lt;/div&gt;&lt;div&gt;POSITION = INDEX(STRING,"the");&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;there is a the in this line&lt;/div&gt;&lt;div&gt;ends in the&lt;/div&gt;&lt;div&gt;ends in the.&lt;/div&gt;&lt;div&gt;none here&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=FIND_WORD;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set FIND_WORD";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program demonstrates the difference between INDEX and INDEXW. Notice in the&lt;/div&gt;&lt;div&gt;first observation in the listing below, the INDEX function returns a 1 because the letters&lt;/div&gt;&lt;div&gt;"the" as part of the word "there" begin the string. Since the INDEXW function needs either&lt;/div&gt;&lt;div&gt;white space at the beginning or end of a string to delimit a word, it returns a 12, the position&lt;/div&gt;&lt;div&gt;of the word "the" in the string. Observation 3 emphasizes the fact that a punctuation mark&lt;/div&gt;&lt;div&gt;does not serve as a word separator. Finally, since the string "the" does not appear anywhere&lt;/div&gt;&lt;div&gt;in the fourth observation, both functions return a 0. Here is the listing:&lt;/div&gt;&lt;div&gt;Listing of Data Set FIND_WORD&lt;/div&gt;&lt;div&gt;Obs STRING POSITION_W POSITION&lt;/div&gt;&lt;div&gt;1 there is a the in this line 12 1&lt;/div&gt;&lt;div&gt;2 ends in the 9 9&lt;/div&gt;&lt;div&gt;3 ends in the. 0 9&lt;/div&gt;&lt;div&gt;4 none here 0 0&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 41&lt;/div&gt;&lt;div&gt;Function: VERIFY&lt;/div&gt;&lt;div&gt;Purpose: To check if a string contains any unwanted values.&lt;/div&gt;&lt;div&gt;Syntax: VERIFY(character-value, verify-string)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;verify-string is a SAS character variable or a list of character values&lt;/div&gt;&lt;div&gt;in quotation marks.&lt;/div&gt;&lt;div&gt;This function returns the first position in the character-value that is&lt;/div&gt;&lt;div&gt;not present in the verify-string. If the character-value does&lt;/div&gt;&lt;div&gt;not contain any characters other than those in the verify-string, the&lt;/div&gt;&lt;div&gt;function returns a 0. Be especially careful to think about trailing blanks&lt;/div&gt;&lt;div&gt;when using this function. If you have an 8-byte character variable equal to&lt;/div&gt;&lt;div&gt;'ABC' (followed by five blanks), and if the verify string is equal to 'ABC',&lt;/div&gt;&lt;div&gt;the VERIFY function returns a 4, the position of the first blank (which is not&lt;/div&gt;&lt;div&gt;present in the verify string). Therefore, you may need to use the TRIM&lt;/div&gt;&lt;div&gt;function on either the character-value, the verify-string, or&lt;/div&gt;&lt;div&gt;both.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING = "ABCXABD" and V = "ABCDE"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;VERIFY(STRING,V) 4 ("X" is not in the verify string)&lt;/div&gt;&lt;div&gt;VERIFY(STRING,"ABCDEXYZ") 0 (no "bad" characters in STRING)&lt;/div&gt;&lt;div&gt;VERIFY(STRING,"ACD") 2 (position of the "B")&lt;/div&gt;&lt;div&gt;VERIFY("ABC ","ABC") 4 (position of the 1st blank)&lt;/div&gt;&lt;div&gt;VERIFY(TRIM("ABC "),"ABC") 0 (no invalid characters)&lt;/div&gt;&lt;div&gt;42 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.20: Using the VERIFY function to check for invalid character&lt;/div&gt;&lt;div&gt;data values&lt;/div&gt;&lt;div&gt;***Primary function: VERIFY;&lt;/div&gt;&lt;div&gt;DATA VERY_FI;&lt;/div&gt;&lt;div&gt;INPUT ID $ 1-3&lt;/div&gt;&lt;div&gt;ANSWER $ 5-9;&lt;/div&gt;&lt;div&gt;P = VERIFY(ANSWER,'ABCDE');&lt;/div&gt;&lt;div&gt;OK = P EQ 0;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;001 ACBED&lt;/div&gt;&lt;div&gt;002 ABXDE&lt;/div&gt;&lt;div&gt;003 12CCE&lt;/div&gt;&lt;div&gt;004 ABC E&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=VERY_FI NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "listing of Data Set VERY_FI";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this example, the only valid values for ANSWER are the uppercase letters A–E. Any time&lt;/div&gt;&lt;div&gt;there are one or more invalid values, the result of the VERIFY function (variable P) will be a&lt;/div&gt;&lt;div&gt;number from 1 to 5. The SAS statement that computes the value of the variable OK needs a&lt;/div&gt;&lt;div&gt;word of explanation. First, the logical comparison P EQ 0 returns a value of true or false,&lt;/div&gt;&lt;div&gt;which is equivalent to a 1 or 0. This value is then assigned to the variable OK. Thus, the&lt;/div&gt;&lt;div&gt;variable OK is set to 1 for all valid values of ANSWER and to 0 for any invalid values. This&lt;/div&gt;&lt;div&gt;use of the VERIFY function is very handy in some data cleaning applications. A listing of&lt;/div&gt;&lt;div&gt;data set VERI_FI is shown below:&lt;/div&gt;&lt;div&gt;listing of Data Set VERY_FI&lt;/div&gt;&lt;div&gt;ID ANSWER P OK&lt;/div&gt;&lt;div&gt;001 ACBED 0 1&lt;/div&gt;&lt;div&gt;002 ABXDE 3 0&lt;/div&gt;&lt;div&gt;003 12CCE 1 0&lt;/div&gt;&lt;div&gt;004 ABC E 4 0&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 43&lt;/div&gt;&lt;div&gt;Functions That Extract Parts of Strings&lt;/div&gt;&lt;div&gt;The functions described in this section can extract parts of strings. When used on the left&lt;/div&gt;&lt;div&gt;hand side of the equal sign, the SUBSTR function can also be used to insert characters into&lt;/div&gt;&lt;div&gt;specific positions of an existing string.&lt;/div&gt;&lt;div&gt;Function: SUBSTR&lt;/div&gt;&lt;div&gt;Purpose: To extract part of a string. When the SUBSTR function is used on the left&lt;/div&gt;&lt;div&gt;side of the equal sign, it can place specified characters into an existing&lt;/div&gt;&lt;div&gt;string.&lt;/div&gt;&lt;div&gt;Syntax: SUBSTR(character-value, start &lt;,length&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is the starting position within the string.&lt;/div&gt;&lt;div&gt;length if specified, is the number of characters to include in the&lt;/div&gt;&lt;div&gt;substring. If this argument is omitted, the SUBSTR function will return all&lt;/div&gt;&lt;div&gt;the characters from the start position to the end of the string.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the character-value.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, let STRING = "ABC123XYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;SUBSTR(STRING,4,2) "12"&lt;/div&gt;&lt;div&gt;SUBSTR(STRING,4) "123XYZ"&lt;/div&gt;&lt;div&gt;SUBSTR(STRING,LENGTH(STRING)) "Z" (last character in the string)&lt;/div&gt;&lt;div&gt;44 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.21: Extracting portions of a character value and creating a&lt;/div&gt;&lt;div&gt;character variable and a numeric value&lt;/div&gt;&lt;div&gt;***Primary function: SUBSTR&lt;/div&gt;&lt;div&gt;***Other function: INPUT;&lt;/div&gt;&lt;div&gt;DATA SUBSTRING;&lt;/div&gt;&lt;div&gt;INPUT ID $ 1-9;&lt;/div&gt;&lt;div&gt;LENGTH STATE $ 2;&lt;/div&gt;&lt;div&gt;STATE = SUBSTR(ID,1,2);&lt;/div&gt;&lt;div&gt;NUM = INPUT(SUBSTR(ID,7,3),3.);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;NYXXXX123&lt;/div&gt;&lt;div&gt;NJ1234567&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=SUBSTRING NOOBS;&lt;/div&gt;&lt;div&gt;TITLE 'Listing of Data Set SUBSTRING';&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this example, the ID contains both state and number information. The first two characters&lt;/div&gt;&lt;div&gt;of the ID variable contain the state abbreviations and the last three characters represent&lt;/div&gt;&lt;div&gt;numerals that you want to use to create a numeric variable. Extracting the state codes is&lt;/div&gt;&lt;div&gt;straightforward. To obtain a numeric value from the last 3 bytes of the ID variable, it is&lt;/div&gt;&lt;div&gt;necessary to first use the SUBSTR function to extract the three characters of interest and to&lt;/div&gt;&lt;div&gt;then use the INPUT function to do the character to numeric conversion. A listing of data set&lt;/div&gt;&lt;div&gt;SUBSTRING is shown next:&lt;/div&gt;&lt;div&gt;Listing of Data Set SUBSTRING&lt;/div&gt;&lt;div&gt;ID STATE NUM&lt;/div&gt;&lt;div&gt;NYXXXX123 NY 123&lt;/div&gt;&lt;div&gt;NJ1234567 NJ 567&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 45&lt;/div&gt;&lt;div&gt;Program 1.22: Extracting the last two characters from a string, regardless&lt;/div&gt;&lt;div&gt;of the length&lt;/div&gt;&lt;div&gt;***Primary functions: LENGTH, SUBSTR;&lt;/div&gt;&lt;div&gt;DATA EXTRACT;&lt;/div&gt;&lt;div&gt;INPUT @1 STRING $20.;&lt;/div&gt;&lt;div&gt;LAST_TWO = SUBSTR(STRING,LENGTH(STRING)-1,2);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABCDE&lt;/div&gt;&lt;div&gt;AX12345NY&lt;/div&gt;&lt;div&gt;126789&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=EXTRACT NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set EXTRACT";&lt;/div&gt;&lt;div&gt;VAR STRING LAST_TWO;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program demonstrates how you can use the LENGTH and SUBSTR functions together&lt;/div&gt;&lt;div&gt;to extract portions of a string when the strings are of different or unknown lengths. To see&lt;/div&gt;&lt;div&gt;how this program works, take a look at the first line of data. The LENGTH function will&lt;/div&gt;&lt;div&gt;return a 5 and (5–1) = 4, the position of the next to the last (penultimate) character in&lt;/div&gt;&lt;div&gt;STRING. See the listing below:&lt;/div&gt;&lt;div&gt;Listing of Data Set EXTRACT&lt;/div&gt;&lt;div&gt;STRING LAST_TWO&lt;/div&gt;&lt;div&gt;ABCDE DE&lt;/div&gt;&lt;div&gt;AX12345NY NY&lt;/div&gt;&lt;div&gt;126789 89&lt;/div&gt;&lt;div&gt;46 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.23: Using the SUBSTR function to "unpack" a string&lt;/div&gt;&lt;div&gt;***Primary function: SUBSTR&lt;/div&gt;&lt;div&gt;***Other functions: INPUT;&lt;/div&gt;&lt;div&gt;DATA PACK;&lt;/div&gt;&lt;div&gt;INPUT STRING $ 1-5;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;12345&lt;/div&gt;&lt;div&gt;8 642&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;DATA UNPACK;&lt;/div&gt;&lt;div&gt;SET PACK;&lt;/div&gt;&lt;div&gt;ARRAY X[5];&lt;/div&gt;&lt;div&gt;DO J = 1 TO 5;&lt;/div&gt;&lt;div&gt;X[J] = INPUT(SUBSTR(STRING,J,1),1.);&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;DROP J;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=UNPACK NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set UNPACK";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;There are times when you want to store a group of one-digit numbers in a compact, spacesaving&lt;/div&gt;&lt;div&gt;way. In this example, you want to store five one-digit numbers. If you stored each&lt;/div&gt;&lt;div&gt;one as an 8-byte numeric, you would need 40 bytes of storage for each observation. By&lt;/div&gt;&lt;div&gt;storing the five numbers as a 5-byte character string, you need only 5 bytes of storage.&lt;/div&gt;&lt;div&gt;However, you need to use CPU time to turn the character string back into the five numbers.&lt;/div&gt;&lt;div&gt;The key here is to use the SUBSTR function with the starting value as the index of a DO&lt;/div&gt;&lt;div&gt;loop. As you pick off each of the numerals, you can use the INPUT function to do the&lt;/div&gt;&lt;div&gt;character-to-numeric conversion. Notice that the ARRAY statement in this program does&lt;/div&gt;&lt;div&gt;not include a list of variables. When this list is omitted and the number of elements is placed&lt;/div&gt;&lt;div&gt;in parentheses, SAS automatically uses the array name followed by the numbers from 1 to n,&lt;/div&gt;&lt;div&gt;where n is the number in parentheses. A listing of data set UNPACK is shown below:&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 47&lt;/div&gt;&lt;div&gt;Listing of Data Set UNPACK&lt;/div&gt;&lt;div&gt;STRING X1 X2 X3 X4 X5&lt;/div&gt;&lt;div&gt;12345 1 2 3 4 5&lt;/div&gt;&lt;div&gt;8 642 8 . 6 4 2&lt;/div&gt;&lt;div&gt;Function: SUBSTR (on the left-hand side of the equal sign)&lt;/div&gt;&lt;div&gt;As we mentioned in the description of the SUBSTR function, there is an interesting and&lt;/div&gt;&lt;div&gt;useful way it can be used—on the left-hand side of the equal sign.&lt;/div&gt;&lt;div&gt;Purpose: To place one or more characters into an existing string.&lt;/div&gt;&lt;div&gt;Syntax: SUBSTR(character-value, start &lt;, length&gt;) =&lt;/div&gt;&lt;div&gt;character-value&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;start is the starting position in a string where you want to place the new&lt;/div&gt;&lt;div&gt;characters.&lt;/div&gt;&lt;div&gt;length is the number of characters to be placed in that string. If length&lt;/div&gt;&lt;div&gt;is omitted, all the characters on the right-hand side of the equal sign replace&lt;/div&gt;&lt;div&gt;the characters in character-value.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;In these examples EXISTING = "ABCDEFGH", NEW = "XY"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;SUBSTR(EXISTING,3,2) = NEW EXISTING is now = "ABXYEFGH"&lt;/div&gt;&lt;div&gt;SUBSTR(EXISTING,3,1) = "*" EXISTING is now = "AB*DEFGH"&lt;/div&gt;&lt;div&gt;48 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.24: Demonstrating the SUBSTR function on the left-hand side&lt;/div&gt;&lt;div&gt;of the equal sign&lt;/div&gt;&lt;div&gt;***Primary function: SUBSTR&lt;/div&gt;&lt;div&gt;***Other function: PUT;&lt;/div&gt;&lt;div&gt;DATA STARS;&lt;/div&gt;&lt;div&gt;INPUT SBP DBP @@;&lt;/div&gt;&lt;div&gt;LENGTH SBP_CHK DBP_CHK $ 4;&lt;/div&gt;&lt;div&gt;SBP_CHK = PUT(SBP,3.);&lt;/div&gt;&lt;div&gt;DBP_CHK = PUT(DBP,3.);&lt;/div&gt;&lt;div&gt;IF SBP GT 160 THEN SUBSTR(SBP_CHK,4,1) = '*';&lt;/div&gt;&lt;div&gt;IF DBP GT 90 THEN SUBSTR(DBP_CHK,4,1) = '*';&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;120 80 180 92 200 110&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=STARS NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set STARS";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this program, you want to "flag" high values of systolic and diastolic blood pressure by&lt;/div&gt;&lt;div&gt;placing an asterisk after the value. Notice that the variables SBP_CHK and DBP_CHK are&lt;/div&gt;&lt;div&gt;both assigned a length of 4 by the length statement. The fourth position needs to be there in&lt;/div&gt;&lt;div&gt;case you want to place an asterisk in that position, to flag the value as abnormal. The PUT&lt;/div&gt;&lt;div&gt;function places the numerals of the blood pressures into the first 3 bytes of the corresponding&lt;/div&gt;&lt;div&gt;character variables. Then, if the value is above the specified level, an asterisk is placed in&lt;/div&gt;&lt;div&gt;the fourth position of these variables.&lt;/div&gt;&lt;div&gt;Listing of Data Set STARS&lt;/div&gt;&lt;div&gt;SBP DBP SBP_CHK DBP_CHK&lt;/div&gt;&lt;div&gt;120 80 120 80&lt;/div&gt;&lt;div&gt;180 92 180* 92*&lt;/div&gt;&lt;div&gt;200 110 200* 110*&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 49&lt;/div&gt;&lt;div&gt;Function: SUBSTRN&lt;/div&gt;&lt;div&gt;Purpose: This function serves the same purpose as the SUBSTR function with a few&lt;/div&gt;&lt;div&gt;added features. Unlike the SUBSTR function, the starting position and the&lt;/div&gt;&lt;div&gt;length arguments of the SUBSTRN function can be 0 or negative without&lt;/div&gt;&lt;div&gt;causing an error. In particular, if the length is 0, the function returns a string&lt;/div&gt;&lt;div&gt;of 0 length. This is particularly useful when you are using regular&lt;/div&gt;&lt;div&gt;expression functions where the length parameter may be 0 when a pattern is&lt;/div&gt;&lt;div&gt;not found (with the PRXSUBSTR function, for example). You can use the&lt;/div&gt;&lt;div&gt;SUBSTRN function in any application where you would use the SUBSTR&lt;/div&gt;&lt;div&gt;function. The effect of 0 or negative parameters is discussed in the&lt;/div&gt;&lt;div&gt;description of the arguments below.&lt;/div&gt;&lt;div&gt;Syntax: SUBSTRN(character-value, start &lt;, length&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character variable.&lt;/div&gt;&lt;div&gt;start is the starting position in the string. If this value is non-positive, the&lt;/div&gt;&lt;div&gt;function returns a substring starting from the first character in&lt;/div&gt;&lt;div&gt;character-value (the length of the substring will be computed by&lt;/div&gt;&lt;div&gt;counting, starting from the value of start). See the program below.&lt;/div&gt;&lt;div&gt;length is the number of characters in the substring. If this value is nonpositive&lt;/div&gt;&lt;div&gt;(in particular, 0), the function returns a string of length 0. If this&lt;/div&gt;&lt;div&gt;argument is omitted, the SUBSTRN function will return all the characters&lt;/div&gt;&lt;div&gt;from the start position to the end of the string.&lt;/div&gt;&lt;div&gt;If a length has not been previously assigned, the length of the resulting&lt;/div&gt;&lt;div&gt;variable will be the length of the character-value.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABCDE"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,2,3) "BCD"&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,-1,4) "AB"&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,4,5) "DE"&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,3,0) string of zero length&lt;/div&gt;&lt;div&gt;50 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.25: Demonstrating the unique features of the SUBSTRN&lt;/div&gt;&lt;div&gt;function&lt;/div&gt;&lt;div&gt;***Primary function: SUBSTRN;&lt;/div&gt;&lt;div&gt;DATA HOAGIE;&lt;/div&gt;&lt;div&gt;STRING = 'ABCDEFGHIJ';&lt;/div&gt;&lt;div&gt;LENGTH RESULT $5.;&lt;/div&gt;&lt;div&gt;RESULT = SUBSTRN(STRING,2,5);&lt;/div&gt;&lt;div&gt;SUB1 = SUBSTRN(STRING,-1,4);&lt;/div&gt;&lt;div&gt;SUB2 = SUBSTRN(STRING,3,0);&lt;/div&gt;&lt;div&gt;SUB3 = SUBSTRN(STRING,7,5);&lt;/div&gt;&lt;div&gt;SUB4 = SUBSTRN(STRING,0,2);&lt;/div&gt;&lt;div&gt;FILE PRINT;&lt;/div&gt;&lt;div&gt;TITLE "Demonstrating the SUBSTRN Function";&lt;/div&gt;&lt;div&gt;PUT "Original String =" @25 STRING /&lt;/div&gt;&lt;div&gt;"SUBSTRN(STRING,2,5) =" @25 RESULT /&lt;/div&gt;&lt;div&gt;"SUBSTRN(STRING,-1,4) =" @25 SUB1 /&lt;/div&gt;&lt;div&gt;"SUBSTRN(STRING,3,0) =" @25 SUB2 /&lt;/div&gt;&lt;div&gt;"SUBSTRN(STRING,7,5) =" @25 SUB3 /&lt;/div&gt;&lt;div&gt;"SUBSTRN(STRING,0,2) =" @25 SUB4;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In data set HOAGIE (sub-strings, get it?) the storage lengths of the variables SUB1–SUB4&lt;/div&gt;&lt;div&gt;are all equal to the length of STRING (which is 10). Since a LENGTH statement was used&lt;/div&gt;&lt;div&gt;to define the length of RESULT, it has a length of 5.&lt;/div&gt;&lt;div&gt;Examine the results below and the brief explanation that follows the results.&lt;/div&gt;&lt;div&gt;Demonstrating the SUBSTRN Function&lt;/div&gt;&lt;div&gt;Original String = ABCDEFGHIJ&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,2,5) = BCDEF&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,-1,4) = AB&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,3,0) =&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,7,5) = GHIJ&lt;/div&gt;&lt;div&gt;SUBSTRN(STRING,0,2) = A&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 51&lt;/div&gt;&lt;div&gt;The first function call (RESULT) gives the same result as the SUBSTR function. The&lt;/div&gt;&lt;div&gt;resulting substring starts at the second position in STRING (B) and has a length of 5. All the&lt;/div&gt;&lt;div&gt;remaining SUBSTRN functions would have resulted in an error if the SUBSTR function had&lt;/div&gt;&lt;div&gt;been used instead.&lt;/div&gt;&lt;div&gt;The starting position of –1 and a length of 4 results in the characters "AB." To figure this&lt;/div&gt;&lt;div&gt;out, realize that you start counting from –1 (–1, 0, 1, 2) and the result is the first two&lt;/div&gt;&lt;div&gt;characters in STRING.&lt;/div&gt;&lt;div&gt;When the LENGTH is 0, the result is a string of length 0.&lt;/div&gt;&lt;div&gt;When you start at position 7 and have a length of 5, you go past the end of the string, so that&lt;/div&gt;&lt;div&gt;the result is truncated and the result is "GHIJ."&lt;/div&gt;&lt;div&gt;Finally, when the starting position is 0 and the length is 2, you get the first character in&lt;/div&gt;&lt;div&gt;string, "A."&lt;/div&gt;&lt;div&gt;Functions That Join Two or More Strings Together&lt;/div&gt;&lt;div&gt;There are three call routines and four functions that concatenate character strings. Although&lt;/div&gt;&lt;div&gt;you can use the || concatenation operator in combination with the STRIP, TRIM, or LEFT&lt;/div&gt;&lt;div&gt;functions, these routines and functions make it much easier to put strings together and, if you&lt;/div&gt;&lt;div&gt;wish, to place one or more separator characters between the strings. The three call routines&lt;/div&gt;&lt;div&gt;are discussed first, followed by the four concatenation functions.&lt;/div&gt;&lt;div&gt;Call Routines&lt;/div&gt;&lt;div&gt;These three call routines, new with Version 9, concatenate two or more strings. Note that&lt;/div&gt;&lt;div&gt;there are four concatenation functions as well (CAT, CATS, CATT, and CATX). The&lt;/div&gt;&lt;div&gt;differences among these routines involve the handling of leading and/or trailing blanks as&lt;/div&gt;&lt;div&gt;well as spacing between the concatenated strings. The traditional concatenation operator (||)&lt;/div&gt;&lt;div&gt;is still useful, but it sometimes takes extra work to strip leading and trailing blanks (LEFT&lt;/div&gt;&lt;div&gt;and TRIM functions, or the new STRIP function) before performing the concatenation&lt;/div&gt;&lt;div&gt;operation. These call routines are a convenience, and you will probably want to use them in&lt;/div&gt;&lt;div&gt;place of the older form of concatenation. There are corresponding concatenation functions&lt;/div&gt;&lt;div&gt;described in the next section.&lt;/div&gt;&lt;div&gt;52 SAS Functions by Example&lt;/div&gt;&lt;div&gt;One advantage of using the call routines over their corresponding functions is improved&lt;/div&gt;&lt;div&gt;performance. For example, CALL CATS(R, X, Y, Z) is faster than R = CATS(R, X, Y, Z).&lt;/div&gt;&lt;div&gt;We will describe all three call routines and follow with one program demonstrating all three.&lt;/div&gt;&lt;div&gt;Function: CALL CATS&lt;/div&gt;&lt;div&gt;Purpose: To concatenate two or more strings, removing both leading and trailing&lt;/div&gt;&lt;div&gt;blanks before the concatenation takes place. To help you remember that&lt;/div&gt;&lt;div&gt;this call routine is the one that strips the leading and trailing blanks before&lt;/div&gt;&lt;div&gt;concatenation, think of the S at the end of CATS as "strip blanks."&lt;/div&gt;&lt;div&gt;Note: To call our three cats, I usually just whistle loudly.&lt;/div&gt;&lt;div&gt;Syntax: CALL CATS(result, string-1 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;result is the concatenated string. It can be a new variable or, if it is an&lt;/div&gt;&lt;div&gt;existing variable, the other strings will be added to it. Be sure that the&lt;/div&gt;&lt;div&gt;length of result is long enough to hold the concatenated results. If not,&lt;/div&gt;&lt;div&gt;the resulting string will be truncated, and you will see an error message in&lt;/div&gt;&lt;div&gt;the log.&lt;/div&gt;&lt;div&gt;string-1 and string-n are the character strings to be concatenated.&lt;/div&gt;&lt;div&gt;Leading and trailing blanks will be stripped prior to the concatenation.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CALL CATS(RESULT, A, B) "BilboFrodo"&lt;/div&gt;&lt;div&gt;CALL CATS(RESULT, B, C, D) "FrodoHobbitGandalf"&lt;/div&gt;&lt;div&gt;CALL CATS(RESULT, "Hello", D) "HelloGandalf"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 53&lt;/div&gt;&lt;div&gt;Function: CALL CATT&lt;/div&gt;&lt;div&gt;Purpose: To concatenate two or more strings, removing only trailing blanks before&lt;/div&gt;&lt;div&gt;the concatenation takes place. To help you remember this, think of the T at&lt;/div&gt;&lt;div&gt;the end of CATT as "trailing blanks" or "trim blanks."&lt;/div&gt;&lt;div&gt;Syntax: CALL CATT(result, string-1 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;result is the concatenated string. It can be a new variable or, if it is an&lt;/div&gt;&lt;div&gt;existing variable, the other strings will be added to it. Be sure that the&lt;/div&gt;&lt;div&gt;length of result is long enough to hold the concatenated results. If not,&lt;/div&gt;&lt;div&gt;the program will terminate and you will see an error message in the log.&lt;/div&gt;&lt;div&gt;string-1 and string-n are the character strings to be concatenated.&lt;/div&gt;&lt;div&gt;Trailing blanks will be stripped prior to the concatenation.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CALL CATT(RESULT, A, B) "Bilbo Frodo"&lt;/div&gt;&lt;div&gt;CALL CATT(RESULT, B, C, D) " FrodoHobbit Gandalf"&lt;/div&gt;&lt;div&gt;CALL CATT(RESULT, "Hello", D) "Hello Gandalf"&lt;/div&gt;&lt;div&gt;Function: CALL CATX&lt;/div&gt;&lt;div&gt;Purpose: To concatenate two or more strings, removing both leading and trailing&lt;/div&gt;&lt;div&gt;blanks before the concatenation takes place, and place a single space, or one&lt;/div&gt;&lt;div&gt;or more characters of your choice, between each of the strings. To help&lt;/div&gt;&lt;div&gt;you remember this, think of the X at the end of CATX as "add eXtra blank."&lt;/div&gt;&lt;div&gt;Syntax: CALL CATX(separator, result, string-1 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;54 SAS Functions by Example&lt;/div&gt;&lt;div&gt;separator is one or more characters, placed in single or double&lt;/div&gt;&lt;div&gt;quotation marks, that you want to use to separate the strings&lt;/div&gt;&lt;div&gt;result is the concatenated string. It can be a new variable or, if it is an&lt;/div&gt;&lt;div&gt;existing variable, the other strings will be added to it. Be sure that the&lt;/div&gt;&lt;div&gt;length of result is long enough to hold the concatenated results. If not,&lt;/div&gt;&lt;div&gt;the program will terminate and you will see an error message in the log.&lt;/div&gt;&lt;div&gt;String-1 and string-n are the character strings to be concatenated.&lt;/div&gt;&lt;div&gt;Leading and trailing blanks will be stripped prior to the concatenation and a&lt;/div&gt;&lt;div&gt;single blank will be placed between the strings.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CALL CATX(" ", RESULT, A, B) "Bilbo Frodo"&lt;/div&gt;&lt;div&gt;CALL CATX(",", RESULT, B, C, D) "Frodo,Hobbit,Gandalf"&lt;/div&gt;&lt;div&gt;CALL CATX(":", RESULT, "Hello", D) "Hello:Gandalf"&lt;/div&gt;&lt;div&gt;CALL CATX(", ", RESULT, "Hello", D) "Hello, Gandalf"&lt;/div&gt;&lt;div&gt;CALL CATX("***", RESULT, A, B) "Bilbo***Frodo"&lt;/div&gt;&lt;div&gt;Program 1.26: Demonstrating the three concatenation call routines&lt;/div&gt;&lt;div&gt;***Primary functions: CALL CATS, CALL CATT, CALL CATX;&lt;/div&gt;&lt;div&gt;DATA CALL_CAT;&lt;/div&gt;&lt;div&gt;STRING1 = "ABC"; * No spaces;&lt;/div&gt;&lt;div&gt;STRING2 = "DEF "; * Three trailing spaces;&lt;/div&gt;&lt;div&gt;STRING3 = " GHI"; * Three leading spaces;&lt;/div&gt;&lt;div&gt;STRING4 = " JKL "; * Three leading and trailing spaces;&lt;/div&gt;&lt;div&gt;LENGTH RESULT1 - RESULT4 $ 20;&lt;/div&gt;&lt;div&gt;CALL CATS(RESULT1, STRING2, STRING4);&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 55&lt;/div&gt;&lt;div&gt;CALL CATT(RESULT2, STRING2, STRING1);&lt;/div&gt;&lt;div&gt;CALL CATX(" ", RESULT3 ,STRING1,STRING3);&lt;/div&gt;&lt;div&gt;CALL CATX(",", RESULT4,STRING3,STRING4);&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=CALL_CAT NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set CALL_CAT";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The three concatenation call routines each perform concatenation operations. The CATS&lt;/div&gt;&lt;div&gt;call routine strips leading and trailing blanks; the CATT call routine removes trailing blanks&lt;/div&gt;&lt;div&gt;before performing the concatenation; the CATX call routine is similar to the CATS call&lt;/div&gt;&lt;div&gt;routine except that it inserts a separator character (specified as the first argument) between&lt;/div&gt;&lt;div&gt;each of the concatenated strings.&lt;/div&gt;&lt;div&gt;According to SAS documentation, the call routines are more efficient to use than the&lt;/div&gt;&lt;div&gt;concatenation operator combined with the TRIM and LEFT functions. For example:&lt;/div&gt;&lt;div&gt;RESULT5 = TRIM(STRING2) || " " || TRIM(LEFT(STRING3));&lt;/div&gt;&lt;div&gt;RESULT5 would be: "DEF GHI"&lt;/div&gt;&lt;div&gt;A listing of data set CALL_CAT is shown below:&lt;/div&gt;&lt;div&gt;Listing of Data Set CALL_CAT&lt;/div&gt;&lt;div&gt;STRING1 STRING2 STRING3 STRING4 RESULT1 RESULT2 RESULT3 RESULT4&lt;/div&gt;&lt;div&gt;ABC DEF GHI JKL DEFJKL DEFABC ABC GHI GHI,JKL&lt;/div&gt;&lt;div&gt;The “CAT” Functions (CAT, CATS, CATT, and CATX)&lt;/div&gt;&lt;div&gt;These four concatenation functions are very similar to the concatenation call routines&lt;/div&gt;&lt;div&gt;described above. However, since they are functions and not call routines, you need to name&lt;/div&gt;&lt;div&gt;the new character variable to be created on the left-hand side of the equal sign and the&lt;/div&gt;&lt;div&gt;function, along with its arguments, on the right-hand side of the equal sign. As with the&lt;/div&gt;&lt;div&gt;concatenation call routines, we will describe the four functions together and then use a single&lt;/div&gt;&lt;div&gt;program to demonstrate them.&lt;/div&gt;&lt;div&gt;56 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Function: CAT&lt;/div&gt;&lt;div&gt;Purpose: To concatenate (join) two or more character strings, leaving leading and/or&lt;/div&gt;&lt;div&gt;trailing blanks unchanged. This function accomplishes the same task as the&lt;/div&gt;&lt;div&gt;concatenation operator (||).&lt;/div&gt;&lt;div&gt;Syntax: CAT(string-1, string-2 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;string-1, string-2 &lt;,string-n&gt; are the character strings to be&lt;/div&gt;&lt;div&gt;concatenated. These arguments can also be written as: CAT(OF C1-&lt;/div&gt;&lt;div&gt;C5)where C1 to C5 are character variables.&lt;/div&gt;&lt;div&gt;Note: It is very important to set the length of the resulting character string, using a&lt;/div&gt;&lt;div&gt;LENGTH statement (or other method), before using any of the concatenation functions.&lt;/div&gt;&lt;div&gt;Otherwise, the length of the resulting string will default to 200.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;C1-C5 are five character variables, with the values of 'A', 'B', 'C', 'D', and 'E'&lt;/div&gt;&lt;div&gt;respectively.&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CAT(A, B) "Bilbo Frodo"&lt;/div&gt;&lt;div&gt;CAT(B, C, D) " FrodoHobbit Gandalf "&lt;/div&gt;&lt;div&gt;CAT("Hello", D) "Hello Gandalf "&lt;/div&gt;&lt;div&gt;CAT(OF C1-C5) "ABCDE"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 57&lt;/div&gt;&lt;div&gt;Function: CATS&lt;/div&gt;&lt;div&gt;Purpose: To concatenate (join) two or more character strings, stripping both leading&lt;/div&gt;&lt;div&gt;and trailing blanks.&lt;/div&gt;&lt;div&gt;Syntax: CATS(string-1, string-2 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;string-1, string-2, and string-n are the character strings to&lt;/div&gt;&lt;div&gt;be concatenated. These arguments can also be written as: CATS(OF C1-&lt;/div&gt;&lt;div&gt;C5)where C1 to C5 are character variables.&lt;/div&gt;&lt;div&gt;Note: It is very important to set the length of the resulting character string, using a&lt;/div&gt;&lt;div&gt;LENGTH statement or other method, before calling any of the concatenation functions.&lt;/div&gt;&lt;div&gt;Otherwise, the length of the resulting string will default to 200.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;C1-C5 are five character variables, with the values of 'A', 'B', 'C', 'D', and 'E'&lt;/div&gt;&lt;div&gt;respectively.&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CATS(A, B) "BilboFrodo"&lt;/div&gt;&lt;div&gt;CATS(B, C, D) "FrodoHobbitGandalf"&lt;/div&gt;&lt;div&gt;CATS("Hello", D) "HelloGandalf"&lt;/div&gt;&lt;div&gt;CATS(OF C1-C5) "ABCDE"&lt;/div&gt;&lt;div&gt;58 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Function: CATT&lt;/div&gt;&lt;div&gt;Purpose: To concatenate (join) two or more character strings, stripping only trailing&lt;/div&gt;&lt;div&gt;blanks.&lt;/div&gt;&lt;div&gt;Syntax: CATT(string-1, string-2 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;string1, string-2, and string-n are the character strings to be&lt;/div&gt;&lt;div&gt;concatenated. These arguments can also be written as: CATT(OF C1-&lt;/div&gt;&lt;div&gt;C5)where C1 to C5 are character variables.&lt;/div&gt;&lt;div&gt;Note: It is very important to set the length of the resulting character string, using a&lt;/div&gt;&lt;div&gt;LENGTH statement or other method, before calling any of the concatenation functions.&lt;/div&gt;&lt;div&gt;Otherwise, the length of the resulting string will default to 200.&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;C1-C5 are five character variables, with the values of 'A', 'B', 'C', 'D', and 'E'&lt;/div&gt;&lt;div&gt;respectively.&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CATT(A, B) "Bilbo Frodo"&lt;/div&gt;&lt;div&gt;CATT(B, C, D) " FrodoHobbit Gandalf"&lt;/div&gt;&lt;div&gt;CATT("Hello", D) "Hello Gandalf"&lt;/div&gt;&lt;div&gt;CATT(OF C1-C5) "ABCDE"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 59&lt;/div&gt;&lt;div&gt;Function: CATX&lt;/div&gt;&lt;div&gt;Purpose: To concatenate (join) two or more character strings, stripping both leading&lt;/div&gt;&lt;div&gt;and trailing blanks and inserting one or more separator characters between&lt;/div&gt;&lt;div&gt;the strings.&lt;/div&gt;&lt;div&gt;Syntax: CATX(separator, string-1, string-2 &lt;,string-n&gt;)&lt;/div&gt;&lt;div&gt;separator is one or more characters, placed in single or double&lt;/div&gt;&lt;div&gt;quotation marks, to be used as separators between the concatenated strings.&lt;/div&gt;&lt;div&gt;string-1, string-2,string-n are the character strings to be&lt;/div&gt;&lt;div&gt;concatenated. These arguments can also be written as: CATX(" ",OF&lt;/div&gt;&lt;div&gt;C1-C5), where C1 to C5 are character variables.&lt;/div&gt;&lt;div&gt;Note: It is very important to set the length of the resulting character string using a&lt;/div&gt;&lt;div&gt;LENGTH statement (or other method), before calling any of the concatenation functions.&lt;/div&gt;&lt;div&gt;Otherwise, the length of the resulting string will default to 200.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;For these examples&lt;/div&gt;&lt;div&gt;A = "Bilbo" (no blanks)&lt;/div&gt;&lt;div&gt;B = " Frodo" (leading blanks)&lt;/div&gt;&lt;div&gt;C = "Hobbit " (trailing blanks)&lt;/div&gt;&lt;div&gt;D = " Gandalf " (leading and trailing blanks)&lt;/div&gt;&lt;div&gt;C1-C5 are five character variables, with the values of 'A', 'B', 'C', 'D', and 'E'&lt;/div&gt;&lt;div&gt;respectively.&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;CATX(" ", A, B) "Bilbo Frodo"&lt;/div&gt;&lt;div&gt;CATX(":"B, C, D) "Frodo:Hobbit:Gandalf"&lt;/div&gt;&lt;div&gt;CATX("***", "Hello", D) "Hello***Gandalf"&lt;/div&gt;&lt;div&gt;CATX("," ,OF C1-C5) "A,B,C,D,E"&lt;/div&gt;&lt;div&gt;60 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.27: Demonstrating the four concatenation functions&lt;/div&gt;&lt;div&gt;***Primary functions: CAT, CATS, CATT, CATX;&lt;/div&gt;&lt;div&gt;DATA CAT_FUNCTIONS;&lt;/div&gt;&lt;div&gt;STRING1 = "ABC"; * No spaces;&lt;/div&gt;&lt;div&gt;STRING2 = "DEF "; * Three trailing spaces;&lt;/div&gt;&lt;div&gt;STRING3 = " GHI"; * Three leading spaces;&lt;/div&gt;&lt;div&gt;STRING4 = " JKL "; * Three leading and trailing spaces;&lt;/div&gt;&lt;div&gt;LENGTH JOIN1 - JOIN5 $ 20;&lt;/div&gt;&lt;div&gt;JOIN1 = CAT(STRING2, STRING3);&lt;/div&gt;&lt;div&gt;JOIN2 = CATS(STRING2, STRING4);&lt;/div&gt;&lt;div&gt;JOIN3 = CATT(STRING2, STRING1);&lt;/div&gt;&lt;div&gt;JOIN4 = CATX(" ",STRING1,STRING3);&lt;/div&gt;&lt;div&gt;JOIN5 = CATX(",",STRING3,STRING4);&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=CAT_FUNCTIONS NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set CAT_FUNCTIONS";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Notice that each of the STRING variables differs with respect to leading and trailing blanks.&lt;/div&gt;&lt;div&gt;The CAT function is identical to the || operator. The CATS function removes both leading&lt;/div&gt;&lt;div&gt;and trailing blanks and is equivalent to TRIM(LEFT(STRING2)) ||&lt;/div&gt;&lt;div&gt;TRIM(LEFT(STRING4). The CATT function, trims only trailing blanks. The last two&lt;/div&gt;&lt;div&gt;statements use the CATX function, which removes leading and trailing blanks. It is just like&lt;/div&gt;&lt;div&gt;the CATS function but adds one or more separator characters (specified as the first&lt;/div&gt;&lt;div&gt;argument), between each of the strings to be joined. Inspection of the listing below will help&lt;/div&gt;&lt;div&gt;make all this clear:&lt;/div&gt;&lt;div&gt;Listing of Data Set CAT_FUNCTIONS&lt;/div&gt;&lt;div&gt;STRING1 STRING2 STRING3 STRING4 JOIN1&lt;/div&gt;&lt;div&gt;ABC DEF GHI JKL DEF GHI&lt;/div&gt;&lt;div&gt;JOIN2 JOIN3 JOIN4 JOIN5&lt;/div&gt;&lt;div&gt;DEFJKL DEFABC ABC GHI GHI,JKL&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 61&lt;/div&gt;&lt;div&gt;Functions That Remove Blanks from Strings&lt;/div&gt;&lt;div&gt;There are times when you want to remove blanks from the beginning or end of a character&lt;/div&gt;&lt;div&gt;string. The two functions LEFT and RIGHT merely shift the characters to the beginning or&lt;/div&gt;&lt;div&gt;the end of the string, respectively. The TRIM, TRIMN, and STRIP functions are useful&lt;/div&gt;&lt;div&gt;when you want concatenate strings (although the new concatenation functions will do this&lt;/div&gt;&lt;div&gt;for you).&lt;/div&gt;&lt;div&gt;LEFT and RIGHT&lt;/div&gt;&lt;div&gt;These two functions left- or right-align text. Remember that the length of a character&lt;/div&gt;&lt;div&gt;variable will not change when you use these two functions. If there are leading blanks, the&lt;/div&gt;&lt;div&gt;LEFT function will shift the first non-blank character to the first position and move the extra&lt;/div&gt;&lt;div&gt;blanks to the end; if there are trailing blanks, the RIGHT function will shift the non-blank&lt;/div&gt;&lt;div&gt;text to the right and move the extra blanks to the left.&lt;/div&gt;&lt;div&gt;Function: LEFT&lt;/div&gt;&lt;div&gt;Purpose: To left-align text values. A subtle but important point: LEFT doesn't&lt;/div&gt;&lt;div&gt;"remove" the leading blanks; it moves them to the end of the string. Thus, it&lt;/div&gt;&lt;div&gt;doesn't change the storage length of the variable, even when you assign the&lt;/div&gt;&lt;div&gt;result of LEFT to a new variable. The LEFT function is particularly useful&lt;/div&gt;&lt;div&gt;if values were read with the $CHAR informat, which preserves leading&lt;/div&gt;&lt;div&gt;blanks. Note that the STRIP function removes both leading and trailing&lt;/div&gt;&lt;div&gt;blanks from a string.&lt;/div&gt;&lt;div&gt;Syntax: LEFT(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;In these examples STRING = " ABC"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;LEFT(STRING) "ABC "&lt;/div&gt;&lt;div&gt;LEFT(" 123 ") "123 "&lt;/div&gt;&lt;div&gt;62 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.28: Left-aligning text values from variables read with the&lt;/div&gt;&lt;div&gt;$CHAR informat&lt;/div&gt;&lt;div&gt;***Primary function: LEFT;&lt;/div&gt;&lt;div&gt;DATA LEAD_ON;&lt;/div&gt;&lt;div&gt;INPUT STRING $CHAR15.;&lt;/div&gt;&lt;div&gt;LEFT_STRING = LEFT(STRING);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABC&lt;/div&gt;&lt;div&gt;XYZ&lt;/div&gt;&lt;div&gt;Ron Cody&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=LEAD_ON NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set LEAD_ON";&lt;/div&gt;&lt;div&gt;FORMAT STRING LEFT_STRING $QUOTE17.;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;If you want to work with character values, you will usually want to remove any leading&lt;/div&gt;&lt;div&gt;blanks first. The $CHARw. informat differs from the $w. informat. $CHARw. maintains&lt;/div&gt;&lt;div&gt;leading blanks; $w. left-aligns the text. Programs involving character variables sometimes&lt;/div&gt;&lt;div&gt;fail to work properly because careful attention was not paid to either leading or trailing&lt;/div&gt;&lt;div&gt;blanks.&lt;/div&gt;&lt;div&gt;Notice the use of the $QUOTE format in the PRINT procedure. This format adds double&lt;/div&gt;&lt;div&gt;quotation marks around the character value. This is especially useful in debugging programs&lt;/div&gt;&lt;div&gt;involving character variables since it allows you to easily identify leading blanks in a&lt;/div&gt;&lt;div&gt;character value.&lt;/div&gt;&lt;div&gt;The listing of data set LEAD_ON is shown below. Notice that the original variable&lt;/div&gt;&lt;div&gt;STRING contains leading blanks. The length of LEFT_STRING is also 15.&lt;/div&gt;&lt;div&gt;Listing of Data Set LEAD_ON&lt;/div&gt;&lt;div&gt;STRING LEFT_STRING&lt;/div&gt;&lt;div&gt;"ABC" "ABC"&lt;/div&gt;&lt;div&gt;" XYZ" "XYZ"&lt;/div&gt;&lt;div&gt;" Ron Cody" "Ron Cody"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 63&lt;/div&gt;&lt;div&gt;Function: RIGHT&lt;/div&gt;&lt;div&gt;Purpose: To right-align a text string. Note that if the length of a character variable&lt;/div&gt;&lt;div&gt;has previously been defined and it contains trailing blanks, the RIGHT&lt;/div&gt;&lt;div&gt;function will move the characters to the end of the string and add the blanks&lt;/div&gt;&lt;div&gt;to the beginning so that the final length of the variable remains the same.&lt;/div&gt;&lt;div&gt;Syntax: right(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Example&lt;/div&gt;&lt;div&gt;In these examples STRING = "ABC "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;RIGHT(STRING) " ABC"&lt;/div&gt;&lt;div&gt;RIGHT(" 123 ") " 123"&lt;/div&gt;&lt;div&gt;Program 1.29: Right-aligning text values&lt;/div&gt;&lt;div&gt;***Primary function: RIGHT;&lt;/div&gt;&lt;div&gt;DATA RIGHT_ON;&lt;/div&gt;&lt;div&gt;INPUT STRING $CHAR10.;&lt;/div&gt;&lt;div&gt;RIGHT_STRING = RIGHT(STRING);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABC&lt;/div&gt;&lt;div&gt;123 456&lt;/div&gt;&lt;div&gt;Ron Cody&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=RIGHT_ON NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set RIGHT_ON";&lt;/div&gt;&lt;div&gt;FORMAT STRING RIGNT_STRING $QUOTE12.;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Data lines one and two both contain three leading blanks; lines one and three contain trailing&lt;/div&gt;&lt;div&gt;blanks.&lt;/div&gt;&lt;div&gt;64 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Notice the use of the $QUOTE format in the PRINT procedure. This format adds double&lt;/div&gt;&lt;div&gt;quotation marks around the character value. This is especially useful in debugging programs&lt;/div&gt;&lt;div&gt;involving character variables since it allows you to easily identify leading blanks in a&lt;/div&gt;&lt;div&gt;character value.&lt;/div&gt;&lt;div&gt;Notice in the listing below, that the values are right-aligned and that blanks are moved to the&lt;/div&gt;&lt;div&gt;beginning of the string:&lt;/div&gt;&lt;div&gt;Listing of Data Set RIGHT_ON&lt;/div&gt;&lt;div&gt;STRING RIGHT_STRING&lt;/div&gt;&lt;div&gt;" ABC" " ABC"&lt;/div&gt;&lt;div&gt;" 123 456" " 123 456"&lt;/div&gt;&lt;div&gt;"Ron Cody" " Ron Cody"&lt;/div&gt;&lt;div&gt;TRIM, TRIMN, and STRIP&lt;/div&gt;&lt;div&gt;This group of functions trims trailing blanks (TRIM and TRIMN) and both leading and&lt;/div&gt;&lt;div&gt;trailing blanks (STRIP).&lt;/div&gt;&lt;div&gt;The two functions TRIM and TRIMN are similar: they both remove trailing blanks from a&lt;/div&gt;&lt;div&gt;string. The functions work identically except when the argument contains only blanks. In&lt;/div&gt;&lt;div&gt;that case, TRIM returns a single blank (length of 1) and TRIMN returns a null string with a&lt;/div&gt;&lt;div&gt;length of 0. The STRIP function removes both leading and trailing blanks.&lt;/div&gt;&lt;div&gt;Function: TRIM&lt;/div&gt;&lt;div&gt;Purpose: To remove trailing blanks from a character value. This is especially useful&lt;/div&gt;&lt;div&gt;when you want to concatenate several strings together and each string may&lt;/div&gt;&lt;div&gt;contain trailing blanks.&lt;/div&gt;&lt;div&gt;Syntax: TRIM(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 65&lt;/div&gt;&lt;div&gt;Important note: The length of the variable returned by the TRIM function will be the same&lt;/div&gt;&lt;div&gt;length as the argument, unless the length of this variable has been previously defined. If the&lt;/div&gt;&lt;div&gt;result of the TRIM function is assigned to a variable with a length longer than the trimmed&lt;/div&gt;&lt;div&gt;argument, the resulting variable will be padded with blanks.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING1 = "ABC " and STRING2 = " XYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;TRIM(STRING1) "ABC"&lt;/div&gt;&lt;div&gt;TRIM(STRING2) " XYZ"&lt;/div&gt;&lt;div&gt;TRIM("A B C ") "A B C"&lt;/div&gt;&lt;div&gt;TRIM("A ") || TRIM("B ") "AB"&lt;/div&gt;&lt;div&gt;TRIM(" ") " " (length = 1)&lt;/div&gt;&lt;div&gt;Program 1.30: Creating a program to concatenate first, middle, and last&lt;/div&gt;&lt;div&gt;names into a single variable&lt;/div&gt;&lt;div&gt;***Primary function: TRIM;&lt;/div&gt;&lt;div&gt;DATA PUT_TOGETHER;&lt;/div&gt;&lt;div&gt;LENGTH NAME $ 45;&lt;/div&gt;&lt;div&gt;INFORMAT NAME1-NAME3 $15.;&lt;/div&gt;&lt;div&gt;INFILE DATALINES MISSOVER;&lt;/div&gt;&lt;div&gt;INPUT NAME1 NAME2 NAME3;&lt;/div&gt;&lt;div&gt;NAME = TRIM(NAME1) || ' ' || TRIM(NAME2) || ' ' || TRIM(NAME3);&lt;/div&gt;&lt;div&gt;WITHOUT = NAME1 || NAME2 || NAME3;&lt;/div&gt;&lt;div&gt;KEEP NAME WITHOUT;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Ronald Cody&lt;/div&gt;&lt;div&gt;Julia Child&lt;/div&gt;&lt;div&gt;Henry Ford&lt;/div&gt;&lt;div&gt;Lee Harvey Oswald&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=PUT_TOGETHER NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing Of Data Set PUT_TOGETHER";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;66 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Note that this program would be much simpler using the concatenation functions or call&lt;/div&gt;&lt;div&gt;routines. However, this method was used to demonstrate the TRIM function.&lt;/div&gt;&lt;div&gt;This program reads in three names, each up to 15 characters in length. Note the use of the&lt;/div&gt;&lt;div&gt;INFILE option MISSOVER. This options sets the value of NAME3 to missing when there&lt;/div&gt;&lt;div&gt;are only two names.&lt;/div&gt;&lt;div&gt;To put the names together, you use the concatenate operator (||). The TRIM function is used&lt;/div&gt;&lt;div&gt;to trim trailing blanks from each of the words (which are all 15 bytes in length), before&lt;/div&gt;&lt;div&gt;putting them together. Without the TRIM function, there are extra spaces between each of&lt;/div&gt;&lt;div&gt;the names (see the variable WITHOUT). The listing below demonstrates that the program&lt;/div&gt;&lt;div&gt;works as desired.&lt;/div&gt;&lt;div&gt;Listing Of Data Set PUT_TOGETHER&lt;/div&gt;&lt;div&gt;NAME WITHOUT&lt;/div&gt;&lt;div&gt;Ronald Cody Ronald Cody&lt;/div&gt;&lt;div&gt;Julia Child Julia Child&lt;/div&gt;&lt;div&gt;Henry Ford Henry Ford&lt;/div&gt;&lt;div&gt;Lee Harvey Oswald Lee Harvey Oswald&lt;/div&gt;&lt;div&gt;Function: TRIMN&lt;/div&gt;&lt;div&gt;Purpose: To remove trailing blanks from a character value. This is especially useful&lt;/div&gt;&lt;div&gt;when you want to concatenate several strings together and each string may&lt;/div&gt;&lt;div&gt;contain trailing blanks. The difference between TRIM and TRIMN is that&lt;/div&gt;&lt;div&gt;the TRIM function returns a single blank for a blank string while TRIMN&lt;/div&gt;&lt;div&gt;returns a null string (zero blanks).&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 67&lt;/div&gt;&lt;div&gt;Syntax: TRIMN(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Important note: The length of the variable returned by the TRIMN function will be the&lt;/div&gt;&lt;div&gt;same length as the argument, unless the length of this variable has been previously defined.&lt;/div&gt;&lt;div&gt;If the result of the TRIMN function is assigned to a variable with a length longer than the&lt;/div&gt;&lt;div&gt;trimmed argument, the resulting variable will be padded with blanks.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING1 = "ABC " and STRING2 = " XYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;TRIMN(STRING1) "ABC"&lt;/div&gt;&lt;div&gt;TRIMN(STRING2) " XYZ"&lt;/div&gt;&lt;div&gt;TRIMN("A B C ") "A B C"&lt;/div&gt;&lt;div&gt;TRIMN("A ") || TRIM("B ") "AB"&lt;/div&gt;&lt;div&gt;TRIMN(" ") "" (length = 0)&lt;/div&gt;&lt;div&gt;Program 1.31: Demonstrating the difference between the TRIM and TRIMN&lt;/div&gt;&lt;div&gt;functions&lt;/div&gt;&lt;div&gt;***Primary functions: TRIM, TRIMN, and LENGTHC&lt;/div&gt;&lt;div&gt;***Other function: COMPRESS;&lt;/div&gt;&lt;div&gt;DATA ALL_THE_TRIMMINGS;&lt;/div&gt;&lt;div&gt;A = "AAA";&lt;/div&gt;&lt;div&gt;B = "BBB";&lt;/div&gt;&lt;div&gt;LENGTH_AB = LENGTHC(A || B);&lt;/div&gt;&lt;div&gt;LENGTH_AB_TRIM = LENGTHC(TRIM(A) || TRIM(B));&lt;/div&gt;&lt;div&gt;LENGTH_AB_TRIMN = LENGTHC(TRIMN(A) || TRIMN(B));&lt;/div&gt;&lt;div&gt;LENGTH_NULL = LENGTHC(COMPRESS(A,"A") || COMPRESS(B, "B"));&lt;/div&gt;&lt;div&gt;LENGTH_NULL_TRIM = LENGTHC(TRIM(COMPRESS(A,"A")) ||&lt;/div&gt;&lt;div&gt;TRIM(COMPRESS(B,"B")));&lt;/div&gt;&lt;div&gt;LENGTH_NULL_TRIMN = LENGTHC(TRIMN(COMPRESS(A,"A")) ||&lt;/div&gt;&lt;div&gt;TRIMN(COMPRESS(B,"B")));&lt;/div&gt;&lt;div&gt;PUT A= B= /&lt;/div&gt;&lt;div&gt;LENGTH_AB= LENGTH_AB_TRIM= LENGTH_AB_TRIMN= /&lt;/div&gt;&lt;div&gt;LENGTH_NULL= LENGTH_NULL_TRIM= LENGTH_NULL_TRIMN=;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;68 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;First, remember that the LENGTHC function returns the length of its argument, including&lt;/div&gt;&lt;div&gt;trailing blanks. As the listing from the SAS log (below) shows, the two functions TRIM and&lt;/div&gt;&lt;div&gt;TRIMN yield identical results when there are no null strings involved. When you compress&lt;/div&gt;&lt;div&gt;an 'A' from the variable A, or 'B' from variable B, the result is null. Notice that when you&lt;/div&gt;&lt;div&gt;trim these compressed values and concatenate the results, the length is 2 (1 + 1); when you&lt;/div&gt;&lt;div&gt;use the TRIMN function, the length is 0. Here are the lines written to the SAS log:&lt;/div&gt;&lt;div&gt;A=AAA B=BBB&lt;/div&gt;&lt;div&gt;LENGTH_AB=6 LENGTH_AB_TRIM=6 LENGTH_AB_TRIMN=6&lt;/div&gt;&lt;div&gt;LENGTH_NULL=0 LENGTH_NULL_TRIM=2 LENGTH_NULL_TRIMN=0&lt;/div&gt;&lt;div&gt;Function: STRIP&lt;/div&gt;&lt;div&gt;Purpose: To strip leading and trailing blanks from character variables or strings.&lt;/div&gt;&lt;div&gt;STRIP(CHAR) is equivalent to TRIMN(LEFT(CHAR)), but more&lt;/div&gt;&lt;div&gt;convenient.&lt;/div&gt;&lt;div&gt;Syntax: STRIP(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;If the STRIP function is used to create a new variable, the length of that new&lt;/div&gt;&lt;div&gt;variable will be equal to the length of the argument of the STRIP function.&lt;/div&gt;&lt;div&gt;If leading or trailing blanks were trimmed, trailing blanks will be added to&lt;/div&gt;&lt;div&gt;the result to pad out the length as necessary. The STRIP function is useful&lt;/div&gt;&lt;div&gt;when using the concatenation operator. However, note that there are several&lt;/div&gt;&lt;div&gt;new concatenation functions and call routines that also perform trimming&lt;/div&gt;&lt;div&gt;before concatenation.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, let STRING = " abc "&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 69&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;STRIP(STRING) "abc" (if result was previously&lt;/div&gt;&lt;div&gt;assigned a length of three, otherwise&lt;/div&gt;&lt;div&gt;trailing blanks would be added)&lt;/div&gt;&lt;div&gt;STRIP(" LEADING AND TRAILING ") "LEADING AND TRAILING"&lt;/div&gt;&lt;div&gt;Program 1.32: Using the STRIP function to strip both leading and trailing&lt;/div&gt;&lt;div&gt;blanks from a string&lt;/div&gt;&lt;div&gt;***Primary function: STRIP;&lt;/div&gt;&lt;div&gt;DATA _NULL_;&lt;/div&gt;&lt;div&gt;ONE = " ONE "; ***Note: three leading and trailing blanks;&lt;/div&gt;&lt;div&gt;TWO = " TWO "; ***Note: three leading and trailing blanks;&lt;/div&gt;&lt;div&gt;CAT_NO_STRIP = ":" || ONE || "-" || TWO || ":";&lt;/div&gt;&lt;div&gt;CAT_STRIP = ":" || STRIP(ONE) || "-" || STRIP(TWO) || ":";&lt;/div&gt;&lt;div&gt;PUT ONE= TWO= / CAT_NO_STRIP= / CAT_STRIP=;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Without the STRIP function, the leading and trailing blanks are maintained in the&lt;/div&gt;&lt;div&gt;concatenated string. The STRIP function, as advertised, removed the leading and trailing&lt;/div&gt;&lt;div&gt;blanks. The following lines were written to the SAS log:&lt;/div&gt;&lt;div&gt;ONE=ONE TWO=TWO&lt;/div&gt;&lt;div&gt;CAT_NO_STRIP=: ONE - TWO :&lt;/div&gt;&lt;div&gt;CAT_STRIP=:ONE-TWO:&lt;/div&gt;&lt;div&gt;70 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Functions That Compare Strings (Exact and "Fuzzy"&lt;/div&gt;&lt;div&gt;Comparisons)&lt;/div&gt;&lt;div&gt;Functions in this section allow you to compare strings that are exactly alike (similar except&lt;/div&gt;&lt;div&gt;for case) or close (not exact matches). Programmers find this latter group of functions useful&lt;/div&gt;&lt;div&gt;in matching names that may be spelled differently in separate files.&lt;/div&gt;&lt;div&gt;Function: COMPARE&lt;/div&gt;&lt;div&gt;Purpose: To compare two character strings. When used with one or more modifiers,&lt;/div&gt;&lt;div&gt;this function can ignore case, remove leading blanks, truncate the longer&lt;/div&gt;&lt;div&gt;string to the length of the shorter string, and strip quotation marks from SAS&lt;/div&gt;&lt;div&gt;n-literals. While all of these tasks can be accomplished with a variety of&lt;/div&gt;&lt;div&gt;SAS functions, use of the COMPARE function can simplify character&lt;/div&gt;&lt;div&gt;comparisons.&lt;/div&gt;&lt;div&gt;Syntax: COMPARE(string-1, string-2 &lt;,'modifiers'&gt;)&lt;/div&gt;&lt;div&gt;string-1 is any SAS character expression.&lt;/div&gt;&lt;div&gt;string-2 is any SAS character expression.&lt;/div&gt;&lt;div&gt;modifiers are one or more modifiers, placed in single or double&lt;/div&gt;&lt;div&gt;quotation marks as follows:&lt;/div&gt;&lt;div&gt;i or I ignore case.&lt;/div&gt;&lt;div&gt;l or L remove leading blanks.&lt;/div&gt;&lt;div&gt;n or N remove quotation marks from any argument that is&lt;/div&gt;&lt;div&gt;an n-literal and ignore case.&lt;/div&gt;&lt;div&gt;An n-literal is a string in quotation marks, followed&lt;/div&gt;&lt;div&gt;by an 'n', useful for non-valid SAS names.&lt;/div&gt;&lt;div&gt;: (colon) truncate the longer string to the length of the shorter&lt;/div&gt;&lt;div&gt;string.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 71&lt;/div&gt;&lt;div&gt;Note that the default is to pad the shorter string with blanks before&lt;/div&gt;&lt;div&gt;a comparison; this is similar to the =: comparison operator.&lt;/div&gt;&lt;div&gt;Note that the order of the modifiers is important. See the examples below.&lt;/div&gt;&lt;div&gt;The function returns a 0 when the two strings match (after any modifiers are applied). If the&lt;/div&gt;&lt;div&gt;two strings differ, a non-zero result is returned. The returned value is negative if string-&lt;/div&gt;&lt;div&gt;1 comes before string-2 in a sort sequence, positive otherwise. The magnitude of this&lt;/div&gt;&lt;div&gt;value is the position of the first difference in the two strings.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, string1 = "AbC", string2 = " ABC",&lt;/div&gt;&lt;div&gt;string3 = " 'ABC'n", string4 = "ABCXYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;COMPARE(string1,string4) 2 ("B" comes before "b")&lt;/div&gt;&lt;div&gt;COMPARE(string4,string1) -2&lt;/div&gt;&lt;div&gt;COMPARE(string1,string2,'i') 1&lt;/div&gt;&lt;div&gt;COMPARE(string1,string4,':I') 0&lt;/div&gt;&lt;div&gt;COMPARE(string1,string3,'nl') 4&lt;/div&gt;&lt;div&gt;COMPARE(string1,string3,'ln') 1&lt;/div&gt;&lt;div&gt;Program 1.33: Comparing two strings using the COMPARE function&lt;/div&gt;&lt;div&gt;***Primary function: COMPARE&lt;/div&gt;&lt;div&gt;***Other function: UPCASE;&lt;/div&gt;&lt;div&gt;DATA COMPARE;&lt;/div&gt;&lt;div&gt;INPUT @1 STRING1 $CHAR3.&lt;/div&gt;&lt;div&gt;@5 STRING2 $CHAR10.;&lt;/div&gt;&lt;div&gt;IF UPCASE(STRING1) = UPCASE(STRING2) THEN EQUAL = 'YES';&lt;/div&gt;&lt;div&gt;ELSE EQUAL = 'NO';&lt;/div&gt;&lt;div&gt;IF UPCASE(STRING1) =: UPCASE(STRING2) THEN COLON = 'YES';&lt;/div&gt;&lt;div&gt;ELSE COLON = 'NO';&lt;/div&gt;&lt;div&gt;COMPARE = COMPARE(STRING1,STRING2);&lt;/div&gt;&lt;div&gt;COMPARE_IL = COMPARE(STRING1,STRING2,'IL');&lt;/div&gt;&lt;div&gt;COMPARE_IL_COLON = COMPARE(STRING1,STRING2,'IL:');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;72 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Abc ABC&lt;/div&gt;&lt;div&gt;abc ABCDEFGH&lt;/div&gt;&lt;div&gt;123 311&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=COMPARE NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set COMPARE";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The first two variables, EQUAL and COLON, use the UPCASE function to convert all the&lt;/div&gt;&lt;div&gt;characters to uppercase before the comparison is made. The colon modifier following the&lt;/div&gt;&lt;div&gt;equal sign (the variable COLON) is an instruction to truncate the longer variable to the&lt;/div&gt;&lt;div&gt;length of the shorter variable before a comparison is made. Be careful here. If the variable&lt;/div&gt;&lt;div&gt;STRING1 had been read with a $CHAR10. informat, the =: comparison operator would not&lt;/div&gt;&lt;div&gt;have produced a match. The length truncation is done on the storage length of the variable,&lt;/div&gt;&lt;div&gt;which may include trailing blanks.&lt;/div&gt;&lt;div&gt;The three COMPARE functions demonstrate the coding efficiency of using this function&lt;/div&gt;&lt;div&gt;with its many modifiers. Use of this function without modifiers gives you no advantage over&lt;/div&gt;&lt;div&gt;a simple test of equality using an equal sign. Using the IL and colon modifiers allows you to&lt;/div&gt;&lt;div&gt;compare the two strings, ignoring case, removing leading blanks, and truncating the two&lt;/div&gt;&lt;div&gt;strings to a length of 3 (the length of STRING1). Note the value of&lt;/div&gt;&lt;div&gt;COMPARE_IL_COLON in the third observation is –1 since "1" comes before "3" in the&lt;/div&gt;&lt;div&gt;ASCII collating sequence. The output from PROC PRINT is shown below:&lt;/div&gt;&lt;div&gt;Listing of Data Set COMPARE&lt;/div&gt;&lt;div&gt;COMPARE_ COMPARE_&lt;/div&gt;&lt;div&gt;STRING1 STRING2 EQUAL COLON COMPARE IL IL_COLON&lt;/div&gt;&lt;div&gt;Abc ABC NO NO 1 0 0&lt;/div&gt;&lt;div&gt;abc ABCDEFGH NO YES 1 -4 0&lt;/div&gt;&lt;div&gt;123 311 NO NO -1 -1 -1&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 73&lt;/div&gt;&lt;div&gt;CALL COMPCOST, COMPGED, and COMPLEV&lt;/div&gt;&lt;div&gt;The two functions, COMPGED and COMPLEV, are both used to determine the similarity&lt;/div&gt;&lt;div&gt;between two strings. The COMPCOST call routine allows you to customize the scoring&lt;/div&gt;&lt;div&gt;system when you are using the COMPGED function.&lt;/div&gt;&lt;div&gt;COMPGED computes a quantity called generalized edit distance, which is useful in&lt;/div&gt;&lt;div&gt;matching names that are not spelled exactly the same. The larger the value, the more&lt;/div&gt;&lt;div&gt;dissimilar the two strings. COMPLEV performs a similar function but uses a method called&lt;/div&gt;&lt;div&gt;the Levenshtein edit distance. It is more efficient than the generalized edit distance, but&lt;/div&gt;&lt;div&gt;may not be as useful in name matching. See the SPEDIS function for a discussion of fuzzy&lt;/div&gt;&lt;div&gt;merging and for detailed programming examples.&lt;/div&gt;&lt;div&gt;Function: CALL COMPCOST&lt;/div&gt;&lt;div&gt;Purpose: To determine the similarity between two strings, using a method called the&lt;/div&gt;&lt;div&gt;generalized edit distance. The cost is computed based on the difference&lt;/div&gt;&lt;div&gt;between the two strings. For example, replacing one letter with another is&lt;/div&gt;&lt;div&gt;assigned one cost and reversing two letters can be assigned another cost.&lt;/div&gt;&lt;div&gt;Since there is a default cost associated with every operation used by&lt;/div&gt;&lt;div&gt;COMPGED, you can use that function without using COMPCOST at all.&lt;/div&gt;&lt;div&gt;You need to call this function only once in a DATA step. Since this is a&lt;/div&gt;&lt;div&gt;very advanced and complicated routine, only a few examples of its use will&lt;/div&gt;&lt;div&gt;be explained. See the SAS OnlineDoc 9.1 for a complete list of operations&lt;/div&gt;&lt;div&gt;and costs.&lt;/div&gt;&lt;div&gt;Syntax: CALL COMPCOST('operation-1', cost-1 &lt;,'operation-&lt;/div&gt;&lt;div&gt;2', cost-2 ...&gt;)&lt;/div&gt;&lt;div&gt;operation is a keyword, placed in quotation marks. A few keywords&lt;/div&gt;&lt;div&gt;are listed here for explanation purposes, but see the SAS OnlineDoc 9.1&lt;/div&gt;&lt;div&gt;documentation for a complete list of operations:&lt;/div&gt;&lt;div&gt;Partial List of Operations&lt;/div&gt;&lt;div&gt;DELETE=&lt;/div&gt;&lt;div&gt;REPLACE=&lt;/div&gt;&lt;div&gt;SWAP=&lt;/div&gt;&lt;div&gt;TRUNCATE=&lt;/div&gt;&lt;div&gt;74 SAS Functions by Example&lt;/div&gt;&lt;div&gt;cost is a value associated with the operation. Valid values for cost range&lt;/div&gt;&lt;div&gt;from –32,767 to +32,767.&lt;/div&gt;&lt;div&gt;Note: The wording of arguments in this book might differ from the wording&lt;/div&gt;&lt;div&gt;of arguments in the SAS OnlineDoc 9.1.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;CALL COMPCOST('REPLACE=', 100, 'SWAP=', 200);&lt;/div&gt;&lt;div&gt;CALL COMPCOST('SWAP=', 150);&lt;/div&gt;&lt;div&gt;Note: Operation can be upper- or lowercase&lt;/div&gt;&lt;div&gt;To see how CALL COMPCOST and COMPGED are used together, see Program 1.36.&lt;/div&gt;&lt;div&gt;Function: COMPGED&lt;/div&gt;&lt;div&gt;Purpose: To compute the similarity between two strings, using a method called the&lt;/div&gt;&lt;div&gt;generalized edit distance. See SPEDIS for a discussion of the possible uses&lt;/div&gt;&lt;div&gt;of this function.&lt;/div&gt;&lt;div&gt;This function can be used in conjunction with CALL COMPCOST if you&lt;/div&gt;&lt;div&gt;want to alter the default costs for each type of spelling error.&lt;/div&gt;&lt;div&gt;Syntax: COMPGED(string-1, string-2 &lt;,maxcost&gt;&lt;/div&gt;&lt;div&gt;&lt;,'modifiers'&gt;)&lt;/div&gt;&lt;div&gt;string-1 is any SAS character expression.&lt;/div&gt;&lt;div&gt;string-2 is any SAS character expression.&lt;/div&gt;&lt;div&gt;maxcost, if specified, is the maximum cost that will be returned by the&lt;/div&gt;&lt;div&gt;COMPLEV function. If the cost computation results in a value larger than&lt;/div&gt;&lt;div&gt;maxcost, the value of maxcost will be returned.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 75&lt;/div&gt;&lt;div&gt;modifiers placed in single or double quotation marks as follows:&lt;/div&gt;&lt;div&gt;i or I ignore case.&lt;/div&gt;&lt;div&gt;l or L remove leading blanks.&lt;/div&gt;&lt;div&gt;n or N remove quotation marks from any argument that is&lt;/div&gt;&lt;div&gt;an n-literal and ignore case.&lt;/div&gt;&lt;div&gt;An n-literal is a string in quotation marks, followed&lt;/div&gt;&lt;div&gt;by an 'n', useful for non-valid SAS names.&lt;/div&gt;&lt;div&gt;: (colon) truncate the longer string to the length of the shorter&lt;/div&gt;&lt;div&gt;string.&lt;/div&gt;&lt;div&gt;Note: If multiple modifiers are used, the order of the modifiers is important.&lt;/div&gt;&lt;div&gt;They are applied in the same order as they appear.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;String1 String2 Function Returns&lt;/div&gt;&lt;div&gt;SAME SAME COMPGED(STRING1, STRING2) 0&lt;/div&gt;&lt;div&gt;case CASE COMPGED(STRING1, STRING2) 500&lt;/div&gt;&lt;div&gt;case CASE COMPGED(STRING1,STRING2,'I') 0&lt;/div&gt;&lt;div&gt;case CASE COMPGED(STRING1, STRING2, 999, 'I') 0&lt;/div&gt;&lt;div&gt;Ron Run COMPGED(STRING1, STRING2) 100&lt;/div&gt;&lt;div&gt;Program 1.34: Using the COMPGED function with a SAS n-literal&lt;/div&gt;&lt;div&gt;***Primary function: COMPGED;&lt;/div&gt;&lt;div&gt;OPTIONS VALIDVARNAME=ANY;&lt;/div&gt;&lt;div&gt;DATA N_LITERAL;&lt;/div&gt;&lt;div&gt;STRING1 = "'INVALID#'N";&lt;/div&gt;&lt;div&gt;STRING2 = 'INVALID';&lt;/div&gt;&lt;div&gt;COMP1 = COMPGED(STRING1,STRING2);&lt;/div&gt;&lt;div&gt;COMP2 = COMPGED(STRING1,STRING2,'N:');&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;76 SAS Functions by Example&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=N_LITERAL NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set N_LITERAL";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program demonstrates the use of the COMPGED function with a SAS n-literal.&lt;/div&gt;&lt;div&gt;Starting with Version 7, SAS variable names could contain characters not normally allowed&lt;/div&gt;&lt;div&gt;in SAS names. The system option VALIDVARNAME is set to "ANY" and the name is&lt;/div&gt;&lt;div&gt;placed in quotation marks, followed by the letter N. Using the N modifier (which strips&lt;/div&gt;&lt;div&gt;quotation marks and the 'n' from the string) and the colon modifier (which truncates the&lt;/div&gt;&lt;div&gt;longer string to the length of the shorter string) results in a value of 0 for the variable&lt;/div&gt;&lt;div&gt;COMP2. See the listing below:&lt;/div&gt;&lt;div&gt;Listing of Data Set N_LITERAL&lt;/div&gt;&lt;div&gt;STRING1 STRING2 COMP1 COMP2&lt;/div&gt;&lt;div&gt;'INVALID#'N INVALID 310 0&lt;/div&gt;&lt;div&gt;Function: COMPLEV&lt;/div&gt;&lt;div&gt;Purpose: To compute the similarity between two strings, using a method called the&lt;/div&gt;&lt;div&gt;Levenshtein edit distance. It is similar to the COMPGED function except&lt;/div&gt;&lt;div&gt;that it uses less computer resources but may not do as good a job of&lt;/div&gt;&lt;div&gt;matching misspelled names.&lt;/div&gt;&lt;div&gt;Syntax: COMPLEV(string-1, string-2 &lt;,maxcost&gt;&lt;/div&gt;&lt;div&gt;&lt;,'modifiers'&gt;)&lt;/div&gt;&lt;div&gt;string-1 is any SAS character expression.&lt;/div&gt;&lt;div&gt;string-2 is any SAS character expression.&lt;/div&gt;&lt;div&gt;maxcost, if specified, is the maximum cost that will be returned by the&lt;/div&gt;&lt;div&gt;COMPGED function. If the cost computation results in a value larger than&lt;/div&gt;&lt;div&gt;maxcost, the value of maxcost will be returned.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 77&lt;/div&gt;&lt;div&gt;modifiers (placed in single or double quotation marks)&lt;/div&gt;&lt;div&gt;i or I ignore case.&lt;/div&gt;&lt;div&gt;l or L remove leading blanks.&lt;/div&gt;&lt;div&gt;n or N remove quotation marks from any argument that is&lt;/div&gt;&lt;div&gt;an n-literal and ignore case.&lt;/div&gt;&lt;div&gt;An n-literal is a string in quotation marks, followed&lt;/div&gt;&lt;div&gt;by an 'n', that is useful for non-valid SAS names.&lt;/div&gt;&lt;div&gt;:(colon) truncate the longer string to the length of the shorter&lt;/div&gt;&lt;div&gt;string.&lt;/div&gt;&lt;div&gt;Note: If multiple modifiers are used, the order of the modifiers is important.&lt;/div&gt;&lt;div&gt;They are applied in the same order as they appear.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;String1 String2 Function Returns&lt;/div&gt;&lt;div&gt;SAME SAME COMPLEV(STRING1, STRING2) 0&lt;/div&gt;&lt;div&gt;case CASE COMPLEV(STRING1, STRING2) 4&lt;/div&gt;&lt;div&gt;case CASE COMPLEV(STRING1,STRING2,'I') 0&lt;/div&gt;&lt;div&gt;case CASE COMPLEV(STRING1, STRING2, 999, 'I') 0&lt;/div&gt;&lt;div&gt;Ron Run COMPLEV(STRING1, STRING2) 1&lt;/div&gt;&lt;div&gt;78 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.35: Demonstration of the generalized edit distance (COMPGED)&lt;/div&gt;&lt;div&gt;and Levenshtein edit distance (COMPLEV) functions&lt;/div&gt;&lt;div&gt;***Primary functions: COMPGED and COMPLEV;&lt;/div&gt;&lt;div&gt;DATA _NULL_;&lt;/div&gt;&lt;div&gt;INPUT @1 STRING1 $CHAR10.&lt;/div&gt;&lt;div&gt;@11 STRING2 $CHAR10.;&lt;/div&gt;&lt;div&gt;PUT "Function COMPGED";&lt;/div&gt;&lt;div&gt;DISTANCE = COMPGED(STRING1, STRING2);&lt;/div&gt;&lt;div&gt;IGNORE_CASE = COMPGED(STRING1, STRING2, 'I');&lt;/div&gt;&lt;div&gt;LEAD_BLANKS = COMPGED(STRING1, STRING2, 'L');&lt;/div&gt;&lt;div&gt;CASE_TRUNC = COMPGED(STRING1, STRING2, ':I');&lt;/div&gt;&lt;div&gt;MAX = COMPGED(STRING1, STRING2, 250);&lt;/div&gt;&lt;div&gt;PUT STRING1= STRING2= /&lt;/div&gt;&lt;div&gt;DISTANCE= IGNORE_CASE= LEAD_BLANKS= CASE_TRUNC= MAX= /;&lt;/div&gt;&lt;div&gt;PUT "Function COMPLEV";&lt;/div&gt;&lt;div&gt;DISTANCE = COMPLEV(STRING1, STRING2);&lt;/div&gt;&lt;div&gt;IGNORE_CASE = COMPLEV(STRING1, STRING2, 'I');&lt;/div&gt;&lt;div&gt;LEAD_BLANKS = COMPLEV(STRING1, STRING2, 'L');&lt;/div&gt;&lt;div&gt;CASE_TRUNC = COMPLEV(STRING1, STRING2, ':I');&lt;/div&gt;&lt;div&gt;MAX = COMPLEV(STRING1, STRING2, 3);&lt;/div&gt;&lt;div&gt;PUT STRING1= STRING2= /&lt;/div&gt;&lt;div&gt;DISTANCE= IGNORE_CASE= LEAD_BLANKS= CASE_TRUNC= MAX= /;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;SAME SAME&lt;/div&gt;&lt;div&gt;cAsE case&lt;/div&gt;&lt;div&gt;Longer Long&lt;/div&gt;&lt;div&gt;abcdef xyz&lt;/div&gt;&lt;div&gt;lead lead&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this program, all the default costs were used, so it was not necessary to call COMPCOST.&lt;/div&gt;&lt;div&gt;Notice that the strings were read in with the $CHAR. informat so that leading blanks would&lt;/div&gt;&lt;div&gt;be preserved. If you wish to use modifiers, you must enter them in quotation marks, in the&lt;/div&gt;&lt;div&gt;order you want the modifying operations to proceed. Careful inspection of the SAS log&lt;/div&gt;&lt;div&gt;below demonstrates the COMPGED and COMPLEV functions and the effects of the&lt;/div&gt;&lt;div&gt;modifiers and the maxcost parameter.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 79&lt;/div&gt;&lt;div&gt;SAS Log from Program 1.35&lt;/div&gt;&lt;div&gt;Function COMPGED&lt;/div&gt;&lt;div&gt;STRING1=SAME STRING2=SAME&lt;/div&gt;&lt;div&gt;DISTANCE=0 IGNORE_CASE=0 LEAD_BLANKS=0 CASE_TRUNC=0 MAX=0&lt;/div&gt;&lt;div&gt;Function COMPLEV&lt;/div&gt;&lt;div&gt;STRING1=SAME STRING2=SAME&lt;/div&gt;&lt;div&gt;DISTANCE=0 IGNORE_CASE=0 LEAD_BLANKS=0 CASE_TRUNC=0 MAX=0&lt;/div&gt;&lt;div&gt;Function COMPGED&lt;/div&gt;&lt;div&gt;STRING1=cAsE STRING2=case&lt;/div&gt;&lt;div&gt;DISTANCE=200 IGNORE_CASE=0 LEAD_BLANKS=200 CASE_TRUNC=0 MAX=200&lt;/div&gt;&lt;div&gt;Function COMPLEV&lt;/div&gt;&lt;div&gt;STRING1=cAsE STRING2=case&lt;/div&gt;&lt;div&gt;DISTANCE=2 IGNORE_CASE=0 LEAD_BLANKS=2 CASE_TRUNC=0 MAX=2&lt;/div&gt;&lt;div&gt;Function COMPGED&lt;/div&gt;&lt;div&gt;STRING1=Longer STRING2=Long&lt;/div&gt;&lt;div&gt;DISTANCE=100 IGNORE_CASE=100 LEAD_BLANKS=100 CASE_TRUNC=100 MAX=100&lt;/div&gt;&lt;div&gt;Function COMPLEV&lt;/div&gt;&lt;div&gt;STRING1=Longer STRING2=Long&lt;/div&gt;&lt;div&gt;DISTANCE=2 IGNORE_CASE=2 LEAD_BLANKS=2 CASE_TRUNC=2 MAX=2&lt;/div&gt;&lt;div&gt;Function COMPGED&lt;/div&gt;&lt;div&gt;STRING1=abcdef STRING2=xyz&lt;/div&gt;&lt;div&gt;DISTANCE=550 IGNORE_CASE=550 LEAD_BLANKS=550 CASE_TRUNC=550 MAX=250&lt;/div&gt;&lt;div&gt;Function COMPLEV&lt;/div&gt;&lt;div&gt;STRING1=abcdef STRING2=xyz&lt;/div&gt;&lt;div&gt;DISTANCE=6 IGNORE_CASE=6 LEAD_BLANKS=6 CASE_TRUNC=6 MAX=3&lt;/div&gt;&lt;div&gt;Function COMPGED&lt;/div&gt;&lt;div&gt;STRING1=lead STRING2=lead&lt;/div&gt;&lt;div&gt;DISTANCE=320 IGNORE_CASE=320 LEAD_BLANKS=0 CASE_TRUNC=320 MAX=250&lt;/div&gt;&lt;div&gt;Function COMPLEV&lt;/div&gt;&lt;div&gt;STRING1=lead STRING2=lead&lt;/div&gt;&lt;div&gt;DISTANCE=3 IGNORE_CASE=3 LEAD_BLANKS=0 CASE_TRUNC=3 MAX=3&lt;/div&gt;&lt;div&gt;80 SAS Functions by Example&lt;/div&gt;&lt;div&gt;The program below demonstrates how to use CALL COMPCOST in combination with&lt;/div&gt;&lt;div&gt;COMPGED and the resulting differences.&lt;/div&gt;&lt;div&gt;Program 1.36: Changing the effect of the call to COMPCOST on the result&lt;/div&gt;&lt;div&gt;from COMPGED&lt;/div&gt;&lt;div&gt;***Primary functions: CALL COMPCOST and COMPGED;&lt;/div&gt;&lt;div&gt;DATA _NULL_;&lt;/div&gt;&lt;div&gt;TITLE "Program without Call to COMPCOST";&lt;/div&gt;&lt;div&gt;INPUT @1 STRING1 $CHAR10.&lt;/div&gt;&lt;div&gt;@11 STRING2 $CHAR10.;&lt;/div&gt;&lt;div&gt;DISTANCE = COMPGED(STRING1, STRING2);&lt;/div&gt;&lt;div&gt;PUT STRING1= STRING2= /&lt;/div&gt;&lt;div&gt;DISTANCE=;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Ron Run&lt;/div&gt;&lt;div&gt;ABC AB&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;DATA _NULL_;&lt;/div&gt;&lt;div&gt;TITLE "Program with Call to COMPCOST";&lt;/div&gt;&lt;div&gt;INPUT @1 STRING1 $CHAR10.&lt;/div&gt;&lt;div&gt;@11 STRING2 $CHAR10.;&lt;/div&gt;&lt;div&gt;IF _N_ = 1 THEN CALL COMPCOST('APPEND=',33);&lt;/div&gt;&lt;div&gt;DISTANCE = COMPGED(STRING1, STRING2);&lt;/div&gt;&lt;div&gt;PUT STRING1= STRING2= /&lt;/div&gt;&lt;div&gt;DISTANCE=;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Ron Run&lt;/div&gt;&lt;div&gt;ABC AB&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The first DATA _NULL_ program is a simple comparison of STRING1 to STRING2, using&lt;/div&gt;&lt;div&gt;the COMPGED function. The second DATA _NULL_ program makes a call to&lt;/div&gt;&lt;div&gt;COMPCOST (note the use of _N_= 1) before the COMPGED function is used. In the SAS&lt;/div&gt;&lt;div&gt;logs below, you can see that the distance in the second observation in the first program is 50,&lt;/div&gt;&lt;div&gt;while in the second program it is 33. That is the result of overriding the default value of 50&lt;/div&gt;&lt;div&gt;points for an appending error and setting it equal to 33.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 81&lt;/div&gt;&lt;div&gt;SAS Log from Program without CALL COMPCOST&lt;/div&gt;&lt;div&gt;STRING1=Ron STRING2=Run&lt;/div&gt;&lt;div&gt;DISTANCE=100&lt;/div&gt;&lt;div&gt;STRING1=ABC STRING2=AB&lt;/div&gt;&lt;div&gt;DISTANCE=50&lt;/div&gt;&lt;div&gt;SAS Log from Program with CALL COMPCOST&lt;/div&gt;&lt;div&gt;STRING1=Ron STRING2=Run&lt;/div&gt;&lt;div&gt;DISTANCE=100&lt;/div&gt;&lt;div&gt;STRING1=ABC STRING2=AB&lt;/div&gt;&lt;div&gt;DISTANCE=33&lt;/div&gt;&lt;div&gt;Function: SOUNDEX&lt;/div&gt;&lt;div&gt;The SOUNDEX function creates a phonetic equivalent of a text string to facilitate "fuzzy"&lt;/div&gt;&lt;div&gt;matching. You can research the details of the SOUNDEX algorithm in the SAS OnlineDoc&lt;/div&gt;&lt;div&gt;9.1. Briefly, this algorithm makes all vowels equal, along with letters that sound the same&lt;/div&gt;&lt;div&gt;(such as 'C' and 'K'). One feature of this algorithm is that the first letters in both words must&lt;/div&gt;&lt;div&gt;be the same to obtain a phonetic match. For those readers interested in the topic of fuzzy&lt;/div&gt;&lt;div&gt;matching, there is an algorithm called NYSIIS, similar to the SOUNDEX algorithm, that&lt;/div&gt;&lt;div&gt;maintains vowel position information and allows mismatches on the initial letter. A copy of&lt;/div&gt;&lt;div&gt;a macro to implement the NYSIIS algorithm is available on the companion Web site for this&lt;/div&gt;&lt;div&gt;book, located at support.sas.com/companionsites. In addition, see the COMPGED and&lt;/div&gt;&lt;div&gt;COMPLEV functions as well as the COMPCOST call routine for alternative matching&lt;/div&gt;&lt;div&gt;algorithms.&lt;/div&gt;&lt;div&gt;Purpose: To create a phonetic equivalent of a text string. Often used to attempt to&lt;/div&gt;&lt;div&gt;match names where there might be some minor spelling differences.&lt;/div&gt;&lt;div&gt;Syntax: SOUNDEX(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;82 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.37: Fuzzy matching on names using the SOUNDEX function&lt;/div&gt;&lt;div&gt;***Primary function: SOUNDEX&lt;/div&gt;&lt;div&gt;***Prepare data sets FILE_1 and FILE_2 to be used in the match;&lt;/div&gt;&lt;div&gt;DATA FILE_1;&lt;/div&gt;&lt;div&gt;INPUT @1 NAME $10.&lt;/div&gt;&lt;div&gt;@11 X 1.;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Friedman 4&lt;/div&gt;&lt;div&gt;Shields 1&lt;/div&gt;&lt;div&gt;MacArthur 7&lt;/div&gt;&lt;div&gt;ADAMS 9&lt;/div&gt;&lt;div&gt;Jose 5&lt;/div&gt;&lt;div&gt;Lundquist 9&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;DATA FILE_2;&lt;/div&gt;&lt;div&gt;INPUT @1 NAME $10.&lt;/div&gt;&lt;div&gt;@11 Y 1.;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Freedman 5&lt;/div&gt;&lt;div&gt;Freidman 9&lt;/div&gt;&lt;div&gt;Schields 2&lt;/div&gt;&lt;div&gt;McArthur 7&lt;/div&gt;&lt;div&gt;Adams 3&lt;/div&gt;&lt;div&gt;Jones 6&lt;/div&gt;&lt;div&gt;Londquest 9&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;***PROC SQL is used to create a Cartesian Product, combinations of all&lt;/div&gt;&lt;div&gt;the names in one data set against all the names in the other;&lt;/div&gt;&lt;div&gt;PROC SQL;&lt;/div&gt;&lt;div&gt;CREATE TABLE BOTH AS&lt;/div&gt;&lt;div&gt;SELECT FILE_1.NAME AS NAME1, X,&lt;/div&gt;&lt;div&gt;FILE_2.NAME AS NAME2, Y&lt;/div&gt;&lt;div&gt;FROM FILE_1 ,FILE_2&lt;/div&gt;&lt;div&gt;QUIT;&lt;/div&gt;&lt;div&gt;DATA POSSIBLE;&lt;/div&gt;&lt;div&gt;SET BOTH;&lt;/div&gt;&lt;div&gt;SOUND_1 = SOUNDEX(NAME1);&lt;/div&gt;&lt;div&gt;SOUND_2 = SOUNDEX(NAME2);&lt;/div&gt;&lt;div&gt;IF SOUND_1 EQ SOUND_2;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=POSSIBLE NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Possible Matches between two files";&lt;/div&gt;&lt;div&gt;VAR NAME1 SOUND_1 NAME2 SOUND_2 X Y;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 83&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Each of the two SAS data sets (FILE_1 and FILE_2) contain names and data. One of the&lt;/div&gt;&lt;div&gt;best ways to see which names may be possible matches is to use PROC SQL to create what&lt;/div&gt;&lt;div&gt;is called a Cartesian product of the two data sets. This is a data set (table in SQLese) that&lt;/div&gt;&lt;div&gt;matches each observation from FILE_1 to each observation from FILE_2. Since there are six&lt;/div&gt;&lt;div&gt;observations in FILE_1 and seven observations in FILE_2, data set BOTH contains 6 x 7 =&lt;/div&gt;&lt;div&gt;42 observations. To be sure this is clear, see the listing of the first 15 observations from data&lt;/div&gt;&lt;div&gt;set BOTH:&lt;/div&gt;&lt;div&gt;Listing of data set BOTH&lt;/div&gt;&lt;div&gt;First 15 Observations&lt;/div&gt;&lt;div&gt;Obs NAME1 X NAME2 Y&lt;/div&gt;&lt;div&gt;1 Friedman 4 Freedman 5&lt;/div&gt;&lt;div&gt;2 Friedman 4 Freidman 9&lt;/div&gt;&lt;div&gt;3 Friedman 4 Schields 2&lt;/div&gt;&lt;div&gt;4 Friedman 4 McArthur 7&lt;/div&gt;&lt;div&gt;5 Friedman 4 Adams 3&lt;/div&gt;&lt;div&gt;6 Friedman 4 Jones 6&lt;/div&gt;&lt;div&gt;7 Friedman 4 Londquest 9&lt;/div&gt;&lt;div&gt;8 Shields 1 Freedman 5&lt;/div&gt;&lt;div&gt;9 Shields 1 Freidman 9&lt;/div&gt;&lt;div&gt;10 Shields 1 Schields 2&lt;/div&gt;&lt;div&gt;11 Shields 1 McArthur 7&lt;/div&gt;&lt;div&gt;12 Shields 1 Adams 3&lt;/div&gt;&lt;div&gt;13 Shields 1 Jones 6&lt;/div&gt;&lt;div&gt;14 Shields 1 Londquest 9&lt;/div&gt;&lt;div&gt;15 MacArthur 7 Freedman 5&lt;/div&gt;&lt;div&gt;The next DATA step (the data set POSSIBLE) uses the SOUNDEX function to create a&lt;/div&gt;&lt;div&gt;SOUNDEX equivalent for each of the two names. The subsetting IF statement selects all&lt;/div&gt;&lt;div&gt;observations where the SOUNDEX values of NAME_1 and NAME_2 are the same. A&lt;/div&gt;&lt;div&gt;more flexible approach is shown in Program 1.39, where you can choose various values of&lt;/div&gt;&lt;div&gt;spelling distance in determining possible matches between two names.&lt;/div&gt;&lt;div&gt;84 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Possible Matches between two files&lt;/div&gt;&lt;div&gt;NAME1 SOUND_1 NAME2 SOUND_2 X Y&lt;/div&gt;&lt;div&gt;Friedman F6355 Freedman F6355 4 5&lt;/div&gt;&lt;div&gt;Friedman F6355 Freidman F6355 4 9&lt;/div&gt;&lt;div&gt;Shields S432 Schields S432 1 2&lt;/div&gt;&lt;div&gt;MacArthur M2636 McArthur M2636 7 7&lt;/div&gt;&lt;div&gt;ADAMS A352 Adams A352 9 3&lt;/div&gt;&lt;div&gt;Lundquist L53223 Londquest L53223 9 9&lt;/div&gt;&lt;div&gt;Function: SPEDIS&lt;/div&gt;&lt;div&gt;The SPEDIS function is a relatively new addition to the SAS arsenal of character functions.&lt;/div&gt;&lt;div&gt;It computes a "spelling distance" between two words. If the two words are identical, the&lt;/div&gt;&lt;div&gt;spelling distance is 0; for each type of spelling error, SPEDIS assigns penalty points. For&lt;/div&gt;&lt;div&gt;example, if the first letters of the two words do not match, there is a relatively large penalty.&lt;/div&gt;&lt;div&gt;If two letters are reversed (such as ie or ei for example), there is a smaller penalty. The final&lt;/div&gt;&lt;div&gt;spelling distance is also based on the length of the words being matched. A wrong letter in a&lt;/div&gt;&lt;div&gt;long word results in a smaller score than a wrong letter in a shorter word.&lt;/div&gt;&lt;div&gt;Take a look at two new functions (COMPGED and COMPLEV) that are similar to the&lt;/div&gt;&lt;div&gt;SPEDIS function. The COMPGED function even has an associated call routine&lt;/div&gt;&lt;div&gt;(COMPCOST) that allows you to adjust the costs for various classes of spelling errors.&lt;/div&gt;&lt;div&gt;There are some very interesting applications of the SPEDIS, COMPGED, and COMPLEV&lt;/div&gt;&lt;div&gt;functions. One, described next, allows you to match names that are not spelled exactly the&lt;/div&gt;&lt;div&gt;same. You may want to try this same program with each of the alternative functions to&lt;/div&gt;&lt;div&gt;compare matching ability and computer efficiency.&lt;/div&gt;&lt;div&gt;Purpose: To compute the spelling distance between two words. The more alike the&lt;/div&gt;&lt;div&gt;two words are, the lower the score. A score of 0 indicates an exact match.&lt;/div&gt;&lt;div&gt;Syntax: SPEDIS(word-1, word-2);&lt;/div&gt;&lt;div&gt;word-1 is any SAS character expression.&lt;/div&gt;&lt;div&gt;word-2 is any SAS character expression.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 85&lt;/div&gt;&lt;div&gt;The function returns the spelling distance between the two words. A zero indicates the&lt;/div&gt;&lt;div&gt;words are identical. Higher scores indicate the words are more dissimilar. Note that&lt;/div&gt;&lt;div&gt;SPEDIS is asymmetric—the order of the values being compared makes a difference. The&lt;/div&gt;&lt;div&gt;value returned by the function is computed as a percentage of the length of the string to be&lt;/div&gt;&lt;div&gt;compared. Thus, an error in two short words returns a larger value than the same error in&lt;/div&gt;&lt;div&gt;two longer words.&lt;/div&gt;&lt;div&gt;A list of the operations and their "cost" is shown in the table below. This will give you an&lt;/div&gt;&lt;div&gt;idea of the severity of different types of spelling errors. Swapping (interchanging) two&lt;/div&gt;&lt;div&gt;letters has a smaller penalty than inserting a letter, and errors involving the first character in&lt;/div&gt;&lt;div&gt;a string have a larger penalty than errors involving letters in the middle of the string.&lt;/div&gt;&lt;div&gt;Operation Cost Explanation&lt;/div&gt;&lt;div&gt;MATCH 0 no change&lt;/div&gt;&lt;div&gt;SINGLET 25 delete one of a double letter&lt;/div&gt;&lt;div&gt;DOUBLET 50 double a letter&lt;/div&gt;&lt;div&gt;SWAP 50 reverse the order of two consecutive&lt;/div&gt;&lt;div&gt;letters&lt;/div&gt;&lt;div&gt;TRUNCATE 50 delete a letter from the end&lt;/div&gt;&lt;div&gt;APPEND 35 add a letter to the end&lt;/div&gt;&lt;div&gt;DELETE 50 delete a letter from the middle&lt;/div&gt;&lt;div&gt;INSERT 100 insert a letter in the middle&lt;/div&gt;&lt;div&gt;REPLACE 100 replace a letter in the middle&lt;/div&gt;&lt;div&gt;FIRSTDEL 100 delete the first letter&lt;/div&gt;&lt;div&gt;FIRSTINS 200 insert a letter at the beginning&lt;/div&gt;&lt;div&gt;FIRSTREP 200 replace the first letter&lt;/div&gt;&lt;div&gt;86 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples WORD1="Steven" WORD2 = "Stephen" and WORD3 =&lt;/div&gt;&lt;div&gt;"STEVEN"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;SPEDIS(WORD1,WORD2) 25&lt;/div&gt;&lt;div&gt;SPEDIS(WORD2,WORD1) 28&lt;/div&gt;&lt;div&gt;SPEDIS(WORD1,WORD3) 83&lt;/div&gt;&lt;div&gt;SPEDIS(WORD1,"Steven") 0&lt;/div&gt;&lt;div&gt;Program 1.38: Using the SPEDIS function to match social security&lt;/div&gt;&lt;div&gt;numbers that are the same or differ by a small amount&lt;/div&gt;&lt;div&gt;***Primary function: SPEDIS;&lt;/div&gt;&lt;div&gt;DATA FIRST;&lt;/div&gt;&lt;div&gt;INPUT ID_1 : $2. SS : $11.;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;1A 123-45-6789&lt;/div&gt;&lt;div&gt;2A 111-45-7654&lt;/div&gt;&lt;div&gt;3A 999-99-9999&lt;/div&gt;&lt;div&gt;4A 222-33-4567&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;DATA SECOND;&lt;/div&gt;&lt;div&gt;INPUT ID_2 : $2. SS : $11.;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;1B 123-45-6789&lt;/div&gt;&lt;div&gt;2B 111-44-7654&lt;/div&gt;&lt;div&gt;3B 899-99-9999&lt;/div&gt;&lt;div&gt;4B 989-99-9999&lt;/div&gt;&lt;div&gt;5B 222-22-5467&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;%LET CUTOFF = 10;&lt;/div&gt;&lt;div&gt;PROC SQL;&lt;/div&gt;&lt;div&gt;TITLE "Output from SQL when CUTOFF is set to &amp;amp;CUTOFF";&lt;/div&gt;&lt;div&gt;SELECT ID_1,&lt;/div&gt;&lt;div&gt;FIRST.SS AS FIRST_SS,&lt;/div&gt;&lt;div&gt;ID_2,&lt;/div&gt;&lt;div&gt;SECOND.SS AS SECOND_SS&lt;/div&gt;&lt;div&gt;FROM FIRST, SECOND&lt;/div&gt;&lt;div&gt;WHERE SPEDIS(FIRST.SS, SECOND.SS) LE &amp;CUTOFF;&lt;/div&gt;&lt;div&gt;QUIT;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 87&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this example, you want to match social security numbers between two files, where the two&lt;/div&gt;&lt;div&gt;numbers may be slightly different (one digit changed or two digits transposed for example).&lt;/div&gt;&lt;div&gt;Even though social security numbers are made up of digits, you can treat the values just like&lt;/div&gt;&lt;div&gt;any other alphabetic characters. The program is first run with the cutoff value set to 10, with&lt;/div&gt;&lt;div&gt;the result shown next:&lt;/div&gt;&lt;div&gt;Output from SQL when CUTOFF is set to 10&lt;/div&gt;&lt;div&gt;ID_1 FIRST_SS ID_2 SECOND_SS&lt;/div&gt;&lt;div&gt;ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ&lt;/div&gt;&lt;div&gt;1A 123-45-6789 1B 123-45-6789&lt;/div&gt;&lt;div&gt;2A 111-45-7654 2B 111-44-7654&lt;/div&gt;&lt;div&gt;3A 999-99-9999 4B 989-99-9999&lt;/div&gt;&lt;div&gt;When you run the same program with the cutoff value set to 20, you obtain an additional&lt;/div&gt;&lt;div&gt;match—numbers 3A and 3B. These two numbers differ in the first digit, which resulted in a&lt;/div&gt;&lt;div&gt;larger penalty. Here is the listing with CUTOFF set to 20:&lt;/div&gt;&lt;div&gt;Output from SQL when CUTOFF is set to 20&lt;/div&gt;&lt;div&gt;ID_1 FIRST_SS ID_2 SECOND_SS&lt;/div&gt;&lt;div&gt;ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ&lt;/div&gt;&lt;div&gt;1A 123-45-6789 1B 123-45-6789&lt;/div&gt;&lt;div&gt;2A 111-45-7654 2B 111-44-7654&lt;/div&gt;&lt;div&gt;3A 999-99-9999 3B 899-99-9999&lt;/div&gt;&lt;div&gt;3A 999-99-9999 4B 989-99-9999&lt;/div&gt;&lt;div&gt;88 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.39: Fuzzy matching on names using the spelling distance&lt;/div&gt;&lt;div&gt;(SPEDIS) function&lt;/div&gt;&lt;div&gt;***Primary function: SPEDIS&lt;/div&gt;&lt;div&gt;***Other function: UPCASE;&lt;/div&gt;&lt;div&gt;***See Program 1-37 for the creation of data set BOTH and the&lt;/div&gt;&lt;div&gt;explanation of the PROC SQL code.;&lt;/div&gt;&lt;div&gt;DATA POSSIBLE;&lt;/div&gt;&lt;div&gt;SET BOTH;&lt;/div&gt;&lt;div&gt;DISTANCE = SPEDIS(UPCASE(NAME1),UPCASE(NAME2));&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=POSSIBLE NOOBS;&lt;/div&gt;&lt;div&gt;WHERE DISTANCE LE 15;&lt;/div&gt;&lt;div&gt;TITLE "Possible Matches between two files";&lt;/div&gt;&lt;div&gt;VAR NAME1 NAME2 DISTANCE X Y;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program starts at the point following PROC SQL in Program 1.37.&lt;/div&gt;&lt;div&gt;The next DATA step (data set POSSIBLE) uses the SPEDIS function to compute the&lt;/div&gt;&lt;div&gt;spelling distance between every pair of names in the data set BOTH. Notice that all the&lt;/div&gt;&lt;div&gt;names are converted to uppercase, using the UPCASE function, to avoid missing possible&lt;/div&gt;&lt;div&gt;matches because of case differences. (Note: the COMPGED and COMPLEV functions&lt;/div&gt;&lt;div&gt;allow a modifier to ignore case in the comparison.) You might want to add a subsetting IF&lt;/div&gt;&lt;div&gt;statement to this DATA step to limit pairs of names with a given spelling distance. For the&lt;/div&gt;&lt;div&gt;purpose of demonstration, this was not done here, and the WHERE statement in the&lt;/div&gt;&lt;div&gt;following PROC PRINT is used to select possible matches. The smaller the value of&lt;/div&gt;&lt;div&gt;DISTANCE, the closer the match. If DISTANCE equals 0, the two names are an exact&lt;/div&gt;&lt;div&gt;match. To see the results of all names within a spelling distance of 15, take a look at the&lt;/div&gt;&lt;div&gt;output from the PROC PRINT. As you can see from the listing below, this method of fuzzy&lt;/div&gt;&lt;div&gt;matching produces a different list of matches from the one produced using the SOUNDEX&lt;/div&gt;&lt;div&gt;function.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 89&lt;/div&gt;&lt;div&gt;Possible Matches between two files&lt;/div&gt;&lt;div&gt;NAME1 NAME2 DISTANCE X Y&lt;/div&gt;&lt;div&gt;Friedman Freedman 12 4 5&lt;/div&gt;&lt;div&gt;Friedman Freidman 6 4 9&lt;/div&gt;&lt;div&gt;Shields Schields 7 1 2&lt;/div&gt;&lt;div&gt;MacArthur McArthur 11 7 7&lt;/div&gt;&lt;div&gt;ADAMS Adams 0 9 3&lt;/div&gt;&lt;div&gt;Functions That Divide Strings into "Words"&lt;/div&gt;&lt;div&gt;These extremely useful functions and call routines can divide a string into words. Words&lt;/div&gt;&lt;div&gt;can be characters separated by blanks or other delimiters that you specify.&lt;/div&gt;&lt;div&gt;SCAN and SCANQ&lt;/div&gt;&lt;div&gt;The two functions, SCAN and SCANQ are similar. They both extract "words" from a string,&lt;/div&gt;&lt;div&gt;words being defined as characters separated by a set of specified delimiters. Pay particular&lt;/div&gt;&lt;div&gt;attention to the fact that the SCAN and SCANQ functions use different sets of default&lt;/div&gt;&lt;div&gt;delimiters. The SCANQ function also has some additional useful features. Programs&lt;/div&gt;&lt;div&gt;demonstrating both of these functions follow the definitions.&lt;/div&gt;&lt;div&gt;Function: SCAN&lt;/div&gt;&lt;div&gt;Purpose: Extracts a specified word from a character expression, where word is&lt;/div&gt;&lt;div&gt;defined as the characters separated by a set of specified delimiters. The&lt;/div&gt;&lt;div&gt;length of the returned variable is 200, unless previously defined.&lt;/div&gt;&lt;div&gt;Syntax: SCAN(character-value, n-word &lt;,'delimiter-list'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;n-word is the nth "word" in the string. If n is greater than the number of&lt;/div&gt;&lt;div&gt;words, the SCAN function returns a value that contains no characters. If n&lt;/div&gt;&lt;div&gt;is negative, the character value is scanned from right to left. A value of zero&lt;/div&gt;&lt;div&gt;is invalid.&lt;/div&gt;&lt;div&gt;90 SAS Functions by Example&lt;/div&gt;&lt;div&gt;delimiter-list is an optional argument. If it is omitted, the default&lt;/div&gt;&lt;div&gt;set of delimiters are (for ASCII environments):&lt;/div&gt;&lt;div&gt;blank . &lt; ( + &amp;amp; ! $ * ) ; ^ - / , % |&lt;/div&gt;&lt;div&gt;For EBCDIC environments, the default delimiters are:&lt;/div&gt;&lt;div&gt;blank . &lt; ( + | &amp;amp; ! $ * ) ; ¬ - / , % | ¢&lt;/div&gt;&lt;div&gt;If you specify any delimiters, only those delimiters will be active.&lt;/div&gt;&lt;div&gt;Delimiters before the first word have no effect. Two or more contiguous&lt;/div&gt;&lt;div&gt;delimiters are treated as one.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "ABC DEF" and&lt;/div&gt;&lt;div&gt;STRING2 = "ONE?TWO THREE+FOUR|FIVE" This is an ASCII example.&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;SCAN(STRING1,2) "DEF"&lt;/div&gt;&lt;div&gt;SCAN(STRING1,-1) "DEF"&lt;/div&gt;&lt;div&gt;SCAN(STRING1,3) no characters&lt;/div&gt;&lt;div&gt;SCAN(STRING2,4) "FIVE"&lt;/div&gt;&lt;div&gt;SCAN(STRING2,2," ") "THREE+FOUR|FIVE"&lt;/div&gt;&lt;div&gt;SCAN(STRING1,0) An error in the SAS log&lt;/div&gt;&lt;div&gt;Function: SCANQ&lt;/div&gt;&lt;div&gt;Purpose: To extract a specified word from a character expression, word being defined&lt;/div&gt;&lt;div&gt;as characters separated by a set of specified delimiters. The basic&lt;/div&gt;&lt;div&gt;differences between this function and the SCAN function are the default set&lt;/div&gt;&lt;div&gt;of delimiters (see syntax below) and the fact that a value of 0 for the word&lt;/div&gt;&lt;div&gt;count does not result in an error message. SCANQ also ignores delimiters&lt;/div&gt;&lt;div&gt;enclosed in quotation marks (SCAN recognizes them).&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 91&lt;/div&gt;&lt;div&gt;Syntax: SCANQ(character-value, n-word &lt;,'delimiter-list'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;n-word is the nth "word" in the string (word being defined as one or more&lt;/div&gt;&lt;div&gt;characters, separated by a set of specified delimiters. If n is negative, the&lt;/div&gt;&lt;div&gt;scan proceeds from right to left. If n is greater than the number of words or&lt;/div&gt;&lt;div&gt;0, the SCANQ function will return a blank value. Delimiters located before&lt;/div&gt;&lt;div&gt;the first word or after the last word are ignored. If two or more delimiters&lt;/div&gt;&lt;div&gt;are located between two words, they are treated as one. If the character&lt;/div&gt;&lt;div&gt;value contains sets of quotation marks, any delimiters within these marks&lt;/div&gt;&lt;div&gt;are ignored.&lt;/div&gt;&lt;div&gt;delimiter-list is an optional argument. If it is omitted, the default&lt;/div&gt;&lt;div&gt;set of delimiters are white space characters (blank, horizontal and vertical&lt;/div&gt;&lt;div&gt;tab, carriage return, line feed, and form feed). Note: this is a different set&lt;/div&gt;&lt;div&gt;of default delimiters from the SCAN function. If you specify any&lt;/div&gt;&lt;div&gt;delimiters, only those delimiters will be active. You cannot specify single&lt;/div&gt;&lt;div&gt;or double quotation marks as delimiters.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "ABC DEF", STRING2 = "ONE TWO THREE&lt;/div&gt;&lt;div&gt;FOUR FIVE", STRING3 = "'AB CD' 'X Y'", and STRING4 = "ONE#&lt;/div&gt;&lt;div&gt;::TWO"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;SCANQ(STRING1,2) "DEF"&lt;/div&gt;&lt;div&gt;SCANQ(STRING1,-1) "DEF"&lt;/div&gt;&lt;div&gt;SCANQ(STRING1,3) no characters&lt;/div&gt;&lt;div&gt;SCANQ(STRING2,4," ") "FOUR"&lt;/div&gt;&lt;div&gt;SCANQ(STRING3,2) "'X Y'"&lt;/div&gt;&lt;div&gt;SCANQ(STRING1,0) no characters&lt;/div&gt;&lt;div&gt;SCANQ(STRING4,2," #:") "TWO"&lt;/div&gt;&lt;div&gt;92 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.40: A novel use of the SCAN function to convert mixed&lt;/div&gt;&lt;div&gt;numbers to decimal values&lt;/div&gt;&lt;div&gt;***Primary function: SCAN&lt;/div&gt;&lt;div&gt;***Other function: INPUT;&lt;/div&gt;&lt;div&gt;DATA PRICES;&lt;/div&gt;&lt;div&gt;INPUT @1 STOCK $3.&lt;/div&gt;&lt;div&gt;@5 MIXED $6.;&lt;/div&gt;&lt;div&gt;INTEGER = SCAN(MIXED,1,'/ ');&lt;/div&gt;&lt;div&gt;NUMERATOR = SCAN(MIXED,2,'/ ');&lt;/div&gt;&lt;div&gt;DENOMINATOR = SCAN(MIXED,3,'/ ');&lt;/div&gt;&lt;div&gt;IF NUMERATOR = ' ' THEN VALUE = INPUT(INTEGER,8.);&lt;/div&gt;&lt;div&gt;ELSE VALUE = INPUT(INTEGER,8.) +&lt;/div&gt;&lt;div&gt;(INPUT(NUMERATOR,8.) / INPUT(DENOMINATOR,8.));&lt;/div&gt;&lt;div&gt;KEEP STOCK VALUE;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ABC 14 3/8&lt;/div&gt;&lt;div&gt;XYZ 8&lt;/div&gt;&lt;div&gt;TWW 5 1/8&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=PRICES NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set PRICES";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The SCAN function has many uses besides merely extracting selected words from text&lt;/div&gt;&lt;div&gt;expressions. In this program, you want to convert numbers such as 23 5/8 into a decimal&lt;/div&gt;&lt;div&gt;value (23.675). An elegant way to accomplish this is to use the SCAN function to separate&lt;/div&gt;&lt;div&gt;the mixed number into three parts: the integer, the numerator of the fraction, and the&lt;/div&gt;&lt;div&gt;denominator. Once this is done, all you need to do is to convert each piece to a numerical&lt;/div&gt;&lt;div&gt;value (using the INPUT function) and add the integer portion to the fractional portion. If the&lt;/div&gt;&lt;div&gt;number being processed does not have a fractional part, the SCAN function returns a blank&lt;/div&gt;&lt;div&gt;value for the two variables NUMERATOR and DENOMINATOR. The listing is shown&lt;/div&gt;&lt;div&gt;below:&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 93&lt;/div&gt;&lt;div&gt;Listing of Data Set PRICES&lt;/div&gt;&lt;div&gt;STOCK VALUE&lt;/div&gt;&lt;div&gt;ABC 14.375&lt;/div&gt;&lt;div&gt;XYZ 8.000&lt;/div&gt;&lt;div&gt;TWW 5.125&lt;/div&gt;&lt;div&gt;Program 1.41: Program to read a tab-delimited file&lt;/div&gt;&lt;div&gt;***Primary function: SCANQ;&lt;/div&gt;&lt;div&gt;DATA READ_TABS;&lt;/div&gt;&lt;div&gt;INFILE 'C:\BOOKS\FUNCTIONS\TAB_FILE.TXT' PAD;&lt;/div&gt;&lt;div&gt;INPUT @1 STRING $30.;&lt;/div&gt;&lt;div&gt;LENGTH FIRST MIDDLE LAST $ 12;&lt;/div&gt;&lt;div&gt;FIRST = SCANQ(STRING,1);&lt;/div&gt;&lt;div&gt;MIDDLE = SCANQ(STRING,2);&lt;/div&gt;&lt;div&gt;LAST = SCANQ(STRING,3);&lt;/div&gt;&lt;div&gt;DROP STRING;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=READ_TABS NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set READS_TABS";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program reads values separated by tab characters. Although you can use the INFILE&lt;/div&gt;&lt;div&gt;option DLM='09'X (the ASCII Hex value for a tab character, or '05'X for EBCDIC) to read&lt;/div&gt;&lt;div&gt;this file, the SCANQ function provides an easy, alternate method. Here you take advantage&lt;/div&gt;&lt;div&gt;of the fact that one of the default delimiters for the SCANQ function is a tab character. This&lt;/div&gt;&lt;div&gt;method could be especially useful if you imported a file from another system, and individual&lt;/div&gt;&lt;div&gt;character values contained tabs or other non-printing white space characters.&lt;/div&gt;&lt;div&gt;94 SAS Functions by Example&lt;/div&gt;&lt;div&gt;A listing of the resulting data set is shown next:&lt;/div&gt;&lt;div&gt;Listing of Data Set READS_TABS&lt;/div&gt;&lt;div&gt;FIRST MIDDLE LAST&lt;/div&gt;&lt;div&gt;Ron P. Cody&lt;/div&gt;&lt;div&gt;Ralph Waldo Emerson&lt;/div&gt;&lt;div&gt;Alfred E. Newman&lt;/div&gt;&lt;div&gt;Program 1.42: Alphabetical listing by last name when the name field&lt;/div&gt;&lt;div&gt;contains first name, possibly middle initial, and last name&lt;/div&gt;&lt;div&gt;***Primary function: SCAN;&lt;/div&gt;&lt;div&gt;***Making the problem a little harder. Extracting the last name&lt;/div&gt;&lt;div&gt;when there may or may not be a middle initial;&lt;/div&gt;&lt;div&gt;DATA FIRST_LAST;&lt;/div&gt;&lt;div&gt;INPUT @1 NAME $20.&lt;/div&gt;&lt;div&gt;@21 PHONE $13.;&lt;/div&gt;&lt;div&gt;***Extract the last name from NAME;&lt;/div&gt;&lt;div&gt;LAST_NAME = SCAN(NAME,-1,' '); /* Scans from the right */&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Jeff W. Snoker (908)782-4382&lt;/div&gt;&lt;div&gt;Raymond Albert (732)235-4444&lt;/div&gt;&lt;div&gt;Steven J. Foster (201)567-9876&lt;/div&gt;&lt;div&gt;Jose Romerez (516)593-2377&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC REPORT DATA=FIRST_LAST NOWD;&lt;/div&gt;&lt;div&gt;TITLE "Names and Phone Numbers in Alphabetical Order (by Last Name)";&lt;/div&gt;&lt;div&gt;COLUMNS NAME PHONE LAST_NAME;&lt;/div&gt;&lt;div&gt;DEFINE LAST_NAME / ORDER NOPRINT WIDTH=20;&lt;/div&gt;&lt;div&gt;DEFINE NAME / DISPLAY 'Name' LEFT WIDTH=20;&lt;/div&gt;&lt;div&gt;DEFINE PHONE / DISPLAY 'Phone Number' WIDTH=13 FORMAT=$13.;&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 95&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;It is easy to extract the last name by using a –1 as the second argument of the SCAN&lt;/div&gt;&lt;div&gt;function. A negative value for this argument results in a scan from right to left. Output from&lt;/div&gt;&lt;div&gt;the REPORT procedure is shown below:&lt;/div&gt;&lt;div&gt;Names and Phone Numbers in Alphabetical Order (by Last Name)&lt;/div&gt;&lt;div&gt;Name Phone Number&lt;/div&gt;&lt;div&gt;Raymond Albert (732)235-4444&lt;/div&gt;&lt;div&gt;Steven J. Foster (201)567-9876&lt;/div&gt;&lt;div&gt;Jose Romerez (516)593-2377&lt;/div&gt;&lt;div&gt;Jeff W. Snoker (908)782-4382&lt;/div&gt;&lt;div&gt;CALL SCAN and CALL SCANQ&lt;/div&gt;&lt;div&gt;The SCAN and SCANQ call routines are similar to the SCAN and SCANQ functions. But&lt;/div&gt;&lt;div&gt;both call routines return a position and length of the nth word (to be used, perhaps, in a&lt;/div&gt;&lt;div&gt;subsequent SUBSTR function) rather than the actual word itself.&lt;/div&gt;&lt;div&gt;Differences between CALL SCAN and CALL SCANQ are the same differences between the&lt;/div&gt;&lt;div&gt;two functions, SCAN and SCANQ.&lt;/div&gt;&lt;div&gt;Function: CALL SCAN&lt;/div&gt;&lt;div&gt;Purpose: To break up a string into words, where words are defined as the characters&lt;/div&gt;&lt;div&gt;separated by a set of specified delimiters, and to return the starting position&lt;/div&gt;&lt;div&gt;and the length of the nth word.&lt;/div&gt;&lt;div&gt;Syntax: CALL SCAN(character-value, n-word, position, length&lt;/div&gt;&lt;div&gt;&lt;,'delimiter-list'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;n-word is the nth "word" in the string. If n is greater than the number of&lt;/div&gt;&lt;div&gt;words, the SCAN call routine returns a value of 0 for position and&lt;/div&gt;&lt;div&gt;length. If n is negative, the scan proceeds from right to left.&lt;/div&gt;&lt;div&gt;96 SAS Functions by Example&lt;/div&gt;&lt;div&gt;position is the name of the numeric variable to which the starting&lt;/div&gt;&lt;div&gt;position in the character-value of the nth word is returned.&lt;/div&gt;&lt;div&gt;length is the name of a numeric variable to which the length of the nth&lt;/div&gt;&lt;div&gt;word is returned.&lt;/div&gt;&lt;div&gt;delimiter-list is an optional argument. If it is omitted, the default set&lt;/div&gt;&lt;div&gt;of delimiters are (for ASCII environments):&lt;/div&gt;&lt;div&gt;blank . &lt; ( + &amp;amp; ! $ * ) ; ^ - / , % |&lt;/div&gt;&lt;div&gt;For EBCDIC environments, the default delimiters are:&lt;/div&gt;&lt;div&gt;blank . &lt; ( + | &amp;amp; ! $ * ) ; ¬ - / , % | ¢&lt;/div&gt;&lt;div&gt;If you specify any delimiters, only those delimiters will be active.&lt;/div&gt;&lt;div&gt;Delimiters are slightly different in ASCII and EBCDIC systems.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "ABC DEF" and STRING2 = "ONE?TWO&lt;/div&gt;&lt;div&gt;THREE+FOUR|FIVE"&lt;/div&gt;&lt;div&gt;Function Position Length&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING1,2,POSITION,LENGTH) 5 3&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING1,-1,POSITION,LENGTH) 5 3&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING1,3,POSITION,LENGTH) 0 0&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING2,1,POSITION,LENGTH) 1 7&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING2,4,POSITION,LENGTH) 20 4&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING2,2,POSITION,LENGTH," ") 9 15&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING1,0,POSITION,LENGTH) missing missing&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 97&lt;/div&gt;&lt;div&gt;Program 1.43: Demonstrating the SCAN call routine&lt;/div&gt;&lt;div&gt;***Primary function: CALL SCAN;&lt;/div&gt;&lt;div&gt;DATA WORDS;&lt;/div&gt;&lt;div&gt;INPUT STRING $40.;&lt;/div&gt;&lt;div&gt;DELIM = 'Default';&lt;/div&gt;&lt;div&gt;N = 2;&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING,N,POSITION,LENGTH);&lt;/div&gt;&lt;div&gt;OUTPUT;&lt;/div&gt;&lt;div&gt;N = -1;&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING,N,POSITION,LENGTH);&lt;/div&gt;&lt;div&gt;OUTPUT;&lt;/div&gt;&lt;div&gt;DELIM = '#';&lt;/div&gt;&lt;div&gt;N = 2;&lt;/div&gt;&lt;div&gt;CALL SCAN(STRING,N,POSITION,LENGTH,'#');&lt;/div&gt;&lt;div&gt;OUTPUT;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ONE TWO THREE&lt;/div&gt;&lt;div&gt;One*#Two Three*Four&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=WORDS NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set WORDS";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The SCAN routine is called three times in this program, twice with default delimiters and&lt;/div&gt;&lt;div&gt;once with the pound sign (#) as the delimiter. Notice that using a negative argument results&lt;/div&gt;&lt;div&gt;in a scan from right to left. The output from this program is shown next:&lt;/div&gt;&lt;div&gt;Listing of Data Set WORDS&lt;/div&gt;&lt;div&gt;STRING DELIM N POSITION LENGTH&lt;/div&gt;&lt;div&gt;ONE TWO THREE Default 2 5 3&lt;/div&gt;&lt;div&gt;ONE TWO THREE Default -1 9 5&lt;/div&gt;&lt;div&gt;ONE TWO THREE # 2 0 0&lt;/div&gt;&lt;div&gt;One*#Two Three*Four Default 2 5 4&lt;/div&gt;&lt;div&gt;One*#Two Three*Four Default -1 16 4&lt;/div&gt;&lt;div&gt;One*#Two Three*Four # 2 6 35&lt;/div&gt;&lt;div&gt;98 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Function: CALL SCANQ&lt;/div&gt;&lt;div&gt;Purpose: To break up a string into words, where words are defined to be the&lt;/div&gt;&lt;div&gt;characters separated by a set of specified delimiters, and to return the&lt;/div&gt;&lt;div&gt;starting position and the length of the nth word. The basic differences&lt;/div&gt;&lt;div&gt;between this call routine and CALL SCAN is that CALL SCANQ uses&lt;/div&gt;&lt;div&gt;white space characters as default delimiters and it can accept a value of 0 for&lt;/div&gt;&lt;div&gt;the n-word argument. In addition, the SCANQ call routine ignores&lt;/div&gt;&lt;div&gt;delimiters within quotation marks.&lt;/div&gt;&lt;div&gt;Syntax: CALL SCAN(character-value, n-word, position, length&lt;/div&gt;&lt;div&gt;&lt;,'delimiter-list'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;n-word is the nth "word" in the string. If n is zero, or if the absolute value&lt;/div&gt;&lt;div&gt;of n is greater than the number of words, the SCANQ call routine returns&lt;/div&gt;&lt;div&gt;values of 0 for position and length.&lt;/div&gt;&lt;div&gt;position is the name of the numeric variable to which the starting&lt;/div&gt;&lt;div&gt;position in the character-value of the nth word is returned.&lt;/div&gt;&lt;div&gt;length is the name of a numeric variable to which the length of the nth&lt;/div&gt;&lt;div&gt;word is returned.&lt;/div&gt;&lt;div&gt;delimiter-list is an optional argument. If it is omitted, the default set&lt;/div&gt;&lt;div&gt;of delimiters are white space characters (blank, horizontal and vertical tab,&lt;/div&gt;&lt;div&gt;carriage return, line feed, and form feed). Also, the beginning or end of a&lt;/div&gt;&lt;div&gt;line also delimits a word. Note: this is a different set of default delimiters&lt;/div&gt;&lt;div&gt;from the SCAN call routine. If you specify any delimiters, only those&lt;/div&gt;&lt;div&gt;delimiters will be active. Also note that in the last example (STRING3),&lt;/div&gt;&lt;div&gt;position and length include single quotation marks.&lt;/div&gt;&lt;div&gt;If you specify any delimiters, only those delimiters will be active.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "ABC DEF" and STRING2 = "ONE TWO THREE&lt;/div&gt;&lt;div&gt;FOUR FIVE", and STRING3 = "'AB CD' 'X Y'"&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 99&lt;/div&gt;&lt;div&gt;Function Position Length&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING1,2,POSITION,LENGTH) 5 3&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING1,-1,POSITION,LENGTH) 5 3&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING1,3,POSITION,LENGTH) 0 0&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING2,4,POSITION,LENGTH) 5 3&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING2,2,POSITION,LENGTH," ") 9 15&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING1,0,POSITION,LENGTH) 0 0&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING3,2,POSITION,LENGTH) 9 5&lt;/div&gt;&lt;div&gt;Program 1.44: Using CALL SCANQ to count the words in a string&lt;/div&gt;&lt;div&gt;***Primary function: CALL SCANQ;&lt;/div&gt;&lt;div&gt;DATA COUNT;&lt;/div&gt;&lt;div&gt;INPUT STRING $40.;&lt;/div&gt;&lt;div&gt;DO I = 1 TO 99 UNTIL (LENGTH EQ 0);&lt;/div&gt;&lt;div&gt;CALL SCANQ(STRING,I,POSITION,LENGTH);&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;NUM_WORDS = I-1;&lt;/div&gt;&lt;div&gt;DROP POSITION LENGTH I;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;ONE TWO THREE&lt;/div&gt;&lt;div&gt;ONE TWO&lt;/div&gt;&lt;div&gt;ONE&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=COUNT NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set COUNT";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;When the value of the second argument in the CALL SCANQ routine is greater than the&lt;/div&gt;&lt;div&gt;number of words in a string, both the position and length values are set to 0. Here, the call&lt;/div&gt;&lt;div&gt;routine is placed in a DO loop, which iterates until the routine returns a value of 0 for&lt;/div&gt;&lt;div&gt;100 SAS Functions by Example&lt;/div&gt;&lt;div&gt;the length. The number of words is, therefore, one fewer than this number. The listing is&lt;/div&gt;&lt;div&gt;shown below:&lt;/div&gt;&lt;div&gt;Listing of Data Set COUNT&lt;/div&gt;&lt;div&gt;NUM_&lt;/div&gt;&lt;div&gt;STRING WORDS&lt;/div&gt;&lt;div&gt;ONE TWO THREE 3&lt;/div&gt;&lt;div&gt;ONE TWO 2&lt;/div&gt;&lt;div&gt;ONE 1&lt;/div&gt;&lt;div&gt;Functions That Substitute Letters or Words in Strings&lt;/div&gt;&lt;div&gt;TRANSLATE can substitute one character for another in a string. TRANWRD is more&lt;/div&gt;&lt;div&gt;flexible—it can substitute a word or several words for one or more words.&lt;/div&gt;&lt;div&gt;Function: TRANSLATE&lt;/div&gt;&lt;div&gt;Purpose To exchange one character value for another. For example, you might want&lt;/div&gt;&lt;div&gt;to change values 1–5 to the values A–E.&lt;/div&gt;&lt;div&gt;Syntax: TRANSLATE(character-value, to-1, from-1 &lt;,… to-n,&lt;/div&gt;&lt;div&gt;from-n&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;to-n is a single character or a list of character values.&lt;/div&gt;&lt;div&gt;from-n is a single character or a list of characters.&lt;/div&gt;&lt;div&gt;Each character listed in from-n is changed to the corresponding value in to-n. If a&lt;/div&gt;&lt;div&gt;character value is not listed in from-n, it will be unaffected.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 101&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;In these examples, CHAR = "12X45", ANS = "Y"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;TRANSLATE(CHAR,"ABCDE","12345") "ABXDE"&lt;/div&gt;&lt;div&gt;TRANSLATE(CHAR,'A','1','B','2','C','3','D','4','E','5') "ABXDE"&lt;/div&gt;&lt;div&gt;TRANSLATE(ANS,"10","YN") "1"&lt;/div&gt;&lt;div&gt;Program 1.45: Converting values of '1','2','3','4', and '5' to 'A','B','C','D', and&lt;/div&gt;&lt;div&gt;'E' respectively&lt;/div&gt;&lt;div&gt;***Primary function: TRANSLATE;&lt;/div&gt;&lt;div&gt;DATA MULTIPLE;&lt;/div&gt;&lt;div&gt;INPUT QUES : $1. @@;&lt;/div&gt;&lt;div&gt;QUES = TRANSLATE(QUES,'ABCDE','12345');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;1 4 3 2 5&lt;/div&gt;&lt;div&gt;5 3 4 2 1&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=MULTIPLE NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set MULTIPLE";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this example, you want to convert the character values of 1–5 to the letters A–E. The two&lt;/div&gt;&lt;div&gt;arguments in this function seem backwards to this author. You would expect the order to be&lt;/div&gt;&lt;div&gt;"from–to" rather than the other way around. I suppose others at SAS felt the same way,&lt;/div&gt;&lt;div&gt;since a more recent function, TRANWRD (next example), uses the "from – to" order for its&lt;/div&gt;&lt;div&gt;arguments. While you could use a format, along with a PUT function to do this translation,&lt;/div&gt;&lt;div&gt;102 SAS Functions by Example&lt;/div&gt;&lt;div&gt;the TRANSLATE function is more compact and easier to use in cases like this. A listing of&lt;/div&gt;&lt;div&gt;data set MULTIPLE follows:&lt;/div&gt;&lt;div&gt;Listing of Data Set MULTIPLE&lt;/div&gt;&lt;div&gt;QUES&lt;/div&gt;&lt;div&gt;A&lt;/div&gt;&lt;div&gt;D&lt;/div&gt;&lt;div&gt;C&lt;/div&gt;&lt;div&gt;B&lt;/div&gt;&lt;div&gt;E&lt;/div&gt;&lt;div&gt;E&lt;/div&gt;&lt;div&gt;C&lt;/div&gt;&lt;div&gt;D&lt;/div&gt;&lt;div&gt;B&lt;/div&gt;&lt;div&gt;A&lt;/div&gt;&lt;div&gt;Program 1.46: Converting the values "Y" and "N" to 1's and 0's&lt;/div&gt;&lt;div&gt;***Primary functions: TRANSLATE, UPCASE&lt;/div&gt;&lt;div&gt;***Other functions: INPUT;&lt;/div&gt;&lt;div&gt;DATA YES_NO;&lt;/div&gt;&lt;div&gt;LENGTH CHAR $ 1;&lt;/div&gt;&lt;div&gt;INPUT CHAR @@;&lt;/div&gt;&lt;div&gt;X = INPUT(&lt;/div&gt;&lt;div&gt;TRANSLATE(&lt;/div&gt;&lt;div&gt;UPCASE(CHAR),'01','NY'),1.);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;N Y n y A B 0 1&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=YES_NO NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set YES_NO";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This rather silly program was written mainly to demonstrate the TRANSLATE and&lt;/div&gt;&lt;div&gt;UPCASE functions. A couple of IF statements, combined with the UPCASE function in the&lt;/div&gt;&lt;div&gt;DATA step would probably be more straightforward. In this program, the UPCASE&lt;/div&gt;&lt;div&gt;function converts lowercase values of "n" and "y" to their uppercase equivalents. The&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 103&lt;/div&gt;&lt;div&gt;TRANSLATE function then converts the Ns and Ys to the characters "0" and "1,"&lt;/div&gt;&lt;div&gt;respectively. Finally, the INPUT function does the character to numeric conversion. Note&lt;/div&gt;&lt;div&gt;that the data values of "1" and "0" do not get translated, but do get converted to numeric&lt;/div&gt;&lt;div&gt;values. As you can see in the listing below, the program does get the job done.&lt;/div&gt;&lt;div&gt;Listing of Data Set YES_NO&lt;/div&gt;&lt;div&gt;CHAR X&lt;/div&gt;&lt;div&gt;N 0&lt;/div&gt;&lt;div&gt;Y 1&lt;/div&gt;&lt;div&gt;n 0&lt;/div&gt;&lt;div&gt;y 1&lt;/div&gt;&lt;div&gt;A .&lt;/div&gt;&lt;div&gt;B .&lt;/div&gt;&lt;div&gt;0 0&lt;/div&gt;&lt;div&gt;1&lt;/div&gt;&lt;div&gt;Function: TRANWRD&lt;/div&gt;&lt;div&gt;Purpose: To substitute one or more words in a string with a replacement word or&lt;/div&gt;&lt;div&gt;words. It works like the find and replace feature of most word processors.&lt;/div&gt;&lt;div&gt;Syntax: TRANWRD(character-value, from-string, to-string)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;from-string is one or more characters that you want to replace with the&lt;/div&gt;&lt;div&gt;character or characters in the to-string.&lt;/div&gt;&lt;div&gt;to-string is one or more characters that replace the entire fromstring.&lt;/div&gt;&lt;div&gt;Making the analogy to the find and replace feature of most word processors here, fromstring&lt;/div&gt;&lt;div&gt;represents the string to find and to-string represents the string to replace.&lt;/div&gt;&lt;div&gt;Notice that the order of from- and to-string in this function is opposite (and more&lt;/div&gt;&lt;div&gt;logical to this author) from the order in the TRANSLATE function.&lt;/div&gt;&lt;div&gt;104 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING = "123 Elm Road", FROM = "Road" and TO =&lt;/div&gt;&lt;div&gt;"Rd."&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;TRANWRD(STRING,FROM,TO) "123 Elm Rd."&lt;/div&gt;&lt;div&gt;TRANWRD("Now is the time","is","is not") "Now is not the time"&lt;/div&gt;&lt;div&gt;TRANWRD("one two three","four","4") "one two three"&lt;/div&gt;&lt;div&gt;TRANWRD("Mr. Rogers","Mr."," ") " Rogers"&lt;/div&gt;&lt;div&gt;TRANWRD("ONE TWO THREE","ONE TWO","A B") "A B THREE"&lt;/div&gt;&lt;div&gt;Program 1.47: Converting words such as Street to their abbreviations&lt;/div&gt;&lt;div&gt;such as St. in an address&lt;/div&gt;&lt;div&gt;***Primary function: TRANWRD;&lt;/div&gt;&lt;div&gt;DATA CONVERT;&lt;/div&gt;&lt;div&gt;INPUT @1 ADDRESS $20. ;&lt;/div&gt;&lt;div&gt;*** Convert Street, Avenue and Road to their abbreviations;&lt;/div&gt;&lt;div&gt;ADDRESS = TRANWRD(ADDRESS,'Street','St.');&lt;/div&gt;&lt;div&gt;ADDRESS = TRANWRD (ADDRESS,'Avenue','Ave.');&lt;/div&gt;&lt;div&gt;ADDRESS = TRANWRD (ADDRESS,'Road','Rd.');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;89 Lazy Brook Road&lt;/div&gt;&lt;div&gt;123 River Rd.&lt;/div&gt;&lt;div&gt;12 Main Street&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=CONVERT;&lt;/div&gt;&lt;div&gt;TITLE 'Listing of Data Set CONVERT';&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;TRANWRD is one of the relatively new SAS functions—and it is enormously useful. This&lt;/div&gt;&lt;div&gt;example uses it to help standardize a mailing list, substituting abbreviations for full words.&lt;/div&gt;&lt;div&gt;Another use for this function is to make to-string a blank, thus allowing you to remove&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 105&lt;/div&gt;&lt;div&gt;words such as Jr. or Mr. from an address. The converted addresses are shown in the listing&lt;/div&gt;&lt;div&gt;below:&lt;/div&gt;&lt;div&gt;Listing of Data Set CONVERT&lt;/div&gt;&lt;div&gt;Obs ADDRESS&lt;/div&gt;&lt;div&gt;1 89 Lazy Brook Rd.&lt;/div&gt;&lt;div&gt;2 123 River Rd.&lt;/div&gt;&lt;div&gt;3 12 Main St.&lt;/div&gt;&lt;div&gt;Functions That Compute the Length of Strings&lt;/div&gt;&lt;div&gt;These four functions compute the length of character values. The LENGTH function (the&lt;/div&gt;&lt;div&gt;oldest of the lot) does not count trailing blanks in its calculation. The LENGTHN function is&lt;/div&gt;&lt;div&gt;identical to the LENGTH function with one exception: If there is a null string (technically&lt;/div&gt;&lt;div&gt;speaking, a string consisting of all blanks), the LENGTH function returns a value of 1 while&lt;/div&gt;&lt;div&gt;the LENGTHN function returns a value of 0. I would recommend using the LENGTHN&lt;/div&gt;&lt;div&gt;function as your general purpose length function in place of the older LENGTH function&lt;/div&gt;&lt;div&gt;(unless, of course, you used the fact that the length of a null string is 1 instead of 0 in your&lt;/div&gt;&lt;div&gt;program). The LENGTHC function operates like the LENGTH function except it counts&lt;/div&gt;&lt;div&gt;trailing blanks in its computation. Finally, LENGTHM computes the length used to store&lt;/div&gt;&lt;div&gt;this variable in memory. In most applications, the LENGTHM and LENGTHC functions&lt;/div&gt;&lt;div&gt;return the same value. You may see some differences when working with macro variables.&lt;/div&gt;&lt;div&gt;The LENGTHM function is a useful way to determine the storage length of a character&lt;/div&gt;&lt;div&gt;variable (instead of using PROC CONTENTS, for example).&lt;/div&gt;&lt;div&gt;Function: LENGTH&lt;/div&gt;&lt;div&gt;Purpose: To determine the length of a character value, not counting trailing blanks. A&lt;/div&gt;&lt;div&gt;null argument returns a value of 1.&lt;/div&gt;&lt;div&gt;Syntax: LENGTH(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;106 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABC "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;LENGTH("ABC") 3&lt;/div&gt;&lt;div&gt;LENGTH(CHAR) 3&lt;/div&gt;&lt;div&gt;LENGTH(" ") 1&lt;/div&gt;&lt;div&gt;Function: LENGTHC&lt;/div&gt;&lt;div&gt;Purpose: To determine the length of a character value, including trailing blanks.&lt;/div&gt;&lt;div&gt;Syntax: LENGTHC(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABC "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;LENGTH("ABC") 3&lt;/div&gt;&lt;div&gt;LENGTH(CHAR) 6&lt;/div&gt;&lt;div&gt;LENGTH(" ") 1&lt;/div&gt;&lt;div&gt;Function: LENGTHM&lt;/div&gt;&lt;div&gt;Purpose: To determine the length of a character variable in memory.&lt;/div&gt;&lt;div&gt;Syntax: LENGTHM(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 107&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABC "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;LENGTHM("ABC") 3&lt;/div&gt;&lt;div&gt;LENGTHM(CHAR) 6&lt;/div&gt;&lt;div&gt;LENGTHM(" ") 1&lt;/div&gt;&lt;div&gt;Function: LENGTHN&lt;/div&gt;&lt;div&gt;Purpose: To determine the length of a character value, not counting trailing blanks. A&lt;/div&gt;&lt;div&gt;null argument returns a value of 0.&lt;/div&gt;&lt;div&gt;Syntax: LENGTHN(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples CHAR = "ABC "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;LENGTH("ABC") 3&lt;/div&gt;&lt;div&gt;LENGTH(CHAR) 3&lt;/div&gt;&lt;div&gt;LENGTH(" ") 0&lt;/div&gt;&lt;div&gt;Program 1.48: Demonstrating the LENGTH, LENGTHC, LENGTHM, and&lt;/div&gt;&lt;div&gt;LENGTHN functions&lt;/div&gt;&lt;div&gt;***Primary functions: LENGTH, LENGTHC, LENGTHM, LENGTHN;&lt;/div&gt;&lt;div&gt;DATA LENGTH_FUNC;&lt;/div&gt;&lt;div&gt;NOTRAIL = "ABC";&lt;/div&gt;&lt;div&gt;TRAIL = "DEF "; * Three trailing blanks;&lt;/div&gt;&lt;div&gt;NULL = " "; * Null string;&lt;/div&gt;&lt;div&gt;LENGTH_NOTRAIL = LENGTH(NOTRAIL);&lt;/div&gt;&lt;div&gt;LENGTH_TRAIL = LENGTH(TRAIL);&lt;/div&gt;&lt;div&gt;108 SAS Functions by Example&lt;/div&gt;&lt;div&gt;LENGTH_NULL = LENGTH(NULL);&lt;/div&gt;&lt;div&gt;LENGTHC_NOTRAIL = LENGTHC(NOTRAIL);&lt;/div&gt;&lt;div&gt;LENGTHC_TRAIL = LENGTHC(TRAIL);&lt;/div&gt;&lt;div&gt;LENGTHC_NULL = LENGTHC(NULL);&lt;/div&gt;&lt;div&gt;LENGTHM_NOTRAIL = LENGTHM(NOTRAIL);&lt;/div&gt;&lt;div&gt;LENGTHM_TRAIL = LENGTHM(TRAIL);&lt;/div&gt;&lt;div&gt;LENGTHM_NULL = LENGTHM(NULL);&lt;/div&gt;&lt;div&gt;LENGTHN_NOTRAIL = LENGTHN(NOTRAIL);&lt;/div&gt;&lt;div&gt;LENGTHN_TRAIL = LENGTHN(TRAIL);&lt;/div&gt;&lt;div&gt;LENGTHN_NULL = LENGTHN(NULL);&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=LENGTH_FUNC NOOBS HEADING=H;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set LENGTH_FUNC";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The LENGTH and LENGTHN functions return the length of a character variable, not&lt;/div&gt;&lt;div&gt;counting trailing blanks. The only difference between the LENGTH and LENGTHN&lt;/div&gt;&lt;div&gt;functions is that the LENGTH function returns a value of 1 for a null string while the&lt;/div&gt;&lt;div&gt;LENGTHN function returns a 0. The LENGTHC function does count trailing blanks in its&lt;/div&gt;&lt;div&gt;calculations. Finally, the LENGTHM function returns the number of bytes of memory used&lt;/div&gt;&lt;div&gt;to store the variable. Notice in this program that the LENGTHM and LENGTHC functions&lt;/div&gt;&lt;div&gt;yield the same value. Look over the listing below to be sure you understand the differences&lt;/div&gt;&lt;div&gt;among these functions:&lt;/div&gt;&lt;div&gt;Listing of Data Set LENGTH_FUNC&lt;/div&gt;&lt;div&gt;LENGTH_ LENGTH_ LENGTH_ LENGTHC_ LENGTHC_ LENGTHC_&lt;/div&gt;&lt;div&gt;NOTRAIL TRAIL NULL NOTRAIL TRAIL NULL NOTRAIL TRAIL NULL&lt;/div&gt;&lt;div&gt;ABC DEF 3 3 1 3 6 1&lt;/div&gt;&lt;div&gt;LENGTHM_ LENGTHM_ LENGTHM_ LENGTHN_ LENGTHN_ LENGTHN_&lt;/div&gt;&lt;div&gt;NOTRAIL TRAIL NULL NOTRAIL TRAIL NULL&lt;/div&gt;&lt;div&gt;3 6 1 3 3 0&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 109&lt;/div&gt;&lt;div&gt;Functions That Count the Number of Letters or Substrings&lt;/div&gt;&lt;div&gt;in a String&lt;/div&gt;&lt;div&gt;The COUNT function counts the number of times a given substring appears in a string. The&lt;/div&gt;&lt;div&gt;COUNTC function counts the number of times specific characters occur in a string.&lt;/div&gt;&lt;div&gt;Function: COUNT&lt;/div&gt;&lt;div&gt;Purpose: To count the number of times a given substring appears in a string. With the&lt;/div&gt;&lt;div&gt;use of a modifier, case can be ignored. If no occurrences of the substring&lt;/div&gt;&lt;div&gt;are found, the function returns a 0.&lt;/div&gt;&lt;div&gt;Syntax: COUNT(character-value, find-string &lt;,'modifiers'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;find-string is a character variable or SAS string literal to be counted.&lt;/div&gt;&lt;div&gt;The following modifiers, placed in single or double quotation marks, may be&lt;/div&gt;&lt;div&gt;used with COUNT:&lt;/div&gt;&lt;div&gt;i or I ignore case.&lt;/div&gt;&lt;div&gt;t or T ignore trailing blanks in both the character value and the&lt;/div&gt;&lt;div&gt;find-string.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING1 = "How Now Brown COW" and STRING2 = "ow"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;COUNT(STRING1, STRING2) 3&lt;/div&gt;&lt;div&gt;COUNT(STRING1,STRING2,'I') 4&lt;/div&gt;&lt;div&gt;COUNT(STRING1, "XX") 0&lt;/div&gt;&lt;div&gt;COUNT("ding and dong","g ") 1&lt;/div&gt;&lt;div&gt;COUNT("ding and dong","g ","T") 2&lt;/div&gt;&lt;div&gt;110 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.49: Using the COUNT function to count the number of times the&lt;/div&gt;&lt;div&gt;word "the" appears in a string&lt;/div&gt;&lt;div&gt;***Primary Function: COUNT;&lt;/div&gt;&lt;div&gt;DATA DRACULA;&lt;/div&gt;&lt;div&gt;INPUT STRING $CHAR60.;&lt;/div&gt;&lt;div&gt;NUM = COUNT(STRING,"the");&lt;/div&gt;&lt;div&gt;NUM_NO_CASE = COUNT(STRING,"the",'I');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;The number of times "the" appears is the question&lt;/div&gt;&lt;div&gt;THE the&lt;/div&gt;&lt;div&gt;None on this line!&lt;/div&gt;&lt;div&gt;There is the map&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=DRACULA NOOB;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set Dracula";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;In this program, the COUNT function is used with and without the I (ignore case) modifier.&lt;/div&gt;&lt;div&gt;In the first observation, the first "The" has an uppercase T, so it does not match the substring&lt;/div&gt;&lt;div&gt;and is not counted for the variable NUM. But when the I modifier is used, it does count.&lt;/div&gt;&lt;div&gt;The same holds for the second observation. When there are no occurrences of the substring,&lt;/div&gt;&lt;div&gt;as in the third observation, the function returns a 0. The fourth line of data demonstrates that&lt;/div&gt;&lt;div&gt;COUNT ignores word boundaries when searching for strings. A listing of data set&lt;/div&gt;&lt;div&gt;DRACULA is displayed below:&lt;/div&gt;&lt;div&gt;Listing of Data Set DRACULA&lt;/div&gt;&lt;div&gt;NUM_NO_&lt;/div&gt;&lt;div&gt;STRING NUM CASE&lt;/div&gt;&lt;div&gt;The number of times "the" appears is the question 2 3&lt;/div&gt;&lt;div&gt;THE the 1 2&lt;/div&gt;&lt;div&gt;None on this line! 0 0&lt;/div&gt;&lt;div&gt;There is the map 1 2&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 111&lt;/div&gt;&lt;div&gt;Function: COUNTC&lt;/div&gt;&lt;div&gt;Purpose: To count the number of individual characters that appear or do not appear in&lt;/div&gt;&lt;div&gt;a string. With the use of a modifier, case can be ignored. Another modifier&lt;/div&gt;&lt;div&gt;allows you to count characters that do not appear in the string. If no&lt;/div&gt;&lt;div&gt;specified characters are found, the function returns a 0.&lt;/div&gt;&lt;div&gt;Syntax: COUNTC(character-value, characters &lt;,'modifiers'&gt;)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;characters is one or more characters to be counted. It may be a string&lt;/div&gt;&lt;div&gt;literal (letters in quotation marks) or a character variable.&lt;/div&gt;&lt;div&gt;The following modifiers, placed in quotation marks, may be used with&lt;/div&gt;&lt;div&gt;COUNTC:&lt;/div&gt;&lt;div&gt;i or I ignore case.&lt;/div&gt;&lt;div&gt;o or O If this modifier is used, COUNTC processes the character&lt;/div&gt;&lt;div&gt;or characters and modifiers only once. If the COUNTC function is&lt;/div&gt;&lt;div&gt;used in the same DATA step, the previous character and modifier&lt;/div&gt;&lt;div&gt;values are used and the current values are ignored.&lt;/div&gt;&lt;div&gt;t or T ignore trailing blanks in the character-value or the&lt;/div&gt;&lt;div&gt;characters. Note, this modifier is especially important when&lt;/div&gt;&lt;div&gt;looking for blanks or when you are using the v modifier (below).&lt;/div&gt;&lt;div&gt;v or V count only the characters that do not appear in the&lt;/div&gt;&lt;div&gt;character-value. Remember that this count will include&lt;/div&gt;&lt;div&gt;trailing blanks unless the t modifier is used.&lt;/div&gt;&lt;div&gt;112 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING1 = "How Now Brown COW" and STRING2 = "wo"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;COUNTC("AaBbbCDE","CBA") 3&lt;/div&gt;&lt;div&gt;COUNTC("AaBbbCDE","CBA",'I') 7&lt;/div&gt;&lt;div&gt;COUNTC(STRING1, STRING2) 6&lt;/div&gt;&lt;div&gt;COUNTC(STRING1,STRING2,'I') 8&lt;/div&gt;&lt;div&gt;COUNTC(STRING1, "XX") 0&lt;/div&gt;&lt;div&gt;COUNTC("ding and dong","g ") 4 (2 g's and 2 blanks)&lt;/div&gt;&lt;div&gt;COUNTC("ding and dong","g ","T") 2 (blanks trimmed)&lt;/div&gt;&lt;div&gt;COUNTC("ABCDEabcde","BCD",'VI') 4 (A, E, a, and e)&lt;/div&gt;&lt;div&gt;Program 1.50: Demonstrating the COUNTC function to find one or more&lt;/div&gt;&lt;div&gt;characters or to check if characters are not present in a&lt;/div&gt;&lt;div&gt;string&lt;/div&gt;&lt;div&gt;***Primary Function: COUNTC;&lt;/div&gt;&lt;div&gt;DATA COUNT_CHAR;&lt;/div&gt;&lt;div&gt;INPUT STRING $20.;&lt;/div&gt;&lt;div&gt;NUM_A = COUNTC(STRING,'A');&lt;/div&gt;&lt;div&gt;NUM_Aa = COUNTC(STRING,'a','i');&lt;/div&gt;&lt;div&gt;NUM_A_OR_B = COUNTC(STRING,'AB');&lt;/div&gt;&lt;div&gt;NOT_A = COUNTC(STRING,'A','v');&lt;/div&gt;&lt;div&gt;NOT_A_TRIM = COUNTC(STRING,'A','vt');&lt;/div&gt;&lt;div&gt;NOT_Aa = COUNTC(STRING,'A','iv');&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;UPPER A AND LOWER a&lt;/div&gt;&lt;div&gt;abAB&lt;/div&gt;&lt;div&gt;BBBbbb&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=COUNT_CHAR;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set COUNT_CHAR";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 113&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;This program demonstrates several features of the COUNTC function. The first use of the&lt;/div&gt;&lt;div&gt;function simply looks for the number of times the uppercase letter A appears in the string.&lt;/div&gt;&lt;div&gt;Next, by adding the i modifier, the number of upper- or lowercase A's is counted. Next,&lt;/div&gt;&lt;div&gt;when you place more than one character in the list, the function returns the total number of&lt;/div&gt;&lt;div&gt;the listed characters. The v modifier is interesting. The first time it is used, COUNTC is&lt;/div&gt;&lt;div&gt;counting the number of characters in the string that are not uppercase A's. Notice in the&lt;/div&gt;&lt;div&gt;listing below, that this count includes the trailing blanks. However, in the next statement of&lt;/div&gt;&lt;div&gt;the program, when the v and t modifiers are used together, the trailing blanks are not&lt;/div&gt;&lt;div&gt;counted.&lt;/div&gt;&lt;div&gt;Listing of Data Set COUNT_CHAR&lt;/div&gt;&lt;div&gt;NUM_A_ NOT_A_&lt;/div&gt;&lt;div&gt;Obs STRING NUM_A NUM_Aa OR_B NOT_A TRIM NOT_Aa&lt;/div&gt;&lt;div&gt;1 UPPER A AND LOWER a 2 3 2 18 17 17&lt;/div&gt;&lt;div&gt;2 abAB 1 2 2 19 3 18&lt;/div&gt;&lt;div&gt;3 BBBbbb 0 0 3 20 6 20&lt;/div&gt;&lt;div&gt;Miscellaneous String Functions&lt;/div&gt;&lt;div&gt;Don't be put off by the "miscellaneous" in this heading. Many of these functions are&lt;/div&gt;&lt;div&gt;extremely useful—they just didn't fit neatly into categories.&lt;/div&gt;&lt;div&gt;Function: MISSING&lt;/div&gt;&lt;div&gt;Purpose: To determine if the argument is a missing (character or numeric) value.&lt;/div&gt;&lt;div&gt;This is a handy function to use since you don't have to know if the variable&lt;/div&gt;&lt;div&gt;you are testing is character or numeric. The function returns a 1 (true) if the&lt;/div&gt;&lt;div&gt;value is a missing value, a 0 (false) otherwise.&lt;/div&gt;&lt;div&gt;Syntax: MISSING(variable)&lt;/div&gt;&lt;div&gt;variable is a character or numeric variable or expression.&lt;/div&gt;&lt;div&gt;114 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Examples:&lt;/div&gt;&lt;div&gt;For these examples, NUM1 = 5, NUM2 = ., CHAR1 = "ABC", and CHAR2 = " "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;MISSING(NUM1) 0&lt;/div&gt;&lt;div&gt;MISSING(NUM2) 1&lt;/div&gt;&lt;div&gt;MISSING(CHAR1) 0&lt;/div&gt;&lt;div&gt;MISSING(CHAR2) 1&lt;/div&gt;&lt;div&gt;Program 1.51: Determining if there are any missing values for all variables&lt;/div&gt;&lt;div&gt;in a data set&lt;/div&gt;&lt;div&gt;***Primary function: MISSING&lt;/div&gt;&lt;div&gt;***Other function: DIM;&lt;/div&gt;&lt;div&gt;***First, create a data set for testing;&lt;/div&gt;&lt;div&gt;DATA TEST_MISS;&lt;/div&gt;&lt;div&gt;INPUT @1 (X Y Z)(1.)&lt;/div&gt;&lt;div&gt;@4 (A B C D)($1.);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;123ABCD&lt;/div&gt;&lt;div&gt;..7 FFF&lt;/div&gt;&lt;div&gt;987RONC&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;DATA FIND_MISS;&lt;/div&gt;&lt;div&gt;SET TEST_MISS END=LAST;&lt;/div&gt;&lt;div&gt;ARRAY NUMS[*] _NUMERIC_;&lt;/div&gt;&lt;div&gt;ARRAY CHARS[*] _CHARACTER_;&lt;/div&gt;&lt;div&gt;DO I = 1 TO DIM(NUMS);&lt;/div&gt;&lt;div&gt;IF MISSING(NUMS[I]) THEN NN + 1;&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;DO I = 1 TO DIM(CHARS);&lt;/div&gt;&lt;div&gt;IF MISSING(CHARS[I]) THEN NC + 1;&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;FILE PRINT;&lt;/div&gt;&lt;div&gt;TITLE "Count of Missing Values";&lt;/div&gt;&lt;div&gt;IF LAST THEN PUT NN "Numeric and " NC "Character values missing";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 115&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;Notice that the MISSING function can take either a numeric or a character argument. In this&lt;/div&gt;&lt;div&gt;program, since you need to have separate arrays for the character and numeric variables, you&lt;/div&gt;&lt;div&gt;could have just as easily used the standard period and blank to represent missing values.&lt;/div&gt;&lt;div&gt;Because of the END= option in the SET statement, the program outputs the counts when the&lt;/div&gt;&lt;div&gt;last observation is processed from the data set TEST_MISS. Output from this program is&lt;/div&gt;&lt;div&gt;shown below:&lt;/div&gt;&lt;div&gt;Count of Missing Values&lt;/div&gt;&lt;div&gt;2 Numeric and 1 Character values missing&lt;/div&gt;&lt;div&gt;Function: RANK&lt;/div&gt;&lt;div&gt;Purpose: To obtain the relative position of the ASCII (or EBCDIC) characters. This&lt;/div&gt;&lt;div&gt;can be useful if you want to associate each character with a number so that&lt;/div&gt;&lt;div&gt;an ARRAY subscript can point to a specific character.&lt;/div&gt;&lt;div&gt;Syntax: RANK(letter)&lt;/div&gt;&lt;div&gt;letter can be a string literal or a SAS character variable. If the literal or&lt;/div&gt;&lt;div&gt;variable contains more than one character, the RANK function returns the&lt;/div&gt;&lt;div&gt;collating sequence of the first character in the string.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING1 = "A" and STRING2 = "XYZ"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;RANK(STRING1) 65&lt;/div&gt;&lt;div&gt;RANK(STRING2) 88&lt;/div&gt;&lt;div&gt;RANK("X") 88&lt;/div&gt;&lt;div&gt;RANK("a") 97&lt;/div&gt;&lt;div&gt;116 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.52: Using the collating sequence to convert plain text to Morse&lt;/div&gt;&lt;div&gt;Code&lt;/div&gt;&lt;div&gt;***Primary function: RANK&lt;/div&gt;&lt;div&gt;***Other functions: LENGTH, UPCASE, SUBSTR;&lt;/div&gt;&lt;div&gt;DATA _NULL_;&lt;/div&gt;&lt;div&gt;ARRAY DOT_DASH[26] $ 4 _TEMPORARY_ ('.-' '-...' '-.-.' '-..' '.'&lt;/div&gt;&lt;div&gt;'..-.' '-..' '....' '..' '.---'&lt;/div&gt;&lt;div&gt;'-.-' '.-..' '--' '-.' '---' '.--.'&lt;/div&gt;&lt;div&gt;'--.-' '.-.' '...' '-' '..-'&lt;/div&gt;&lt;div&gt;'...-' '.--' '-..-' '-.--' '--..');&lt;/div&gt;&lt;div&gt;INPUT @1 STRING $80.;&lt;/div&gt;&lt;div&gt;FILE PRINT;&lt;/div&gt;&lt;div&gt;TITLE "Morse Code Conversion Using the RANK Function";&lt;/div&gt;&lt;div&gt;DO I = 1 TO LENGTH(STRING);&lt;/div&gt;&lt;div&gt;LETTER = UPCASE(SUBSTR(STRING,I,1));&lt;/div&gt;&lt;div&gt;IF LETTER = ' ' THEN PUT LETTER @;&lt;/div&gt;&lt;div&gt;ELSE DO;&lt;/div&gt;&lt;div&gt;NUM = RANK(LETTER) - 64;&lt;/div&gt;&lt;div&gt;PUT DOT_DASH[NUM] ' ' @;&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;END;&lt;/div&gt;&lt;div&gt;PUT;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;This is a test SOS&lt;/div&gt;&lt;div&gt;Now is the time for all good men&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;The RANK function returns a value of 65 for an uppercase A, a value of 66 for a B, and so&lt;/div&gt;&lt;div&gt;forth (in the ASCII character set). If you subtract 64 from the RANK value of the letters A&lt;/div&gt;&lt;div&gt;to Z, you will get the numbers 1 to 26. Each element in the temporary array is the Morse&lt;/div&gt;&lt;div&gt;code equivalent of the 26 letters of the alphabet.&lt;/div&gt;&lt;div&gt;The DO loop starts from 1 to the LENGTH of STRING. Each letter is converted to&lt;/div&gt;&lt;div&gt;uppercase and its order in the alphabet is returned by the expression RANK(LETTER)&lt;/div&gt;&lt;div&gt;– 64. This value is then used as the subscript in the DOT_DASH array and the appropriate&lt;/div&gt;&lt;div&gt;series of dots and dashes is written to the output screen. As an "exercise for the reader," this&lt;/div&gt;&lt;div&gt;problem can also be solved in an elegant manner using a user-defined format mapping the&lt;/div&gt;&lt;div&gt;letters of the alphabet to the Morse equivalents. The output from this program is shown&lt;/div&gt;&lt;div&gt;below:&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 117&lt;/div&gt;&lt;div&gt;Morse Code Conversion Using the RANK Function&lt;/div&gt;&lt;div&gt;- .... .. ... .. ... .- - . ... - ... --- ...&lt;/div&gt;&lt;div&gt;-. --- .-- .. ... - .... . - .. -- . ..-. --- .-.&lt;/div&gt;&lt;div&gt;.- .-.. .-.. -.. --- --- -.. -- . -.&lt;/div&gt;&lt;div&gt;Function: REPEAT&lt;/div&gt;&lt;div&gt;Purpose: To make multiple copies of a string.&lt;/div&gt;&lt;div&gt;Syntax: REPEAT(character-value, n)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;n is the number of repetitions. The result of this function is the original&lt;/div&gt;&lt;div&gt;string plus n repetitions. Thus if n equals 1, the result will be two copies of&lt;/div&gt;&lt;div&gt;the original string in the result. If you do not declare the length of the&lt;/div&gt;&lt;div&gt;character variable holding the result of the REPEAT function, it will default&lt;/div&gt;&lt;div&gt;to 200.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples, STRING = "ABC"&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;REPEAT(STRING,1) "ABCABC"&lt;/div&gt;&lt;div&gt;REPEAT("HELLO ",3) "HELLO HELLO HELLO HELLO"&lt;/div&gt;&lt;div&gt;REPEAT("*",5) "******"&lt;/div&gt;&lt;div&gt;118 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Program 1.53: Using the REPEAT function to underline output values&lt;/div&gt;&lt;div&gt;***Featured Function: REPEAT;&lt;/div&gt;&lt;div&gt;DATA _NULL_;&lt;/div&gt;&lt;div&gt;FILE PRINT;&lt;/div&gt;&lt;div&gt;TITLE "Demonstrating the REPEAT Function";&lt;/div&gt;&lt;div&gt;LENGTH DASH $ 50;&lt;/div&gt;&lt;div&gt;INPUT STRING $50.;&lt;/div&gt;&lt;div&gt;IF _N_ = 1 THEN PUT 50*"*";&lt;/div&gt;&lt;div&gt;DASH = REPEAT("-",LENGTH(STRING) - 1);&lt;/div&gt;&lt;div&gt;PUT STRING / DASH;&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Short line&lt;/div&gt;&lt;div&gt;This is a longer line&lt;/div&gt;&lt;div&gt;Bye&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;I must admit, I had a hard time coming up with a reasonable program to demonstrate the&lt;/div&gt;&lt;div&gt;REPEAT function. The program above underlines each string with the same number of&lt;/div&gt;&lt;div&gt;dashes as there are characters in the string. Since you want the line of dashes to be the same&lt;/div&gt;&lt;div&gt;length as the string, you subtract one from the length, remembering that the REPEAT&lt;/div&gt;&lt;div&gt;function results in n + 1 copies of the original string (the original plus n repetitions).&lt;/div&gt;&lt;div&gt;The two important points to remember when using the REPEAT function are: always make&lt;/div&gt;&lt;div&gt;sure you have defined a length for the resulting character variable, and the result of the&lt;/div&gt;&lt;div&gt;REPEAT function is n + 1 repetitions of the original string. The output from the program&lt;/div&gt;&lt;div&gt;above is shown below:&lt;/div&gt;&lt;div&gt;Demonstrating the REPEAT Function&lt;/div&gt;&lt;div&gt;**************************************************&lt;/div&gt;&lt;div&gt;Short line&lt;/div&gt;&lt;div&gt;----------&lt;/div&gt;&lt;div&gt;This is a longer line&lt;/div&gt;&lt;div&gt;---------------------&lt;/div&gt;&lt;div&gt;Bye&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;Chapter 1: Character Functions 119&lt;/div&gt;&lt;div&gt;Function: REVERSE&lt;/div&gt;&lt;div&gt;Purpose: To reverse the order of text of a character value.&lt;/div&gt;&lt;div&gt;Syntax: REVERSE(character-value)&lt;/div&gt;&lt;div&gt;character-value is any SAS character expression.&lt;/div&gt;&lt;div&gt;Examples&lt;/div&gt;&lt;div&gt;For these examples STRING1 = "ABCDE" and STRING2 = "XYZ "&lt;/div&gt;&lt;div&gt;Function Returns&lt;/div&gt;&lt;div&gt;REVERSE(STRING1) "EDCBA"&lt;/div&gt;&lt;div&gt;REVERSE(STRING2) " ZYX"&lt;/div&gt;&lt;div&gt;REVERSE("1234") "4321"&lt;/div&gt;&lt;div&gt;Program 1.54: Using the REVERSE function to create backwards writing&lt;/div&gt;&lt;div&gt;***Primary function: REVERSE;&lt;/div&gt;&lt;div&gt;DATA BACKWARDS;&lt;/div&gt;&lt;div&gt;INPUT @1 STRING $CHAR10.;&lt;/div&gt;&lt;div&gt;GNIRTS = REVERSE(STRING);&lt;/div&gt;&lt;div&gt;DATALINES;&lt;/div&gt;&lt;div&gt;Ron Cody&lt;/div&gt;&lt;div&gt;XYZ&lt;/div&gt;&lt;div&gt;ABCDEFG&lt;/div&gt;&lt;div&gt;x&lt;/div&gt;&lt;div&gt;1234567890&lt;/div&gt;&lt;div&gt;;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA=BACKWARDS NOOBS;&lt;/div&gt;&lt;div&gt;TITLE "Listing of Data Set BACKWARDS";&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;120 SAS Functions by Example&lt;/div&gt;&lt;div&gt;Explanation&lt;/div&gt;&lt;div&gt;It is important to realize that if you don't specify the length of the result, it will be the same&lt;/div&gt;&lt;div&gt;length as the argument of the REVERSE function. Also, if there were trailing blanks in the&lt;/div&gt;&lt;div&gt;original string, there will be leading blanks in the reversed string. Look specifically at the&lt;/div&gt;&lt;div&gt;last two observations in the listing below to see that this is the case.&lt;/div&gt;&lt;div&gt;Listing of Data Set BACKWARDS&lt;/div&gt;&lt;div&gt;STRING GNIRTS&lt;/div&gt;&lt;div&gt;Ron Cody ydoC noR&lt;/div&gt;&lt;div&gt;XYZ ZYX&lt;/div&gt;&lt;div&gt;ABCDEFG GFEDCBA&lt;/div&gt;&lt;div&gt;x x&lt;/div&gt;&lt;div&gt;1234567890 0987654321&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-3332701335873508857?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/3332701335873508857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=3332701335873508857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/3332701335873508857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/3332701335873508857'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2008/09/functions-that-change-case-of.html' title='Functions That Change the Case of Characters 5'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-6621866616649038844</id><published>2008-09-15T00:13:00.000-07:00</published><updated>2008-12-23T21:47:39.061-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAS'/><category scheme='http://www.blogger.com/atom/ns#' term='Products'/><title type='text'>An Overview of SAS Products</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SAS licenses many different products. This book covers elements from Base SAS software,&lt;/div&gt;&lt;div&gt;SAS/STAT software, and SAS/ACCESS for PC Files software. You can see from the following&lt;/div&gt;&lt;div&gt;list that there is much more to SAS than just these products. Fortunately, most of the products&lt;/div&gt;&lt;div&gt;are integrated, so you don't have to convert data sets or start up another program to use the&lt;/div&gt;&lt;div&gt;other products. The following is a partial list of SAS products with brief descriptions. Since the&lt;/div&gt;&lt;div&gt;number of SAS products is constantly changing, check the SAS Web site (www.sas.com) for a&lt;/div&gt;&lt;div&gt;current list. You must have Base SAS software installed on your system to run most of these&lt;/div&gt;&lt;div&gt;products. Not all products are available for all operating environments. Contact SAS for more&lt;/div&gt;&lt;div&gt;information on any of the products:&lt;/div&gt;&lt;div&gt;Base SAS&lt;/div&gt;&lt;div&gt;must be installed on your system to run most of the other SAS products. Base SAS software&lt;/div&gt;&lt;div&gt;includes the DATA step for manipulating your data and simple statistical and utility procedures.&lt;/div&gt;&lt;div&gt;SAS/ACCESS&lt;/div&gt;&lt;div&gt;allows you access to data used by other software packages. You can read and, in some cases,&lt;/div&gt;&lt;div&gt;write data in their native formats without having to leave SAS. Most of the popular database&lt;/div&gt;&lt;div&gt;software is supported, and each has its own SAS/ACCESS product.&lt;/div&gt;&lt;div&gt;SAS/AF&lt;/div&gt;&lt;div&gt;allows you to write your own interactive SAS applications. Applications written with SAS/AF&lt;/div&gt;&lt;div&gt;software allow users quick-and-easy access to information without knowing the SAS language.&lt;/div&gt;&lt;div&gt;SAS/ASSIST&lt;/div&gt;&lt;div&gt;is a menu-driven front end to SAS software. You make choices from menus, and SAS writes the&lt;/div&gt;&lt;div&gt;program for you. Programs can be stored for later use.&lt;/div&gt;&lt;div&gt;SAS/C&lt;/div&gt;&lt;div&gt;is a C and C++ development environment for IBM mainframes.&lt;/div&gt;&lt;div&gt;SAS/CONNECT&lt;/div&gt;&lt;div&gt;connects computers running SAS software. Data can be shared between the computers, and&lt;/div&gt;&lt;div&gt;programs developed on one computer or operating environment can be transferred to another&lt;/div&gt;&lt;div&gt;for processing.&lt;/div&gt;&lt;div&gt;SAS Data Quality Server&lt;/div&gt;&lt;div&gt;enables you to analyze, cleanse, and standardize your data.&lt;/div&gt;&lt;div&gt;SAS/EIS&lt;/div&gt;&lt;div&gt;allows you to develop and use custom executive information systems. Managers can use the EIS&lt;/div&gt;&lt;div&gt;interfaces to SAS to quickly get the information they need by simply pointing and clicking (with&lt;/div&gt;&lt;div&gt;a mouse, of course).&lt;/div&gt;&lt;div&gt;SAS Enterprise Guide&lt;/div&gt;&lt;div&gt;is a graphical user interface to many parts of SAS software. This is a Windows only product, but&lt;/div&gt;&lt;div&gt;can be used to access SAS servers on other systems.&lt;/div&gt;&lt;div&gt;SAS Enterprise Miner&lt;/div&gt;&lt;div&gt;is a complete product in itself. It provides an easy-to-use front-end to the SEMMA (Sample,&lt;/div&gt;&lt;div&gt;Explore, Modify, Model, Assess) process for business users.&lt;/div&gt;&lt;div&gt;Appendices 289&lt;/div&gt;&lt;div&gt;SAS Enterprise Reporter&lt;/div&gt;&lt;div&gt;enables you to see, analyze, and present information customized to your specific reporting needs.&lt;/div&gt;&lt;div&gt;SAS/ETS&lt;/div&gt;&lt;div&gt;has many procedures for analysis of time-series data, forecasting, and business planning.&lt;/div&gt;&lt;div&gt;SAS/FSP&lt;/div&gt;&lt;div&gt;comprises full-screen products that provide interactive methods for data entry, editing, and&lt;/div&gt;&lt;div&gt;retrieval. Custom data entry screens can be developed with error checking built in.&lt;/div&gt;&lt;div&gt;SAS/Genetics&lt;/div&gt;&lt;div&gt;provides methods for characterization of fundamental genetic parameters, and the detection of&lt;/div&gt;&lt;div&gt;associations between genetic markers and disease status.&lt;/div&gt;&lt;div&gt;SAS/GIS&lt;/div&gt;&lt;div&gt;is a geographic information system for analyzing data with spatial relationships.&lt;/div&gt;&lt;div&gt;SAS/GRAPH&lt;/div&gt;&lt;div&gt;produces high-resolution plots, charts, and maps.&lt;/div&gt;&lt;div&gt;SAS/IML&lt;/div&gt;&lt;div&gt;is a programming language (Interactive Matrix Language) with an extensive set of mathematical&lt;/div&gt;&lt;div&gt;and matrix operators.&lt;/div&gt;&lt;div&gt;SAS/INSIGHT&lt;/div&gt;&lt;div&gt;is a tool for visual analysis of your data. Statistical results are displayed graphically whenever&lt;/div&gt;&lt;div&gt;possible and interactive manipulation of data is possible.&lt;/div&gt;&lt;div&gt;SAS Information Delivery Portal&lt;/div&gt;&lt;div&gt;combines SAS software with an open Java portal platform, allowing information to be selectively&lt;/div&gt;&lt;div&gt;and securely disseminated throughout the organization.&lt;/div&gt;&lt;div&gt;SAS Integration Technologies&lt;/div&gt;&lt;div&gt;allows you to share resources and integrate SAS into your enterprise applications.&lt;/div&gt;&lt;div&gt;SAS/IntrNet&lt;/div&gt;&lt;div&gt;allows you to effectively deliver your SAS applications to the Web.&lt;/div&gt;&lt;div&gt;SAS/LAB&lt;/div&gt;&lt;div&gt;is for guided statistical analysis. This product is good for people who need to analyze data but do&lt;/div&gt;&lt;div&gt;not have a background in statistics.&lt;/div&gt;&lt;div&gt;SAS/MDDB Server&lt;/div&gt;&lt;div&gt;allows you to save data in multidimensional database (MDDB) formats for use with online&lt;/div&gt;&lt;div&gt;analytical processing (OLAP) (otherwise known as slicing and dicing your data).&lt;/div&gt;&lt;div&gt;SAS OLAP Server&lt;/div&gt;&lt;div&gt;provides the components that you need to perform multidimensional analysis.&lt;/div&gt;&lt;div&gt;SAS OLE DB Providers&lt;/div&gt;&lt;div&gt;consists of interfaces that can read data from a variety of sources using the OLE Component Object&lt;/div&gt;&lt;div&gt;Model (COM). SAS OLE DB interfaces provide a standard by which applications can uniformly&lt;/div&gt;&lt;div&gt;access stored data located in a variety of sources.&lt;/div&gt;&lt;div&gt;290 The Little SAS Book&lt;/div&gt;&lt;div&gt;SAS Online Tutor&lt;/div&gt;&lt;div&gt;is an online tool for learning SAS. There are lessons covering many different aspects of SAS.&lt;/div&gt;&lt;div&gt;SAS Open OLAP Server&lt;/div&gt;&lt;div&gt;enables you to access multidimensional data (for example, an MDDB) stored in SAS from an&lt;/div&gt;&lt;div&gt;external source. The SAS Open OLAP Server supports the Microsoft Corporation’s OLE DB for&lt;/div&gt;&lt;div&gt;OLAP API.&lt;/div&gt;&lt;div&gt;SAS/OR&lt;/div&gt;&lt;div&gt;provides procedures for project management and operations research such as linear programming,&lt;/div&gt;&lt;div&gt;Gantt charts, activity networks, and decision analysis.&lt;/div&gt;&lt;div&gt;SAS/QC&lt;/div&gt;&lt;div&gt;provides procedures for statistical quality improvement, including methods for experimental&lt;/div&gt;&lt;div&gt;design, improved process, and statistical control.&lt;/div&gt;&lt;div&gt;SAS Scalable Performance Data Server&lt;/div&gt;&lt;div&gt;using parallel processing methods and data server capabilities, provides access to large volumes of&lt;/div&gt;&lt;div&gt;data and serves large numbers of concurrent users.&lt;/div&gt;&lt;div&gt;SAS/SECURE&lt;/div&gt;&lt;div&gt;provides encryption services to increase the security of transmissions across a network.&lt;/div&gt;&lt;div&gt;SAS/SECURE software makes use of the cryptographic services provided by RSA’s Bsafe and&lt;/div&gt;&lt;div&gt;Microsoft’s CryptoAPI ciphers and is subject to export regulations.&lt;/div&gt;&lt;div&gt;SAS/SHARE&lt;/div&gt;&lt;div&gt;provides concurrent access to data by multiple users.&lt;/div&gt;&lt;div&gt;SAS/SPECTRAVIEW&lt;/div&gt;&lt;div&gt;is a tool for analysis and visualization of three-dimensional data.&lt;/div&gt;&lt;div&gt;SAS/STAT&lt;/div&gt;&lt;div&gt;has procedures for most types of statistical analyses including many forms of regression and&lt;/div&gt;&lt;div&gt;analysis of variance.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-6621866616649038844?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/6621866616649038844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=6621866616649038844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/6621866616649038844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/6621866616649038844'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2008/09/overview-of-sas-products.html' title='An Overview of SAS Products'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-8284472792210529651</id><published>2008-09-15T00:12:00.001-07:00</published><updated>2008-12-23T21:47:39.061-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAS'/><category scheme='http://www.blogger.com/atom/ns#' term='Language'/><title type='text'>The SAS Language</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Many software applications are either menu driven, or command driven (enter a commandsee&lt;/div&gt;&lt;div&gt;the result). SAS is neither. With SAS, you use statements to write a series of instructions called a&lt;/div&gt;&lt;div&gt;SAS program. The program communicates what you want to do and is written using the SAS&lt;/div&gt;&lt;div&gt;language. There are some menu-driven front ends to SAS, for example SAS Enterprise Guide&lt;/div&gt;&lt;div&gt;software, which make SAS appear like a point-and-click program. However, these front ends still&lt;/div&gt;&lt;div&gt;use the SAS language to write programs for you. You will have much more flexibility using SAS&lt;/div&gt;&lt;div&gt;if you learn to write your own programs using the SAS language. Maybe learning a new&lt;/div&gt;&lt;div&gt;language is the last thing you want to do, but be assured that although there are parallels&lt;/div&gt;&lt;div&gt;between SAS and languages you know (be they English or FORTRAN), SAS is much easier to&lt;/div&gt;&lt;div&gt;learn.&lt;/div&gt;&lt;div&gt;SAS programs A SAS program is a sequence of statements executed in order. A statement&lt;/div&gt;&lt;div&gt;gives information or instructions to SAS and must be appropriately placed in the program. An&lt;/div&gt;&lt;div&gt;everyday analogy to a SAS program is a trip to the bank. You enter your bank, stand in line, and&lt;/div&gt;&lt;div&gt;when you finally reach the teller’s window, you say what you want to do. The statements you&lt;/div&gt;&lt;div&gt;give can be written down in the form of a program:&lt;/div&gt;&lt;div&gt;I would like to make a withdrawal.&lt;/div&gt;&lt;div&gt;My account number is 0937.&lt;/div&gt;&lt;div&gt;I would like $200.&lt;/div&gt;&lt;div&gt;Give me five 20s and two 50s.&lt;/div&gt;&lt;div&gt;Note that you first say what you want to do, then give all the information the teller needs to&lt;/div&gt;&lt;div&gt;carry out your request. The order of the subsequent statements may not be important, but you&lt;/div&gt;&lt;div&gt;must start with the general statement of what you want to do. You would not, for example, go&lt;/div&gt;&lt;div&gt;up to a bank teller and say, “Give me five 20s and two 50s.” This is not only bad form, but would&lt;/div&gt;&lt;div&gt;probably make the teller’s heart skip a beat or two. You must also make sure that all the&lt;/div&gt;&lt;div&gt;subsequent statements belong with the first. You would not say, “I want the largest box you&lt;/div&gt;&lt;div&gt;have” when making a withdrawal from your checking account. That statement belongs with “I&lt;/div&gt;&lt;div&gt;would like to open a safe deposit box.” A SAS program is an ordered set of SAS statements like&lt;/div&gt;&lt;div&gt;the ordered set of instructions you use when you go to the bank.&lt;/div&gt;&lt;div&gt;SAS statements As with any language, there are a few rules to follow when writing SAS&lt;/div&gt;&lt;div&gt;programs. Fortunately for us, the rules for writing SAS programs are much fewer and simpler&lt;/div&gt;&lt;div&gt;than those for English.&lt;/div&gt;&lt;div&gt;The most important rule is&lt;/div&gt;&lt;div&gt;Every SAS statement ends with a semicolon.&lt;/div&gt;&lt;div&gt;This sounds simple enough. But while children generally outgrow the habit of forgetting the&lt;/div&gt;&lt;div&gt;period at the end of a sentence, SAS programmers never seem to outgrow forgetting the semicolon&lt;/div&gt;&lt;div&gt;at the end of a SAS statement. Even the most experienced SAS programmer will at least&lt;/div&gt;&lt;div&gt;occasionally forget the semicolon. You will be two steps ahead if you remember this simple rule.&lt;/div&gt;&lt;div&gt;Chapter 1: Getting Started Using SAS Software 3&lt;/div&gt;&lt;div&gt;Layout of SAS programs There really aren’t any rules about how to format your SAS&lt;/div&gt;&lt;div&gt;program. While it is helpful to have a neat looking program with each statement on a line by itself&lt;/div&gt;&lt;div&gt;and indentions to show the various parts of the program, it isn’t necessary.&lt;/div&gt;&lt;div&gt; SAS statements can be in upper- or lowercase.&lt;/div&gt;&lt;div&gt; Statements can continue on the next line (as long as you don’t split words in two).&lt;/div&gt;&lt;div&gt; Statements can be on the same line as other statements.&lt;/div&gt;&lt;div&gt; Statements can start in any column.&lt;/div&gt;&lt;div&gt;So you see, SAS is so flexible that it is possible to write programs so disorganized that no one can&lt;/div&gt;&lt;div&gt;read them, not even you. (Of course, we don’t recommend this.)&lt;/div&gt;&lt;div&gt;Comments To make your programs more understandable, you can insert comments into your&lt;/div&gt;&lt;div&gt;programs. It doesn’t matter what you put in your commentsSAS doesn’t look at it. You could put&lt;/div&gt;&lt;div&gt;your favorite cookie recipe in there if you want. However, comments are usually used to annotate&lt;/div&gt;&lt;div&gt;the program, making it easier for someone to read your program and understand what you have&lt;/div&gt;&lt;div&gt;done and why.&lt;/div&gt;&lt;div&gt;There are two styles of comments you can use: one starts with an asterisk (*) and ends with a&lt;/div&gt;&lt;div&gt;semicolon (;). The other style starts with a slash asterisk (/*) and ends with an asterisk slash (*/).&lt;/div&gt;&lt;div&gt;The following SAS program shows the use of both of these style comments:&lt;/div&gt;&lt;div&gt;* Read animals’ weights from file;&lt;/div&gt;&lt;div&gt;DATA animals;&lt;/div&gt;&lt;div&gt;INFILE ’c:\MyRawData\Zoo.dat’;&lt;/div&gt;&lt;div&gt;INPUT Lions Tigers;&lt;/div&gt;&lt;div&gt;PROC PRINT DATA = animals; /* Print the results */&lt;/div&gt;&lt;div&gt;RUN;&lt;/div&gt;&lt;div&gt;Since some operating environments interpret a slash asterisk (/*) in the first column as the end of a&lt;/div&gt;&lt;div&gt;job, be careful when using this style of comment not to place it in the first column. For this reason,&lt;/div&gt;&lt;div&gt;we chose the asterisk-semicolon style of comment for this book.&lt;/div&gt;&lt;div&gt;Errors People who are just learning a programming language often get frustrated because their&lt;/div&gt;&lt;div&gt;programs do not work correctly the first time they write them. To make matters worse, SAS errors&lt;/div&gt;&lt;div&gt;often come up in bright red letters, and for the poor person whose results turn out more red than&lt;/div&gt;&lt;div&gt;black, this can be a very humbling experience. You should expect errors. Most programs simply&lt;/div&gt;&lt;div&gt;don’t work the first time, if for no other reason than you are human. You forget a semicolon,&lt;/div&gt;&lt;div&gt;misspell a word, have your fingers in the wrong place on the keyboard. It happens. Often one small&lt;/div&gt;&lt;div&gt;mistake can generate a whole list of errors. Don’t panic if you see red.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3911719273486645161-8284472792210529651?l=sasfaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sasfaqs.blogspot.com/feeds/8284472792210529651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3911719273486645161&amp;postID=8284472792210529651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/8284472792210529651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3911719273486645161/posts/default/8284472792210529651'/><link rel='alternate' type='text/html' href='http://sasfaqs.blogspot.com/2008/09/sas-language.html' title='The SAS Language'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3911719273486645161.post-8000123629950968652</id><published>2008-08-06T04:34:00.001-07:00</published><updated>2008-12-23T21:47:39.061-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAS'/><category scheme='http://www.blogger.com/atom/ns#' term='Basic Concepts'/><title type='text'>Basic Concepts</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///D:%5CDOCUME%7E1%5Cshesu04%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_filelist.xml"&gt;&lt;link rel="Edit-Time-Data" href="file:///D:%5CDOCUME%7E1%5Cshesu04%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_editdata.mso"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;title&gt;Oracle Certification Program Candidate Guide&lt;/title&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:documentproperties&gt;   &lt;o:author&gt;misebast&lt;/o:Author&gt;   &lt;o:version&gt;11.9999&lt;/o:Version&gt;  &lt;/o:DocumentProperties&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-alt:Symbol; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:SimSun; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-alt:ËÎÌå; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;} @font-face 	{font-family:"\@SimSun"; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-alt:"\@Arial Unicode MS"; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} a:link, span.MsoHyperlink 	{color:blue; 	mso-text-animation:none; 	text-decoration:none; 	text-underline:none; 	text-decoration:none; 	text-line-through:none;} a:visited, span.MsoHyperlinkFollowed 	{color:#606420; 	text-decoration:underline; 	text-underline:single;} p.para, li.para, div.para 	{mso-style-name:para; 	margin-top:.15in; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} p.first-para, li.first-para, div.first-para 	{mso-style-name:first-para; 	margin-top:.15in; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} p.first-para2, li.first-para2, div.first-para2 	{mso-style-name:first-para2; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} p.table-para, li.table-para, div.table-para 	{mso-style-name:table-para; 	margin-top:4.8pt; 	margin-right:12.0pt; 	margin-bottom:0in; 	margin-left:.05in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} span.fixed1 	{mso-style-name:fixed1; 	font-family:"Courier New"; 	mso-ascii-font-family:"Courier New"; 	mso-hansi-font-family:"Courier New"; 	mso-bidi-font-family:"Courier New";} p.bold, li.bold, div.bold 	{mso-style-name:bold; 	mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US; 	font-weight:bold;} p.first-para1, li.first-para1, div.first-para1 	{mso-style-name:first-para1; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:203762040; 	mso-list-template-ids:1242755706;} @list l0:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l1 	{mso-list-id:276760612; 	mso-list-template-ids:537403976;} @list l1:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l2 	{mso-list-id:761335681; 	mso-list-template-ids:-693443528;} @list l2:level1 	{mso-level-number-format:alpha-upper; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l3 	{mso-list-id:842474590; 	mso-list-template-ids:-563938488;} @list l3:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l4 	{mso-list-id:1217089415; 	mso-list-template-ids:2012892740;} @list l4:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l5 	{mso-list-id:1316371465; 	mso-list-template-ids:-478664392;} @list l5:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l6 	{mso-list-id:1490176383; 	mso-list-template-ids:-2126371542;} @list l6:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Wingdings;} @list l7 	{mso-list-id:1624967767; 	mso-list-template-ids:-1416227622;} @list l7:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l8 	{mso-list-id:1686053432; 	mso-list-template-ids:-148197320;} @list l8:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l9 	{mso-list-id:1775053185; 	mso-list-template-ids:51829316;} @list l9:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l10 	{mso-list-id:1806006229; 	mso-list-template-ids:-700923368;} @list l10:level1 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="para"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:documentproperties&gt;   &lt;o:author&gt;misebast&lt;/o:Author&gt;   &lt;o:version&gt;11.9999&lt;/o:Version&gt;  &lt;/o:DocumentProperties&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;/p&gt;&lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195523"&gt;&lt;/a&gt;&lt;a name="18"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P48A351C37-B8AC-4A1F-99D6-4"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="19"&gt;&lt;/a&gt;&lt;a name="beginpage.A858A4E8-0351-4399-8B84-2575DF"&gt;&lt;/a&gt;&lt;a name="20"&gt;&lt;/a&gt;&lt;a name="beginpage.2E47F049-6301-496C-A8ED-CDF381"&gt;&lt;/a&gt;To program effectively using SAS, you need to understand basic concepts about &lt;b&gt;SAS programs &lt;/b&gt;and the &lt;b&gt;SAS files&lt;/b&gt; that they process. In particular, you need to be familiar with &lt;b&gt;SAS data sets&lt;/b&gt;.&lt;/p&gt;  &lt;p class="para"&gt;In this chapter, you'll examine a simple SAS program and see how it works. You'll see how SAS data sets are stored temporarily or permanently in &lt;b&gt;SAS libraries&lt;/b&gt;. You'll also learn details about SAS data sets, which are files that contain data that is logically arranged in a form that SAS can understand. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_1"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F01%5F0%2Ejpg&amp;amp;image_id=1&amp;amp;previd=IMG_1" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="IMG_1" spid="_x0000_i1030" type="#_x0000_t75" alt="Image from book" style="'width:188.25pt;height:118.5pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image001.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_01.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195524"&gt;&lt;/a&gt;&lt;a name="21"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P88A351C37-B8AC-4A1F-99D6-4"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Objectives&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;In this chapter, you learn aboutB&lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;the structure and components of SAS programs &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;the steps involved in processing SAS programs &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;SAS libraries and the types of SAS files that they contain &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;temporary and permanent SAS libraries &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;a name="22"&gt;&lt;/a&gt;&lt;a name="beginpage.39E11D83-A279-4339-8BC5-6433F9"&gt;&lt;/a&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;The structure and components of SAS data sets. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Tahoma;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195525"&gt;&lt;/a&gt;&lt;a name="23"&gt;&lt;/a&gt;&lt;a name="WBP03CHAPTER1P1749023A24-1431-4201-AADD-"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;SAS Programs&lt;/span&gt;&lt;/span&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="first-para"&gt;You can use SAS programs to access, manage, analyze, or present your data. Let's begin by looking at a simple SAS program. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;data clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;set clinic.admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;proc print data=clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;This program creates a new SAS data set from an existing SAS data set and then prints a listing of the new data set. A SAS data set is a data file that is formatted in a way that SAS can understand. &lt;/p&gt;  &lt;p class="para"&gt;Let's see how this program works. &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195526"&gt;&lt;/a&gt;&lt;a name="24"&gt;&lt;/a&gt;&lt;a name="wbp03chapter1p2649023A24-1431-4201-AADD-"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Components of SAS Programs&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;Our sample SAS program contains two steps: a &lt;b&gt;DATA step&lt;/b&gt; and a &lt;b&gt;PROC step&lt;/b&gt;.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;data clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;set clinic.admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;proc print data=clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;These two types of steps, alone or combined, form most SAS programs. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 26%;" valign="top" width="26%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_2" spid="_x0000_i1025" type="#_x0000_t75" alt="Image from book" style="'width:99.75pt;height:47.25pt'"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image002.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01_01.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 74%;" valign="top" width="74%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;A SAS   program can consist of a DATA step &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 26%;" valign="top" width="26%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_3" spid="_x0000_i1026" type="#_x0000_t75" alt="Image from book" style="'width:98.25pt;height:47.25pt'"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image003.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01_02.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 74%;" valign="top" width="74%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;or a   PROC step&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 26%;" valign="top" width="26%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1027" type="#_x0000_t75" alt="Image from book" style="'width:99.75pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image002.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01_01.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 74%;" valign="top" width="74%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;or any   combination of DATA and PROC steps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 26%;" valign="top" width="26%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1028" type="#_x0000_t75" alt="Image from book" style="'width:98.25pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image003.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01_02.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 74%;" valign="top" width="74%"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 26%;" valign="top" width="26%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1029" type="#_x0000_t75" alt="Image from book" style="'width:98.25pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image003.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01_02.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 74%;" valign="top" width="74%"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="para"&gt;&lt;a name="25"&gt;&lt;/a&gt;&lt;a name="beginpage.5f6e5e31-2058-46be-bc99-f9c6be"&gt;&lt;/a&gt;&lt;b&gt;DATA steps&lt;/b&gt; typically create or modify SAS data sets. They can also be used to produce custom-designed reports. For example, you can use DATA steps to &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;put your data into a SAS data set &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;compute values &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;check for and correct errors in your data &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;produce new SAS data sets by subsetting, merging, and updating existing data sets. &lt;/p&gt;  &lt;p class="para"&gt;&lt;b&gt;PROC (procedure) steps&lt;/b&gt; are pre-written routines that enable you to analyze and process the data in a SAS data set and to present the data in the form of a report. PROC steps sometimes create new SAS data sets that contain the results of the procedure. PROC steps can list, sort, and summarize data. For example, you can use PROC steps to &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;create a report that lists the data &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;produce descriptive statistics &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;create a summary report &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;produce plots and charts. &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195527"&gt;&lt;/a&gt;&lt;a name="26"&gt;&lt;/a&gt;&lt;a name="wbp03chapter1p7649023A24-1431-4201-AADD-"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Characteristics of SAS Programs&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;Next let's look at the individual statements in our sample program. SAS programs consist of &lt;b&gt;SAS statements&lt;/b&gt;. A SAS statement has two important characteristics: &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It usually begins with a SAS &lt;b&gt;keyword&lt;/b&gt;.&lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It always ends with a &lt;b&gt;semicolon&lt;/b&gt;.&lt;/p&gt;  &lt;p class="para"&gt;As you've seen, a DATA step begins with a DATA statement, which begins with the keyword DATA. A PROC step begins with a PROC statement, which begins with the keyword PROC. Our sample program contains &lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_4" spid="_x0000_i1031" type="#_x0000_t75" alt="Image from book" style="'width:12pt;height:12pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image004.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image004.jpg" alt="Image from book" shapes="IMG_4" width="16" border="0" height="16" /&gt;&lt;!--[endif]--&gt;a DATA statement, &lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_5" spid="_x0000_i1032" type="#_x0000_t75" alt="Image from book" style="'width:12pt;height:12.75pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image005.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico02.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image005.jpg" alt="Image from book" shapes="IMG_5" width="16" border="0" height="17" /&gt;&lt;!--[endif]--&gt;a SET statement, &lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_6" spid="_x0000_i1033" type="#_x0000_t75" alt="Image from book" style="'width:12pt;height:11.25pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image006.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico03.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image006.jpg" alt="Image from book" shapes="IMG_6" width="16" border="0" height="15" /&gt;&lt;!--[endif]--&gt;a RUN statement,&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_7" spid="_x0000_i1034" type="#_x0000_t75" alt="Image from book" style="'width:12pt;height:12.75pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image007.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico04.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image007.jpg" alt="Image from book" shapes="IMG_7" width="16" border="0" height="17" /&gt;&lt;!--[endif]--&gt; a PROC PRINT statement, and &lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_8" spid="_x0000_i1035" type="#_x0000_t75" alt="Image from book" style="'width:12pt;height:11.25pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image008.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico05.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image008.jpg" alt="Image from book" shapes="IMG_8" width="16" border="0" height="15" /&gt;&lt;!--[endif]--&gt;another RUN statement. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="" border="1" cellpadding="0"&gt;  &lt;thead&gt;   &lt;tr style=""&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 43%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="43%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 57%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="57%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Sample Program Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 43%;" valign="top" width="43%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1036" type="#_x0000_t75" alt="Image from book" style="'width:12pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image004.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico01.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image004.jpg" alt="Image from book" shapes="_x0000_i1036" width="16" border="0" height="16" /&gt;&lt;!--[endif]--&gt;a DATA statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 57%;" valign="top" width="57%"&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;data clinic.admit2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 43%;" valign="top" width="43%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1037" type="#_x0000_t75" alt="Image from book" style="'width:12pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image005.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico02.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image005.jpg" alt="Image from book" shapes="_x0000_i1037" width="16" border="0" height="17" /&gt;&lt;!--[endif]--&gt;a SET statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 57%;" valign="top" width="57%"&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;set clinic.admit;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 43%;" valign="top" width="43%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1038" type="#_x0000_t75" alt="Image from book" style="'width:12pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image006.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico03.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image006.jpg" alt="Image from book" shapes="_x0000_i1038" width="16" border="0" height="15" /&gt;&lt;!--[endif]--&gt;a RUN statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 57%;" valign="top" width="57%"&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 43%;" valign="top" width="43%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1039" type="#_x0000_t75" alt="Image from book" style="'width:12pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image007.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico04.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image007.jpg" alt="Image from book" shapes="_x0000_i1039" width="16" border="0" height="17" /&gt;&lt;!--[endif]--&gt;a PROC PRINT   statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 57%;" valign="top" width="57%"&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;proc print data=clinic.admit2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 43%;" valign="top" width="43%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1040" type="#_x0000_t75" alt="Image from book" style="'width:12pt;"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image008.jpg" href="http://images.books24x7.com/bookimages/id_13821/ico05.jpg"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image008.jpg" alt="Image from book" shapes="_x0000_i1040" width="16" border="0" height="15" /&gt;&lt;!--[endif]--&gt;another RUN statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 57%;" valign="top" width="57%"&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195528"&gt;&lt;/a&gt;&lt;a name="27"&gt;&lt;/a&gt;&lt;a name="wbp03chapter1p11649023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Layout for SAS Programs&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="28"&gt;&lt;/a&gt;&lt;a name="BEGINPAGE.F9D178F5-0A86-489D-8003-3EEBF7"&gt;&lt;/a&gt;SAS statements are in free format. This means that &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;they can begin and end anywhere on a line &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;one statement can continue over several lines &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;several statements can be on a line. &lt;/p&gt;  &lt;p class="para"&gt;Blanks or special characters separate "words" in a SAS statement. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 0.25in;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Note &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;You can specify SAS statements   in uppercase or lowercase. In most situations, text that is enclosed in   quotation marks is case sensitive. &lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="last-para"&gt;You’ve examined the general structure of our sample program. But what happens when you run the program? &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195529"&gt;&lt;/a&gt;&lt;a name="29"&gt;&lt;/a&gt;&lt;a name="wbp03chapter1p12649023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Processing SAS Programs&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;When you submit a SAS program, SAS begins reading the statements and checking them for errors. &lt;/p&gt;  &lt;p class="para"&gt;DATA and PROC statements signal the beginning of a new step. When SAS encounters a subsequent DATA, PROC, or RUN statement (for DATA steps and most procedures) or a QUIT statement (for some procedures), SAS stops reading statements and executes the previous step in the program. In our sample program, each step ends with a RUN statement. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;data clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;set clinic.admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;proc print data=clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 0.25in;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Note &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;The beginning of a new step   (DATA or PROC) implies the end of the previous step. Though the RUN statement   is not always required between steps in a SAS program, using it can make the   SAS program easier to read and debug, and it makes the SAS log easier to   read. &lt;a name="beginpage.5e6fe53d-0a7c-4ca3-bd2d-1f833c"&gt;&lt;/a&gt;&lt;a name="30"&gt;&lt;/a&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195530"&gt;&lt;/a&gt;&lt;a name="31"&gt;&lt;/a&gt;&lt;a name="wbp03chapter1p13549023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Log Messages&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;Each time a step is executed, SAS generates a log of the processing activities and the results of the processing. The SAS log collects messages about the processing of SAS programs and about any errors that occur. &lt;/p&gt;  &lt;p class="para"&gt;When SAS processes our sample program, you see the log messages shown below. Notice that you get separate sets of messages for each step in the program. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="example-title1"&gt;&lt;span style="  font-weight: normal;font-family:Arial;font-size:10pt;"&gt;SAS Log &lt;/span&gt;&lt;/span&gt;&lt;a name="32"&gt;&lt;/a&gt;&lt;a name="example.cf3a177e-237b-4d7b-8325-f4063c11"&gt;&lt;/a&gt;&lt;b style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 95%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="95%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1041" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1041" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;1&lt;span style=""&gt;    &lt;/span&gt;data clinic.: admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;2&lt;span style=""&gt;       &lt;/span&gt;set clinic.admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;3&lt;span style=""&gt;    &lt;/span&gt;run; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: The data set CLINIC.ADMIT2 has 21&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;observations and 9 variables. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: The DATA statement used 1.03 seconds &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;4&lt;span style=""&gt;    &lt;/span&gt;proc print data=clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;5&lt;span style=""&gt;    &lt;/span&gt;run; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: The PROCEDURE PRINT used 0.2 seconds. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 95%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="95%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1042" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1042" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="  display: none;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 10%;" width="10%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12pt;"&gt;   &lt;td style="padding: 0in; height: 12pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195531"&gt;&lt;/a&gt;&lt;a name="33"&gt;&lt;/a&gt;&lt;a name="wbp03chapter1p153"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Results of Processing&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;Suppose you submit the sample program below. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;data clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;set clinic.admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;proc print data=clinic.admit2; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;When the program is processed, it &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;creates the SAS data set &lt;b&gt;Clinic.Admit2&lt;/b&gt;&lt;a name="34"&gt;&lt;/a&gt;&lt;a name="beginpage.4f677d43-d9a0-472b-a693-3d9529"&gt;&lt;/a&gt; in the DATA step. The DATA step produces messages in the SAS log, but it does not create a report or other output. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;creates the following HTML report of the SAS data set &lt;b&gt;Clinic.Admit2&lt;/b&gt;:&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 434.1pt; margin-left: 20.4pt;" width="579" border="1" cellpadding="0"&gt;  &lt;thead&gt;   &lt;tr style="height: 0.1in;"&gt;    &lt;td colspan="3" style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 10.16%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="10%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Obs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td colspan="2" style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 8.88%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="8%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 17.18%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="17%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 8.18%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="8%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Sex&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 8.44%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="8%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Age&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 9.06%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="9%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 11.18%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="11%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Height&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 12.72%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="12%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Weight ActLevel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td colspan="2" style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 10.74%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 0.1in;" valign="top" width="10%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Fee&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;&lt;tr style="height: 0.1in;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 0.1in;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 0.1in;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2458&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 0.1in;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Murray&lt;/span&gt;&lt;/st1:city&gt;&lt;/st1:place&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;, W&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 0.1in;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 0.1in;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;27&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 0.1in;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 0.1in;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;72&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 0.1in;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;168 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 0.1in;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;85.20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 0.1in;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 0.1in;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 0.1in;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2462&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 0.1in;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Almers,   C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 0.1in;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 0.1in;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;34&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 0.1in;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 0.1in;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;66&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 0.1in;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;152 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 0.1in;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;3&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2501&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Bonaventure,   T&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;31&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;61&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;123 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 28.45pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 28.45pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;4&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 28.45pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2523&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 28.45pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Johnson,   R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 28.45pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 28.45pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;43&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 28.45pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;31&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 28.45pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;63&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 28.45pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;137 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 28.45pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;5&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2539&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;LaMance,   K&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;51&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;71&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;158 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;6&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2544&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Jones, M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;29&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;76&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;193 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;7&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2552&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Reberson,   P&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;32&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;67&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;151 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;8&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2555&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;King, E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;35&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;70&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;173 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;9&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2563&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Pitts, D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;34&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;22&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;73&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;154 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;10&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2568&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Eberhardt,   S&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;49&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;27&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;64&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;172 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;11&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2571&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Nunnelly,   A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;44&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;19&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;66&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;140 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;12&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2572&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Oberon,   M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;28&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;62&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;118 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;85.20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;13&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2574&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Peterson,   V&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;69&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;147 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;14&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2575&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Quigley,   M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;69&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;163 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;15&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2578&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Cameron,   L&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;47&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;72&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;173 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;16&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2579&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Underwood,   K&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;22&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;71&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;191 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;17&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2584&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Takahashi,   Y&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;43&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;29&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;123 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;124.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;18&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2586&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Derber,   B&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;25&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;23&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;188 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;85.20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;19&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2588&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Ivan, H&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;22&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;63&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;139 LOW&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;85.20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 28.45pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 28.45pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;20&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 28.45pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2589&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 28.45pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Wilcox,   E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 28.45pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 28.45pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;41&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 28.45pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 28.45pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;67&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 28.45pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;141 HIGH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 28.45pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 27.7pt;"&gt;   &lt;td colspan="3" style="padding: 0in; width: 10.16%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;21&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 8.88%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;2595&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 17.18%; height: 27.7pt;" valign="top" width="17%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Warren,   C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.18%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8.44%; height: 27.7pt;" valign="top" width="8%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;54&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 9.06%; height: 27.7pt;" valign="top" width="9%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 11.18%; height: 27.7pt;" valign="top" width="11%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;71&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 12.72%; height: 27.7pt;" valign="top" width="12%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;183 MOD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="padding: 0in; width: 10.74%; height: 27.7pt;" valign="top" width="10%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;149.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 0.1in;"&gt;   &lt;td style="border: medium none ; padding: 0in;" width="0%"&gt;&lt;p class="MsoNormal"&gt; &lt;/p&gt;&lt;/td&gt;   &lt;td style="border: medium none ; padding: 0in; height: 0.1in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="2" style="border: medium none ; padding: 0in; height: 0.1in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Note &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan="8" style="border: medium none ; padding: 0in; height: 0.1in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;Throughout this book,   procedure output is shown in HTML in the style shown above unless otherwise   noted. You can learn how to create HTML output in &lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;destid=93#93" target="_parent"&gt;Chapter 2&lt;/a&gt;, &lt;b&gt;Referencing Files and Setting Options&lt;/b&gt;.&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: medium none ; padding: 0in;" width="3%"&gt;&lt;p class="MsoNormal"&gt; &lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;!--[if !supportMisalignedColumns]--&gt;  &lt;tr height="0"&gt;   &lt;td style="border: medium none ;" width="6"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="23"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="29"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="28"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="27"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="100"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="52"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="52"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="56"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="68"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="77"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="43"&gt;&lt;/td&gt;   &lt;td style="border: medium none ;" width="22"&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;!--[endif]--&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="para"&gt;You've seen the results of submitting our sample program. For other SAS programs, the results of processing might vary: &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;a name="35"&gt;&lt;/a&gt;&lt;a name="beginpage.4017e68e-3151-4282-8c42-27f74f"&gt;&lt;/a&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;SAS programs often invoke procedures that create output in the form of a report, as is the case with the TABULATE procedure. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;proc tabulate data=clinic.admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;class sex; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;var height weight; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;table sex*(height weight),mean; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 20.4pt;" border="1" cellpadding="0"&gt;  &lt;thead&gt;   &lt;tr style=""&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 19%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="19%"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 28%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="28%"&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 53%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="53%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Mean&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 19%;" valign="top" width="19%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Sex&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td rowspan="2" style="padding: 0in; width: 53%;" valign="bottom" width="53%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;64.82&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td rowspan="2" style="padding: 0in; width: 19%;" valign="top" width="19%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Height&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Weight&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;141.73&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td rowspan="2" style="padding: 0in; width: 19%;" valign="top" width="19%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Height&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 53%;" valign="top" width="53%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;72.00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Weight&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;172.80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Other SAS programs perform tasks such as sorting and managing data, which have no visible results except for &lt;b&gt;messages in the log&lt;/b&gt;. (All SAS programs produce log messages, but some SAS programs produce &lt;b&gt;only&lt;/b&gt; log messages.) &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;proc copy in=clinic out=work; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;         &lt;/span&gt;select admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="example" style="margin: 0in 0in 5pt 20.4pt;"&gt;&lt;span class="example-title1"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;SAS Log&lt;/span&gt;&lt;/span&gt;&lt;a name="36"&gt;&lt;/a&gt;&lt;a name="EXAMPLE.1590C645-1073-4C8E-87E0-AB8756AA"&gt;&lt;/a&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 90%; margin-left: 20.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1064" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1064" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;6&lt;span style=""&gt;  &lt;/span&gt;proc copy in: =clinic out=work; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;7&lt;span style=""&gt;  &lt;/span&gt;select admit; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;8&lt;span style=""&gt;  &lt;/span&gt;run; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: Copying CLINIC.ADMIT to WORK.ADMIT (memtype=DATA). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: There were 21 observations read from the data set&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;CLINIC.ADMIT. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: The data set WORK.ADMIT has 21 observations and 9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;variables. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;NOTE: PROCEDURE COPY used (Total process time): &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;      &lt;/span&gt;real time&lt;span style=""&gt;           &lt;/span&gt;0.13 seconds &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;cpu time&lt;span style=""&gt;            &lt;/span&gt;0.08 seconds &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 90%; margin-left: 20.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="90%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1065" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1065" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-left: 20.4pt;"&gt;&lt;span style="  display: none;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 10%; margin-left: 20.4pt;" width="10%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12pt;"&gt;   &lt;td style="padding: 0in; height: 12pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="  display: none;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 0.25in;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Note &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;You can turn off log messages   by using system options, which you can learn about in &lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;destid=93#93" target="_parent"&gt;Chapter 2&lt;/a&gt;, &lt;b&gt;Referencing Files and Setting Options&lt;/b&gt;.&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Tahoma;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195532"&gt;&lt;/a&gt;&lt;a name="37"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P66149023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;SAS Libraries&lt;/span&gt;&lt;/span&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="para"&gt;&lt;a name="38"&gt;&lt;/a&gt;&lt;a name="beginpage.CD2CBEDE-5D1C-4578-A431-2E9870"&gt;&lt;/a&gt;You've learned about SAS programs and SAS data sets. Now let's look at &lt;b&gt;SAS libraries&lt;/b&gt; to see how SAS data sets and other SAS files are organized and stored. &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195533"&gt;&lt;/a&gt;&lt;a name="39"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P66349023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;How SAS Files Are Stored&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;Every SAS file is stored in a &lt;b&gt;SAS library&lt;/b&gt;, which is a collection of SAS files. A SAS data library is the highest level of organization for information within SAS. &lt;/p&gt;  &lt;p class="para"&gt;SAS libraries have different implementations depending on your operating environment, but a library usually corresponds to the level of organization that your host operating system uses to access and store files. In some operating environments, a library is a physical collection of files. In others, the files are only logically related. &lt;/p&gt;  &lt;p class="para"&gt;For example, in the Windows and UNIX environments, a library is typically a group of SAS files in the same folder or directory. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_9" spid="_x0000_i1043" type="#_x0000_t75" alt="Image from book" style="'width:239.25pt;height:186pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image010.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_02.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;The table below summarizes the implementation of SAS libraries in various operating environments. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="" border="1" cellpadding="0"&gt;  &lt;thead&gt;   &lt;tr style=""&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 30%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="30%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Environment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 70%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="70%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Library&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 30%;" valign="top" width="30%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Windows,   UNIX, OpenVMS&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;br /&gt; (directory based- systems)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 70%;" valign="top" width="70%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;a group   of SAS files that are stored in the same directory. Other files can be stored   in the directory, but only the files that have SAS file extensions are   recognized as part of the SAS library. (Refer to the online documentation for   more information.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 30%;" valign="top" width="30%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;CMS&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 70%;" valign="top" width="70%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;a group   of SAS files that have the same file type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 30%;" valign="top" width="30%"&gt;   &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;z/OS&lt;/span&gt;&lt;/b&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 70%;" valign="top" width="70%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;a   specially formatted host data set in which only SAS files are stored.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195534"&gt;&lt;/a&gt;&lt;a name="40"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P69149023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Storing Files Temporarily or Permanently&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="41"&gt;&lt;/a&gt;&lt;a name="beginpage.B4037D4A-149B-45C5-B6EA-E3A8C3"&gt;&lt;/a&gt;Depending on the library name that you use when you create a file, you can store SAS files temporarily or permanently. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="42"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P69449023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_10" spid="_x0000_i1044" type="#_x0000_t75" alt="Image from book" style="'width:120.75pt;height:99.75pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image011.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_03.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;br /&gt;&lt;span class="figure-title1"&gt;Temporary SAS libraries last only for the current SAS session. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;&lt;b&gt;Storing files temporarily:&lt;/b&gt; &lt;/p&gt;  &lt;p class="para"&gt;If you don't specify a library name when you create a file (or if you specify the library name &lt;b&gt;Work&lt;/b&gt;), the file is stored in the temporary SAS data library. When you end the session, the temporary library and all of its files are deleted. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="43"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P69849023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_11" spid="_x0000_i1045" type="#_x0000_t75" alt="Image from book" style="'width:124.5pt;height:106.5pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image012.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_04.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;br /&gt;&lt;span class="figure-title1"&gt;Permanent SAS libraries are available to you during subsequent SAS sessions.&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;&lt;b&gt;Storing files permanently:&lt;/b&gt; &lt;/p&gt;  &lt;p class="para"&gt;To store files permanently in a SAS data library, you specify a library name other than the default library name &lt;b&gt;Work&lt;/b&gt;.&lt;/p&gt;  &lt;p class="para"&gt;For example, by specifying the library name &lt;b&gt;Clinic&lt;/b&gt; when you create a file, you specify that the file is to be stored in a permanent SAS data library until you delete it. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 0.25in;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Note &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;You can learn how to set up   permanent SAS libraries in &lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;destid=93#93" target="_parent"&gt;Chapter 2&lt;/a&gt;, &lt;b&gt;Referencing Files and Setting Options&lt;/b&gt;.&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Tahoma;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195535"&gt;&lt;/a&gt;&lt;a name="44"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P70349023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;Referencing SAS Files&lt;/span&gt;&lt;/span&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195536"&gt;&lt;/a&gt;&lt;a name="45"&gt;&lt;/a&gt;&lt;a name="beginpage.62D05653-591B-470F-86F5-0F95BF"&gt;&lt;/a&gt;&lt;a name="46"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P70449023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Two-Level Names&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;To reference a permanent SAS data set in your SAS programs, you use a &lt;b&gt;two-level name&lt;/b&gt;:&lt;/p&gt;  &lt;p class="first-para"&gt;&lt;b&gt;&lt;i&gt;libref.filename&lt;/i&gt;&lt;/b&gt; &lt;/p&gt;  &lt;p class="para"&gt;In the two-level name, &lt;b&gt;&lt;i&gt;libref&lt;/i&gt;&lt;/b&gt; is the name of the SAS data library that contains the file, and &lt;b&gt;&lt;i&gt;filename &lt;/i&gt;&lt;/b&gt;is the name of the file itself. A period separates the libref and filename. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_12"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F05%5F0%2Ejpg&amp;amp;image_id=12&amp;amp;previd=IMG_12" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_12" spid="_x0000_i1046" type="#_x0000_t75" alt="Image from book" style="'width:191.25pt;height:122.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image013.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_05.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;For example, in our sample program, &lt;b&gt;Clinic.Admit&lt;/b&gt; is the two-level name for the SAS data set &lt;b&gt;Admit&lt;/b&gt;, which is stored in the library named &lt;b&gt;Clinic&lt;/b&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_13" spid="_x0000_i1047" type="#_x0000_t75" alt="Image from book" style="'width:93.75pt;height:60pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image014.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_06.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195537"&gt;&lt;/a&gt;&lt;a name="47"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P71149023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Referencing Temporary SAS Files&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="48"&gt;&lt;/a&gt;&lt;a name="beginpage.C9097E87-7086-44B1-8C14-030189"&gt;&lt;/a&gt;To reference temporary SAS files, you can specify the default libref &lt;b&gt;Work&lt;/b&gt;, a period, and the filename. For example, the two-level name &lt;b&gt;Work.Test&lt;/b&gt; references the SAS data set named &lt;b&gt;Test&lt;/b&gt; that is stored in the temporary SAS library &lt;b&gt;Work&lt;/b&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_14"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F07%5F0%2Ejpg&amp;amp;image_id=14&amp;amp;previd=IMG_14" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_14" spid="_x0000_i1048" type="#_x0000_t75" alt="Image from book" style="'width:207.75pt;height:94.5pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image015.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_07.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;Alternatively, you can use a &lt;b&gt;one-level name&lt;/b&gt; (the filename only) to reference a file in a temporary SAS library. When you specify a one-level name, the default libref &lt;b&gt;Work&lt;/b&gt; is assumed. For example, the one-level name &lt;b&gt;Test&lt;/b&gt; also references the SAS data set named &lt;b&gt;Test&lt;/b&gt; that is stored in the temporary SAS library &lt;b&gt;Work&lt;/b&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_15"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F08%5F0%2Ejpg&amp;amp;image_id=15&amp;amp;previd=IMG_15" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_15" spid="_x0000_i1049" type="#_x0000_t75" alt="Image from book" style="'width:207.75pt;height:102pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image016.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_08.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 0.25in;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 30pt;" valign="top" width="40"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Info &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;If the USER library is   assigned, SAS uses the &lt;b&gt;User&lt;/b&gt; library rather than the &lt;b&gt;Work&lt;/b&gt;   library for one-level names. &lt;b&gt;User&lt;/b&gt; is a permanent library. For more   information, see the &lt;i&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=7466&amp;amp;destid=0#0" target="_parent"&gt;SAS Language Reference: Concepts &lt;/a&gt;&lt;/i&gt;documentation. &lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195538"&gt;&lt;/a&gt;&lt;a name="49"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P71749023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Referencing Permanent SAS Files&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="50"&gt;&lt;/a&gt;&lt;a name="beginpage.C6AE5F6E-C85B-4F79-86AA-946BC4"&gt;&lt;/a&gt;You can see that &lt;b&gt;Clinic.Admit&lt;/b&gt; and &lt;b&gt;Clinic.Admit2&lt;/b&gt; are permanent SAS data sets because the library name is &lt;b&gt;Clinic,&lt;/b&gt; not &lt;b&gt;Work&lt;/b&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_16"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F09%5F0%2Ejpg&amp;amp;image_id=16&amp;amp;previd=IMG_16" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_16" spid="_x0000_i1050" type="#_x0000_t75" alt="Image from book" style="'width:232.5pt;height:80.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image017.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_09.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="last-para"&gt;So referencing a SAS file in any library &lt;b&gt;except Work&lt;/b&gt; indicates that the SAS file is stored permanently. For example, when our sample program creates &lt;b&gt;Clinic.Admit2&lt;/b&gt;, it stores the new &lt;b&gt;Admit2&lt;/b&gt; data set permanently in the SAS library &lt;b&gt;Clinic.&lt;/b&gt; &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195539"&gt;&lt;/a&gt;&lt;a name="51"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P72149023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Rules for SAS Names&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;SAS data set names &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;can be 1 to 32 characters long &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;must begin with a letter (A–Z, either uppercase or lowercase) or an underscore (_) &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;can continue with any combination of numbers, letters, or underscores. &lt;/p&gt;  &lt;p class="para"&gt;These are examples of valid data set names: &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;Payroll &lt;/b&gt;&lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;LABDATA1995_1997 &lt;/b&gt;&lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;_EstimatedTaxPayments3 &lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Tahoma;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195540"&gt;&lt;/a&gt;&lt;a name="52"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P73449023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;SAS Data Sets&lt;/span&gt;&lt;/span&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="para"&gt;&lt;a name="53"&gt;&lt;/a&gt;&lt;a name="beginpage.ECE593D1-701A-438C-A760-EDCCC2"&gt;&lt;/a&gt;So far, you've seen the components and characteristics of SAS programs, including how they reference SAS data sets. Data sets are one type of SAS file. There are other types of SAS files (such as catalogs), but this chapter focuses on SAS data sets. For many procedures and for some DATA step statements, data must be in the form of a SAS data set to be processed. Now let's take a closer look at SAS data sets. &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195541"&gt;&lt;/a&gt;&lt;a name="54"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P73649023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Overview of Data Sets&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;As you saw in our sample program, for many of the data processing tasks that you perform with SAS, you &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;access data in the form of a SAS data set &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;analyze, manage, or present the data. &lt;/p&gt;  &lt;p class="para"&gt;Conceptually, a SAS data set is a file that consists of two parts: a &lt;b&gt;descriptor portion&lt;/b&gt; and a &lt;b&gt;data portion&lt;/b&gt;. Sometimes a SAS data set also points to one or more indexes, which enable SAS to locate records in the data set more efficiently. (The data sets that you see in this chapter do not contain indexes.) &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_17"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F10%5F0%2Ejpg&amp;amp;image_id=17&amp;amp;previd=IMG_17" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_17" spid="_x0000_i1051" type="#_x0000_t75" alt="Image from book" style="'width:171.75pt;height:132pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image018.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_10.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195542"&gt;&lt;/a&gt;&lt;a name="55"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P74449023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Descriptor Portion&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="56"&gt;&lt;/a&gt;&lt;a name="beginpage.481D987A-00EB-4CDF-9BB5-667F08"&gt;&lt;/a&gt;The descriptor portion of a SAS data set contains information about the data set, including &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;the name of the data set &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;the date and time that the data set was created &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;the number of observations &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;the number of variables. &lt;/p&gt;  &lt;p class="para"&gt;Let's look at another SAS data set. The table below lists part of the descriptor portion of the data set &lt;b&gt;Clinic.Insure&lt;/b&gt;, which contains insurance information for patients who are admitted to a wellness clinic. (It's a good idea to give your data set a name that is descriptive of the contents.) &lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 95%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="95%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1066" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1066" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Data Set Name:&lt;span style=""&gt;      &lt;/span&gt;CLINIC.INSURE &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Member Type:&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;DATA &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Engine:&lt;span style=""&gt;             &lt;/span&gt;V8 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Created:&lt;span style=""&gt;            &lt;/span&gt;10:05 Tuesday, March 30, 1999 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Observations:&lt;span style=""&gt;       &lt;/span&gt;21 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Variables:&lt;span style=""&gt;          &lt;/span&gt;7 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Indexes:&lt;span style=""&gt;            &lt;/span&gt;0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Observation Length: 64 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 95%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="95%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1067" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1067" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="  display: none;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 10%;" width="10%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12pt;"&gt;   &lt;td style="padding: 0in; height: 12pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195543"&gt;&lt;/a&gt;&lt;a name="57"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P76449023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Data Portion&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;The data portion of a SAS data set is a collection of data values that are arranged in a rectangular table. In the example below, the name &lt;i&gt;Jones&lt;/i&gt; is a data value, the weight &lt;i&gt;158.3&lt;/i&gt; is a data value, and so on. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_18"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F11%5F0%2Ejpg&amp;amp;image_id=18&amp;amp;previd=IMG_18" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_18" spid="_x0000_i1052" type="#_x0000_t75" alt="Image from book" style="'width:262.5pt;height:108.75pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image019.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_11.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195544"&gt;&lt;/a&gt;&lt;a name="58"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P76749023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Observations (Rows)&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="59"&gt;&lt;/a&gt;&lt;a name="beginpage.AFEF0E11-14DA-431A-9A10-A25136"&gt;&lt;/a&gt;&lt;b&gt;Rows&lt;/b&gt; (called &lt;b&gt;observations&lt;/b&gt;) in the data set are collections of data values that usually relate to a single object. The values &lt;i&gt;Jones&lt;/i&gt;,&lt;i&gt; M&lt;/i&gt;,&lt;i&gt; 48&lt;/i&gt;, and &lt;i&gt;128.6&lt;/i&gt; constitute a single observation in the data set shown below. &lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195545"&gt;&lt;/a&gt;&lt;a name="63"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P77849023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;Variable Attributes&lt;/span&gt;&lt;/span&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="first-para"&gt;In addition to general information about the data set, the descriptor portion contains information about the attributes of each variable in the data set. The attribute information includes the variable's name, type, length, format, informat, and label. &lt;/p&gt;  &lt;p class="para"&gt;When you write SAS programs, it's important to understand the attributes of the variables that you use. For example, you might need to combine SAS data sets that contain same-named variables. In this case, the variables must be the same type (character or numeric). &lt;/p&gt;  &lt;p class="para"&gt;The following is a partial listing of the attribute information in the descriptor portion of the SAS data set &lt;b&gt;Clinic.Insure&lt;/b&gt;. Let's look at the &lt;b&gt;name&lt;/b&gt;,&lt;b&gt; type&lt;/b&gt;, and &lt;b&gt;length&lt;/b&gt; variable attributes. You'll learn about the format, informat, and label attributes later in this chapter. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 95%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="95%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1068" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1068" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Variable Type Length Format&lt;span style=""&gt;   &lt;/span&gt;Informat Label&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Policy&lt;span style=""&gt;   &lt;/span&gt;Num&lt;span style=""&gt;  &lt;/span&gt;8&lt;span style=""&gt;                        &lt;/span&gt;Policy Number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Total&lt;span style=""&gt;    &lt;/span&gt;Num&lt;span style=""&gt;  &lt;/span&gt;8&lt;span style=""&gt;     &lt;/span&gt;DOLLAR8.2 COMMA10. Total Balance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=" Courier New&amp;quot;;font-family:&amp;quot;;font-size:10pt;"&gt;Name&lt;span style=""&gt;     &lt;/span&gt;Char 20&lt;span style=""&gt;                       &lt;/span&gt;Patient Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="background: rgb(1, 1, 0) none repeat scroll 0% 0%; width: 95%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="95%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; background: navy none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1069" type="#_x0000_t75" alt="Image from book" style="'width:.75pt;height:1.5pt'/"&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image009.gif" alt="Image from book" shapes="_x0000_i1069" width="1" border="0" height="2" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="  color: rgb(1, 1, 0);font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="  display: none;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 10%;" width="10%" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12pt;"&gt;   &lt;td style="padding: 0in; height: 12pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Verdana;font-size:8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195546"&gt;&lt;/a&gt;&lt;a name="64"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P79249023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Name&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="65"&gt;&lt;/a&gt;&lt;a name="beginpage.949FB62A-460A-4CA4-9A50-24AC9E"&gt;&lt;/a&gt;Each variable has a name that conforms to SAS naming conventions. Variable names follow exactly the same rules as SAS data set names. Like data set names, variable names &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;can be 1 to 32 characters long &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;must begin with a letter (A–Z, either uppercase or lowercase) or an underscore (_) &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;can continue with any combination of numbers, letters, or underscores. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 20.4pt;"&gt;&lt;a name="IMG_22"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F22%5F0%2Ejpg&amp;amp;image_id=22&amp;amp;previd=IMG_22" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_22" spid="_x0000_i1053" type="#_x0000_t75" alt="Image from book" style="'width:255pt;height:71.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image020.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_22.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195547"&gt;&lt;/a&gt;&lt;a name="66"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P80049023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Type&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;A variable's type is either &lt;b&gt;character&lt;/b&gt; or &lt;b&gt;numeric&lt;/b&gt;.&lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Character variables, such as &lt;span class="fixed1"&gt;Name&lt;/span&gt; (shown below), can contain &lt;b&gt;any values&lt;/b&gt;.&lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Numeric variables, such as &lt;span class="fixed1"&gt;Policy&lt;/span&gt; and &lt;span class="fixed1"&gt;Total&lt;/span&gt; (shown below), can contain &lt;b&gt;only numeric values &lt;/b&gt;(the digits 0 through 9, +, -, ., and E for scientific notation). &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 20.4pt;"&gt;&lt;a name="IMG_23"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F23%5F0%2Ejpg&amp;amp;image_id=23&amp;amp;previd=IMG_23" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_23" spid="_x0000_i1054" type="#_x0000_t75" alt="Image from book" style="'width:255pt;height:71.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image021.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_23.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;&lt;a name="67"&gt;&lt;/a&gt;&lt;a name="beginpage.632B07A7-51E8-413A-8CAA-2A8A21"&gt;&lt;/a&gt;A variable's type determines how missing values for a variable are displayed. In the following data set, &lt;span class="fixed1"&gt;Name&lt;/span&gt; and &lt;span class="fixed1"&gt;Sex&lt;/span&gt; are character variables, and &lt;span class="fixed1"&gt;Age&lt;/span&gt; and &lt;span class="fixed1"&gt;Weight&lt;/span&gt; are numeric variables. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;For character variables such as &lt;span class="fixed1"&gt;Name&lt;/span&gt;, a &lt;b&gt;blank&lt;/b&gt; represents a missing value. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;For numeric variables such as &lt;span class="fixed1"&gt;Age&lt;/span&gt;, a &lt;b&gt;period&lt;/b&gt; represents a missing value. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 20.4pt;" border="1" cellpadding="0"&gt;  &lt;thead&gt;   &lt;tr style=""&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="0%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="0%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Sex&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="0%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Age&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="0%"&gt;    &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Weight&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;48&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;128.6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Laverne&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;58&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;158.3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Jaffe&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;115.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;Wilson&lt;/span&gt;&lt;/st1:city&gt;&lt;/st1:place&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;28&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 0%;" valign="top" width="0%"&gt;   &lt;p class="table-para"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;170.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195548"&gt;&lt;/a&gt;&lt;a name="68"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P81349023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Length&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;A variable's &lt;b&gt;length&lt;/b&gt; (the number of bytes used to store it) is related to its type. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Character variables can be up to &lt;b&gt;32,767 bytes&lt;/b&gt; long. In the example below, &lt;span class="fixed1"&gt;Name&lt;/span&gt; has a length of 20 characters and uses 20 bytes of storage. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;All numeric variables have a default length of &lt;b&gt;8&lt;/b&gt;. Numeric values (no matter how many digits they contain) are stored as floating-point numbers in 8 bytes of storage, unless you specify a different length. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 20.4pt;"&gt;&lt;a name="IMG_24"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F24%5F0%2Ejpg&amp;amp;image_id=24&amp;amp;previd=IMG_24" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_24" spid="_x0000_i1055" type="#_x0000_t75" alt="Image from book" style="'width:255pt;height:71.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image022.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_24.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="last-para"&gt;You've seen that each SAS variable has a name, type, and length. In addition, you can define &lt;b&gt;format&lt;/b&gt;,&lt;b&gt; informat&lt;/b&gt;, and &lt;b&gt;label&lt;/b&gt; attributes for variables. Let's look briefly at these optional attributes— you'll learn more about them in later chapters as you need to use them. &lt;a name="69"&gt;&lt;/a&gt;&lt;a name="beginpage.09A24975-3A94-41CE-BFB6-76CF73"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195549"&gt;&lt;/a&gt;&lt;a name="70"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P82149023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Format&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;Formats are variable attributes that affect the way data values are written. SAS software offers a variety of character, numeric, and date and time formats. You can also create and store your own formats. To write values out using a particular form, you select the appropriate format. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_25" spid="_x0000_i1056" type="#_x0000_t75" alt="Image from book" style="'width:255.75pt;height:71.25pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image023.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_16.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;For example, to display the value &lt;i&gt;1234&lt;/i&gt; as $1234.00 in a report, you can use the DOLLAR8.2 format, as shown for &lt;span class="fixed1"&gt;Total&lt;/span&gt; below. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_26"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F25%5F0%2Ejpg&amp;amp;image_id=26&amp;amp;previd=IMG_26" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_26" spid="_x0000_i1057" type="#_x0000_t75" alt="Image from book" style="'width:260.25pt;height:1in'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image024.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_25.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;Usually you have to specify the maximum width (&lt;b&gt;&lt;i&gt;w&lt;/i&gt;&lt;/b&gt;) of the value to be written. Depending on the particular format, you might also need to specify the number of decimal places (&lt;b&gt;&lt;i&gt;d&lt;/i&gt;&lt;/b&gt;) to be written. For example, to display the value &lt;i&gt;5678&lt;/i&gt; as 5,678.00 in a report, you can use the COMMA8.2 format, which specifies a width of 8 including 2 decimal places. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 0.25in;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:navy;"&gt;Note &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para5" style="margin-left: 0.25in;"&gt;You can permanently assign a   format to a variable in a SAS data set, or you can temporarily specify a   format in a PROC step to determine the way the data values appear in output. &lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195550"&gt;&lt;/a&gt;&lt;a name="71"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P82849023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Informat&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;a name="72"&gt;&lt;/a&gt;&lt;a name="beginpage.FDAE70CF-08E7-4044-9CB2-FE646E"&gt;&lt;/a&gt;Whereas &lt;b&gt;formats&lt;/b&gt; write values &lt;b&gt;out&lt;/b&gt; by using some particular form, &lt;b&gt;informats&lt;/b&gt; read data values in certain forms &lt;b&gt;into&lt;/b&gt; standard SAS values. Informats determine how data values are read into a SAS data set. You &lt;b&gt;must&lt;/b&gt; use informats to read numeric values that contain letters or other special characters. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_27" spid="_x0000_i1058" type="#_x0000_t75" alt="Image from book" style="'width:246.75pt;height:71.25pt'"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image025.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_17.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="para"&gt;For example, the numeric value &lt;i&gt;$1,234.00&lt;/i&gt; contains two special characters, a dollar sign ($) and a comma (,). You can use an informat to read the value while removing the dollar sign and comma, and then store the resulting value as a standard numeric value. For &lt;span class="fixed1"&gt;Total&lt;/span&gt; below, the COMMA10. informat is specified. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_28"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F26%5F0%2Ejpg&amp;amp;image_id=28&amp;amp;previd=IMG_28" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_28" spid="_x0000_i1059" type="#_x0000_t75" alt="Image from book" style="'width:255.75pt;height:71.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image026.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_26.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195551"&gt;&lt;/a&gt;&lt;a name="73"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P83349023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Label&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;A variable can have a &lt;b&gt;label&lt;/b&gt;, which consists of descriptive text up to 256 characters long. By default, many reports identify variables by their names. You might want to display more descriptive information about the variable by assigning a label to the variable. &lt;/p&gt;  &lt;p class="para"&gt;For example, you can label &lt;span class="fixed1"&gt;Policy&lt;/span&gt; as &lt;b&gt;Policy Number&lt;/b&gt;, &lt;span class="fixed1"&gt;Total&lt;/span&gt; as &lt;b&gt;Total Balance&lt;/b&gt;, and &lt;span class="fixed1"&gt;Name&lt;/span&gt; as &lt;b&gt;Patient Name&lt;/b&gt; to display these labels in reports. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_29"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F27%5F0%2Ejpg&amp;amp;image_id=29&amp;amp;previd=IMG_29" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_29" spid="_x0000_i1060" type="#_x0000_t75" alt="Image from book" style="'width:255.75pt;height:71.25pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image027.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_27.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="last-para"&gt;You might even want to use labels to shorten long variable names in your reports. Assigning labels to variables is discussed in &lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;destid=222#222" target="_parent"&gt;Chapter 4&lt;/a&gt;, &lt;b&gt;Creating List Reports&lt;/b&gt;.&lt;/p&gt;  &lt;p class="first-para"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_19"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F12%5F0%2Ejpg&amp;amp;image_id=19&amp;amp;previd=IMG_19" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_19" spid="_x0000_i1061" type="#_x0000_t75" alt="Image from book" style="'width:262.5pt;height:105pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image028.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_12.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="last-para"&gt;This data set has four observations, each containing information about an individual. A SAS data set can store any number of observations. &lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195552"&gt;&lt;/a&gt;&lt;a name="60"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P77149023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Variables (Columns)&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;&lt;b&gt;Columns&lt;/b&gt; (called &lt;b&gt;variables&lt;/b&gt;) in the data set are collections of values that describe a particular characteristic. The values &lt;i&gt;Jones&lt;/i&gt;,&lt;i&gt; Laverne&lt;/i&gt;,&lt;i&gt; Jaffe&lt;/i&gt;, and &lt;i&gt;Wilson&lt;/i&gt; constitute the variable &lt;span class="fixed1"&gt;Name&lt;/span&gt; in the data set shown below. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_20"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F13%5F0%2Ejpg&amp;amp;image_id=20&amp;amp;previd=IMG_20" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_20" spid="_x0000_i1062" type="#_x0000_t75" alt="Image from book" style="'width:262.5pt;height:114.75pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image029.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_13.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="last-para"&gt;This data set contains four variables for each observation: &lt;span class="fixed1"&gt;Name&lt;/span&gt;,&lt;span class="fixed1"&gt; Sex&lt;/span&gt;,&lt;span class="fixed1"&gt; Age&lt;/span&gt;, and &lt;span class="fixed1"&gt;Weight&lt;/span&gt;. A SAS data set can store thousands of variables. &lt;a name="61"&gt;&lt;/a&gt;&lt;a name="beginpage.D8994A91-EEAF-4711-B62A-A136F8"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195553"&gt;&lt;/a&gt;&lt;a name="62"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P77549023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Missing Values&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para"&gt;The rectangular arrangement of rows and columns in a SAS data set implies that every variable must exist for each observation. If a data value is unknown for a particular observation, a missing value is recorded in the SAS data set. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="IMG_21"&gt;&lt;/a&gt;&lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;image_src=http://images.books24x7.com/bookimages/id_13821/ill01%5F14%5F0%2Ejpg&amp;amp;image_id=21&amp;amp;previd=IMG_21" target="_parent"&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="IMG_21" spid="_x0000_i1063" type="#_x0000_t75" alt="Image from book" style="'width:262.5pt;height:117pt'" button="t"&gt;  &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image030.jpg" href="http://images.books24x7.com/bookimages/id_13821/ill01_14.jpg"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Tahoma;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195554"&gt;&lt;/a&gt;&lt;a name="74"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P83849023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;    &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style=""&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt;Summary&lt;/span&gt;&lt;/span&gt;&lt;span style="  ;font-family:Arial;font-size:13.5pt;color:navy;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195555"&gt;&lt;/a&gt;&lt;a name="75"&gt;&lt;/a&gt;&lt;a name="beginpage.591B2762-9F14-44C4-ACB9-1758D3"&gt;&lt;/a&gt;&lt;a name="76"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P83949023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="77"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P84049023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;Components of SAS Programs &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;&lt;b&gt;SAS programs&lt;/b&gt; consist of two types of steps: DATA steps and PROC (procedure) steps. These two steps, alone or combined, form most SAS programs. A SAS program can consist of a DATA step, a PROC step, or any combination of DATA and PROC steps. &lt;b&gt;DATA steps&lt;/b&gt; typically create or modify SAS data sets, but they can also be used to produce custom-designed reports. &lt;b&gt;PROC steps&lt;/b&gt; are pre- written routines that enable you to analyze and process the data in a SAS data set and to present the data in the form of a report. PROC steps sometimes create new SAS data sets that contain the results of the procedure. &lt;/p&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="78"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P84249023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;Characteristics of SAS Programs &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;SAS programs consist of &lt;b&gt;SAS statements&lt;/b&gt;. A SAS statement usually begins with a SAS keyword and always ends with a semicolon. A DATA step begins with the keyword DATA. A PROC step begins with the keyword PROC. SAS statements are in free format, so they can begin and end anywhere on a line. One statement can continue over several lines, and several statements can be on a line. Blanks or special characters separate "words" in a SAS statement. &lt;/p&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="79"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P84449023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;Processing SAS Programs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;When you submit a SAS program, SAS reads SAS statements and checks them for errors. When it encounters a subsequent DATA, PROC, RUN, or QUIT statement, SAS executes the previous step in the program. &lt;/p&gt;  &lt;p class="para"&gt;Each time a step is executed, SAS generates a log of the processing activities and the results of the processing. The SAS log collects messages about the processing of SAS programs and about any errors that occur. &lt;/p&gt;  &lt;p class="last-para"&gt;The results of processing can vary. Some SAS programs open an interactive window or invoke procedures that create output in the form of a report. Other SAS programs perform tasks such as sorting and managing data, which have no visible results other than messages in the log. &lt;/p&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="80"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P84849023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;SAS Libraries&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;Every SAS file is stored in a &lt;b&gt;SAS library&lt;/b&gt;, which is a collection of SAS files such as SAS data sets and catalogs. In some operating environments, a SAS library is a physical collection of files. In others, the files are only logically related. In the Windows and UNIX environments, a SAS library is typically a group of SAS files in the same folder or directory. &lt;a name="81"&gt;&lt;/a&gt;&lt;a name="beginpage.E602B724-42CB-4254-8500-1B6347"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="para"&gt;Depending on the libref you use, you can store SAS files in temporary SAS libraries or in permanent SAS libraries. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Temporary SAS files that are created during the session are held in a special workspace that is assigned the default libref &lt;b&gt;Work&lt;/b&gt;. If you don't specify a libref when you create a file (or if you specify &lt;b&gt;Work&lt;/b&gt;), then the file is stored in the temporary SAS library. When you end the session, the temporary library is deleted. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;To store a file permanently in a SAS library, you assign it a libref other than the default &lt;b&gt;Work&lt;/b&gt;. For example, by assigning the libref &lt;b&gt;Clinic&lt;/b&gt; to a SAS library, you specify that files within the library are to be stored until you delete them. &lt;/p&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="82"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P85549023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;Referencing SAS Files &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;To reference a SAS file, you use a two-level name, &lt;b&gt;&lt;i&gt;libref.filename&lt;/i&gt;&lt;/b&gt;. In the two-level name, &lt;b&gt;&lt;i&gt;libref&lt;/i&gt;&lt;/b&gt; is the name for the SAS library that contains the file, and &lt;b&gt;&lt;i&gt;filename&lt;/i&gt;&lt;/b&gt; is the name of the file itself. A period separates the libref and filename. &lt;/p&gt;  &lt;p class="para"&gt;To reference temporary SAS files, you specify the default libref &lt;b&gt;Work&lt;/b&gt;, a period, and the filename. Alternatively, you can simply use a one-level name (the filename only) to reference a file in a temporary SAS library. Referencing a SAS file in any library &lt;b&gt;except Work&lt;/b&gt; indicates that the SAS file is stored permanently. &lt;/p&gt;  &lt;p class="last-para"&gt;SAS data set names can be 1 to 32 characters long, must begin with a letter (A–Z, either uppercase or lowercase) or an underscore (_), and can continue with any combination of numbers, letters, or underscores. &lt;/p&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="83"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P85949023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;Overview of SAS Data Sets &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;For many of the data processing tasks that you perform with SAS, you access data in the form of a &lt;b&gt;SAS data set&lt;/b&gt; and use SAS programs to analyze, manage, or present the data. Conceptually, a SAS data set is a file that consists of two parts: a descriptor portion and a data portion. Some SAS data sets also contain one or more indexes, which enable SAS to locate records in the data set more efficiently.&lt;/p&gt;  &lt;p class="para"&gt;The&lt;b&gt; descriptor portion&lt;/b&gt; of a SAS data set contains information about the data set. &lt;/p&gt;  &lt;p class="last-para"&gt;The&lt;b&gt; data portion&lt;/b&gt; of a SAS data set is a collection of data values that are arranged in a rectangular table. &lt;b&gt;Observations&lt;/b&gt; in the data set correspond to rows or data lines in a raw data file or in an external database. An observation is the information about each object in a SAS data set. &lt;b&gt;Variables &lt;/b&gt;in the data set correspond to columns in a raw data file or in an external database. A variable is the set of data values that describe a particular characteristic. If a data value is unknown for a particular observation, a missing value is recorded in the SAS data set. &lt;/p&gt;  &lt;h4 style="margin: 0.15in 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="84"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P86349023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=" color: rgb(1, 1, 0);font-family:Arial;"&gt;Variable Attributes &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;  &lt;p class="first-para"&gt;In addition to general information about the data set, the descriptor portion contains attribute information for each variable in the data set. The attribute information includes the variable's name, length, and type. A variable's type determines how missing values for a variable are displayed by SAS. For character variables, a &lt;b&gt;blank&lt;/b&gt; represents a missing value. For numeric variables, a &lt;b&gt;period &lt;/b&gt;represents a missing value. &lt;a name="85"&gt;&lt;/a&gt;&lt;a name="beginpage.E5621FB4-D9D6-415B-84A4-CDCA71"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3 style="margin: 15.6pt 0in 0.0001pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;a name="_Toc158195556"&gt;&lt;/a&gt;&lt;a name="86"&gt;&lt;/a&gt;&lt;a name="wbp03Chapter1P86549023A24-1431-4201-AADD"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;Points to Remember&lt;/span&gt;&lt;/span&gt;&lt;span style=" ;font-family:Arial;color:maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Before referencing SAS files, you must assign a name (libref, or library reference) to the library in which the files are stored (or specify that SAS is to assign the name automatically). &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;You can store SAS files either temporarily or permanently. &lt;/p&gt;  &lt;p class="first-para2" style="margin-left: 20.4pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;§&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Variable names follow the same rules as SAS data set names. However, your site might choose to restrict variable names to those valid in SAS Version 6, to uppercase variable names automatically, or to remove all restrictions on variable names. &lt;/p&gt;  &lt;table class="MsoNormalTable" style="margin-left: 38.4pt;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-top: 0.15in;"&gt;&lt;span style=" ;font-family:Arial;font-size:10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="  ;font-family:Arial;font-size:10pt;color:maroon;"&gt;Warning &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in;" valign="top"&gt;   &lt;p class="first-para9" style="margin-left: 0.25in;"&gt;After completing &lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;destid=16#16" target="_parent"&gt;Chapter 1&lt;/a&gt; and before continuing with &lt;a href="http://skillport.books24x7.com/viewer.asp?bkid=13821&amp;amp;destid=93#93" target="_parent"&gt;Chapter 2&lt;/a&gt; of this book, you should take one of the   tutorials located on the CD that accompanies this book. These tutorials teach   you how to create and manage your SAS programs by using the programming   workspace provided in SAS and SAS Enterprise Guide. &lt;/p&gt;   &lt;p class="para1" style="margin-left: 0.25in;"&gt;Which tutorial you take will depend   on the version of SAS that you are running on your machine. &lt;/p&gt;   &lt;p class="first-para9" style="margin-left: 42pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="Courier New&amp;quot;;font-family:&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;If you are running SAS9, take the &lt;b&gt;Using the   Programming Workspace: SAS Windowing Environment&lt;/b&gt; tutorial. &lt;/p&gt;   &lt;p class="first-para9" style="margin-left: 42pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="Courier New&amp;quot;;font-family:&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;If you are running SAS Enterprise Guide 3.0,   take the &lt;b&gt;Using the Programming Workspace: SAS &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Enterprise&lt;/st1:city&gt;&lt;/st1:place&gt; Guide 3.0&lt;/b&gt; tutorial. &lt;/p&gt;   &lt;p class="first-para9" style="margin-left: 42pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="Courier New&amp;quot;;font-family:&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;If you are running SAS Enterprise Guide 4.1,   take the &lt;b&gt;Using the Programming Workspace: SAS &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Enterprise&lt;/st1:city&gt;&lt;/st1:place&gt; Guide 4.1&lt;/b&gt; tutorial. &lt;/p&gt;   &lt;p class="para1" style="margin-left: 0.25in;"&gt;Now, insert the CD and print one of   the following tutorials: &lt;/p&gt;   &lt;p class="first-para9" style="margin-left: 42pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="Courier New&amp;quot;;font-family:&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Using the Programming Workspace: SAS Windowing   Environment &lt;/p&gt;   &lt;p class="first-para9" style="margin-left: 42pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="Courier New&amp;quot;;font-family:&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Using the Programming Workspace: SAS &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Enterprise&lt;/st1:city&gt;&lt;/st1:place&gt; Guide 3.0 &lt;/p&gt;   &lt;p class="first-para9" style="margin-left: 42pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="Courier New&amp;quot;;font-family:&amp;quot;;"&gt;&lt;span style=""&gt;o&lt;span style="Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal;  line-height: normal; font-size-adjust: none; font-stretch: normal;font-family:&amp;quot;;font-size:7pt;"&gt;                              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Using the Programming Workspace: SAS &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Enterprise&lt;/st1:city&gt;&lt;/st1:place&gt; Guide 4.1 &lt;/p&gt;   &lt;p class="para1" style="margin-left: 0.25in;"&gt;If you do not find the release or   version of SAS that you are running at your site, check the following   companion Web site for updates: &lt;/p&gt;   &lt;p class="para1" style="margin-left: 0.25in;"&gt;&lt;span class="fixed1"&gt;&lt;a href="http://support.sas.com/certbasetutorials" target="_top"&gt;support.sas.com/certbasetutorials&lt;/a&gt;&lt;/span&gt;   &lt;/p&gt;   &lt;p class="last-para1" style="margin-left: 0.25in;"&gt;Ensure that you read the &lt;b&gt;Before   You Begin&lt;/b&gt; section on the CD for instructions on how to create the sample   data and how to use the contents of the CD.&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;&lt;p class="para"&gt;Select the best answer for each question. After completing the quiz, you can check your answers using the answer key in the appendix.&lt;/p&gt;  &lt;table class="MsoNormalTable" style="" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 2%;" valign="top" width="2%"&gt;   &lt;p class="first-para"&gt;&lt;a name="N3249023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;b&gt;1. &lt;/b&gt;&lt;/a&gt;&lt;b style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 90%;" valign="top" width="90%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;How many   observations and variables does the data set below contain? &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;table class="MsoNormalTable" style="" border="1" cellpadding="0"&gt;    &lt;thead&gt;     &lt;tr style=""&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 21%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="21%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 28%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="28%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;Sex&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 51%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="51%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;Age&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;     &lt;/tr&gt;    &lt;/thead&gt;    &lt;tbody&gt;&lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 21%;" valign="top" width="21%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Picker&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;M&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 51%;" valign="top" width="51%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;32&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 21%;" valign="top" width="21%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Fletcher&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;     &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;br /&gt;&lt;/td&gt;     &lt;td style="padding: 0in; width: 51%;" valign="top" width="51%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;28&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 21%;" valign="top" width="21%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Romano&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;F&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 51%;" valign="top" width="51%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 21%;" valign="top" width="21%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Choi&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 28%;" valign="top" width="28%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;M&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 51%;" valign="top" width="51%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;42&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;a.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;3   observations, 4 variables &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;b.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;3   observations, 3 variables &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;c.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;4   observations, 3 variables &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;d.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;can't   tell because some values are missing&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8%;" valign="top" width="8%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;&lt;a href="http://skillport.books24x7.com/book/id_13821/viewer_r.asp?bookid=13821&amp;amp;chunkid=172069554#answer.N3249023A24-1431-4201-AADD-2B5D7C5861FD#answer.N3249023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;    &lt;v:stroke joinstyle="miter"&gt;    &lt;v:formulas&gt;     &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;     &lt;v:f eqn="sum @0 1 0"&gt;     &lt;v:f eqn="sum 0 0 @1"&gt;     &lt;v:f eqn="prod @2 1 2"&gt;     &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;     &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;     &lt;v:f eqn="sum @0 0 1"&gt;     &lt;v:f eqn="prod @6 1 2"&gt;     &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;     &lt;v:f eqn="sum @8 21600 0"&gt;     &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;     &lt;v:f eqn="sum @10 21600 0"&gt;    &lt;/v:formulas&gt;    &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;    &lt;o:lock ext="edit" aspectratio="t"&gt;   &lt;/v:shapetype&gt;&lt;v:shape id="IMG_2" spid="_x0000_i1025" type="#_x0000_t75" alt="Image from book" style="'width:18pt;height:18pt'" button="t"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image001.png" href="http://images.books24x7.com/bookimages/id_13821/question.gif"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image002.jpg" alt="Image from book" shapes="IMG_2" width="24" border="0" height="24" /&gt;&lt;!--[endif]--&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 2%;" valign="top" width="2%"&gt;   &lt;p class="first-para"&gt;&lt;a name="N22049023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;b&gt;2. &lt;/b&gt;&lt;/a&gt;&lt;b style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 90%;" valign="top" width="90%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;How many program   steps are executed when the program below is processed? &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;data user.tables; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;&lt;span style=""&gt;   &lt;/span&gt;infile jobs; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;&lt;span style=""&gt;   &lt;/span&gt;input date name $ job $; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;proc sort data=user.tables; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;&lt;span style=""&gt;   &lt;/span&gt;by name; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;proc print data=user.tables; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-top: 4.8pt;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"&gt;run;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;a.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;three   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;b.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;four   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;c.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;five   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;d.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;six&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8%;" valign="top" width="8%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;&lt;a href="http://skillport.books24x7.com/book/id_13821/viewer_r.asp?bookid=13821&amp;amp;chunkid=172069554#answer.N22049023A24-1431-4201-AADD-2B5D7C5861FD#answer.N22049023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1026" type="#_x0000_t75" alt="Image from book" style="'width:18pt;" button="t"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image001.png" href="http://images.books24x7.com/bookimages/id_13821/question.gif"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image002.jpg" alt="Image from book" shapes="_x0000_i1026" width="24" border="0" height="24" /&gt;&lt;!--[endif]--&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 2%;" valign="top" width="2%"&gt;   &lt;p class="first-para"&gt;&lt;a name="N25249023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;b&gt;3. &lt;/b&gt;&lt;/a&gt;&lt;b style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 90%;" valign="top" width="90%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;What type of   variable is the variable AcctNum in the data set below? &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;table class="MsoNormalTable" style="" border="1" cellpadding="0"&gt;    &lt;thead&gt;     &lt;tr style=""&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 37%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="37%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;AcctNum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 63%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="63%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;Balance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;     &lt;/tr&gt;    &lt;/thead&gt;    &lt;tbody&gt;&lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 37%;" valign="top" width="37%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;3456_1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 63%;" valign="top" width="63%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;M&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 37%;" valign="top" width="37%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;2451_2&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 63%;" valign="top" width="63%"&gt;     &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;br /&gt;&lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 37%;" valign="top" width="37%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Romano&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 63%;" valign="top" width="63%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;F&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 37%;" valign="top" width="37%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Choi&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 63%;" valign="top" width="63%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;M&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;a.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;numeric   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;b.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;character   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;c.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;can   be either character or numeric &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;d.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;can't   tell from the data shown &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8%;" valign="top" width="8%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;&lt;a href="http://skillport.books24x7.com/book/id_13821/viewer_r.asp?bookid=13821&amp;amp;chunkid=172069554#answer.N25249023A24-1431-4201-AADD-2B5D7C5861FD#answer.N25249023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1027" type="#_x0000_t75" alt="Image from book" style="'width:18pt;" button="t"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image001.png" href="http://images.books24x7.com/bookimages/id_13821/question.gif"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image002.jpg" alt="Image from book" shapes="_x0000_i1027" width="24" border="0" height="24" /&gt;&lt;!--[endif]--&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 2%;" valign="top" width="2%"&gt;   &lt;p class="first-para"&gt;&lt;a name="N39149023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;b&gt;4. &lt;/b&gt;&lt;/a&gt;&lt;b style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 90%;" valign="top" width="90%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;What type of   variable is the variable Wear in the data set below? &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;table class="MsoNormalTable" style="" border="1" cellpadding="0"&gt;    &lt;thead&gt;     &lt;tr style=""&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 33%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="33%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;Brand&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;      &lt;td style="padding: 0.75pt; background: white none repeat scroll 0% 0%; width: 67%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="67%"&gt;      &lt;p class="table-para"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:10;color:maroon;"&gt;Wear&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;      &lt;/td&gt;     &lt;/tr&gt;    &lt;/thead&gt;    &lt;tbody&gt;&lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 33%;" valign="top" width="33%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Acme&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 67%;" valign="top" width="67%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;43&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 33%;" valign="top" width="33%"&gt;     &lt;p class="table-para"&gt;&lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Ajax&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/st1:city&gt;&lt;/st1:place&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 67%;" valign="top" width="67%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;34&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;    &lt;tr style=""&gt;     &lt;td style="padding: 0in; width: 33%;" valign="top" width="33%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;Atlas&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;     &lt;td style="padding: 0in; width: 67%;" valign="top" width="67%"&gt;     &lt;p class="table-para"&gt;&lt;span class="fixed1"&gt;&lt;b style=""&gt;&lt;span style="font-size:10;"&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:Arial;font-size:10;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;     &lt;/td&gt;    &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;A.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;numeric   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;B.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;character   &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;C.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;can   be either character or numeric &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;D.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;can't   tell from the data shown&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 8%;" valign="top" width="8%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;&lt;a href="http://skillport.books24x7.com/book/id_13821/viewer_r.asp?bookid=13821&amp;amp;chunkid=172069554#answer.N39149023A24-1431-4201-AADD-2B5D7C5861FD#answer.N39149023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1028" type="#_x0000_t75" alt="Image from book" style="'width:18pt;" button="t"&gt;    &lt;v:imagedata src="file:///D:\DOCUME~1\shesu04\LOCALS~1\Temp\msohtml1\06\clip_image001.png" href="http://images.books24x7.com/bookimages/id_13821/question.gif"&gt;   &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///D:/DOCUME~1/shesu04/LOCALS~1/Temp/msohtml1/06/clip_image002.jpg" alt="Image from book" shapes="_x0000_i1028" width="24" border="0" height="24" /&gt;&lt;!--[endif]--&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0in; width: 2%;" valign="top" width="2%"&gt;   &lt;p class="first-para"&gt;&lt;a name="N51449023A24-1431-4201-AADD-2B5D7C5861FD"&gt;&lt;b&gt;5. &lt;/b&gt;&lt;/a&gt;&lt;b style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in; width: 90%;" valign="top" width="90%"&gt;   &lt;p class="first-para"&gt;&lt;b style=""&gt;Which of the   following variable names is valid? &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="first-para1" style="margin-left: 31.2pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;a.&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt
