This program disables page numbering via global options, then uses a DATA step to create a table named 'info'. It defines four variables (City, Country, CountryCode, CityCode) with static values for 'Sao Paulo', 'Brazil' and their associated codes. The code contains educational comments regarding syntax error handling (semicolons).
Data Analysis
Type : CREATION_INTERNE
Data is manually created within the DATA step by simple variable assignment.
1 Code Block
OPTIONS
Explanation : Environment configuration to not display page numbers in the output.
Copied!
OPTIONS NONUMBER;
1
OPTIONS NONUMBER;
2 Code Block
DATA STEP Data
Explanation : DATA step generating the 'info' table. It creates a single row with the specified values for city and country.
Copied!
DATA info;
City = "Sao Paulo";
* Semicolon missing for exercise ;
* Omitting smicolon produces 1 error, 2 warnings, and 3 notes;
Country = "Brazil";
CountryCode = 55;
CityCode = 11;
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.