For part one this might get you started
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(6),
Compress File When Saved(1),
New Column("ID",
Character,
"Nominal",
Set Values({"A001", "A002", "A003", "B001", "B002", "B003"})
)
);
nw = New Window("", << modal, << return result,
v list box(
teb = text edit box("A00*"),
h list box(
Button Box("OK"),
Button Box("Cancel"),
)
)
);
If(nw["Button"] != 1,
stop();
);
// no real idea behind the selection logic, so we will use very simple one
// user has to always provide *
user_input = nw["teb"];
If(!Contains(user_input, "*"),
Throw("No wild card provided!");
);
user_rows = dt << Get Rows Where(Starts With(:ID, Substitute(nw["teb"], "*", "")));
user_ids = dt[user_rows, "ID"];
Concatenation is easy to do by letting JMP create script for it. Then just add references and maybe make it into a function
-Jarmo