If you have JMP16 this should work. Run it in parts to understand what it is doing
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(2),
Compress File When Saved(1),
New Column("NumVal", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2])),
New Column("NumMissing", Numeric, "Continuous", Format("Best", 12), Set Values([., .])),
New Column("CharVar", Character, "Nominal", Set Values({"a", "b"})),
New Column("CharMissing", Character, "Nominal", Set Values({"", ""}))
);
n_rows = N Rows(dt);
For Each({col_name}, dt << Get Column Names("String"),
If(Col N Missing(Column(dt, col_name)) == n_rows,
dt << New Column(col_name);
);
);
-Jarmo