<?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: How to resolve for different lengths in source and targets in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563541#M17313</link>
    <description>&lt;P&gt;You need to add a derived mapping/calculation, like substr(left(source_column),1,30))&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2019 14:55:33 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2019-06-04T14:55:33Z</dc:date>
    <item>
      <title>How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563290#M17286</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For one of column the length we are getting from the source is char 300 and but output target has char 30 and we have no control over the source and target. can we use any function like trim or something to get this work ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;source (column char 300) --&amp;gt; transformation(function?)&amp;nbsp; --&amp;gt; target (column char 30)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kajal&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 15:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563290#M17286</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-06-03T15:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563299#M17288</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For one of column the length we are getting from the source is char 300 and but output target has char 30 and we have no control over the source and target. can we use any function like trim or something to get this work ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;source (column char 300) --&amp;gt; transformation(function?)&amp;nbsp; --&amp;gt; target (column char 30)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Kajal&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is the 'source'? A text file, SAS data set, remote DBMS table?&lt;/P&gt;
&lt;P&gt;What kind of "transformation" are you expecting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I am told the output is limited to 30 characters I need some sort of idea what should be kept and what the starting values may be plus the rules involved in getting the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the desired behavior is to just accept the first 30 characters from the source then read the data that way. Or send to the target that as length 30. But kind of need to know how either step is performed to provide concrete examples.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 15:34:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563299#M17288</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-03T15:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563401#M17297</link>
      <description>&lt;P&gt;If your import is done with a datastep :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data myNewDataset;
length mySourceVar $30;
set mySource;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if done via SQL:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table myNewDataset as
select
    myId,
    /* other variables */,
    mySourceVar length=30
from mySource;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With both methods, the variable (mySourceVar) will be truncated by SAS.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 22:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563401#M17297</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-03T22:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563409#M17299</link>
      <description>&lt;P&gt;I have a source where there is a column name with length 300 when I am passing this column to the next transformation it gives me a warning saying that length of column name is less in target and there may a truncation happen&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 23:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563409#M17299</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-06-03T23:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563541#M17313</link>
      <description>&lt;P&gt;You need to add a derived mapping/calculation, like substr(left(source_column),1,30))&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 14:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563541#M17313</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2019-06-04T14:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563549#M17314</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a source where there is a column name with length 300 when I am passing this column to the next transformation it gives me a warning saying that length of column name is less in target and there may a truncation happen&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So show the code you are using to "pass this column to the next transformation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AND you still have not described what &lt;STRONG&gt;you&lt;/STRONG&gt; want to keep from the long string.&lt;/P&gt;
&lt;P&gt;There is no way that a 300 character value will fit into a 30 column output. None. So you have to decide what you want and specify that as what goes into the 30 columns if you do not want random truncation notes.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 15:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/563549#M17314</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-04T15:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for different lengths in source and targets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/567819#M17421</link>
      <description>&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 03:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-resolve-for-different-lengths-in-source-and-targets/m-p/567819#M17421</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-06-21T03:13:55Z</dc:date>
    </item>
  </channel>
</rss>

