<?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: SAS Variable generation Error 180-322 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/686249#M208202</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try Tools -- Options -- Graph -- check "Suppress graph option statements in generated code".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 00:31:30 GMT</pubDate>
    <dc:creator>User_Help</dc:creator>
    <dc:date>2020-09-24T00:31:30Z</dc:date>
    <item>
      <title>SAS Variable generation Error 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/635776#M188826</link>
      <description>&lt;DIV class="post-text"&gt;&lt;P&gt;I am very new to SAS, which is why this question has probably a quite easy answer. I use the SAS university edition.&lt;/P&gt;&lt;P&gt;I have dataset containing socio-structural data in 31 variables and 1000000 observations. The data is stored in a Stata .dta file, which is why I used the following code to import in into SAS:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LIBNAME IN '/folders/myfolders/fake_data';

proc import out= fake_2017 datafile = "/folders/myfolders/fake_data/mz_2017.dta" replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, I want to create new variables. At first, a year variable that takes the value 2017 for all observations. After, I have several other variables that I want to generate from the 31 existing variables. However, running my code I get the same error message for all my steps:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;year = 2017;
run;

ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I found many things online but nothing that'd help me. What am I doing wrong/forgetting? For me, the code looks like in all the SAS tutorial videos that I have already watched.&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Mar 2020 11:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/635776#M188826</guid>
      <dc:creator>baumannnick97</dc:creator>
      <dc:date>2020-03-30T11:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Variable generation Error 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/635778#M188827</link>
      <description>&lt;P&gt;A command such as &lt;FONT face="courier new,courier"&gt;year=2017;&lt;/FONT&gt; must be in a DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fake_2017;
     set fake_2017;
     year=2017;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 11:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/635778#M188827</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-30T11:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Variable generation Error 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/686249#M208202</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try Tools -- Options -- Graph -- check "Suppress graph option statements in generated code".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 00:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Variable-generation-Error-180-322/m-p/686249#M208202</guid>
      <dc:creator>User_Help</dc:creator>
      <dc:date>2020-09-24T00:31:30Z</dc:date>
    </item>
  </channel>
</rss>

