⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m26 - creating multiple observations from a single record - 31 of 33.mht

📁 sas的考试样题
💻 MHT
📖 第 1 页 / 共 5 页
字号:
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_13.htm">INPUT</A></ST=
RONG><A=20
      onmouseover=3D"window.status=3D'Display details on the @ line-hold =
specifier.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_13.htm">=20
      <EM>repeating-variable =
</EM><STRONG>@;</STRONG></A></FONT></NOBR></TD></TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>&nbsp; &nbsp;&nbsp; =
</STRONG>&nbsp; &nbsp;=20
      &nbsp; &nbsp;&nbsp;<A=20
      onmouseover=3D"window.status=3D'Display details on the OUTPUT =
statement.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_16.htm"><STRONG>OUTPU=
T;</STRONG></A></FONT></TD></TR>
  <TR>
    <TD>&nbsp; &nbsp; &nbsp; <FONT color=3D#003399><A=20
      onmouseover=3D"window.status=3D'Display details on iterative DO =
loops.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_16.htm"><STRONG>END;<=
/STRONG></A></FONT></TD></TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>RUN;=20
</STRONG></FONT></TD></TR></TBODY></TABLE></CENTER>
<P align=3Dcenter>
<CENTER>
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"85%" border=3D0>
  <TBODY>
  <TR>
    <TD align=3Dleft>
      <BLOCKQUOTE>
        <P><STRONG>An ID Field Followed by a Varying Number of Repeating =

        =
Fields</STRONG></P></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR></CENTER>
<P align=3Dcenter>
<CENTER>
<TABLE cellPadding=3D2>
  <TBODY>
  <TR>
    <TD><FONT color=3D#003399><STRONG>LIBNAME</STRONG> <EM>libref</EM>=20
      =
&nbsp;<STRONG>'</STRONG><EM>SAS-data-library</EM><STRONG>';</STRONG></FON=
T></TD></TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>FILENAME</STRONG> <EM>fileref=20
      =
</EM><STRONG>'</STRONG><EM>filename</EM><STRONG>';</STRONG></FONT></TD></=
TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>DATA</STRONG>=20
      <EM>SAS-data-set</EM><STRONG>;</STRONG></FONT></TD></TR>
  <TR>
    <TD><FONT color=3D#003399>&nbsp; &nbsp; &nbsp; <A=20
      onmouseover=3D"window.status=3D'Display details on the MISSOVER =
option.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_23.htm"><STRONG>INFIL=
E</STRONG>=20
      <EM>file-specification =
</EM><STRONG>MISSOVER;</STRONG></A></FONT></TD></TR>
  <TR>
    <TD><NOBR><FONT color=3D#003399><STRONG>&nbsp; &nbsp; =
</STRONG>&nbsp; <A=20
      onmouseover=3D"window.status=3D'Display details on the @ line-hold =
specifier.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_13.htm"><STRONG>INPUT=
</STRONG>=20
      <EM>id-variable &nbsp;repeating-variable=20
      =
<STRONG>@</STRONG></EM><STRONG>;</STRONG></A></FONT></NOBR></TD></TR>
  <TR>
    <TD>&nbsp; &nbsp; &nbsp;&nbsp;<FONT color=3D#003399><A=20
      onmouseover=3D"window.status=3D'Display details on creating a =
counter variable.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_26.htm"><EM>counter-v=
ariable</EM><STRONG>=3D</STRONG>0;</A></FONT></TD></TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>&nbsp; &nbsp; &nbsp;</STRONG> <A=20
      onmouseover=3D"window.status=3D'Display details on executing SAS =
statements while a condition is true.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_24.htm"><STRONG>DO=20
      WHILE</STRONG>=20
      =
<STRONG>(</STRONG><EM>expression<STRONG>)</STRONG></EM><STRONG>;</STRONG>=
</A></FONT></TD></TR>
  <TR>
    <TD>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <FONT =
color=3D#003399><A=20
      onmouseover=3D"window.status=3D'Display details on creating a =
counter variable.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_26.htm"><EM>counter-v=
ariable</EM><STRONG>+</STRONG>1;</A></FONT></TD></TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>&nbsp; &nbsp;&nbsp; =
</STRONG>&nbsp; &nbsp;=20
      &nbsp; &nbsp;<A=20
      onmouseover=3D"window.status=3D'Display details on the OUTPUT =
statement.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_16.htm"><STRONG>OUTPU=
T;</STRONG></A>&nbsp;</FONT></TD></TR>
  <TR>
    <TD><FONT color=3D#003399><STRONG>&nbsp; &nbsp;&nbsp; =
</STRONG>&nbsp; &nbsp;=20
      &nbsp; &nbsp;<A=20
      onmouseover=3D"window.status=3D'Display details on the @ line-hold =
specifier.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_13.htm"><STRONG>INPUT=
</STRONG>=20
      <EM>repeating-variable =
</EM><STRONG>@;</STRONG></A></FONT></TD></TR>
  <TR>
    <TD>&nbsp; &nbsp; &nbsp; <FONT color=3D#003399>&nbsp;<A=20
      onmouseover=3D"window.status=3D'Display details on the END =
statement for DO WHILE loops.'; "=20
      onclick=3DsuggestBack() onmouseout=3D"window.status=3D''"=20
      =
href=3D"http://www.sas.com/apps/OLTRN/59080/m26/m26_16.htm"><STRONG>END;<=
/STRONG></A></FONT></TD></TR>
  <TR>
    <TD><FONT=20
color=3D#003399><STRONG>RUN;</STRONG></FONT></TD></TR></TBODY></TABLE></C=
ENTER>
<P align=3Dcenter>
<CENTER>
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"85%" border=3D0>
  <TBODY>
  <TR>
    <TD align=3Dleft>
      <HR>
    </TD></TR></TBODY></TABLE><BR></CENTER><!-- InstanceEndEditable -->
<P><!-- InstanceBeginEditable name=3D"sampleprogram" -->
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"85%" border=3D0>
  <TBODY>
  <TR>
    <TD align=3Dleft><STRONG><A name=3DSample>Sample =
Programs</A></STRONG>=20
      <BLOCKQUOTE>
        <P><STRONG>Repeating Blocks of Data</STRONG> =
</P></BLOCKQUOTE><PRE><FONT color=3D#003399>     libname perm =
'c:\records\weather';</FONT>
<FONT color=3D#003399>     filename tempdata =
'c:\records\weather\tempdata';</FONT>
<FONT color=3D#003399>     data perm.april90;</FONT>
<FONT color=3D#003399>        infile tempdata;          </FONT>
<FONT color=3D#003399>        input Date : date. HighTemp =
@@;</FONT><STRONG><FONT color=3D#003399> </FONT></STRONG><FONT =
color=3D#003399>        </FONT>
<FONT color=3D#003399>        format date date9.;        </FONT>
<FONT color=3D#003399>     run;</FONT></PRE>
      <BLOCKQUOTE>
        <P><STRONG>An ID Field Followed by the Same Number of Repeating=20
        Fields</STRONG> </P></BLOCKQUOTE><PRE><FONT color=3D#003399>     =
libname perm 'c:\records\sales';</FONT>
<FONT color=3D#003399>     filename data97 =
'c:\records\sales\1997.dat';</FONT>
<FONT color=3D#003399>     data perm.sales97;</FONT>
<FONT color=3D#003399>        infile data97;</FONT>
<FONT color=3D#003399>        input ID $ @;</FONT>
<FONT color=3D#003399>     <STRONG> </STRONG>  do Quarter=3D1 to =
4;</FONT>
<FONT color=3D#003399>           input Sales : comma. @;</FONT>
<FONT color=3D#003399>           output;</FONT>
<FONT color=3D#003399>        end;</FONT>
<FONT color=3D#003399>     run;</FONT>
</PRE>
      <BLOCKQUOTE>
        <P><STRONG>An ID Field Followed by a Varying Number of Repeating =

        Fields</STRONG> </P></BLOCKQUOTE><PRE><FONT color=3D#003399>     =
libname perm 'c:\records\sales';</FONT>
<FONT color=3D#003399>     filename data97 =
'c:\records\sales\1997.dat';</FONT>
<FONT color=3D#003399>     data perm.sales97;</FONT>
<FONT color=3D#003399>        infile data97 missover;</FONT>
<FONT color=3D#003399>        input ID $ Sales : comma. @;</FONT>
<FONT color=3D#003399>        Quarter=3D0;</FONT>
<FONT color=3D#003399>        do while (sales ne .); </FONT>
<FONT color=3D#003399>           quarter+1;</FONT>
<FONT color=3D#003399>           output;</FONT>
<FONT color=3D#003399>           input sales : comma. @;</FONT>
<FONT color=3D#003399>        end;</FONT>
     <FONT color=3D#003399>run;</FONT></PRE>
      <P>
      <HR>
    </TD></TR></TBODY></TABLE><BR><!-- InstanceEndEditable -->
<P><!-- InstanceBeginEditable name=3D"pointstoremember" -->
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"85%" border=3D0>
  <TBODY>
  <TR>
    <TD align=3Dleft><STRONG><A name=3DPoints>Points to =
Remember</A></STRONG>=20
      <UL>
        <LI>The double trailing at sign (@@) holds a record across =
multiple=20
        iterations of the DATA step until the end of the record is =
reached.=20
        <BR><BR>
        <LI>The single trailing at sign (@) releases a record when =
control=20
        returns to the top of the DATA step. <BR><BR>
        <LI>Use an END statement to complete DO loops and DO WHILE =
loops.=20
      </LI></UL></TD></TR></TBODY></TABLE><!-- InstanceEndEditable =
--></CENTER><!-- #BeginLibraryItem "/Library/nav_regular_bottom.lbi" -->
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%">
  <TBODY>
  <TR>
    <TD width=3D14><IMG height=3D7 alt=3D""=20
      =
src=3D"http://www.sas.com/apps/elearning/images/en/navimages/linebox.gif"=
=20
      width=3D14></TD>
    <TD colSpan=3D2><IMG height=3D7 alt=3D""=20
      =
src=3D"http://www.sas.com/apps/elearning/images/en/navimages/linegray.gif=
"=20
      width=3D"100%"></TD></TR>
  <TR>
    <TD>&nbsp;</TD>
    <TD vAlign=3Dtop><FONT face=3D"Verdana, Arial, Helvetica, Sans =
Serif"=20
      color=3Dgray size=3D1><A class=3Dcopyrightlink=20
      href=3D"javascript:%20openOther('../copyrite.htm')"><FONT=20
      face=3D"Arial, Helvetica, sans-serif">Copyright</FONT></A> <FONT=20
      face=3D"Arial, Helvetica, sans-serif">=A9 2003 SAS Institute Inc., =
Cary, NC,=20
      USA. All rights reserved.</FONT></FONT> <FONT=20
      face=3D"Arial, Helvetica, sans-serif"><BR><FONT color=3Dgray =
size=3D1><A=20
      class=3Dcopyrightlink href=3D"http://www.sas.com/Copyright.html"=20
      target=3D_blank>Terms of Use &amp; Legal Information</A> | <A=20
      class=3Dcopyrightlink href=3D"http://www.sas.com/Privacy.html"=20
      target=3D_blank>Privacy Statement</A></FONT> </FONT></TD>
    <TD width=3D60>
      <DIV align=3Dright><A=20
      onmouseover=3D"rOver('back2');window.status=3D'Display the =
previous page.';return true"=20

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -