<?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: custom formats 'partially' work in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474626#M121958</link>
    <description>&lt;P&gt;I get this message in Log&lt;/P&gt;&lt;DIV class="sasSource"&gt;83 ! 2 = 'Female';&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;180&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;</description>
    <pubDate>Sat, 30 Jun 2018 03:17:04 GMT</pubDate>
    <dc:creator>jimmychoi</dc:creator>
    <dc:date>2018-06-30T03:17:04Z</dc:date>
    <item>
      <title>custom formats 'partially' work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474625#M121957</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;19 1 14000 Y&lt;BR /&gt;45 1 65000 G&lt;BR /&gt;72 2 35000 B&lt;BR /&gt;31 1 44000 Y&lt;BR /&gt;58 2 83000 W&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's my data for 'car customers' and each field representing age, sex, income, and preferred color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA cars;
	INFILE '/folders/myfolders/sasuser.v94/universecars.txt';
	INPUT Age Gen Income CarColor $;
RUN;

PROC FORMAT;
	VALUE agegroup	13 -&amp;lt; 20 = 'Teen'
					20 -&amp;lt; 65 = 'Adults'
					65 - high = 'Senior';
	VALUE gender	1 = 'Male';
					2 = 'Female';
	VALUE incrange	0 -&amp;lt; 20000 = 'Extreme Low'
					20000 -&amp;lt; 40000 = 'Low'
					40000 -&amp;lt; 60000 = 'Med'
					60000 -&amp;lt; 80000 = 'High'
					80000 - HIGH = 'Extreme High';
	VALUE $color	'y' = 'Yellow'
					'G' = 'Green'
					'B' = 'Blue'
					'W' = 'White';
					
PROC PRINT data=cars;
	FORMAT Age agegroup. Gen gender. Income incrange. CarColor $color.;
RUN;&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;and the results when I run, does not interprete number 2 in 'sex' field as 'female'.&lt;/P&gt;&lt;P&gt;Strange enough, 1 works as a 'male'. and it doesnot work for Y, neither.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Age&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Gen&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Income&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;CarColor&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Teen&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;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t;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Extreme High&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;White&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474625#M121957</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2018-06-30T03:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: custom formats 'partially' work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474626#M121958</link>
      <description>&lt;P&gt;I get this message in Log&lt;/P&gt;&lt;DIV class="sasSource"&gt;83 ! 2 = 'Female';&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;180&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474626#M121958</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2018-06-30T03:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: custom formats 'partially' work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474627#M121959</link>
      <description>&lt;P&gt;remove semicolon&amp;nbsp; after male&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;VALUE&lt;/SPAN&gt; gender	&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Male'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
					&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Female'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474627#M121959</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-30T03:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: custom formats 'partially' work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474628#M121960</link>
      <description>&lt;P&gt;check for&lt;STRONG&gt; case sensitivity of format vs value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;	&lt;SPAN class="token keyword"&gt;VALUE&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;color	&lt;SPAN class="token string"&gt;'y'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Yellow'&lt;/SPAN&gt;
					&lt;SPAN class="token string"&gt;'G'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Green'&lt;/SPAN&gt;
					&lt;SPAN class="token string"&gt;'B'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Blue'&lt;/SPAN&gt;
					&lt;SPAN class="token string"&gt;'W'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'White'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474628#M121960</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-30T03:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: custom formats 'partially' work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474629#M121961</link>
      <description>Works like a charm thank you so much&lt;BR /&gt;Why didn't I find that???&lt;BR /&gt;and thanks again for the comments for the case sensitivity of formats, I will work on that</description>
      <pubDate>Sat, 30 Jun 2018 03:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474629#M121961</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2018-06-30T03:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: custom formats 'partially' work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474630#M121962</link>
      <description>&lt;P&gt;lol happens to me too. Just a syntax issue. Have fun!&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-formats-partially-work/m-p/474630#M121962</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-30T03:25:46Z</dc:date>
    </item>
  </channel>
</rss>

