All you need to do is to modify the list of column names, to meet the requirements. There are many ways to do this, below is one example
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Get the all of the numeric, continuous column names
colNames = dt << get column names( string, continuous );
// Work backwards through the list of columns eliminating those that
// do not meet the pattern one is interested in
For( i = N Items( colNames ), i >= 1, i--,
If( left( colNames[i], 3 ) != "NPN" , colNames = remove( colNames, i, 1 ) );
);
// Build a character string that represents the commands that need to be run
theExpr = "dis = dt << Distribution(
Continuous Distribution( column( column(dt, colNames[1])))";
// Loop across the remaining columns in the colNames list and generate the continuous distribution
// commands
For( i = 2, i <= N Items( colNames ), i++,
theExpr = theExpr || ", Continuous Distribution( column( column(dt, colNames[" || Char( i ) || "])))"
);
// place the closing ")" to complete the command string
theExpr = theExpr || ");";
// Execute the code generated and placed into the character string variable
Eval( Parse( theExpr ) );
Jim