<?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: Reduce the length of the numeric variables in DI Studio in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452445#M13959</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt; wrote:&lt;BR /&gt;Got it now! How can I tackle this issue now?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How about using three (3) as the length?&lt;/P&gt;</description>
    <pubDate>Mon, 09 Apr 2018 08:47:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-04-09T08:47:00Z</dc:date>
    <item>
      <title>Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452428#M13952</link>
      <description>&lt;P&gt;I've one numeric field which is coming from DB2 and it has a length 8 and now I want to do the mapping of this field to the target table under Join transformation and I've reduce the length to 2. When I tried to do this, I'm getting an error like, 'Length of the numeric filed should be between 3 to 8'. I tried using substr function as follows in expression tab.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;substr(column_name,1,2)

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Appreciate if someone of you help me to resolve this issue.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452428#M13952</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-04-09T08:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452433#M13953</link>
      <description>&lt;P&gt;substr() works on CHARACTER variables, it is useless for NUMERIC variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&lt;/P&gt;
&lt;P&gt;'Length of the numeric filed should be between 3 to 8'&lt;/P&gt;
&lt;P&gt;speaks for itself, doesn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452433#M13953</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-09T08:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452434#M13954</link>
      <description>&lt;P&gt;What do you mean "length"?&amp;nbsp; Numberic lengths are 3-8 by default as the error is telling you.&amp;nbsp; I really cannot tell what you are doing from that snippet of code - please learn to follow the guidance in posting a complete question to avoid confusion.&amp;nbsp; At a guess I suspect you are somehow trying to set a length to be less than 3 which is not possible for numbers.&amp;nbsp; TBH there really isn't any noticeable benefit to reducing the length from 8 to 3 other than the numbers they can contain would be lower.&amp;nbsp; You may also need to consider how to truncate the numbers if they don't fit the new storage.&amp;nbsp; A length of 3 will only allow numbers up to 8192, after that you would need to round or truncate the data.&amp;nbsp; Again, posting clear examples with test data in the form of a datastep really helps show your issues.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:22:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452434#M13954</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-09T08:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452437#M13955</link>
      <description>Could you please help me understand how the error message has speak for&lt;BR /&gt;itself? I have the field which has integer values and has the values&lt;BR /&gt;between 10 to 99. Is there any function/apporoach available to tackle this&lt;BR /&gt;problem?&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:27:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452437#M13955</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-04-09T08:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452439#M13956</link>
      <description>&lt;P&gt;OK, since this is so hard for you, I'll try to translate your own post for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"and I've reduce the length to 2. When I tried to do this, I'm getting an error like, 'Length of the numeric filed should be between 3 to 8'."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The MINIMUM LENGTH for a numeric variable in SAS is, as you are being told by the message, 3 (three, as in I I I). The maximum length (same message) is 8 (eight, I I I I I I I I), you can count that with your fingers.&lt;/P&gt;
&lt;P&gt;So a value of 2 (two, I I) is not allowed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Got it now?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452439#M13956</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-09T08:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452440#M13957</link>
      <description>&lt;P&gt;Or, in SAS code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
x1 = 2;
if 3 &amp;lt;= x1 &amp;lt;= 8
then answer = 'yes';
else answer = 'no';
run;

proc print data=test noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452440#M13957</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-09T08:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452441#M13958</link>
      <description>Got it now!  How can I tackle this issue now?&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452441#M13958</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-04-09T08:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452445#M13959</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt; wrote:&lt;BR /&gt;Got it now! How can I tackle this issue now?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How about using three (3) as the length?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452445#M13959</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-09T08:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452533#M13960</link>
      <description>&lt;P&gt;May be of interest when setting lengths of numeric variables:&lt;/P&gt;
&lt;TABLE class="tgroup"&gt;&lt;CAPTION class="xis-title"&gt;Largest Integer That Can Be Safely Stored in a Given Length&lt;/CAPTION&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n0qwk4shq0729in1uma28apysmtq"&gt;When Variable Length Equals ...&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalRight"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0nh56ojor12run1ekve1d6tc28o"&gt;Largest Integer&lt;/DIV&gt;
&lt;DIV class="xis-paraTable" id="n1ld5m8x4fc6f4n10yhsqp8iirrw"&gt;&lt;SPAN class="xis-nobr"&gt;z/OS&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalRight"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0gpgfxgzxb0uan13joucwhrggni"&gt;Largest Integer&lt;/DIV&gt;
&lt;DIV class="xis-paraTable" id="p005k67asic3sun16gusqzqkqe8v"&gt;Windows/UNIX&lt;/DIV&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n17vxxx38psoaxn14k9de0p2tqk9"&gt;2&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p17lc8d869fj15n1lsoqy94osvs7"&gt;256&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p1ggrfpeeg9zxin1mxufmabfgfvy"&gt;not applicable&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0syfrmtxvu07xn1jzayk3drqn3x"&gt;3&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p00yzj3g7eo8qyn1bdsad86dvy97"&gt;65,536&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n13x7swxk0158hn1t34hkm6fk7tq"&gt;8,192&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n07iyon2094htsn19s8kchep3zks"&gt;4&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1acuzuoljipxfn1m5g2z88g5ulo"&gt;16,777,216&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0qxtset0lt5xcn11jliqrs7tlnb"&gt;2,097,152&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1p0rnjudfk4rxn1lwhli0jr2xec"&gt;5&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0gd6y9nyy7m70n10bzt5ap6keud"&gt;4,294,967,296&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n187v6gtnjwkxfn1bg60t0k2e169"&gt;536,870,912&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1u295g0y06z4wn1gpmnzgw7i7i8"&gt;6&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1te184zb13yxpn1je1hi452ajat"&gt;1,099,511,627,776&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0eugjc1efm8wbn1ama7vdu1onpm"&gt;137,438,953,472&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p00y9dkqnn92gnn1j1r664d86e0l"&gt;7&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p1us8qjqc3hd4yn15qqw3rc8pc5r"&gt;281,474,946,710,656&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1ixmxgf8rt2z3n1w35ww7irgk7f"&gt;35,184,372,088,832&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="text-align: center;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n07j8jg68z1pujn1eaj6e9p6kirc"&gt;8 (default)&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1hht28dqr0cnln17rshr44qmr5i"&gt;72,057,594,037,927,936&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n14rv9qgabmcbwn1xl5vb617q7cb"&gt;9,007,199,254,740,992&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV class="xis-paragraph" id="n0g0p7hddxuactn13s33cgvj0eil"&gt;&amp;nbsp;Note that if the numeric variable contain decimals it is a very poor idea to use a length less than 8.&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Apr 2018 15:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452533#M13960</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-09T15:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce the length of the numeric variables in DI Studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452548#M13961</link>
      <description>&lt;P&gt;The length of a variable in SAS is how many bytes it takes in the stored dataset.&amp;nbsp; Numbers are 64 bit floating point values so they take 8 bytes.&amp;nbsp; If you know your numbers are only integers you can save some space by storing them with lengths between 3 and 7 (on IBM mainframe you can even use only two bytes).&amp;nbsp; But you do not save much space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How many digits it takes to display the number is related to what display format you have attached. If your values are integers between 0 and 99 then you might want to attach the F2. format (or the Z2. format if you want values less than ten to appear with leading zeros).&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 16:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Reduce-the-length-of-the-numeric-variables-in-DI-Studio/m-p/452548#M13961</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-09T16:26:49Z</dc:date>
    </item>
  </channel>
</rss>

