Hi Ross,
The main problem that I see is you need to declare a character variable (CHAR) instead of a double variable. The information that you are obtaining from the TA statement is actually a text string that either reads 'INTOL' or 'OUTOL'. The IF statement should read IF/(OKNG.EQ.'OUTOL'). Notice the single quotes on OUTOL. They must be used or the software will consider it a variable name instead of text. Hope this helps.
Dale Hanna
Layout Technician
Robert Bosch Corp.