[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-573662-105":3,"detail-sidebar-cat-1-en-105":79,"doc-detail-573662-en":125},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":72,"head_meta":74,"extra_data":76,"updated_unix":78},105,"en","sas-base-programming-reference-sheet-notes","SAS Base Programming Reference Sheet - Notes","","SAS Base Programming Reference Sheet consolidates core SAS programming concepts and practical syntax patterns for building data and procedure step programs. It explains program structure, run boundaries, statements and semicolon rules, and how to create logs, results, and output datasets. The sheet details global statements like OPTIONS, TITLE, FOOTNOTE, and LIBNAME, plus commenting styles and accessing structured or unstructured data via LIBNAME or PROC IMPORT. It also provides procedures for exploring and analyzing data including PROC CONTENTS, PRINT, MEANS, UNIVARIATE, and FREQ.",{"@graph":14,"@context":71},[15,34,54],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/sas-base-programming-reference-sheet-notes/573662/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":48,"encodingFormat":47,"isAccessibleForFree":49,"interactionStatistic":50},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/sas-base-programming-reference-sheet-notes/573662.png","ImageObject",442,249,{"name":42,"@type":43},"EvelynWrites","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-14",true,{"@type":51,"interactionType":52,"userInteractionCount":22},"InteractionCounter",{"@type":53},"ViewAction",{"@type":55,"mainEntity":56},"FAQPage",[57,63,67],{"name":58,"@type":59,"acceptedAnswer":60},"What are the key components of a SAS program in this reference sheet?","Question",{"text":61,"@type":62},"Programs are made of Data steps and Procedure steps. Steps end with a run, and each step contains a series of statements.","Answer",{"name":64,"@type":59,"acceptedAnswer":65},"How do OPTIONS, TITLE, and FOOTNOTE work in SAS programs?",{"text":66,"@type":62},"OPTIONS sets SAS system options, TITLE configures up to 10 titles, and FOOTNOTE sets up to 10 footnotes using text values.",{"name":68,"@type":59,"acceptedAnswer":69},"Which procedures are used for exploring and analyzing data by default?",{"text":70,"@type":62},"PROC CONTENTS prints dataset descriptors, PROC PRINT lists rows and columns, PROC MEANS provides summary statistics, PROC UNIVARIATE focuses on distributions and extreme values, and PROC FREQ builds frequency tables.","https://schema.org",{"og:url":32,"og:type":73,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":75,"canonical":32},"index,follow",{"doc_id":77,"site_id":7},573662,1792015529,{"code":4,"msg":80,"data":81},"success",[82,86,91,96,101,106,111,116,121],{"id":83,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":84,"slug":85},11,90,"presentations",{"id":87,"doc_module":22,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},12,"Resumes",80,"resumes",{"id":92,"doc_module":22,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},14,"Invoices",70,"invoices",{"id":97,"doc_module":22,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},15,"Posters",60,"posters",{"id":102,"doc_module":22,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},16,"Social Media",50,"social-media",{"id":107,"doc_module":22,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},17,"Forms",40,"forms",{"id":112,"doc_module":22,"doc_module_name":25,"category_name":113,"show_sort_weight":114,"slug":115},18,"Letters",30,"letters",{"id":117,"doc_module":22,"doc_module_name":25,"category_name":118,"show_sort_weight":119,"slug":120},21,"Paper Templates",5,"papers-templates",{"id":122,"doc_module":22,"doc_module_name":25,"category_name":123,"show_sort_weight":4,"slug":124},158,"General","general-158",{"code":4,"msg":80,"data":126},{"doc_id":77,"user_id":127,"nickname":42,"user_avatar":128,"doc_module":22,"category_id":83,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":129,"file_id":130,"file_url":131,"file_type":132,"file_size":133,"view_count":22,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":33,"language":134,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":135,"faqs":136,"seo_title":137,"seo_description":12,"update_tm":138,"read_time":26},687212989558,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","SAS Base Programming Reference Sheet  \nSAS Programming Fundamentals  \n• A program can create a log, results, and output data  \n• Programs are comprised of Data and Procedure steps  \n• Steps end with a run; statement (sometimes quit;)  \n• Each step is a series of statements  \n• A statement begins with a keyword ([e.g.](e.g. data)[ data](e.g. data)) and end with a semicolon“;”  \n• Assignment statements do not begin with a keyword  \nProgram Explanation  \n\n| Example Program Data myclass;\u003Cbr>set sashelp.class;\u003Cbr>heightcm = height*2 .54;\u003Cbr>Run;\u003Cbr>Proc print data = myclass; var age heightcm;\u003Cbr>Run; | Creates a new dataset myclass in the work library. Calculates a new variable heightcm\u003Cbr>Prints a view of the myclass dataset in the results window displaying only 2 variables: age, heightcm.\u003Cbr>There are 7 statements. |\n| --- | --- |\n\nGlobal Statements  \n•  OPTIONS …;  sets SAS system options  \nEX: Options Validvarname = V7;  \n•  TITLE \u003Coptions> “…title text…”;  set up to 10 titles  \nEX: TITLE “Student Ages and Heights”;  \nTITLE2 “Classroom 105”;  \n•  FOOTNOTE \u003Coptions> “…..”;  sets up to 10 footnotes  \nEX: FOOTNOTE “Data refreshed annually”;  \n•  LIBNAME libref\u003Cengine> “ ”;  sets a shortcut reference to data of a specific type in a specific location  \no libref: name to call a library. 8-character max length  \no engine: contains predefined set of rules for reading data. Base is the default engine reading SAS datasets  \no “ ” physical name of the library recognized by the system  \nEX: LIBNAME mylib “/C:/documents/project/data”; LIBNAME myXL xlsx “/C:/documents/class.xlsx”;  \n•  LIBNAME libref CLEAR;  ends connection to the data source  \nCommenting Code  \n• Comments can be added to prevent text in the program from executing  \n• There are 2 comment styles  \n• Comments are not executable statements  \n/* insert commented text here */  \n* Insert commented text here ;  \nAccessing Data  \n• SAS can read and understand structured (e.g. xlsx) and unstructured (e.g. csv) data types  \n• Structured data can be read via a LIBNAME statement or PROC IMPORT step  \n• Unstructured data requires PROC IMPORT to define rules Importing data using Proc Import  \nProgram Explanation  \n\n| Example Program\u003Cbr>Proc import datafile = “myfile. csv” dbmsImport a CSV file (unstructured data) |  |\n| --- | --- |\n| = csv out = mylib.example replace; guessingrows = 100;\u003Cbr>Run; | that outputs a SAS dataset example in a user defined permanent library mylib.\u003Cbr>Optionally add a guessingrows statement to read n rows to determine variable attributes. |\n\nProcedures for Exploring and Analyzing Data  \n• PROC CONTENTS: Prints descriptor portion of a data set  \nPROC CONTENTS DATA = data-set-name; RUN;  \n• PROC PRINT: lists all columns and rows in the input table by default  \n• OBS = option limits the number of rows listed  \n• VAR statement limits and orders columns listed  \n• Use _NUMERIC_, _CHARACTER_, and _ALL_ keywords to specify variables of a certain type (numeric or character) or all types  \n• WHERE statement filters the data  \n• BY statement groups output data  \n• FORMAT statement applies a temporary* format in the output  \n• LABEL statement applies a temporary* label to the variable names in the output  \n* Permanent characteristics are defined in the data step  \nPROC PRINT DATA = data-set-name \u003Clabel> (OBS = n);\u003CVAR col-name(s);>  \n\u003CWHERE expression;>  \n\u003CBY col-names(s);>  \n\u003CFORMAT col-name(s) \u003C$> format name. ;>  \n\u003CLABEL col-name = “Label”; > RUN;  \n• PROC MEANS: generates simple summary statistics for each numeric column in the input data by default unless the VAR statement is used  \n• CLASS specifies variables to group data before calculating statistics  \n• WAYS specifies number of ways to make unique combinations of class variables  \n• OUTPUT provides the option to create an output table and specific output statistics  \n• OUT = names the output table to be created  \nPROC MEANS DATA = data-set-name;\u003CWHERE expression;>  \n\u003CVAR col-name(s);>  \n\u003CCLASS col-names(s);>  \n\u003CWAY","cbCaikFXzWwdJxS3","https://ap.wps.com/l/cbCaikFXzWwdJxS3","pdf",435694,"English","# SAS Programming Fundamentals\n## Program Explanation\n## Global Statements\n## Commenting Code\n## Accessing Data\n## Importing Data using Proc Import\n## Procedures for Exploring and Analyzing Data\n## Procedures for Data Manipulation","[{\"question\":\"What are the key components of a SAS program in this reference sheet?\",\"answer\":\"Programs are made of Data steps and Procedure steps. Steps end with a run, and each step contains a series of statements.\"},{\"question\":\"How do OPTIONS, TITLE, and FOOTNOTE work in SAS programs?\",\"answer\":\"OPTIONS sets SAS system options, TITLE configures up to 10 titles, and FOOTNOTE sets up to 10 footnotes using text values.\"},{\"question\":\"Which procedures are used for exploring and analyzing data by default?\",\"answer\":\"PROC CONTENTS prints dataset descriptors, PROC PRINT lists rows and columns, PROC MEANS provides summary statistics, PROC UNIVARIATE focuses on distributions and extreme values, and PROC FREQ builds frequency tables.\"}]","SAS Base Programming Reference Sheet - Notes | PDF",1791943962]