is there JSL equivalent of menu function
Rows=> Row Selection => Name Selection In Column?
let's say there's column A and I used select where to select rows in Column A. How to create Column B with value 1 for selected rows and 0 for not selected?
<< Name Selection In Column() is a message you can send to data table. This seems to only support strings for values though, so if you need numbers you have to use some other method
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Select Where(:Age < 14);
dt << Name Selection in Column(
Column Name("Younger"),
Selected("Yes"),
Unselected("No")
);

Here is other method if you wish to use numbers (similar idea could be used for other values, but you have to initialize empty list using Repeat() instead of J())
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Select Where(:Age < 14);
selrows = dt << Get Selected Rows;
vals = J(1, N Rows(dt), 0);
vals[selrows] = 1;
dt << New Column("Selection", Numeric, Nominal, Values(vals));