cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Saving data tables with JSL

What inspired this wish list request? 

 

The current syntax for saving data tables with JSL is a bit clunky.

dt=current data table();
dt << Save(<filepath>);

This requires specifying the complete file path, which includes the JMP data table name.  To save the file with its current name it is even more clunky.   

dt = current data table();

table_name=dt << get name;
dir="C:\temp\";
filepath=dir || table_name || ".jmp";
dt << save( filepath)

 

What is the improvement you would like to see? 

 

I would like a Save File( ) function that you can save data tables (and possibly any JMP file) with a more obvious and compact syntax.   For saving tables, it could look something like this

 

dt=current data table();
// save to default directory
Save File(dt);
// save to specific directory
Save File(dt, <directory path>)
//save to specific directory with data table name new name
Save File(dt, <directory path>, <new name>)

 

 

Why is this idea important? 

It is for JSL coding efficiency and readability. 

 

2 Comments
hogi
Level XII

instead of 

Save File(dt);

you can use

dt << save();

 

For the issue with path and filename, one could make the wish more general - way beyond "SAVE" - 
... and ask for a framework to handle file pathes in JMP  like it's possible in other languages

(maybe there is an existing wish?).

 

Just have a look at  pathlib / Path in python. It's not rocket science - but it removes a lot of pain : )

Status changed to: Acknowledged

Thank you for submitting this request!