<?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: ERROR 22-322: Expecting a name. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411787#M100679</link>
    <description>&lt;P&gt;If you use a FORMAT like 20. in your INPUT statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;@43 Job_Title @ 20.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then SAS expects a variable name to precede the format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you mean to read JOB_TITLE as a character variable? So perhaps you wanted.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;68 @43 Job_Title $20.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2017 00:40:42 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-11-09T00:40:42Z</dc:date>
    <item>
      <title>ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411786#M100678</link>
      <description />
      <pubDate>Sun, 14 Jan 2018 20:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411786#M100678</guid>
      <dc:creator>ssv</dc:creator>
      <dc:date>2018-01-14T20:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411787#M100679</link>
      <description>&lt;P&gt;If you use a FORMAT like 20. in your INPUT statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;@43 Job_Title @ 20.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then SAS expects a variable name to precede the format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you mean to read JOB_TITLE as a character variable? So perhaps you wanted.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;68 @43 Job_Title $20.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 00:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411787#M100679</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-09T00:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411797#M100680</link>
      <description>&lt;P&gt;&lt;FONT size="3" color="#3366FF"&gt;Thank you so much Tom&lt;/FONT&gt;... I appreciate your help. By mistake i inserted&amp;nbsp;@ instead of $.&lt;/P&gt;&lt;P&gt;Got the result now.&lt;/P&gt;&lt;P&gt;Thank you for your response. Have a Good one.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 03:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/411797#M100680</guid>
      <dc:creator>ssv</dc:creator>
      <dc:date>2017-11-09T03:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530301#M144992</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting same error and tried your suggestion but still hut resolved. Please help me out.&lt;/P&gt;&lt;P&gt;Code to import the file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data get_US_Company_Dataset;&lt;BR /&gt;infile 'C:\Users\HP\Desktop\Jigsaw_Acedemy\US_Company_Dataset.csv' dlm=',' dsd missover firstobs=1 lrecl=20;&lt;BR /&gt;input $company_name_id $10 $company_name year_founded $city $state $country zip_code $company_type $date_of_audit;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;also not getting the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;VIpendra&lt;/P&gt;&lt;P&gt;+919106739515&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2019 08:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530301#M144992</guid>
      <dc:creator>vipendra</dc:creator>
      <dc:date>2019-01-26T08:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530302#M144993</link>
      <description>&lt;P&gt;Hi vipendra&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You forgot a period after the character format. I often forget i too.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2019 08:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530302#M144993</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-01-26T08:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530315#M144995</link>
      <description>&lt;P&gt;Thanks for correcting me&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12887"&gt;@ErikLund_Jensen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still some of error is throwing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to connect with you personally to learn something from you.&lt;/P&gt;&lt;P&gt;Please mail me&amp;nbsp;@ vipendratripathi6@gmail.com or whatsapp me&amp;nbsp;@+919806980858.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vipendra&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2019 14:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530315#M144995</guid>
      <dc:creator>vipendra</dc:creator>
      <dc:date>2019-01-26T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530317#M144996</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/257885"&gt;@vipendra&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Getting same error and tried your suggestion but still hut resolved. Please help me out.&lt;/P&gt;
&lt;P&gt;Code to import the file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data get_US_Company_Dataset;&lt;BR /&gt;infile 'C:\Users\HP\Desktop\Jigsaw_Acedemy\US_Company_Dataset.csv' dlm=',' dsd missover firstobs=1 lrecl=20;&lt;BR /&gt;input $company_name_id $10 $company_name year_founded $city $state $country zip_code $company_type $date_of_audit;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;also not getting the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;VIpendra&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have way too many variables for the lines of data to only be 20 bytes long.&amp;nbsp; Remove the LRECL= option on the INFILE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have an extra $ in front of the variable COMPANY_NAME_ID.&amp;nbsp; Also why should that variable be only the single character in column 10 of the input data line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have much better success if you first define the variables and then just list them in the INPUT statement. That way your INPUT statement does not need any formats or dollar signs.&amp;nbsp; For example just add a LENGTH statement and define which variables are numeric (length of 8 to store the full 8 byte floating point numbers that SAS uses for all numbers) and which are character (maximum length in bytes).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data get_US_Company_Dataset;
  infile 'C:\Users\HP\Desktop\Jigsaw_Acedemy\US_Company_Dataset.csv' dlm=',' dsd TRUNCOVER firstobs=1 ;
  length company_name_id $10 company_name $40 year_founded 8 
    city $30 state $15 country $20 zip_code $10 
    company_type $20 date_of_audit $10
  ;
  input company_name_id company_name year_founded city state country 
      zip_code company_type date_of_audit
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Jan 2019 15:06:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530317#M144996</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-01-26T15:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Expecting a name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530456#M145073</link>
      <description>Thanks Tom.&lt;BR /&gt;&lt;BR /&gt;It works.&lt;BR /&gt;&lt;BR /&gt;Reagrds&lt;BR /&gt;Vipendra</description>
      <pubDate>Sun, 27 Jan 2019 13:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Expecting-a-name/m-p/530456#M145073</guid>
      <dc:creator>vipendra</dc:creator>
      <dc:date>2019-01-27T13:15:43Z</dc:date>
    </item>
  </channel>
</rss>

