<?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 JSL code for File Open if file exists in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7393#M7387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some JSL code that opens a series of files (both a *.jmp and *.dat) and then performs various data management activities on them (namely, testing for presence of new data and then concatenating only the new data). The code runs fine as long as all the files are present.&amp;nbsp; There are some cases where a particular data file hasn't been collected and I want the JSL code to run for those data files that exist&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.&amp;nbsp; Currently, the JSL code stops if a file specified in my dt = Open&amp;nbsp; ( ......) doesn't exist.&amp;nbsp; I am looking for a way to test for whether a *.dat file exists and to open it if does or jump to next section of code if it doesn't.&amp;nbsp; Is there a way to do this in JSL?&amp;nbsp; Any suggestions would be very much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2013 21:08:53 GMT</pubDate>
    <dc:creator>terapin</dc:creator>
    <dc:date>2013-09-11T21:08:53Z</dc:date>
    <item>
      <title>JSL code for File Open if file exists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7393#M7387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some JSL code that opens a series of files (both a *.jmp and *.dat) and then performs various data management activities on them (namely, testing for presence of new data and then concatenating only the new data). The code runs fine as long as all the files are present.&amp;nbsp; There are some cases where a particular data file hasn't been collected and I want the JSL code to run for those data files that exist&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.&amp;nbsp; Currently, the JSL code stops if a file specified in my dt = Open&amp;nbsp; ( ......) doesn't exist.&amp;nbsp; I am looking for a way to test for whether a *.dat file exists and to open it if does or jump to next section of code if it doesn't.&amp;nbsp; Is there a way to do this in JSL?&amp;nbsp; Any suggestions would be very much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 21:08:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7393#M7387</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2013-09-11T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: JSL code for File Open if file exists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7394#M7388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At least in JMP 10 there is a function &lt;EM&gt;File Exists()&lt;/EM&gt; that could be useful here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2600eb;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; i &lt;SPAN style="color: #150097;"&gt;&amp;lt;=&lt;/SPAN&gt; n_files&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #150097;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2600eb;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;If&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;File Exists&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a70096;"&gt;"path"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #009800;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; my dt &lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2600eb;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a70096;"&gt;"path"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;// more code...&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 21:20:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7394#M7388</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-09-11T21:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSL code for File Open if file exists</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7395#M7389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks MS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I knew there must be some command for this task.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 14:27:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-code-for-File-Open-if-file-exists/m-p/7395#M7389</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2013-09-12T14:27:12Z</dc:date>
    </item>
  </channel>
</rss>

