I let the script run to see if it was stuck (appears it was running, but it takes hours, not minutes when running within a script).
I only have show statements in the log.
Here is log output for running scripts within a script. (The "changing to one test instance" takes 3.65 hours vs 3.65 minutes if i run the same script myself on the same file). The CPU was running 12 cores (CPU0 to CPU11) about 20% for the 3.65 hours
Here is the log(s) and a snippet of the JSL below.
N Items(files_open) = 12;
"Files are Concatenated ";
As Date(Today()) = 14Feb2022:13:00:32;
start_time - As Date(Today()) = -492;
"Saving Digital_shmoo_all";
As Date(Today()) = 14Feb2022:13:00:54;
"Done Saving Digital_shmoo_all";
As Date(Today()) = 14Feb2022:13:01:24;
"Changing to one test instance";
N Rows(dt) = 41929065;
"In Reduce_Test_Instance";
As Date(Today()) = 14Feb2022:13:01:39;
"Reducing Test Instances Ended";
As Date(Today()) = 14Feb2022:16:41:13;
start_time - As Date(Today()) = -13174;
"Transposing";
"File has been transposed";
As Date(Today()) = 14Feb2022:16:42:23;
start_time - As Date(Today()) = -69;
If I run the the reduce test instance script by itself with the same large file, here is the log
As Date(Today()) = 14Feb2022:13:01:24;
"Changing to one test instance";
N Rows(dt) = 41929065;
"In Reduce_Test_Instance";
As Date(Today()) = 14Feb2022:13:01:39;
"Reducing Test Instances Ended";
As Date(Today()) = 14Feb2022:16:41:13;
start_time - As Date(Today()) = -13174;
"Transposing";
"File has been transposed";
As Date(Today()) = 14Feb2022:16:42:23;
start_time - As Date(Today()) = -69;
The basics of this script is finding names that start with "Char_Char" and changing them so they do not have "Char_Char" ; Doing this by creating a summary table, selecting the rows in the summary table that have "Char_Char", getting the rows in the main table that are selected, then changing the name in the main table. Here is a snipping of the slow script.
One_Test_Instance.JSL
dt = Current Data Table();
Names Default To Here( 1 );
Show( N Rows( dt ), "In Reduce_Test_Instance" );
Show( As Date( Today() ) );
start_time = As Date( Today() );
dt << clear select;
dt << clear column selection;
Wait();
Test_names = {};
dt << Summary(
Group( :Test_Instance ),
Freq( "None" ),
Weight( "None" ),
output table name( "Summary_of_Table" )
);
dt_summary = Current Data Table();
Wait();
For Each Row( Insert Into( Test_names, dt_summary:Test_Instance ) );
Wait();
For( i = N Items( Test_names ), i > 0, i--,
If( (!Contains( Test_names[i], "CHAR_char" )),
Remove From( Test_names, i )
)
);
dt_summary << select where( Contains( Test_names, :Test_Instance ) );
Wait();
aa = dt << get selected rows; //Get selected rows in main table
Wait();
Close( dt_summary, nosave );
If( N Rows( aa ) > 0,
(dt:Test_instance[aa]) = "CHAR_char_meas_TI";
(dt:Setup[aa]) = "meas_TI"; //Change name in main table
);
dt << clear select;
dt << clear column selection;
Wait();