Like this? - http://en.wikipedia.org/wiki/Base_36 (included is a Python examples, and links to other implementations. REXX left as an excercise for the reader :-)
Kirk Wolf Dovetailed Technologies http://dovetail.com On Mon, Aug 1, 2011 at 9:35 AM, Norbert Friemel <nf.ibmm...@web.de> wrote: > On Mon, 1 Aug 2011 04:21:42 -0500, John McKown wrote: > > >anybody know an easy way to encode a base 10 number into base 26? > >Basically, I want to make a decimal number into the English alphabet: > >A-Z. I was hoping there was a simpler way than: > > > > Perhaps not "simpler": > > arg input_number . > if datatype(input_number,"W") & , > bpxwunix("typeset -i26 a &&let a="input_number "&&print > $a",,stdout.) = 0 & , > stdout.0 = 1 & , > left(stdout.1,3) = "26#" then > output = translate(substr(stdout.1,4), , > "ABCDEFGHIJKLMNOPQRSTUVWXYZ", , > "0123456789abcdefghijklmnop") > else output = "A" > say output > > Have fun! > > Norbert Friemel > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html