<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. They have a file
<br>
that they use as experimental documentation before they turn the
product
<br>
into a real product number. 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. The numbers are
A000, A001,
<br>
etc. The problem is that the Alpha does not increment
correctly. It
<br>
will work for a while and then will jump to Uxxx.(xxx being the
numeric
<br>
portion of the number. 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. After that, you want the
thousands place to wrap to letters, so that 9999->A000,
A999->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") &
<br>
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> Rod Caddy<br>
Pro-Set Systems<br>
<a class="moz-txt-link-abbreviated" href="mailto:rcaddy@pro-set.com">rcaddy@pro-set.com</a><br>
<small> The information in this e-mail is confidential and may
be privileged. If<br>
you are not the intended recipient, please destroy this
e-mail and <br>
notify the sender immediately. You should not retain, copy,
distribute <br>
or use this e-mail for any purpose, nor disclose any of its
contents to <br>
any other person.<br>
</small>
<pre class="moz-signature" cols="72">
</pre>
</div>
</div>
</body>
</html>