<?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 Re: Proc contents in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571436#M161188</link>
    <description>Hmmmm....the proc freq still doesn't work. Is there something wrong with the data step?&lt;BR /&gt;&lt;BR /&gt;105 /*proc contents data='H:\PCORI\Deliveries\pcori_preg_diag_final.sas7bdat';*/&lt;BR /&gt;106 /*run; */&lt;BR /&gt;107&lt;BR /&gt;108 proc freq;&lt;BR /&gt;109 category;&lt;BR /&gt;--------&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;110 run;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 05 Jul 2019 15:30:45 GMT</pubDate>
    <dc:creator>mcgannmary1</dc:creator>
    <dc:date>2019-07-05T15:30:45Z</dc:date>
    <item>
      <title>Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571420#M161179</link>
      <description>&lt;P&gt;Hi, This should be an easy one. I am trying to run proc contents as written below...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Count of sterilization failures by type by diagnosis*/&lt;/P&gt;&lt;P&gt;data deliveries;&lt;BR /&gt;set 'H:Deliveries\pcori_preg_diag_final.sas7bdat';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc contents;&lt;BR /&gt;deliveries;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I am getting this error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;4 proc contents;&lt;BR /&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;BR /&gt;5 deliveries;&lt;BR /&gt;----------&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;6 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571420#M161179</guid>
      <dc:creator>mcgannmary1</dc:creator>
      <dc:date>2019-07-05T15:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571421#M161180</link>
      <description>I have no idea how that smiley face showed up in my code!</description>
      <pubDate>Fri, 05 Jul 2019 15:04:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571421#M161180</guid>
      <dc:creator>mcgannmary1</dc:creator>
      <dc:date>2019-07-05T15:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571422#M161181</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=deliveries;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:05:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571422#M161181</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-05T15:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571424#M161183</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/276963"&gt;@mcgannmary1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have no idea how that smiley face showed up in my code!&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;when pasting or typing SAS code, you need to first click on the running man icon and then type or paste your code into that window. Then the forum software will format the text as actual SAS code, and the colon followed by right-parenthesis (or colon follow by letter D, &lt;EM&gt;etc&lt;/EM&gt;.) will not be intrepreted as a smiley face.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571424#M161183</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-05T15:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571430#M161185</link>
      <description>&lt;P&gt;It's not common to see the full path in your SET statement. It's more usual to see a libname referenced and then youcopy the data set over to use. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname source 'H:\Deliveries\';
data deliveries;
set source.pcori_preg_diag_final;
run;

proc contents data=deliveries;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571430#M161185</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-05T15:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571432#M161186</link>
      <description>&lt;P&gt;There is no need to make a copy of your data first before asking PROC CONTENTS (or any other proc) to use it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data='H:\deliveries\pcori_preg_diag_final.sas7bdat';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Remember to start your paths with \ or else Windows will treat them as relative, even when prefixed with a drive letter.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571432#M161186</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-05T15:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571435#M161187</link>
      <description>&lt;P&gt;Thank you for your speedy reply.&lt;/P&gt;&lt;P&gt;The code you shared worked!:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571435#M161187</guid>
      <dc:creator>mcgannmary1</dc:creator>
      <dc:date>2019-07-05T15:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571436#M161188</link>
      <description>Hmmmm....the proc freq still doesn't work. Is there something wrong with the data step?&lt;BR /&gt;&lt;BR /&gt;105 /*proc contents data='H:\PCORI\Deliveries\pcori_preg_diag_final.sas7bdat';*/&lt;BR /&gt;106 /*run; */&lt;BR /&gt;107&lt;BR /&gt;108 proc freq;&lt;BR /&gt;109 category;&lt;BR /&gt;--------&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;110 run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571436#M161188</guid>
      <dc:creator>mcgannmary1</dc:creator>
      <dc:date>2019-07-05T15:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571437#M161189</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/276963"&gt;@mcgannmary1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;108 proc freq;&lt;BR /&gt;109 category;&lt;BR /&gt;--------&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;110 run;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's not clear what you are trying to do here in PROC FREQ, as there is no such thing as a CATEGORY statement in PROC FREQ.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is independent of your earlier problem with PROC CONTENTS, you probably ought to start a new thread on this, rather than discuss it here.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571437#M161189</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-05T15:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571438#M161190</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571438#M161190</guid>
      <dc:creator>mcgannmary1</dc:creator>
      <dc:date>2019-07-05T15:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571439#M161191</link>
      <description>You're missing the data= statement on your proc freq, the same thing you did with your PROC CONTENTS. For a proc to know what data set you're working with you should always put an explicit DATA= after the PROC name. If you don't, it uses the last generated file - not in the order of the program but what you ran, so it's very easy to get errors and wrong results when you don't use the DATA= on your PROC STATEMENTS. Especially at the beginning.</description>
      <pubDate>Fri, 05 Jul 2019 15:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571439#M161191</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-05T15:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc contents</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571440#M161192</link>
      <description>&lt;P&gt;Most procs will support the DATA= option on the PROC statement. But when in doubt look at the documentation for the PROC.&lt;/P&gt;
&lt;P&gt;For PROC FREQ you need to use a TABLES statement to list of variables (or variable combinations) that you want to analyze.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=deliveries;
  tables category;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jul 2019 15:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-contents/m-p/571440#M161192</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-05T15:38:15Z</dc:date>
    </item>
  </channel>
</rss>

