Chito Jovellanos asked:
>  Does anyone have a utility handy that appends the checksum 
>  for a list of (6-digit) SEDOL numbers?

I've never used SEDOL numbers, but if I'm reading the Wikipedia page for SEDOL 
[1] right, this should do what you're asking:
           
        sn   =.  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'              NB.  SEDOL 
numerals
        acs  =.  (,. 10 | 10 - 10 | 1 3 1 7 3 9 +/@:*"1 ])&.(sn&i.)  NB.  
Append checksum
        
Though the repeated appearance of  10  makes me suspect there's a cuter (more 
concise) way to express this.

-Dan

[1]  http://en.wikipedia.org/wiki/SEDOL


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to