//main_call.jsl<BR />open log(1);
jsl = Get Environment Variable("jsl_var");
include(jsl);
path_to_jmp = Get Environment Variable("jmp_var");
csv_path = Get Environment Variable("csv_var");
path_final = Get Environment Variable("out_var");
x = my_real_code(path_to_jmp, csv_path, path_final);
my_real_code = Function({path_to_jmp, csv_path, path_final},{dt, dtNew, names, ngraphs, current_graph, char_type, name, final_name, name, picture_path},
//This adds csv file to JMP file
names default to here(1);
dt = Open( Char(path_to_jmp), invisible);
dtNew = Open(Char(csv_path), invisible);
dt << concatenate(dtNew, append to first table(1));
dt << save(Char(path_to_jmp)); //Saves JMP file, but also asks me to Save As I don't know why<BR />);<BR />//final.jslI am using environment variables to send paths of different files that I want to be added/ran.
The issue is that whenever I execute the save(Char(path_to_jmp)); in final.jsl, it also pops up a Save As window to save the JMP file which I do not know why it's doing it.
when setting my environment variables, this is what I execute:
echo open log(1); Get Environment Variable("jsl_var"); Get Environment Variable("jmp_var"); Get Environment Variable("csv_var"); Get Environment Variable("out_var");>main_call.jsl
set "jsl_var=C:\Users\variables\final.jsl"&&set "jmp_var=C:\Users\variables\sample_output_data.jmp"&&set "csv_var=C:\Users\variables\generic_csv.csv"&&set "out_var=C:\Users\variables\PNGs\" && "C:\Program Files\SAS\JMP\14\jmp.exe " C:\Users\variables\main_call.jsl
Is there something wrong in my calls? or my JMP script? Not sure why it's not just saving
I tried several things, can't reproduce the issue.
Are there log messages? (I hope you find something like "file already exists, overwrite?")
What version of JMP?
Is there enough disk space for 2 copies of the .JMP?
Is the .JMP file read only? (see Saving to disk as hidden or read-only ).
A crude work-around might look like:
- save to a new name "aa.jmp", in the same directory
- rename the old file to "bb.jmp"
- rename "aa.jmp" to the actual name
- delete bb.jmp
Tech support is my next recommendation.
Assuming windows...
https://answers.microsoft.com/en-us/windows/forum/all/read-only-folders/41ac086e-2fba-49b5-97c4-6130ba85b296
this may lead you to the real answer. I believe the "LemP" answer has good information.
Let us know what the answer is!
Will it work with just dt<