<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 1/19/2012 11:04 AM, Kenneth Brody wrote:
    <blockquote cite="mid:4F184D0F.7080603@spamcop.net" type="cite">On
      1/18/2012 4:41 PM, Rod Caddy wrote:
      <br>
      <blockquote type="cite">I have a customer running SCO Unix with
        Filepro 4.5.&nbsp; They have a file
        <br>
        that they use as experimental documentation before they turn the
        product
        <br>
        into a real product number.&nbsp; In the experimental file there is
        an
        <br>
        experimental number that was setup as (4, allup). They use the
        <br>
        processing below to increment the numbers.&nbsp; The numbers are
        A000, A001,
        <br>
        etc.&nbsp; The problem is that the Alpha does not increment
        correctly.&nbsp; It
        <br>
        will work for a while and then will jump to Uxxx.(xxx being the
        numeric
        <br>
        portion of the number.&nbsp; I am open to ideas here, I have tried
        modifying
        <br>
        the code several ways and have had very little success.
        <br>
      </blockquote>
      [...]
      <br>
      <br>
      From your code, I assume what you want is a 4-digit code which
      originally runs from 0000 to 9999.&nbsp; After that, you want the
      thousands place to wrap to letters, so that 9999-&gt;A000,
      A999-&gt;B000, and so on, up to Z999.
      <br>
      <br>
      Is that correct?
      <br>
      <br>
      This assumes that "num" is the (4,allup) field you wish to
      "increment".
      <br>
      <br>
      ==========
      <br>
      declare last3(4,0rj), first1(1,*)
      <br>
      first1 = mid(num,"1","1") ; last3 = mid(num,"2","3") + "1"
      <br>
      num = base(base(first1,"36")+int(last3/"1000"),"10","36") &amp;
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mid(last3,"2","3")
      <br>
      ==========
      <br>
      <br>
    </blockquote>
    <font face="Helvetica, Arial, sans-serif">Yes that is correct.</font><br>
    <br>
    <div class="moz-signature">-- <br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <br>
      <div class="moz-signature">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <title></title>
        <a href="www.pro-set.com"><img alt="Pro-Set Systems Logo"
            src="cid:part1.09060503.00010204@pro-set.com" align="left"
            border="0" height="50" width="42"></a>&nbsp; Rod Caddy<br>
        &nbsp; Pro-Set Systems<br>
        &nbsp; <a class="moz-txt-link-abbreviated" href="mailto:rcaddy@pro-set.com">rcaddy@pro-set.com</a><br>
        &nbsp;<small> The information in this e-mail is confidential and may
          be privileged. If<br>
          &nbsp; you are not the intended recipient, please destroy this
          e-mail and <br>
          &nbsp; notify the sender immediately. You should not retain, copy,
          distribute <br>
          &nbsp; or use this e-mail for any purpose, nor disclose any of its
          contents to <br>
          &nbsp; any other person.<br>
        </small>
        <pre class="moz-signature" cols="72">
</pre>
      </div>
    </div>
  </body>
</html>