cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Samu
Level II

close() does not default to NoSave since 17.0

Hello everyone,

I'm running into a bit of trouble with my scripts ever since I updated to JMP 17.

I have a lot of scripts using

close(dt2);

whereas dt2 is a data table opened using Open getting a xlsx-File.

I only read data from that table and close it in the end, without saving, but recently I end up with those unneeded unnamed Table1 files in my folders. If I specify

close(dt2, NoSave);

the problem doesn't occur, but I was working under the assumption that this was the default.

Is there a setting to fix this?

5 REPLIES 5
Jeff_Perkinson
Community Manager Community Manager

Re: close() does not default to NoSave since 17.0

I'm not able to reproduce this behavior.

 

Can you try a simple example only opening the table and closing it to see if it happens for you in that case? If it doesn't you'll need to look further that your script to see if you can determine what else might be happening.

-Jeff

Re: close() does not default to NoSave since 17.0

I am unable to reproduce it either. This short script isolates the action you describe.

 

Names Default to Here( 1 );
dt = Open( "C:\Program Files\SAS\JMPPRO\17\Samples\Import Data\Bigclass.xlsx" );

Wait( 3 );

Close( dt );
jthi
Super User

Re: close() does not default to NoSave since 17.0

I can replicate this behaviour with JMP17.0. The file will be saved to Current Default Directory().

Names Default To Here(1);

show(File Exists(Get Default Directory() ||"bigclass.jmp"));

dt = Open("C:\temp\Bigclass.xlsx");
Wait(1);

Close(dt);

show(File Exists(Get Default Directory() ||"bigclass.jmp"));

JMP17.0

jthi_3-1684904140571.png

 

This behaviour has been different in earlier JMP versions, but I wouldn't say that it is was to No Save as it gives message to log where as using No Save doesn't 

 

JMP16.2

jthi_1-1684904043184.png

-Jarmo
Samu
Level II

Re: close() does not default to NoSave since 17.0

Broke the script down to the relevant parts and this is all that's left:

dt2 = Open ("Close Test File.xlsx",
            Worksheets( "Tabelle1" ),
            Use for all sheets( 1 ),
            Concatenate Worksheets( 0 ),
            Create Concatenation Column( 0 ),
            Worksheet Settings(1, Has Column Headers( 1 ),
            Number of Rows in Headers( 1 ),
            Headers Start on Row( 1 ),
            Data Starts on Row( 2 ),
            Data Starts on Column( 1 ),
            Data Ends on Row( 0 ),
            Data Ends on Column( 0 ),
            Replicated Spanned Rows( 1 ),
            Suppress Hidden Rows( 1 ),
            Suppress Hidden Columns( 1 ),
            Treat as Hierarchy( 0 )));

close(dt2);

Still results in a new file called "Tabelle1.jmp".

Jarmos post made me remember that I indeed used to see this I/O problem message a lot and was never able to place it.

I'm afraid a lot of scripts were written without specifiying NoSave and it didn't cause any harm during runtime and now the behaviour has changed.

David_Burnham
Super User (Alumni)

Re: close() does not default to NoSave since 17.0

I'm not sure this is new to version 17 of JMP.  I remember years ago having to explicitly put NoSave into all my code (about 50k lines of code spread across about 80 separate JSL files).  I think it happened with the transition from version 13 to 14, but I might be wrong with the version numbers.  I ended up writing a utility to help me search across all scripts within a folder to locate the files that performed a close - it's turned out to be one of the most important utilities that I use every day: you'll find it here: https://www.pega-analytics.co.uk/blog/finding-that-line-of-code/

 

-Dave