<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error in a program in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28658#M6682</link>
    <description>I have an error in this program and I didn´t found the reason. When I start it the log file told me that the variables did not exist, but in my data table I had labelled the columns with Paar, Geburt, Zeit, Lebende (all numeric). Paar is organized like this 1 1 1 1...., 2 2 2 2...., 3 3 3 3.., etc. Geburt also. "Zeit" is time from day 1 to 10.  and Lebende ist survival from a beginning of 50 individuals.&lt;BR /&gt;
&lt;BR /&gt;
DATA work.test;                                                                                                                         &lt;BR /&gt;
     input Paar Geburt Zeit Lebende;                                                                                                    &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC SORT DATA=work.test;                                                                                                             &lt;BR /&gt;
     BY Paar Geburt Zeit;                                                                                                               &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
DATA test;                                                                                                                              &lt;BR /&gt;
     RETAIN n0;                                                                                                                         &lt;BR /&gt;
     SET work.test;                                                                                                                     &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
     IF Zeit = THEN DO;                                                                                                         &lt;BR /&gt;
       n0 = Lebende;                                                                                                                    &lt;BR /&gt;
     END;                                                                                                                               &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
     PctLebend = 100*Lebende/n0;                                                                                                        &lt;BR /&gt;
RUN;                                                                                                                                    &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC SORT DATA=work.test;                                                                                                               &lt;BR /&gt;
     BY Paar Zeit;                                                                                                                      &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC MEANS DATA=work.test N MEAN STD CLM;                                                                                               &lt;BR /&gt;
     VAR PctLebende;                                                                                                                    &lt;BR /&gt;
     BY Paar Zeit;                                                                                                                      &lt;BR /&gt;
     OUTPUT OUT=mtest MEAN=mPctLebende LCLM=loPctLebende UCLM=upPctLebende;                                                             &lt;BR /&gt;
RUN;                                                                                                                                    &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
SYMBOL1 I=JOIN V=DOT C=BLUE;                                                                                                            &lt;BR /&gt;
SYMBOL2 I=JOIN V=NONE C=BLUE L=3;                                                                                                       &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC GPLOT DATA=mtest;                                                                                                                  &lt;BR /&gt;
     PLOT mPctLebende * Zeit = 1                                                                                                        &lt;BR /&gt;
          loPctLebende * Zeit = 2                                                                                                       &lt;BR /&gt;
          upPctLebende * Zeit = 2 / OVERLAY;                                                                                            &lt;BR /&gt;
     BY Paar;                                                                                                                           &lt;BR /&gt;
RUN;                                                                                                                                    &lt;BR /&gt;
QUIT;   &lt;BR /&gt;
Thanks a lot for help!!

Message was edited by: bio</description>
    <pubDate>Tue, 01 Jul 2008 12:10:52 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-07-01T12:10:52Z</dc:date>
    <item>
      <title>Error in a program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28658#M6682</link>
      <description>I have an error in this program and I didn´t found the reason. When I start it the log file told me that the variables did not exist, but in my data table I had labelled the columns with Paar, Geburt, Zeit, Lebende (all numeric). Paar is organized like this 1 1 1 1...., 2 2 2 2...., 3 3 3 3.., etc. Geburt also. "Zeit" is time from day 1 to 10.  and Lebende ist survival from a beginning of 50 individuals.&lt;BR /&gt;
&lt;BR /&gt;
DATA work.test;                                                                                                                         &lt;BR /&gt;
     input Paar Geburt Zeit Lebende;                                                                                                    &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC SORT DATA=work.test;                                                                                                             &lt;BR /&gt;
     BY Paar Geburt Zeit;                                                                                                               &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
DATA test;                                                                                                                              &lt;BR /&gt;
     RETAIN n0;                                                                                                                         &lt;BR /&gt;
     SET work.test;                                                                                                                     &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
     IF Zeit = THEN DO;                                                                                                         &lt;BR /&gt;
       n0 = Lebende;                                                                                                                    &lt;BR /&gt;
     END;                                                                                                                               &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
     PctLebend = 100*Lebende/n0;                                                                                                        &lt;BR /&gt;
RUN;                                                                                                                                    &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC SORT DATA=work.test;                                                                                                               &lt;BR /&gt;
     BY Paar Zeit;                                                                                                                      &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC MEANS DATA=work.test N MEAN STD CLM;                                                                                               &lt;BR /&gt;
     VAR PctLebende;                                                                                                                    &lt;BR /&gt;
     BY Paar Zeit;                                                                                                                      &lt;BR /&gt;
     OUTPUT OUT=mtest MEAN=mPctLebende LCLM=loPctLebende UCLM=upPctLebende;                                                             &lt;BR /&gt;
RUN;                                                                                                                                    &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
SYMBOL1 I=JOIN V=DOT C=BLUE;                                                                                                            &lt;BR /&gt;
SYMBOL2 I=JOIN V=NONE C=BLUE L=3;                                                                                                       &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
PROC GPLOT DATA=mtest;                                                                                                                  &lt;BR /&gt;
     PLOT mPctLebende * Zeit = 1                                                                                                        &lt;BR /&gt;
          loPctLebende * Zeit = 2                                                                                                       &lt;BR /&gt;
          upPctLebende * Zeit = 2 / OVERLAY;                                                                                            &lt;BR /&gt;
     BY Paar;                                                                                                                           &lt;BR /&gt;
RUN;                                                                                                                                    &lt;BR /&gt;
QUIT;   &lt;BR /&gt;
Thanks a lot for help!!

Message was edited by: bio</description>
      <pubDate>Tue, 01 Jul 2008 12:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28658#M6682</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-01T12:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28659#M6683</link>
      <description>You need an INFILE statement in the initial DATA step to tell SAS where to find the data to put into work.test.</description>
      <pubDate>Wed, 02 Jul 2008 13:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28659#M6683</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-07-02T13:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28660#M6684</link>
      <description>The statement (IF Zeit = THEN DO; ) would fail ... should be something like &lt;BR /&gt;
(IF Zeit = 0 THEN DO;) &lt;BR /&gt;
&lt;BR /&gt;
I mean a numeric value (may be a . for missing values) after the equal sign&lt;BR /&gt;
&lt;BR /&gt;
again In your:&lt;BR /&gt;
PROC MEANS DATA=work.test N MEAN STD CLM; &lt;BR /&gt;
VAR PctLebende; &lt;BR /&gt;
BY Paar Zeit; &lt;BR /&gt;
OUTPUT OUT=mtest MEAN=mPctLebende LCLM=loPctLebende UCLM=upPctLebende; &lt;BR /&gt;
RUN; &lt;BR /&gt;
&lt;BR /&gt;
the VAR statement specify (PCTLEBENDE) variable as analysis variable while your dataset has no (PCTLEBENDE) variable at all. also... failure of any of the above data steps or SAS PROCs that create a datasets, may cause the rest of your program to feed on empty datasets ... etc potential for such error messages</description>
      <pubDate>Mon, 14 Jul 2008 12:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-in-a-program/m-p/28660#M6684</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-14T12:53:43Z</dc:date>
    </item>
  </channel>
</rss>

