.Q.j10 s .Q.j12 s
.Q.x10 s .Q.x12 s
Where s is a string, these functions return s encoded (j10, j12)
or decoded (x10, x12) against restricted alphabets:
…10 en/decodes against the alphabet .Q.b6, this is a base-64 encoding - see BinHex and Base64
for more details than you ever want to know about which characters are where in the encoding. To keep the
resulting number an integer the maximum length of s is 10.
-12 en/decodes against .Q.nA, a base-36 encoding. As the alphabet is smaller
s can be longer – maximum length 12.
The main use of these functions is to encode long alphanumeric identifiers (CUSIP, ORDERID..) so they can be quickly searched – but without filling up the symbol table with vast numbers of single-use values.
q).Q.x10 12345
"AAAAAAADA5"
q).Q.j10 .Q.x10 12345
12345
q).Q.j10 each .Q.x10 each 12345+1 2 3
12346 12347 12348
q).Q.x12 12345
"0000000009IX"
q).Q.j12 .Q.x12 12345
12345