< 0cm 0cm 0pt; LAYOUT-GRID-MODE: char; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto">§<FONT face="Times New Roman">2.1 SAS</FONT>语言构成<FONT face="Times New Roman"> </FONT></P>< 0cm 0cm 0pt; LAYOUT-GRID-MODE: char; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><FONT face="Times New Roman">2.1.1 SAS</FONT>语句<FONT face="Times New Roman"> </FONT></P>< 0cm 0cm 0pt; LAYOUT-GRID-MODE: char; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><FONT face="Times New Roman">SAS</FONT>语言程序由数据步和过程步组成。数据步用来生成数据集、计算、整理数据,过程步用来对数据进行分析、报告。<FONT face="Times New Roman">SAS</FONT>语言的基本单位是语句,每个<FONT face="Times New Roman">SAS</FONT>语句一般由一个关键字(如<FONT face="Times New Roman">DATA</FONT>,<FONT face="Times New Roman">PROC</FONT>,<FONT face="Times New Roman">INPUT</FONT>,<FONT face="Times New Roman">CARDS</FONT>,<FONT face="Times New Roman">BY</FONT>)开头,包含<FONT face="Times New Roman">SAS</FONT>名字、特殊字符、运算符等,以分号结束。<FONT face="Times New Roman"> </FONT></P><P 0cm 0cm 0pt; LAYOUT-GRID-MODE: char; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><FONT face="Times New Roman">SAS</FONT>关键字是用于<FONT face="Times New Roman">SAS</FONT>语句开头的特殊单词,<FONT face="Times New Roman">SAS</FONT>语句除了赋值、累加、注释、空语句以外都以关键字开头。<FONT face="Times New Roman">SAS</FONT>名字在<FONT face="Times New Roman">SAS</FONT>程序中标识各种<FONT face="Times New Roman">SAS</FONT>成分,如变量、数据集、数据库,等等。<FONT face="Times New Roman">SAS</FONT>名字由<FONT face="Times New Roman">1</FONT>到<FONT face="Times New Roman">8</FONT>个字母、数字、下划线组成,第一个字符必须是字母或下划线。<FONT face="Times New Roman">SAS</FONT>关键字和<FONT face="Times New Roman">SAS</FONT>名字都不分大<FONT face="Times New Roman"> </FONT></P><P 0cm 0cm 0pt; LAYOUT-GRID-MODE: char; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto">小写。<FONT face="Times New Roman"> </FONT></P>