PDA

View Full Version : TestN on V5R1



Guest.Visitor
07-30-2002, 07:13 AM
It depends on what you're trying to do with <code>TESTN</code>. In some cases, people try to use <code>TESTN</code> when what they're really trying to do is check that all the characters in a character variable are numeric digits. In that case, <code>TESTN</code> isn't quite right, and the better way to do the check is with something like <code>%CHECK('0123456789':DATA)</code>, which returns 0 if all the characters in the data are digits.

Guest.Visitor
07-30-2002, 07:18 AM
i'm trying to do some V5R1 free format programming and my problem is that TESTN is not allowed and has no replacement. How do i convert these lines of code to free format? <pre> D FileNbr S 4 C C Eval FileNbr = %Subst(Odobnm : 5 : 4) C TestN FileNbr 51 C If *in51 = '1' C . C . C endif </pre> thanks in advance for your help, maria

Guest.Visitor
07-30-2002, 07:18 AM
thanks, Hans, that answers my question.