Here is a modification of the script that I previously posted.
I strongly suggest that you take the time to read the Scripting Guide found in the JMP Documentation Library, under the Help pull down menu so you will be able to take this sample code and use it to solve your own scripting needs.
animals = Open( "$SAMPLE_DATA\Animals.jmp" );
dt_animals = Data Table( "Animals" );
col_list = {"species", "subject", "miles", "season", "name"};
notFound = {};
For( i = 1, i <= N Items( col_list ), i++,
If( Try( Column( col_list[i] ) << get name, "" ) == "",
Insert Into( notFound, col_list[i] )
)
);
If( N Items( notFound ),
nf = New Window( "Error:",
V List Box(
Text Box( "The following columns are required" ),
Text Box( "but were not found in the data table" ),
List Box( notFound )
)
);
throw();
);
Jim