<?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: DI Studio 3.4 CSV Source in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72844#M15691</link>
    <description>Correction&lt;BR /&gt;
&lt;BR /&gt;
Its a TXT source not a CSV source sorry.&lt;BR /&gt;
&lt;BR /&gt;
The column definitions is the CSV file.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks&lt;BR /&gt;
Milton</description>
    <pubDate>Wed, 23 Sep 2009 06:33:02 GMT</pubDate>
    <dc:creator>milts</dc:creator>
    <dc:date>2009-09-23T06:33:02Z</dc:date>
    <item>
      <title>DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72843#M15690</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I created a fixed-width source table from a csv file. I also imported the column definitions from a csv file.&lt;BR /&gt;
&lt;BR /&gt;
Then I created a job that uses that source table to create an exact copy of it in a sas data set. But i get errors regarding on invalid data. How come do i get those errors when i didn't specify any constraints?&lt;BR /&gt;
&lt;BR /&gt;
Also is there a maximum length for fields which come from csv files? I have a column character with length 80 but when I run the job complete value wasn't captured.&lt;BR /&gt;
&lt;BR /&gt;
Hope you could help me out. Many thanks!&lt;BR /&gt;
Milton</description>
      <pubDate>Wed, 23 Sep 2009 05:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72843#M15690</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2009-09-23T05:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72844#M15691</link>
      <description>Correction&lt;BR /&gt;
&lt;BR /&gt;
Its a TXT source not a CSV source sorry.&lt;BR /&gt;
&lt;BR /&gt;
The column definitions is the CSV file.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks&lt;BR /&gt;
Milton</description>
      <pubDate>Wed, 23 Sep 2009 06:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72844#M15691</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2009-09-23T06:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72845#M15692</link>
      <description>Please attach a log so that you error messages can be available to be commented on.&lt;BR /&gt;
Your error could be that you are specifying a numeric column, but there exists for some reason alphanumeric data.&lt;BR /&gt;
For the field length, try using a informat with the lenght of 80.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Wed, 23 Sep 2009 07:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72845#M15692</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-09-23T07:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72846#M15693</link>
      <description>Hi Linus,&lt;BR /&gt;
&lt;BR /&gt;
In the log there are error messages saying invalid data for value SOME_DATE and yes it's specified as numeric but there are no alphanumeric characters. But the problem is that there is no value for that field in the text source file. I checked the treat unassigned values to missing in the option also.&lt;BR /&gt;
&lt;BR /&gt;
Regarding the field length, thanks it's now working.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Milton</description>
      <pubDate>Thu, 24 Sep 2009 00:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72846#M15693</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2009-09-24T00:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72847#M15694</link>
      <description>It sounds like you ERROR is because there is some value in an expected date field that is not a valid date. For example you migh have something like '9999/99/99' in your field, or a year may be outside of the range specified by YEARCUTOFF (From memory, I think the highest year by default is 5499?)&lt;BR /&gt;
&lt;BR /&gt;
As for your field length problem, I suspect that the issue will lie in the Begin &amp;amp; End position columns in your external table definition. You'll most likely need to check the overlap tick box before you're allowed to change them though. I guess you specified it incorrectly in the first place, and then just changed the Length column in the definition??</description>
      <pubDate>Fri, 25 Sep 2009 14:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72847#M15694</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-25T14:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72848#M15695</link>
      <description>Hi simkinp,&lt;BR /&gt;
&lt;BR /&gt;
I have checked the raw text file and the error appears on rows which has no value/blank in that field. that's why it's a little weird.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Milton</description>
      <pubDate>Fri, 25 Sep 2009 23:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72848#M15695</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2009-09-25T23:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72849#M15696</link>
      <description>Hi Milton&lt;BR /&gt;
&lt;BR /&gt;
Try this:&lt;BR /&gt;
In your "fixed-width source table" object in the tab "File Parameters" &lt;BR /&gt;
- check the box "Pad column values with blanks"&lt;BR /&gt;
- check the box "Treat unassigned values as missings"&lt;BR /&gt;
- Choose a "logical record length" big enough for the longest line of data in your text file.&lt;BR /&gt;
&lt;BR /&gt;
If this doesn't help: &lt;BR /&gt;
Please send the log and/or the part of the generated code where the "infile" statement is.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
P.S:&lt;BR /&gt;
The important checkbox is "Treat unassigned values as missings" as this adds a "truncover" to the infile statement. &lt;BR /&gt;
&lt;BR /&gt;
Checkbox "Pad column values with blanks" adds a "pad" to the infile statement. Actually no more necessary as there is already a "truncover" - but it doesn't hurt to have it as well.</description>
      <pubDate>Sat, 26 Sep 2009 02:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72849#M15696</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-09-26T02:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72850#M15697</link>
      <description>Hi Patrick,&lt;BR /&gt;
&lt;BR /&gt;
Those are checked already. truncover is in the option and the lrecl i set is 32000.&lt;BR /&gt;
&lt;BR /&gt;
Will there be a difference if I add the DSD option?&lt;BR /&gt;
&lt;BR /&gt;
I'll post the logs by Monday.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Milton</description>
      <pubDate>Sat, 26 Sep 2009 05:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72850#M15697</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2009-09-26T05:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72851#M15698</link>
      <description>"Will there be a difference if I add the DSD option?"&lt;BR /&gt;
Not with fixed length as you are reading by column position and don't use a delimiter to decide where a new field starts in the record.&lt;BR /&gt;
&lt;BR /&gt;
If truncover is already there: &lt;BR /&gt;
Could it be that there are some invisible control characters in your text file. That can happen when textfiles are copied from Windows to Unix with Unix only having LF at the end of a line and Windows having CR/LF.&lt;BR /&gt;
Is this field you're having problems with at the end of your record?</description>
      <pubDate>Sat, 26 Sep 2009 06:15:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72851#M15698</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-09-26T06:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72852#M15699</link>
      <description>Apologies, I mis-read data as date so my first comment is kind of irrelevant! (The regular Friday evening rush to leave work!)&lt;BR /&gt;
&lt;BR /&gt;
As for your truncation problem, I'm presuming that you can actually see your data is being truncated? DI Studio will not truncate your data unless it is told to do so, and it won't even map you column if the target is shorter than the source, Meaning the problem is certainly in the external file. &lt;BR /&gt;
&lt;BR /&gt;
I'd suggest you've got one of the following issues&lt;BR /&gt;
&lt;BR /&gt;
Your LRECL is too short meaning just your last column has been truncated.&lt;BR /&gt;
&lt;BR /&gt;
or&lt;BR /&gt;
&lt;BR /&gt;
There is a difference of opinion between your Length, Informat and Begin/End positions (The length of these should all be the same). Don't trust the import wizard, it does get things wrong occaisionally.</description>
      <pubDate>Mon, 28 Sep 2009 11:12:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72852#M15699</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-28T11:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio 3.4 CSV Source</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72853#M15700</link>
      <description>when handling delimited data allways use DSD.&lt;BR /&gt;
Otherwise it isn't  needed.&lt;BR /&gt;
peterC</description>
      <pubDate>Thu, 01 Oct 2009 09:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-3-4-CSV-Source/m-p/72853#M15700</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2009-10-01T09:31:47Z</dc:date>
    </item>
  </channel>
</rss>

