JMP12 vs JMP14 close command while savingHello,
I've recently moved to JMP14 and have some scripts that stop working due to "invalid argument in access or evaluation of 'Close'".
Basically in JMP12 if I wanted to close table ABC and save it as a csv file, I'd use the following command:
close(data table ("ABC") << save("\C:\Temp\ABC.csv"));In JMP14, I cannot do this anymore. Does anyone know what would be the equivalent to this command in JMP14 (without having to save it with 1 command and close it with another).
Thanks in advance, Eliav.
Automation and ScriptingData AccessRe: JMP12 vs JMP14 close command while savingJim's answer is correct.
So, what changed? JMP 13 or 14 added a return code to the <
dt = open("$sample_data/big class.jmp");
x = dt<<SAVE></SAVE>
The C++ developer decides to return a value (like 1 for <
Anyone still reading: writing JSL that chains more than one method and checks for the result is also a potential problem. Don't use chaining, and don't depend on the default behavior to help future-proof your JSL:
dt = Open( "$sample_data/big class.jmp" );
// prefer to send messages one at a time. Three messages:<BR />
x = dt << getname;
Write( Eval Insert( "\!ngetname ^x^" ) ); // big class
x = dt << save( "$desktop/big class.jmp" );
Write( Eval Insert( "\!nsave ^x^" ) ); // 1
x = dt << end data update;
Write( Eval Insert( "\!nend data update ^x^ ^x<<GETNAME></GETNAME>
(I don't have JMP before 14, but I think this will be correct...)
The answer to the chained question where << is used three times will depend on the version of JMP. The <
Re: JMP12 vs JMP14 close command while savingclose(data table ("ABC"), save("\C:\Temp\ABC.csv") );