<?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 Help wanted - beginner in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43476#M11375</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I'm new to this forum &amp;amp; new to SAS.&lt;BR /&gt;
Somebody wrote me a procedure, but I do not get it to work.&lt;BR /&gt;
It tells me, it cannot find the dataset.&lt;BR /&gt;
&lt;BR /&gt;
Can you help me out?&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Procedure:&lt;/B&gt;&lt;BR /&gt;
/*&lt;BR /&gt;
proc print data=wc.gi_det_total (obs=5);&lt;BR /&gt;
run;&lt;BR /&gt;
*/&lt;BR /&gt;
data wc.wcwork;&lt;BR /&gt;
set wc.gi_det_total (keep = hs_01 ap_06 nu_01 nu_02 et03 hc_04 hc_0201 hc_0202);&lt;BR /&gt;
if ap_06 = 1 then pa1 = 1;else pa1 = 0;&lt;BR /&gt;
if ap_06 = 2 then pa2 = 1;else pa2 = 0;&lt;BR /&gt;
if nu_01 = 1 then wc1 = 1;else wc1 = 0;&lt;BR /&gt;
if nu_01 = 2 then wc2 = 1;else wc2 = 0;&lt;BR /&gt;
if nu_02 = 1 then bmi1 = 1;else bmi1 = 0;&lt;BR /&gt;
if nu_02 = 2 then bmi2 = 1;else bmi2 = 0;&lt;BR /&gt;
if nu_02 = 3 then bmi3 = 1;else bmi3 = 0;&lt;BR /&gt;
if nu_02 in(1,2) then bmi = 1;&lt;BR /&gt;
if nu_02 in(3,4) then bmi = 0;&lt;BR /&gt;
bmiwc = bmi * nu_01;&lt;BR /&gt;
bmiwc1 = bmi * wc1;&lt;BR /&gt;
bmiwc2 = bmi * wc2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc logistic data=wc.wcwork;&lt;BR /&gt;
model hs_01 = ap_06 nu_01 nu_02 et03 hc_04 hc_0201 / rsq;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Errors:&lt;/B&gt;&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           1.71 seconds&lt;BR /&gt;
      cpu time            1.45 seconds&lt;BR /&gt;
&lt;BR /&gt;
1    libname wc 'c:\temp';&lt;BR /&gt;
NOTE: Libref WC was successfully assigned as follows:&lt;BR /&gt;
      Engine:        V9&lt;BR /&gt;
      Physical Name: c:\temp&lt;BR /&gt;
2    /*&lt;BR /&gt;
3    proc print data=wc.gi_det_total (obs=5);&lt;BR /&gt;
4    run;&lt;BR /&gt;
5    */&lt;BR /&gt;
6    data wc.wcwork;&lt;BR /&gt;
7    set wc.gi_det_total (keep = hs_01 ap_06 nu_01 nu_02 et03 hc_04 hc_0201 hc_0202);&lt;BR /&gt;
&lt;BR /&gt;
ERROR: File WC.GI_DET_TOTAL.DATA does not exist.&lt;BR /&gt;
8    if ap_06 = 1 then pa1 = 1;else pa1 = 0;&lt;BR /&gt;
9    if ap_06 = 2 then pa2 = 1;else pa2 = 0;&lt;BR /&gt;
10   if nu_01 = 1 then wc1 = 1;else wc1 = 0;&lt;BR /&gt;
11   if nu_01 = 2 then wc2 = 1;else wc2 = 0;&lt;BR /&gt;
12   if nu_02 = 1 then bmi1 = 1;else bmi1 = 0;&lt;BR /&gt;
13   if nu_02 = 2 then bmi2 = 1;else bmi2 = 0;&lt;BR /&gt;
14   if nu_02 = 3 then bmi3 = 1;else bmi3 = 0;&lt;BR /&gt;
15   if nu_02 in(1,2) then bmi = 1;&lt;BR /&gt;
16   if nu_02 in(3,4) then bmi = 0;&lt;BR /&gt;
17   bmiwc = bmi * nu_01;&lt;BR /&gt;
18   bmiwc1 = bmi * wc1;&lt;BR /&gt;
19   bmiwc2 = bmi * wc2;&lt;BR /&gt;
20   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
WARNING: The data set WC.WCWORK may be incomplete.  When this step was stopped there were 0&lt;BR /&gt;
         observations and 14 variables.&lt;BR /&gt;
WARNING: Data set WC.WCWORK was not replaced because this step was stopped.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.07 seconds&lt;BR /&gt;
      cpu time            0.06 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
21&lt;BR /&gt;
NOTE: PROCEDURE LOGISTIC used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Can someone explain me what to do?&lt;/B&gt;&lt;BR /&gt;
Thanks in Advance!&lt;BR /&gt;
Phi</description>
    <pubDate>Mon, 04 Apr 2011 14:37:54 GMT</pubDate>
    <dc:creator>Mephisto</dc:creator>
    <dc:date>2011-04-04T14:37:54Z</dc:date>
    <item>
      <title>Help wanted - beginner</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43476#M11375</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I'm new to this forum &amp;amp; new to SAS.&lt;BR /&gt;
Somebody wrote me a procedure, but I do not get it to work.&lt;BR /&gt;
It tells me, it cannot find the dataset.&lt;BR /&gt;
&lt;BR /&gt;
Can you help me out?&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Procedure:&lt;/B&gt;&lt;BR /&gt;
/*&lt;BR /&gt;
proc print data=wc.gi_det_total (obs=5);&lt;BR /&gt;
run;&lt;BR /&gt;
*/&lt;BR /&gt;
data wc.wcwork;&lt;BR /&gt;
set wc.gi_det_total (keep = hs_01 ap_06 nu_01 nu_02 et03 hc_04 hc_0201 hc_0202);&lt;BR /&gt;
if ap_06 = 1 then pa1 = 1;else pa1 = 0;&lt;BR /&gt;
if ap_06 = 2 then pa2 = 1;else pa2 = 0;&lt;BR /&gt;
if nu_01 = 1 then wc1 = 1;else wc1 = 0;&lt;BR /&gt;
if nu_01 = 2 then wc2 = 1;else wc2 = 0;&lt;BR /&gt;
if nu_02 = 1 then bmi1 = 1;else bmi1 = 0;&lt;BR /&gt;
if nu_02 = 2 then bmi2 = 1;else bmi2 = 0;&lt;BR /&gt;
if nu_02 = 3 then bmi3 = 1;else bmi3 = 0;&lt;BR /&gt;
if nu_02 in(1,2) then bmi = 1;&lt;BR /&gt;
if nu_02 in(3,4) then bmi = 0;&lt;BR /&gt;
bmiwc = bmi * nu_01;&lt;BR /&gt;
bmiwc1 = bmi * wc1;&lt;BR /&gt;
bmiwc2 = bmi * wc2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc logistic data=wc.wcwork;&lt;BR /&gt;
model hs_01 = ap_06 nu_01 nu_02 et03 hc_04 hc_0201 / rsq;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Errors:&lt;/B&gt;&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           1.71 seconds&lt;BR /&gt;
      cpu time            1.45 seconds&lt;BR /&gt;
&lt;BR /&gt;
1    libname wc 'c:\temp';&lt;BR /&gt;
NOTE: Libref WC was successfully assigned as follows:&lt;BR /&gt;
      Engine:        V9&lt;BR /&gt;
      Physical Name: c:\temp&lt;BR /&gt;
2    /*&lt;BR /&gt;
3    proc print data=wc.gi_det_total (obs=5);&lt;BR /&gt;
4    run;&lt;BR /&gt;
5    */&lt;BR /&gt;
6    data wc.wcwork;&lt;BR /&gt;
7    set wc.gi_det_total (keep = hs_01 ap_06 nu_01 nu_02 et03 hc_04 hc_0201 hc_0202);&lt;BR /&gt;
&lt;BR /&gt;
ERROR: File WC.GI_DET_TOTAL.DATA does not exist.&lt;BR /&gt;
8    if ap_06 = 1 then pa1 = 1;else pa1 = 0;&lt;BR /&gt;
9    if ap_06 = 2 then pa2 = 1;else pa2 = 0;&lt;BR /&gt;
10   if nu_01 = 1 then wc1 = 1;else wc1 = 0;&lt;BR /&gt;
11   if nu_01 = 2 then wc2 = 1;else wc2 = 0;&lt;BR /&gt;
12   if nu_02 = 1 then bmi1 = 1;else bmi1 = 0;&lt;BR /&gt;
13   if nu_02 = 2 then bmi2 = 1;else bmi2 = 0;&lt;BR /&gt;
14   if nu_02 = 3 then bmi3 = 1;else bmi3 = 0;&lt;BR /&gt;
15   if nu_02 in(1,2) then bmi = 1;&lt;BR /&gt;
16   if nu_02 in(3,4) then bmi = 0;&lt;BR /&gt;
17   bmiwc = bmi * nu_01;&lt;BR /&gt;
18   bmiwc1 = bmi * wc1;&lt;BR /&gt;
19   bmiwc2 = bmi * wc2;&lt;BR /&gt;
20   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
WARNING: The data set WC.WCWORK may be incomplete.  When this step was stopped there were 0&lt;BR /&gt;
         observations and 14 variables.&lt;BR /&gt;
WARNING: Data set WC.WCWORK was not replaced because this step was stopped.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.07 seconds&lt;BR /&gt;
      cpu time            0.06 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
21&lt;BR /&gt;
NOTE: PROCEDURE LOGISTIC used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Can someone explain me what to do?&lt;/B&gt;&lt;BR /&gt;
Thanks in Advance!&lt;BR /&gt;
Phi</description>
      <pubDate>Mon, 04 Apr 2011 14:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43476#M11375</guid>
      <dc:creator>Mephisto</dc:creator>
      <dc:date>2011-04-04T14:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help wanted - beginner</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43477#M11376</link>
      <description>Make sure the library reference is correct.  Is the file really located in 'c:\temp' as indicated in this libname statement.&lt;BR /&gt;
&lt;BR /&gt;
libname wc 'c:\temp';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Good luck!</description>
      <pubDate>Mon, 04 Apr 2011 14:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43477#M11376</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-04-04T14:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help wanted - beginner</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43478#M11377</link>
      <description>Thanx, that did the trick!&lt;BR /&gt;
Now, for something completely different:&lt;BR /&gt;
I'm stuck with a table with 46 duplicates of each record.&lt;BR /&gt;
Any idea how to sort that out?&lt;BR /&gt;
&lt;BR /&gt;
All help is greatly appreciated, thanx!

Message was edited by: Mephisto</description>
      <pubDate>Mon, 04 Apr 2011 17:13:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43478#M11377</guid>
      <dc:creator>Mephisto</dc:creator>
      <dc:date>2011-04-04T17:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help wanted - beginner</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43479#M11378</link>
      <description>Next time, create a new post for a new query.&lt;BR /&gt;
&lt;BR /&gt;
Regarding your sort and duplicates, look at PROC SORT and using the DUPOUT=  parameter.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
proc sort dupsout site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
sort duplicate observations separate file site:sas.com</description>
      <pubDate>Mon, 04 Apr 2011 19:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-wanted-beginner/m-p/43479#M11378</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-04-04T19:58:48Z</dc:date>
    </item>
  </channel>
</rss>

