Question
· Jun 22, 2022

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
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