<?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: Truncating Character strings in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5408#M5407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the other hand, this is the nuclear weapon of ETL, guaranteed to handle everything, but more work. You may find it's the only option if your different suppliers follow significantly different processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply create a unique conformance table for each supplier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;length FoundInVersion $32;&lt;/P&gt;&lt;P&gt;input FoundInVersion $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5.1.2.1&lt;/P&gt;&lt;P&gt;5.1.2.2&lt;/P&gt;&lt;P&gt;5.2.2.2a&lt;/P&gt;&lt;P&gt;5.2.2.3&lt;/P&gt;&lt;P&gt;5.2.2.3x&lt;/P&gt;&lt;P&gt;5.2.2.9&lt;/P&gt;&lt;P&gt;5.2.2.9weird&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data master_conversion;&lt;/P&gt;&lt;P&gt;length FoundInVersionGood FoundInVersion $32;&lt;/P&gt;&lt;P&gt;input FoundInVersionGood $ FoundInVersion $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5.1.2 5.1.2.1&lt;/P&gt;&lt;P&gt;5.1.2 5.1.2.2&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.2a&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.3&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.3x&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.9&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.9weird&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select FoundInVersionGood as FoundInVersion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from master_conversion inner join&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; have on (master_conversion.FoundInVersion = have.FoundInVersion);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 Aug 2012 14:20:30 GMT</pubDate>
    <dc:creator>tomkari</dc:creator>
    <dc:date>2012-08-05T14:20:30Z</dc:date>
    <item>
      <title>Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5404#M5403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have multiple data tables that include a column called 'Found in Version".&amp;nbsp;&amp;nbsp;&amp;nbsp; The Major versions are usually 4 digits ---&amp;nbsp;&amp;nbsp; the minor versions sometimes append a alpha-character to the end of a Major version number.&amp;nbsp;&amp;nbsp; For the purposes of Graphing I don't want to show the minor versions --- instead I'd like to merge the Minor versions with their associated Major versions.&amp;nbsp; For example...&amp;nbsp;&amp;nbsp; if a Major version is 5.1.2.1 then I want the minor version 5.1.2.1a to also be called 5.1.2.1.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to throw another wrinkle in the mix ----&amp;nbsp;&amp;nbsp; I may also want to convert all the 5.1.2.x's&amp;nbsp; into 5.1.2---- so 5.1.2.0, 5.1.2.2a, 5.1.2.3, 5.1.2.4a, etc... would become Version 5.1.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current column is 'Character', 'Nominal'......&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I was thinking of 'truncating' the character strings in the column to 7 characters or 5 depending on the level of detail needed/desired --- but I'm not sure how to do that or if there is a better approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition --- I'm receiving datatables from different teams --- each seems to have a different versioning scheme --- so flexibility will have to be built-in ----- not sure if I have to analyze each data element s, and compare common characters to see if they 'belong' in the same version ???&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2349_Character_trunc.jpg" style="width: 199px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71i830F34EE71F1F7AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2349_Character_trunc.jpg" alt="2349_Character_trunc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 20:00:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5404#M5403</guid>
      <dc:creator>twaintwist</dc:creator>
      <dc:date>2016-10-18T20:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5405#M5404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure if this what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input old :$10.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5.1.2&lt;/P&gt;&lt;P&gt;5.1.2.1&lt;/P&gt;&lt;P&gt;5.1.2.1e&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;length new $5;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;new=old;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 18:07:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5405#M5404</guid>
      <dc:creator>hai_kuo</dc:creator>
      <dc:date>2012-08-03T18:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5406#M5405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will do the trick.&amp;nbsp; Loops over all values and uses regular expressions to test each value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;current data table&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;new column&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"Found in Vers Truncated"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; character&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; nominal&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;i &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; i &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;nrows&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test_value &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"Found in Version"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green;"&gt;// See if the last character is one of a to z&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;is missing&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;regex&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;test_value&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"[a-z]$"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // then&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"Found in Vers Truncated"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; test_value&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // else&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; one_length &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;test_value&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"Found in Vers Truncated"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;substr&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;test_value&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;one_length &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;-&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 10:35:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5406#M5405</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2012-08-05T10:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5407#M5406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for using SAS code, as I'm not a JMP user...perhaps the equivalent functions exist in JMP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is very simple and very dumb, so the data must be quite conformed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;length FoundInVersion $32;&lt;/P&gt;&lt;P&gt;input FoundInVersion $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5.1.2.1&lt;/P&gt;&lt;P&gt;5.1.2.2&lt;/P&gt;&lt;P&gt;5.2.2.2a&lt;/P&gt;&lt;P&gt;5.2.2.3&lt;/P&gt;&lt;P&gt;5.2.2.3x&lt;/P&gt;&lt;P&gt;5.2.2.9&lt;/P&gt;&lt;P&gt;5.2.2.9weird&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;length FoundInVersionGood $32;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;/* Using period as delimiter, scan for first, second, and third words (SCAN), and then concatenate them with periods between (CATX). */&lt;/P&gt;&lt;P&gt;/* assumes there will always be at least three levels */&lt;/P&gt;&lt;P&gt;FoundInVersionGood = catx(".", scan(FoundInVersion,1,"."), scan(FoundInVersion,2,"."), scan(FoundInVersion,3,"."));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 14:17:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5407#M5406</guid>
      <dc:creator>tomkari</dc:creator>
      <dc:date>2012-08-05T14:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5408#M5407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the other hand, this is the nuclear weapon of ETL, guaranteed to handle everything, but more work. You may find it's the only option if your different suppliers follow significantly different processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply create a unique conformance table for each supplier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;length FoundInVersion $32;&lt;/P&gt;&lt;P&gt;input FoundInVersion $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5.1.2.1&lt;/P&gt;&lt;P&gt;5.1.2.2&lt;/P&gt;&lt;P&gt;5.2.2.2a&lt;/P&gt;&lt;P&gt;5.2.2.3&lt;/P&gt;&lt;P&gt;5.2.2.3x&lt;/P&gt;&lt;P&gt;5.2.2.9&lt;/P&gt;&lt;P&gt;5.2.2.9weird&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data master_conversion;&lt;/P&gt;&lt;P&gt;length FoundInVersionGood FoundInVersion $32;&lt;/P&gt;&lt;P&gt;input FoundInVersionGood $ FoundInVersion $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5.1.2 5.1.2.1&lt;/P&gt;&lt;P&gt;5.1.2 5.1.2.2&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.2a&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.3&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.3x&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.9&lt;/P&gt;&lt;P&gt;5.2.2 5.2.2.9weird&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select FoundInVersionGood as FoundInVersion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from master_conversion inner join&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; have on (master_conversion.FoundInVersion = have.FoundInVersion);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 14:20:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5408#M5407</guid>
      <dc:creator>tomkari</dc:creator>
      <dc:date>2012-08-05T14:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5409#M5408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I think a regular expression (regex()) may address the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Newcolumn("Found in Version Major",character,nominal,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;formula(regex(:Found in Version, ".*?(\d+\.\d+\.\d+).*","\1")&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;".*?(\d+\.\d+\.\d+).*" means find just enough of anything, .*?, followed by a number of any length, \d+, decimal one time, \., a number of any length, \d+, &lt;SPAN style="font-style: inherit;"&gt;decimal one time, \.&lt;/SPAN&gt;, a number of any length, \d+, followed by anything. Only return the part in parentheses, the numbers and decimals, \1.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;For the minor version, change the regular expression (regex()) to have one more decimal and number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Newcolumn("Found in Version Minor",character,nominal,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;formula(regex(:Found in Version, ".*?(\d+\.\d+\.\d+\.\d+).*","\1")&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 03:17:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5409#M5408</guid>
      <dc:creator>wiebepo</dc:creator>
      <dc:date>2012-08-06T03:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Truncating Character strings</title>
      <link>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5410#M5409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answers here were very helpful and led me to think I may have been making this too complicated ---&amp;nbsp; so I tried the character function 'Left' but couldn't get it to work last week....&amp;nbsp; my syntax must have been 'off' --- because it worked for me today..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;For each Row (:&lt;SPAN style="color: #800080; font-family: 'Courier New'; background-color: #ffffff;"&gt;Found in Vers Truncated&lt;/SPAN&gt; = Left(:Found in Version, 7));&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;----&amp;nbsp; this simply truncates the character string to the left most characters... which will strip off the lesser version characters ---since the version numbers from various teams is not consistent (some teams use 4 digits with appended alpha characters, some use 3 digits with no appended alpha characters) I think this method may work but I'll have to test which version scheme is being used to determine the level of truncation....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 13:38:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Truncating-Character-strings/m-p/5410#M5409</guid>
      <dc:creator>twaintwist</dc:creator>
      <dc:date>2012-08-06T13:38:54Z</dc:date>
    </item>
  </channel>
</rss>

