<?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: Parse a Data Table Name or File Name; Extract; Split; Word in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529490#M75291</link>
    <description>&lt;P&gt;dtd00 has reference to the datatable you did open. You have to get the name of datatable, which you can do with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtd00 &amp;lt;&amp;lt; Get Name;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Aug 2022 16:16:50 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-08-02T16:16:50Z</dc:date>
    <item>
      <title>Parse a Data Table Name or File Name; Extract; Split; Word</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529481#M75290</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Haven't yet figured out how to parse fields in a file name or use word() function with the text argument a variable rather than a true text string.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtd00 = Open(
	"$0802\field1_field2_field3.txt",
	Import Settings( End Of Field( Spaces, Space, CSV( 0 ) ) )
); // 

my_fld1 = Word( 1, "field1_field2_field3.txt", "_" );  // 

// This does set my_fld1 = field1

my_fld2 = Word( 2, (dtd00), "_" );  // 

// This doesn't set my_fld2 = field2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reaching out for suggestions,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JohnM&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:52:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529481#M75290</guid>
      <dc:creator>johnm</dc:creator>
      <dc:date>2023-06-10T23:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a Data Table Name or File Name; Extract; Split; Word</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529490#M75291</link>
      <description>&lt;P&gt;dtd00 has reference to the datatable you did open. You have to get the name of datatable, which you can do with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtd00 &amp;lt;&amp;lt; Get Name;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Aug 2022 16:16:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529490#M75291</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-02T16:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a Data Table Name or File Name; Extract; Split; Word</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529493#M75292</link>
      <description>&lt;P&gt;With some more JSL manual surfing, found an approach.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;my_file_name = dtd00 &amp;lt;&amp;lt; get name;
// then add a column for example;
dtd00 &amp;lt;&amp;lt; New Column( "my_fld2", formula( Word( 2, my_file_name, "_" ) ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 18:12:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-a-Data-Table-Name-or-File-Name-Extract-Split-Word/m-p/529493#M75292</guid>
      <dc:creator>johnm</dc:creator>
      <dc:date>2022-08-02T18:12:27Z</dc:date>
    </item>
  </channel>
</rss>

