<?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: Invalid Data Error - From Informat in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569994#M160697</link>
    <description>&lt;P&gt;Thanks, ballardw, for the tip about the ??.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as the format statement I just was trying to recreate quickly a small sample of my data, but good to know for future reference.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2019 21:04:35 GMT</pubDate>
    <dc:creator>GBL__</dc:creator>
    <dc:date>2019-06-28T21:04:35Z</dc:date>
    <item>
      <title>Invalid Data Error - From Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569987#M160691</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am importing a csv file that has a variable named bnkrptdate that has a length of 7 and I am using an informat of MMDDYY7. to read it in to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I am running in to is that if the observation does NOT have a bnkrptdate, the value is 0000000, if it does have a bnkrptdate then the informat works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
	infile datalines delimiter=',' ;
	informat contrprofile 16. bnkrpt_ch $2. bnkrptdate mmddyy7. loanclass $2. int_type $1. purchasedate mmddyy7. ;
	input contrprofile bnkrpt_ch $ bnkrptdate loanclass $ int_type $ purchasedate ;
datalines ;
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,13,0040218,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,58,I,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081718 
;
	format bnkrptdate purchasedate mmddyy10. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the note I get (from my full dataset):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Invalid data for bnkrptdate in line 21 494-500.
WARNING: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am just curious how I can work around this issue?&amp;nbsp; Open to any suggestions, thnaks for reading!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 20:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569987#M160691</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2019-06-28T20:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Data Error - From Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569988#M160692</link>
      <description>&lt;P&gt;1. Read it as character and fix in the next step or within the proc&lt;/P&gt;
&lt;P&gt;2. Create a custom informat that sets 000000 to missing (untested)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
invalue myFormat
'0000000' = .
other = [yymmdd10.];
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Jun 2019 20:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569988#M160692</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-28T20:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Data Error - From Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569990#M160693</link>
      <description>&lt;P&gt;proc format was a great way to go, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 21:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569990#M160693</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2019-06-28T21:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Data Error - From Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569992#M160695</link>
      <description>&lt;P&gt;On an input statement you can add the INFORMAT modifier&amp;nbsp; ?? to suppress error messages .&lt;/P&gt;
&lt;P&gt;BTW you can't have any code such as your Format statement after a datalines block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have ;
	infile datalines delimiter=',' ;
	informat contrprofile 16. bnkrpt_ch $2. bnkrptdate  mmddyy7. loanclass $2. int_type $1. purchasedate mmddyy7. ;
	input contrprofile bnkrpt_ch $ bnkrptdate &lt;STRONG&gt;??&lt;/STRONG&gt; loanclass $ int_type $ purchasedate ;
	format bnkrptdate purchasedate mmddyy10. ;
datalines ;
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,13,0040218,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,58,I,0081518 
0000000000000,00,0000000,59,P,0081518 
0000000000000,00,0000000,59,P,0081718 
;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Jun 2019 21:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569992#M160695</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-28T21:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Data Error - From Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569994#M160697</link>
      <description>&lt;P&gt;Thanks, ballardw, for the tip about the ??.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as the format statement I just was trying to recreate quickly a small sample of my data, but good to know for future reference.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 21:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Data-Error-From-Informat/m-p/569994#M160697</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2019-06-28T21:04:35Z</dc:date>
    </item>
  </channel>
</rss>

