<?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 is not reading my FORMAT for a variable correctly in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698286#M25495</link>
    <description>&lt;P&gt;It's tough for me to explain everything, but hopefully this can give you a better idea of what I want to achieve.&lt;/P&gt;&lt;P&gt;Here's an example of a code that achieves what I want to do for WORK.Contact_MS.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA	WORK.Contact_IA ;  
	RETAIN SSN Inits City StateCd ZipCd; 
	 
	SET	HypImpt.IowaResidents 
		(   RENAME = ( ZipCd = ZipCdNum )   );  
			 ZipCd = PUT(ZipCdNum, 5.); 
			DROP 	ZipCdNum; 
	LABEL 	SSN			=  'Social Security Number' 
			Inits		=  'Subject Initials' 
			City		=  'City' 
			StateCd		=  'State Code' 
			ZipCd		=  'Zip Code'; 
	LENGTH  Inits    $	3 
			StateCd  $	2; 
		 
		 City  = PROPCASE(City); 
 	   StateCd = CAT(SUBSTR(State, 1, 1), SUBSTR(State, 4,1)); 
         Inits = CATS(SUBSTR(Initials, 3, 2), SUBSTR(Initials, 1, 1)); 
	FORMAT StateCd $StateCd.;  
	KEEP SSN Inits City StateCd ZipCd; 
 
	RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My output looks like this for WORK.Contact_IA:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WORK.Contact IA.PNG" style="width: 401px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51587iEA11C64243A0FFFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="WORK.Contact IA.PNG" alt="WORK.Contact IA.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to give you an idea of what the original data set looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Iowa Residents.PNG" style="width: 799px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51588iB13FF5526EAE0577/image-size/large?v=v2&amp;amp;px=999" role="button" title="Iowa Residents.PNG" alt="Iowa Residents.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, my output for WORK.Contact_MS looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WORK.Contact MS.PNG" style="width: 384px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51589iA7A517368CBAC189/image-size/large?v=v2&amp;amp;px=999" role="button" title="WORK.Contact MS.PNG" alt="WORK.Contact MS.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I see in my log (which doesn't show any errors or warning messages):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         DATAWORK.Contact_MS;
 74         RETAIN SSN Inits City StateCd ZipCd;
 75         
 76         LENGTH  Inits    $3
 77         City     $20
 78         StateCd  $2;
 79         SETHypImpt.MS_Citizens (RENAME = (SocSecNum = SSN));
 80         
 81         /*RETAIN SSN
 82            Inits
 83            City
 84            StateCd 'MS'
 85            ZipCd;*/
 86         
 87         LABEL SSN=  'Social Security Number'
 88         Inits=  'Subject Initials'
 89         City=  'City'
 90         StateCd=  'State Code'
 91         ZipCd=  'Zip Code';
 92         
 93         
 94             /*  FirstInit = COMPRESS(FirstInit, '.');
 95               MiddleInit = COMPRESS(MiddleInit, '.');
 96               LastInit = COMPRESS(LastInit, '.');
 97               Inits =  FirstInit||MiddleInit||LastInit;
 98               City = SCAN(CityState, 1, ' ,');
 99               StateCd = SCAN(CityState, 2, ' ,'); */
 100        
 101           City  = SCAN(CityState, 1, ' ,');
 102        City  = PROPCASE(City);
 103           StateCd = COMPRESS((SCAN(CityState, 2, ',')));
 104           StateCd = UPCASE(StateCd);
 105                Inits = CATS(SUBSTR(FirstInit, 1, 1), SUBSTR(MiddleInit, 1, 1), SUBSTR (LastInit, 1, 1));
 106        
 107        FORMAT StateCd $StateCd.; /*if I add this, "Unexpected Value" appears in output*/
 108        KEEP SSN Inits City StateCd ZipCd;
 109        RUN;
 
 NOTE: Variable StateCd is uninitialized.
 NOTE: There were 207 observations read from the data set HYPIMPT.MS_CITIZENS.
 NOTE: The data set WORK.CONTACT_MS has 207 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              1119.18k
       OS Memory           32940.00k
       Timestamp           11/12/2020 02:28:04 AM
       Step Count                        362  Switch Count  2
       Page Faults                       0
       Page Reclaims                     198
       Page Swaps                        0
       Voluntary Context Switches        23
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           272
       
 
 110        
 111        
 112        PROC SORT DATA = WORK.Contact_MS;
 113        BY SSN;
 114        RUN;
 
 NOTE: There were 207 observations read from the data set WORK.CONTACT_MS.
 NOTE: The data set WORK.CONTACT_MS has 207 observations and 5 variables.
 NOTE: PROCEDURE SORT used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.01 seconds
       memory              1041.50k
       OS Memory           32940.00k
       Timestamp           11/12/2020 02:28:04 AM
       Step Count                        363  Switch Count  2
       Page Faults                       0
       Page Reclaims                     113
       Page Swaps                        0
       Voluntary Context Switches        11
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 
 115        
 116        PROC CONTENTS DATA = WORK.Contact_MS ORDER = VARNUM;
 117        RUN;
 
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.06 seconds
       user cpu time       0.07 seconds
       system cpu time     0.00 seconds
       memory              3129.90k
       OS Memory           33708.00k
       Timestamp           11/12/2020 02:28:04 AM
       Step Count                        364  Switch Count  0
       Page Faults                       0
       Page Reclaims                     243
       Page Swaps                        0
       Voluntary Context Switches        2
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 
 118        
 119        PROC PRINT DATA = WORK.Contact_MS;
 120        RUN;
 
 NOTE: There were 207 observations read from the data set WORK.CONTACT_MS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.30 seconds
       user cpu time       0.30 seconds
       system cpu time     0.00 seconds
       memory              3049.31k
       OS Memory           35752.00k
       Timestamp           11/12/2020 02:28:05 AM
       Step Count                        365  Switch Count  0
       Page Faults                       0
       Page Reclaims                     643
       Page Swaps                        0
       Voluntary Context Switches        2
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           152
       
 
 121        
 122        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 134        &lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Nov 2020 02:53:22 GMT</pubDate>
    <dc:creator>rodrima4</dc:creator>
    <dc:date>2020-11-12T02:53:22Z</dc:date>
    <item>
      <title>SAS is not reading my FORMAT for a variable correctly</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698264#M25492</link>
      <description>&lt;P&gt;SAS Studio User&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi again! Thank you for the help on my previous question, but there seems to be another issue with my code that I have to fix.&amp;nbsp;I have a variable named StateCd for which SAS should read as 'MS'. In that same code, I included a FORMAT for the variable StateCd which I have named $StateCd. This format is supposed to read as 'Mississippi'. Here is my code for the format:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;FORMAT&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $StateCd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'IA' = 'Iowa'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MS' = 'Mississippi'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'UT' = 'Utah';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run my entire code, in the output my variable StateCd is read as 'MI' which are the first two letters of Mississippi. I know this is happening because in my code my length statement states that StateCd should be a length of 2. However, my data steps for IA and UT are similar to my MS data step code and I am not having issues with those reading like I want them to. If anyone can provide me with some insight as to what I am doing wrong, I would appreciate it! Let me know if you need to see anything else. Thank you in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code for MS:&lt;/P&gt;&lt;P&gt;DATA WORK.Contact_MS;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;RETAIN SSN Inits City StateCd ZipCd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LENGTH Inits $3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; City $20&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StateCd $2;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SET HypImpt.MS_Citizens (RENAME = (SocSecNum = SSN));&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; LABEL SSN = 'Social Security Number'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Inits = 'Subject Initials'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;City = 'City'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StateCd = 'State Code'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ZipCd = 'Zip Code';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;City = SCAN(CityState, 1, ' ,');&lt;BR /&gt;City = PROPCASE(City);&lt;BR /&gt;StateCd = UPCASE(SCAN(CityState, 2, ' ,'), 1);&lt;BR /&gt;StateCd = COMPRESS((SCAN(CityState, 2, ',')));&lt;BR /&gt;StateCd = UPCASE(StateCd);&lt;BR /&gt;Inits = CATS(SUBSTR(FirstInit, 1, 1), SUBSTR(MiddleInit, 1, 1), SUBSTR (LastInit, 1, 1));&lt;BR /&gt;&lt;BR /&gt;FORMAT StateCd $StateCd.; /*if I add this, "Unexpected Value" appears in output*/&lt;BR /&gt;KEEP SSN Inits City StateCd ZipCd;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 01:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698264#M25492</guid>
      <dc:creator>rodrima4</dc:creator>
      <dc:date>2020-11-12T01:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading my FORMAT for a variable correctly</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698265#M25493</link>
      <description>&lt;P&gt;Formats have nothing to do with "reading" but display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have now asked several questions without actually showing any of your actual data.&lt;/P&gt;
&lt;P&gt;The format you show will not display "Unexpected Value".&amp;nbsp; If you see that as a formatted value, then the format is NOT the one you show as code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, provide example data in the form of a data step that generates the result you claim.&lt;/P&gt;
&lt;P&gt;Also, when getting messages in the log that you question copy from the log the entire data step or procedure code and all the messages or notes. Then paste into a code box opened on the forum with the &amp;lt;/&amp;gt; icon to preserve the formatting of the text. SAS often provides diagnostics and the code box preserves the location for use. The main message windows reformat pasted text.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 01:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698265#M25493</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-12T01:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading my FORMAT for a variable correctly</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698286#M25495</link>
      <description>&lt;P&gt;It's tough for me to explain everything, but hopefully this can give you a better idea of what I want to achieve.&lt;/P&gt;&lt;P&gt;Here's an example of a code that achieves what I want to do for WORK.Contact_MS.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA	WORK.Contact_IA ;  
	RETAIN SSN Inits City StateCd ZipCd; 
	 
	SET	HypImpt.IowaResidents 
		(   RENAME = ( ZipCd = ZipCdNum )   );  
			 ZipCd = PUT(ZipCdNum, 5.); 
			DROP 	ZipCdNum; 
	LABEL 	SSN			=  'Social Security Number' 
			Inits		=  'Subject Initials' 
			City		=  'City' 
			StateCd		=  'State Code' 
			ZipCd		=  'Zip Code'; 
	LENGTH  Inits    $	3 
			StateCd  $	2; 
		 
		 City  = PROPCASE(City); 
 	   StateCd = CAT(SUBSTR(State, 1, 1), SUBSTR(State, 4,1)); 
         Inits = CATS(SUBSTR(Initials, 3, 2), SUBSTR(Initials, 1, 1)); 
	FORMAT StateCd $StateCd.;  
	KEEP SSN Inits City StateCd ZipCd; 
 
	RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My output looks like this for WORK.Contact_IA:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WORK.Contact IA.PNG" style="width: 401px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51587iEA11C64243A0FFFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="WORK.Contact IA.PNG" alt="WORK.Contact IA.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to give you an idea of what the original data set looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Iowa Residents.PNG" style="width: 799px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51588iB13FF5526EAE0577/image-size/large?v=v2&amp;amp;px=999" role="button" title="Iowa Residents.PNG" alt="Iowa Residents.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, my output for WORK.Contact_MS looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WORK.Contact MS.PNG" style="width: 384px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51589iA7A517368CBAC189/image-size/large?v=v2&amp;amp;px=999" role="button" title="WORK.Contact MS.PNG" alt="WORK.Contact MS.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I see in my log (which doesn't show any errors or warning messages):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         DATAWORK.Contact_MS;
 74         RETAIN SSN Inits City StateCd ZipCd;
 75         
 76         LENGTH  Inits    $3
 77         City     $20
 78         StateCd  $2;
 79         SETHypImpt.MS_Citizens (RENAME = (SocSecNum = SSN));
 80         
 81         /*RETAIN SSN
 82            Inits
 83            City
 84            StateCd 'MS'
 85            ZipCd;*/
 86         
 87         LABEL SSN=  'Social Security Number'
 88         Inits=  'Subject Initials'
 89         City=  'City'
 90         StateCd=  'State Code'
 91         ZipCd=  'Zip Code';
 92         
 93         
 94             /*  FirstInit = COMPRESS(FirstInit, '.');
 95               MiddleInit = COMPRESS(MiddleInit, '.');
 96               LastInit = COMPRESS(LastInit, '.');
 97               Inits =  FirstInit||MiddleInit||LastInit;
 98               City = SCAN(CityState, 1, ' ,');
 99               StateCd = SCAN(CityState, 2, ' ,'); */
 100        
 101           City  = SCAN(CityState, 1, ' ,');
 102        City  = PROPCASE(City);
 103           StateCd = COMPRESS((SCAN(CityState, 2, ',')));
 104           StateCd = UPCASE(StateCd);
 105                Inits = CATS(SUBSTR(FirstInit, 1, 1), SUBSTR(MiddleInit, 1, 1), SUBSTR (LastInit, 1, 1));
 106        
 107        FORMAT StateCd $StateCd.; /*if I add this, "Unexpected Value" appears in output*/
 108        KEEP SSN Inits City StateCd ZipCd;
 109        RUN;
 
 NOTE: Variable StateCd is uninitialized.
 NOTE: There were 207 observations read from the data set HYPIMPT.MS_CITIZENS.
 NOTE: The data set WORK.CONTACT_MS has 207 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              1119.18k
       OS Memory           32940.00k
       Timestamp           11/12/2020 02:28:04 AM
       Step Count                        362  Switch Count  2
       Page Faults                       0
       Page Reclaims                     198
       Page Swaps                        0
       Voluntary Context Switches        23
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           272
       
 
 110        
 111        
 112        PROC SORT DATA = WORK.Contact_MS;
 113        BY SSN;
 114        RUN;
 
 NOTE: There were 207 observations read from the data set WORK.CONTACT_MS.
 NOTE: The data set WORK.CONTACT_MS has 207 observations and 5 variables.
 NOTE: PROCEDURE SORT used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.01 seconds
       memory              1041.50k
       OS Memory           32940.00k
       Timestamp           11/12/2020 02:28:04 AM
       Step Count                        363  Switch Count  2
       Page Faults                       0
       Page Reclaims                     113
       Page Swaps                        0
       Voluntary Context Switches        11
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 
 115        
 116        PROC CONTENTS DATA = WORK.Contact_MS ORDER = VARNUM;
 117        RUN;
 
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.06 seconds
       user cpu time       0.07 seconds
       system cpu time     0.00 seconds
       memory              3129.90k
       OS Memory           33708.00k
       Timestamp           11/12/2020 02:28:04 AM
       Step Count                        364  Switch Count  0
       Page Faults                       0
       Page Reclaims                     243
       Page Swaps                        0
       Voluntary Context Switches        2
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 
 118        
 119        PROC PRINT DATA = WORK.Contact_MS;
 120        RUN;
 
 NOTE: There were 207 observations read from the data set WORK.CONTACT_MS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.30 seconds
       user cpu time       0.30 seconds
       system cpu time     0.00 seconds
       memory              3049.31k
       OS Memory           35752.00k
       Timestamp           11/12/2020 02:28:05 AM
       Step Count                        365  Switch Count  0
       Page Faults                       0
       Page Reclaims                     643
       Page Swaps                        0
       Voluntary Context Switches        2
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           152
       
 
 121        
 122        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 134        &lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Nov 2020 02:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698286#M25495</guid>
      <dc:creator>rodrima4</dc:creator>
      <dc:date>2020-11-12T02:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading my FORMAT for a variable correctly</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698290#M25496</link>
      <description>&lt;P&gt;The note after your data step:&lt;/P&gt;
&lt;PRE&gt; NOTE: Variable StateCd is uninitialized.&lt;/PRE&gt;
&lt;P&gt;Means at that point there is NO VALUE for the StateCd variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Running this code:&lt;/P&gt;
&lt;PRE&gt;PROC FORMAT;
VALUE      $StateCd
'IA' = 'Iowa'
'MS' = 'Mississippi'
'UT' = 'Utah';
RUN;

data junk;
   input x $;
datalines;
IA
BC
MS
UT
.
;

ods listing;
Proc print data=junk;
   format x $statecd.;
run;&lt;/PRE&gt;
&lt;P&gt;Yields this output.&lt;/P&gt;
&lt;PRE&gt;Obs    x

 1     Iowa
 2     BC
 3     Mississippi
 4     Utah
 5
&lt;/PRE&gt;
&lt;P&gt;So a "blank" or missing value value with that format does NOT create "Unknown" for output. So, either you have a different actual format ACTIVE than you have shown or something else is happening.&lt;/P&gt;
&lt;P&gt;Most likely the actual Format code you ran had either a missing or "other" assigning "Unknown" and that makes sense because you have no actual values for the variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 04:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-is-not-reading-my-FORMAT-for-a-variable-correctly/m-p/698290#M25496</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-12T04:11:31Z</dc:date>
    </item>
  </channel>
</rss>

