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.
Jim