Row selection by value labelsI would like to script a row selection by the value labels in a column. As an example, the Big Class data set has a value label where F=Female and M=Male. As far I can tell, I cannot write JSL to do a column selection by "Female". Does anyone know how to do this in JSL?

My bigger issue is that I have several values that have the same label, but instead of trying to select all of those values individually, I would like to just select the label.
Re: Row selection by value labelsThis is also fantastic. I couldn't quite figure out how to grab the labels, but tossing them into a journal is brilliant. My actual dataset is over 2MM records and this goes 4X faster to complete. Thanks so much for sending this along.Re: Row selection by value labelsHere is a different take on a solution for your question. The example jsl simply creates a new column that contains the Value Labels values, which then you can make your Select Where() functions from. Since there is not a function to directly create the new column, the code uses a feature where JMP will move the value label form of a column if the column is copied to a JMP Journal. See the code below for the details
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
// Create the Value Labels for the Sample data table
dt:sex << set property("value labels", {"F" = "Female", "M" = "Male"} );
// Select the column of interest
dt<<GO to=""></GO>

Re: Row selection by value labelsthanks Mark. I appreciate the quick response.
Re: Row selection by value labelsUse this example that illustrates one way to reverse the reference from the label to the value. (Note: I manually added the Value Label column property to the sex data column so that there was something to work with. That step is not included in the script. You shouldn't need it because your data column already has this property.)
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
label = Arg( dt:sex << Get Property( "Value Labels" ), 1 );
For( i = 1, i <= N Items( label ), i++,
If( Contains( Arg( label[i], 2 ), "female" ),
value = Arg( label[i], 1 );
Break();
);
);
dt << Select Where( :sex == value );