<?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 Importing a file with multiple &amp;quot;other&amp;quot; delimiters in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37834#M22163</link>
    <description>&lt;P&gt;JMP Pro 13. &amp;nbsp;I'm attempting to import a .dat file. &amp;nbsp;Each column is numeric. &amp;nbsp;Each line begins with a ( and ends with a ) so I can't seem to figure out how to remove both of those symbols at import. &amp;nbsp;The problem is that I cannot seem to get rid of that trailing ) so that column is imported as a character. &amp;nbsp;Even if I setup script to replace the ) with nothing the column is still character and I can't figure out how to force it to numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;For( i = 1, i&amp;lt;= n rows(dtSFileMasterModule), i++,
		dtSPMFile = Open( PMxPath || PMx[i] ||"\file.dat", Import Settings(
				End Of Line( CRLF, CR, LF ),
				End Of Field( Space, Other( "(" ), CSV( 0 ) ),
				Strip Quotes( 1 ),
				Use Apostrophe as Quotation Mark( 0 ),
				Use Regional Settings( 0 ),
				Scan Whole File( 1 ),
				Treat empty columns as numeric( 0 ),
				CompressNumericColumns( 0 ),
				CompressCharacterColumns( 0 ),
				CompressAllowListCheck( 0 ),
				Labels( 1 ),
				Column Names Start( 3 ),
				Data Starts( 4 ),
				Lines To Read( "All" ),
				Year Rule( "20xx" )));
		dtSPMxFileMaster = dtSPMxFileMaster &amp;lt;&amp;lt; concatenate(dtSPMFile, append to first table(1));
		Close( dtSPMFile, "no save" );
	);&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Apr 2017 17:13:10 GMT</pubDate>
    <dc:creator>MuttonChops</dc:creator>
    <dc:date>2017-04-05T17:13:10Z</dc:date>
    <item>
      <title>Importing a file with multiple "other" delimiters</title>
      <link>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37834#M22163</link>
      <description>&lt;P&gt;JMP Pro 13. &amp;nbsp;I'm attempting to import a .dat file. &amp;nbsp;Each column is numeric. &amp;nbsp;Each line begins with a ( and ends with a ) so I can't seem to figure out how to remove both of those symbols at import. &amp;nbsp;The problem is that I cannot seem to get rid of that trailing ) so that column is imported as a character. &amp;nbsp;Even if I setup script to replace the ) with nothing the column is still character and I can't figure out how to force it to numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;For( i = 1, i&amp;lt;= n rows(dtSFileMasterModule), i++,
		dtSPMFile = Open( PMxPath || PMx[i] ||"\file.dat", Import Settings(
				End Of Line( CRLF, CR, LF ),
				End Of Field( Space, Other( "(" ), CSV( 0 ) ),
				Strip Quotes( 1 ),
				Use Apostrophe as Quotation Mark( 0 ),
				Use Regional Settings( 0 ),
				Scan Whole File( 1 ),
				Treat empty columns as numeric( 0 ),
				CompressNumericColumns( 0 ),
				CompressCharacterColumns( 0 ),
				CompressAllowListCheck( 0 ),
				Labels( 1 ),
				Column Names Start( 3 ),
				Data Starts( 4 ),
				Lines To Read( "All" ),
				Year Rule( "20xx" )));
		dtSPMxFileMaster = dtSPMxFileMaster &amp;lt;&amp;lt; concatenate(dtSPMFile, append to first table(1));
		Close( dtSPMFile, "no save" );
	);&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:13:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37834#M22163</guid>
      <dc:creator>MuttonChops</dc:creator>
      <dc:date>2017-04-05T17:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a file with multiple "other" delimiters</title>
      <link>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37835#M22164</link>
      <description>&lt;P&gt;I believe that if you add this after the all of the individual data tables have been concatenated that it will correct the issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Loop through all rows and get rid of the ")" on the last column
For( i = 1, I &amp;lt;= N Rows( dtSPMxFileMaster ), i++,
	Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i] = Substr(
		Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i],
		1,
		Contains( Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i], ")" )
	)
);
// Change the last column to numeric and continuous
Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) ) &amp;lt;&amp;lt; data type( numeric ) &amp;lt;&amp;lt; modeling type( continuous );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:29:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37835#M22164</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-04-05T17:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a file with multiple "other" delimiters</title>
      <link>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37836#M22165</link>
      <description>&lt;P&gt;That seems very very close. &amp;nbsp;The one issue I'm having is that the whole cell is being deleted, instead of just the closing parenthesis. &amp;nbsp;For example, that cell contains a number like 26.1234) and I just want to trim off the closing parenthesis. &amp;nbsp;The script you provide deletes the cell, but I don't think you meant it to do that, right? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can replace a string in your script with a "7" to trim it after the 7th digit but it makes the script not very flexible in the event that the data changes to some other string length. &amp;nbsp;This will work most likely but if you have any suggestions I'm for it! &amp;nbsp;Thanks!!!&lt;/P&gt;&lt;PRE&gt;For( i = 1, i &amp;lt;= N Rows( dtSPMxFileMaster ), i++,
	Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i] = Substr(Column( 
		dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i],
		1,
		7 )
	);
// Change the last column to numeric and continuous
Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) ) &amp;lt;&amp;lt; data type( numeric ) &amp;lt;&amp;lt; modeling type( continuous );&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 19:53:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37836#M22165</guid>
      <dc:creator>MuttonChops</dc:creator>
      <dc:date>2017-04-05T19:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a file with multiple "other" delimiters</title>
      <link>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37837#M22166</link>
      <description>&lt;P&gt;Oops, I forgot to subract "1" from the length of the string to be subsetted. &amp;nbsp;The code should be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i] = Substr(
	Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i],
	1,
	Contains( Column( dtSPMxFileMaster, N Cols( dtSPMxFileMaster ) )[i], ")" ) - 1
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 21:15:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Importing-a-file-with-multiple-quot-other-quot-delimiters/m-p/37837#M22166</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-04-05T21:15:08Z</dc:date>
    </item>
  </channel>
</rss>

