I have a data table with 60 columns and I'm trying to select columns which have "Test" in their name.I then need to select all 1.values that lie in the range 50 & -50 in Test_AB;
2.values that lie in the range 100 & -100 in Test_CD;
3.values that lie in the range 200 & -200 in Test_EF;
and delete other rows.
Is there an easy way to do this in JSL?
Thanks
Below is an example of how to do the items you request
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Find all columns that have PN in their name, and select the column
For( i = 1, i <= N Cols( dt ), i++,
If( Contains( Column( dt, i ) << get name, "PN" ),
Column( dt, i ) << set selected
)
);
// Select the required rows
dt << select where(
118 <= :NPN1 <= 122 |
360 <= :PNP1 <= 300 |
500 <= :PNP2 <= 510
);
// Delete the non selected rows
dt << invert row selection;
dt << delete rows;
These 2 tasks are very elementry items in JSL. With the number of interactions you have had on the Discussion Forum, I would have expected you to have been able to handle your issue without help from the Discussion Group. If you are still having issues with writing your own JSL, then I strongly suggest that you sign up for a training class on JSL, and even more strongly suggest you take the time to read the Scripting Guide.
If you already had working code it might be very useful to include it in your request. Many times a modification of your working code will the best thing to achieve your results.