I have found that the easiest way seems to be to use the %Check BIF. I have included an example below. Hope this helps. Alan
Code
I have found that the easiest way seems to be to use the %Check BIF. I have included an example below. Hope this helps. Alan
Code
Thanks. And that should work with 5.1? I'll be glad when or if we upgrade to 5.2 looks like alot more functions are avalible to use. Thanks again.
If you are uncomfortable using the %check BIF, you can use the CHECK opcode. It works the same way going back to V3R2! Dave
Thanks it works like a charm. Question though. . where can I go to research all the bif commands? Would be alot easier on me if I had the list. Thanks!! =)
You can find a list of BIF's on the IBM web site: http://publib.boulder.ibm.com/iserie...s/c0925083.pdf
Is this means that testn operation code not supported in /free format. I have also same problem where users need to enter numeric broker# 6,0 to a 10 char alpha field. Theres no validation so there's an enormous amount of errors, I have to capture only the numbers and convert to numeric using %int. I want to create an array and test each char if its number. I used %check and it seems not working because it pass back the position of the field. Is there other way. TIA Tiki
I have an incoming field that is alpha. Most cases the info is numeric data. However some instances the field could be 3345AA23. In these cases I have to renumber the account as the system I am converting to is numeric only. So my question, how do I handle this in /Free? I know in the regular RPG side I can do a TESTN over the field and handle it from there. But how do I do this in /Free? Thanks!
I have a utility written by Ted Holt that will take, up to a 30 character alpha field and strip out any numerics returning a numeric field. if this would be of use to you you can email me at bbbarnes@thepantry.com.