Guest.Visitor
07-23-2002, 04:45 AM
The <code>TESTN</code> opcode is a bit strange in that it will accept certain alphabetic characters as valid numeric. If you read the documentation for <code>TESTN</code> carefully, you'll see that it accepts characters other than '0'-'9' for the right-most digit. In particular, it accepts any character with zone nybble of '0'-'9' and sign nybble of hex 'C', 'D', or 'F' (in EBCDIC). Thus, characters '{', 'A'-'I', '}', and 'J'-'R' are accepted as the right-most digit. What to do? Best to use opcode <code>CHECK</code> or built-in function <code>%CHECK()</code> to ensure that all digits are in the range '0'-'9'. For example, the expression "<code>%CHECK('0123456789':%TRIMR(DATA))=0</code>" will have a value of <code>*ON</code> if the variable <code>DATA</code> has only digits and trailing spaces.