@user8421 ,
Did you successfully run @jthi's script? If yes, then I suspect:
- one or more of the tables are closed
- one or more of the tables are private
- wrong old names.
Below is a slight modification to @jthi's script. I make the 3rd table private, and I add show statements to the For loop.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt = Open("$SAMPLE_DATA/Quality Control/Failures3Delimited.jmp");
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp", "Private");
OldNames = {"Big Class", "Failures3Delimited", "Semiconductor Capability"};
NewNames = {"New Name 1", "New Name 2", "New Name 3"};
For(i = 1, i <= N Items(OldNames), i++,
show(i, OldNames[i], NewNames[i]);
dt = Data Table(OldNames[i]);
dt << Set Name(NewNames[i]);
);
Here is the log output
/*:
i = 1;
OldNames[i] = "Big Class";
NewNames[i] = "New Name 1";
i = 2;
OldNames[i] = "Failures3Delimited";
NewNames[i] = "New Name 2";
i = 3;
OldNames[i] = "Semiconductor Capability";
NewNames[i] = "New Name 3";
Cannot locate data table in access or evaluation of 'Data Table' , Data Table/*###*/(OldNames[i])
at line 11 in Script.jsl
The JMP Scripting Guide states for private table that
- Private tables are not counted when N Table() returns the number of open data tables.
- Private tables cannot be made current with Current Data Table().
This made me think that a private table might not have the same functionality, might not have teh names stored in memory since it is not counted.
Good luck!