

{"id":11184,"date":"2018-03-20T06:21:16","date_gmt":"2018-03-20T00:51:16","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=11184"},"modified":"2021-05-09T13:17:00","modified_gmt":"2021-05-09T07:47:00","slug":"sas-data-set","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/sas-data-set\/","title":{"rendered":"SAS Data Set &#8211; 5 Mins Guide for Special &amp; Built-in Data Set"},"content":{"rendered":"<p>In this <strong>SAS Tutorial<\/strong>, we will discuss the SAS Data Set. Data is the building block and primary constituent of any data set. We will also learn about parts of the SAS Data Set: Descriptor Portion and Data Portion, Special SAS Data Sets and Built-in Data Sets.<\/p>\n<p>Simultaneously, we will discuss some Data Set examples to explore the definition of Data Set in SAS Programming.<\/p>\n<h2>What is SAS Data Set?<\/h2>\n<p>A SAS dataset is basically a SAS file that\u00a0store in the SAS library, that create and a process by SAS. A dataset contains data values that organize in the form of rows and columns inside a table. In SAS terminology, rows are called <strong>observations <\/strong>and columns are called <strong>SAS\u00a0variables.<\/strong><\/p>\n<p>Here\u2019s what a dataset in SAS looks like<br \/>\n<strong><em>Variables (also called columns) <\/em><\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_3_CARS_explore.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11202 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_3_CARS_explore.jpg\" alt=\"SAS Data Set\" width=\"600\" height=\"455\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_3_CARS_explore.jpg 600w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_3_CARS_explore-150x114.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_3_CARS_explore-300x228.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><strong><em>Observations (also called rows)<\/em><\/strong><\/p>\n<p>Each line represents one observation, while ids, bday, Gender, Rank, and State are variables. The data point 10NOV1994 is one of the values of the variable bday and is also part of the sixth observation.<\/p>\n<h2>Parts of SAS Data Set<\/h2>\n<p>There are two types of SAS Data Set: Descriptor Portion and\u00a0Data Portion.<\/p>\n<h3>1. Descriptor Portion<\/h3>\n<p>The\u00a0<strong>descriptor portion<\/strong>\u00a0of a SAS data set contains vital information of the data set, such as the name of the data set, the date and time at which the data set was created. The time and date it was last modified on, the number of observations in the dataset and the number of variables.<\/p>\n<p>The following table is an illustration of the descriptor portion of a SAS\u00a0data Set with the name <em>work.grade<\/em>.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/sas_L0102.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11205 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/sas_L0102.gif\" alt=\"SAS Data Set\" width=\"580\" height=\"154\" \/><\/a><\/p>\n<h3>2. Data Portion<\/h3>\n<p>The\u00a0<strong>data portion<\/strong>\u00a0basically consists of all data values of the SAS dataset. The data values are organized in the form of a table. Below is an illustration of the same.<\/p>\n<table width=\"431\">\n<tbody>\n<tr>\n<td><strong>ID<\/strong><\/td>\n<td><strong>Name<\/strong><\/td>\n<td><strong>Height<\/strong><\/td>\n<td><strong>Weight<\/strong><\/td>\n<\/tr>\n<tr>\n<td>53<\/td>\n<td>Susie<\/td>\n<td>65<\/td>\n<td>120<\/td>\n<\/tr>\n<tr>\n<td>54<\/td>\n<td>Charles<\/td>\n<td>72<\/td>\n<td>200<\/td>\n<\/tr>\n<tr>\n<td>55<\/td>\n<td>\u00a0Linda<\/td>\n<td>60<\/td>\n<td>105<\/td>\n<\/tr>\n<tr>\n<td>56<\/td>\n<td>Lucy<\/td>\n<td>63<\/td>\n<td>142<\/td>\n<\/tr>\n<tr>\n<td>57<\/td>\n<td>Dennis<\/td>\n<td>70<\/td>\n<td>166<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In this SAS Data Set example, the number 57 is a data value, the name Linda is a data value, weight 105 is a data value and so on.<\/p>\n<p>The variables (columns) contain data values that describe a particular characteristic of the thing being measure such as weight in the above table. SAS data has the ability to store thousands of variables.<\/p>\n<p>The SAS\u00a0data set has four variables \u2014 the<em>\u00a0id<\/em>,\u00a0<em>name<\/em>,\u00a0<em>height<\/em>, and\u00a0<em>weight<\/em>. The observations (or rows) are collections of data values that refer to one particular object (such as a person named\u00a0<em>Linda<\/em>).<\/p>\n<p>The values 55, Linda, 60&#8243;, and 105 constitute a single observation in the above data set. SAS data has the ability to store any number of observations just like variables. SAS data set above contains five observations.<\/p>\n<h2>Special SAS Data Set<\/h2>\n<p>There are three types of special SAS Data Set:<\/p>\n<h3>1. NULL Data Sets<\/h3>\n<p>Sometimes, it might happen that we wish to execute a DATA step, but we do not want to create a dataset, in such cases _NULL_ can use. The following statement begins a DATA step where no data set creates:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">data _null_;<\/pre>\n<h3>2. Default Data Sets<\/h3>\n<p>SAS is clear enough to remember the last dataset that uses by using the reserve word _LAST_. If we execute a DATA or a PROC step without mentioning the dataset, SAS by default makes use of the _LAST_ dataset.<\/p>\n<h3>3. Automatic Naming Convention<\/h3>\n<p>If you do not give a name to the SAS dataset or the reserved name _NULL_ in the DATA statement, SAS automatically creates data sets with the names DATA1, DATA2, and so on that get store in the library.<\/p>\n<p>This feature is called as the DATA\u00a0naming convention. Here is an example of a statement that SAS dataset produces using the data naming\u00a0convention:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Data ;<\/pre>\n<h2>SAS Built-in Data Set<\/h2>\n<p>SAS software has some datasets that are already available in the SAS library and can use for running sample programs, doing analysis and calculations. All datasets store under <strong>SASHELP <\/strong>in my libraries.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_1_explore.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11206 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_1_explore.jpg\" alt=\"SAS Data Set\" width=\"600\" height=\"450\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_1_explore.jpg 600w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_1_explore-150x113.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_1_explore-300x225.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Now let us say we want to use the data set named CARS, double-click on it and a pane will open on the right. The image below shows the CARS dataset that is an inbuilt dataset in the SAS library.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_2_CARS.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11207 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_2_CARS.jpg\" alt=\"SAS Data Set\" width=\"600\" height=\"456\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_2_CARS.jpg 600w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_2_CARS-150x114.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/data_sets_2_CARS-300x228.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>The entire columns and data values can see while scrolling through the data set.<\/p>\n<h2>Summary<\/h2>\n<p>We studied that SAS Data Sets are an integral part while developing any program in SAS. The most important feature is that it allows multiple variables and thousands of observations to organize inside a table.\u00a0SAS also has the feature of using a default, and null data sets when no dataset is specified.<\/p>\n<p>Any queries regarding article? Enter in the comments section. We will be glad to hear from you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this SAS Tutorial, we will discuss the SAS Data Set. Data is the building block and primary constituent of any data set. We will also learn about parts of the SAS Data Set:&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":11210,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[9433,19277,19278,15926],"class_list":["post-11184","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sas","tag-parts-of-sas-data-set","tag-sas-builtin-data-set","tag-special-sas-data-set","tag-what-is-sas-data-set"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SAS Data Set - 5 Mins Guide for Special &amp; Built-in Data Set - DataFlair<\/title>\n<meta name=\"description\" content=\"SAS Data Set covers parts of Data Set; Descriptor Portion,Data Portion, Special SAS Data Sets, and, Built-in SAS Data Set.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/sas-data-set\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAS Data Set - 5 Mins Guide for Special &amp; Built-in Data Set - DataFlair\" \/>\n<meta property=\"og:description\" content=\"SAS Data Set covers parts of Data Set; Descriptor Portion,Data Portion, Special SAS Data Sets, and, Built-in SAS Data Set.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/sas-data-set\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-20T00:51:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-09T07:47:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Data-set-in-SAS-01-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SAS Data Set - 5 Mins Guide for Special &amp; Built-in Data Set - DataFlair","description":"SAS Data Set covers parts of Data Set; Descriptor Portion,Data Portion, Special SAS Data Sets, and, Built-in SAS Data Set.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/sas-data-set\/","og_locale":"en_US","og_type":"article","og_title":"SAS Data Set - 5 Mins Guide for Special &amp; Built-in Data Set - DataFlair","og_description":"SAS Data Set covers parts of Data Set; Descriptor Portion,Data Portion, Special SAS Data Sets, and, Built-in SAS Data Set.","og_url":"https:\/\/data-flair.training\/blogs\/sas-data-set\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-03-20T00:51:16+00:00","article_modified_time":"2021-05-09T07:47:00+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Data-set-in-SAS-01-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"SAS Data Set &#8211; 5 Mins Guide for Special &amp; Built-in Data Set","datePublished":"2018-03-20T00:51:16+00:00","dateModified":"2021-05-09T07:47:00+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/"},"wordCount":775,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Data-set-in-SAS-01-1.jpg","keywords":["Parts of SAS Data Set","SAS Builtin Data Set","Special SAS Data Set","What is SAS Data Set"],"articleSection":["SAS Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/sas-data-set\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/","url":"https:\/\/data-flair.training\/blogs\/sas-data-set\/","name":"SAS Data Set - 5 Mins Guide for Special &amp; Built-in Data Set - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Data-set-in-SAS-01-1.jpg","datePublished":"2018-03-20T00:51:16+00:00","dateModified":"2021-05-09T07:47:00+00:00","description":"SAS Data Set covers parts of Data Set; Descriptor Portion,Data Portion, Special SAS Data Sets, and, Built-in SAS Data Set.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/sas-data-set\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Data-set-in-SAS-01-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Data-set-in-SAS-01-1.jpg","width":1200,"height":628,"caption":"What is Data Set SAS"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/sas-data-set\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"SAS Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/sas\/"},{"@type":"ListItem","position":3,"name":"SAS Data Set &#8211; 5 Mins Guide for Special &amp; Built-in Data Set"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=11184"}],"version-history":[{"count":13,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11184\/revisions"}],"predecessor-version":[{"id":93972,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11184\/revisions\/93972"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/11210"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=11184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=11184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=11184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}