BookmarkSubscribeSubscribe to RSS Feed

How to check, in JSL, if CSV is finished exporting from other Application prior to JMP import?


Community Trekker


Jan 26, 2015


For some of my data that I work with I have an intermediate application that is required to extract data from the data base before I can import it into JMP.

I have written a JSL script to launch said application, pull the data, export it to a CSV, and import it into JMP.

While the application is running, JMP performs a check every 15 seconds to see if the file becomes available. Once it becomes available JMP checks its file size every 15 seconds to make sure it stops changing before importing. If the file stays the same size X times in a row, then I start the CSV import.

The reason I have to check file size is because the files are often large and do not immediately export from the intermediate application.

Is there a less-clunky way to check if the file has finished exporting?

My method works, but I am wondering if there is a more elegant way to do it.

Thank you,



Super User


Jun 22, 2012

In the past, I have put the burden on the extraction program.  The extraction pgm creates a csv file of some name, but once it has completed, it renames the csv file to the name that I am checking for.  Since the rename takes virtually no time to execute, you end up only getting a fully extracted file.


Community Trekker


Jan 26, 2015

That is a clever solution, unfortunately, I cannot modify the extraction program's function to rename files. I will see if this kind of functionality could be added, as it would make for a simple solution.

Is there some kind of file flag available to JMP that can check if a file is active or not?




Mar 21, 2013

runprogram(executable("notepad"),readfunction("text"));print("done editing");

this won't run the print until notepad is closed.



Aug 27, 2015

Could you provide the JSL that you are currently using to launch the application that creates the CSV file?