title: Incrementing numbers in REXX
body: <p>I have a requirement where I take a SUBSTR (e.g st_detail = &quot;%BOM0007992739871P&quot;, st_digit = SUBSTR(st_detail, 8, 10) ). I have to do some validations on the st_digit and if it is valid change &quot;%BOM0002562186P&quot; to &quot;%BOM0002562186C&quot;. My code works fine upto this. But I was asked to increment st_digit (I used st_digit = st_digit + 1 ) and print 100 valid st_digits and append it with C. so I put the code in a loop and display st_detail. But when i ran it i got &quot;%BOM0007.99273987E+9C&quot; after first increment. Please help on how to display &quot;%BOM0007992739872C&quot;? (NOTE: this is a reference only and I can't display the validation logic here and my code works fine. The extra code i added was the code I used here)</p>
  <pre><code>out_ctr = 1
  DO while out_ctr &lt; 101
     /* validations */
     IF valid THEN
       say st_digit &quot; is valid&quot;
     ELSE
       say st_digit &quot; is invalid&quot;
     st_digit = st_digit + 1
     out_ctr = out_ctr + 1
  END
  </code></pre>