<?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: problem in creating variable value in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371376#M2841</link>
    <description>&lt;P&gt;You are encountering two types of problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first problem occurs just once, on the first FORMAT statement.&amp;nbsp; It should read:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format hlthfood hlthfood.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The syntax of table_name.field_name is generally not used within SAS ... perhaps only within PROC SQL.&amp;nbsp; The remaining FORMAT statements appear to be correct.&amp;nbsp; Which leads to the second problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have stored these formats permanently.&amp;nbsp; However, you have not told SAS where to look, to retrieve the formats.&amp;nbsp; That actually requires an additional statement, such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options fmtsearch=(Preeti, work);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems strange that you can create formats early in the program, save them, and yet SAS cannot find them.&amp;nbsp; But that's what happens when you permanently save formats.&amp;nbsp; You have to add the FMTSEARCH option to tell SAS where to look.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jun 2017 17:12:38 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-06-28T17:12:38Z</dc:date>
    <item>
      <title>problem in creating variable value</title>
      <link>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371362#M2839</link>
      <description>&lt;P&gt;please help me with this....&lt;/P&gt;&lt;P&gt;i want to put value in variable but its showing error....&lt;/P&gt;&lt;P&gt;reply fast please......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc format lib=Preeti;&lt;BR /&gt;value hlthfood&lt;BR /&gt;0='No'&lt;BR /&gt;1='Yes';&lt;BR /&gt;value size&lt;BR /&gt;1='Small'&lt;BR /&gt;2='Medium'&lt;BR /&gt;3='Large';&lt;BR /&gt;value org&lt;BR /&gt;1='Emphasizes produce'&lt;BR /&gt;2='Emphasizes deli'&lt;BR /&gt;3='Emphasizes bakery'&lt;BR /&gt;4='No emphasis';&lt;BR /&gt;value gender&lt;BR /&gt;0='Male'&lt;BR /&gt;1='Female';&lt;BR /&gt;value shopfor&lt;BR /&gt;1='Self'&lt;BR /&gt;2='Self and spouse'&lt;BR /&gt;3='Self and family';&lt;BR /&gt;value veg&lt;BR /&gt;0='No'&lt;BR /&gt;1='Yes';&lt;BR /&gt;value style&lt;BR /&gt;1='Biweekly' and 'in bulk'&lt;BR /&gt;2='Weekly' and 'similar items'&lt;BR /&gt;3='Often' and 'whats on sale';&lt;BR /&gt;value usecoup&lt;BR /&gt;1='No'&lt;BR /&gt;2='From newspaper'&lt;BR /&gt;3='From mailings'&lt;BR /&gt;4='From both';&lt;/P&gt;&lt;P&gt;value carry&lt;BR /&gt;0='First period'&lt;BR /&gt;1='No coupon'&lt;BR /&gt;2='5 percent'&lt;BR /&gt;3='15 percent'&lt;BR /&gt;4='25 percent';&lt;/P&gt;&lt;P&gt;Value coupval&lt;BR /&gt;1='No value'&lt;BR /&gt;2='5 percent'&lt;BR /&gt;3='15 percent'&lt;BR /&gt;4='25 percent'&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data preeti.grocery_coupons1;&lt;BR /&gt;set Preeti.grocery_coupons;&lt;BR /&gt;format preeti.hlthfood hlthfood.;&lt;BR /&gt;format size size. ;&lt;BR /&gt;format org org. ;&lt;BR /&gt;format custid custid. ;&lt;BR /&gt;format gender gender. ;&lt;BR /&gt;format shopfor shopfor. ;&lt;BR /&gt;format veg veg. ;&lt;BR /&gt;format style style. ;&lt;BR /&gt;format usecoup usecoup. ;&lt;BR /&gt;format week week. ;&lt;BR /&gt;format seq seq. ;&lt;BR /&gt;format carry carry. ;&lt;BR /&gt;format coupval coupval. ;&lt;BR /&gt;format amtspent amtspent. ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error ;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;data preeti.grocery_coupons1;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;111 set Preeti.grocery_coupons;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;112 format preeti.hlthfood hlthfood.;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_________&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Invalid variable specification, preeti.hlthfood. Variable names of the form X.X must be either FIRST.X or LAST.X.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The name preeti.hlthfood is not a valid SAS name.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format HLTHFOOD was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;113 format size size. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format SIZE was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;114 formatorgorg. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format ORG was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;115 formatcustidcustid. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format CUSTID was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;116 formatgendergender. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format GENDER was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;117 formatshopforshopfor. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;________&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format SHOPFOR was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;118 formatvegveg. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format VEG was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;119 formatstylestyle. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format STYLE was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;120 formatusecoupusecoup. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;________&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format USECOUP was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;121 formatweekweek. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format WEEK was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;122 formatseqseq. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format SEQ was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;123 formatcarrycarry. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format CARRY was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;124 formatcoupvalcoupval. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;________&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format COUPVAL was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;125 formatamtspentamtspent. ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_________&lt;/DIV&gt;&lt;DIV class="sasError"&gt;484&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE 484-185: Format AMTSPENT was not found or could not be loaded.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;126 run;&lt;/DIV&gt;</description>
      <pubDate>Wed, 28 Jun 2017 16:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371362#M2839</guid>
      <dc:creator>jonty</dc:creator>
      <dc:date>2017-06-28T16:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem in creating variable value</title>
      <link>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371376#M2841</link>
      <description>&lt;P&gt;You are encountering two types of problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first problem occurs just once, on the first FORMAT statement.&amp;nbsp; It should read:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format hlthfood hlthfood.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The syntax of table_name.field_name is generally not used within SAS ... perhaps only within PROC SQL.&amp;nbsp; The remaining FORMAT statements appear to be correct.&amp;nbsp; Which leads to the second problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have stored these formats permanently.&amp;nbsp; However, you have not told SAS where to look, to retrieve the formats.&amp;nbsp; That actually requires an additional statement, such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options fmtsearch=(Preeti, work);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems strange that you can create formats early in the program, save them, and yet SAS cannot find them.&amp;nbsp; But that's what happens when you permanently save formats.&amp;nbsp; You have to add the FMTSEARCH option to tell SAS where to look.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 17:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371376#M2841</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-28T17:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem in creating variable value</title>
      <link>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371431#M2843</link>
      <description>&lt;P&gt;thank you so much&lt;/P&gt;&lt;P&gt;i like your support....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and its strange that i havent used FMTSEARCH and dont know how it still worked&amp;nbsp;&lt;/P&gt;&lt;P&gt;well i am a rookiee to sas so i believe these probs are common for me as i am not from any science studies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still respect for you, you helped me i loved it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;jonty&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 19:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/problem-in-creating-variable-value/m-p/371431#M2843</guid>
      <dc:creator>jonty</dc:creator>
      <dc:date>2017-06-28T19:03:28Z</dc:date>
    </item>
  </channel>
</rss>

