Question
Kevin Kindschuh · Jun 22

SOUNDEX function in IRIS or Caché?

Is there a way to access a SOUNDEX function from ObjectScript?  There is such a function in the multivalue basic dialect and also one used by Patient Index.

Product version: IRIS 2021.1
0
1 84
Discussion (1)1
Log in or sign up to continue

See MultiValue Basic | Caché Alternative Exists for SOUNDEX()

Workaround:

Class dc.test Abstract ]
{

ClassMethod Test()
{
  
  ..SOUNDEX("M"),!

  ;or

  &sql(select SOUNDEX('McD'into :r)
  r,!
}

ClassMethod SOUNDEX(sAs %String Language = mvbasic, SqlName SOUNDEXSqlProc ]
{
 RETURN SOUNDEX(s)
}

}

Result:

USER>##class(dc.test).Test()
M000
M230