$Order and $Next in Cache Basic script
Hi all,
I need to create a routine to modifiy some values in a global.
My first attempt was:
// Search the first position of Messages
set pos=$Order(^Ens.MessageBodyD(""))
while(pos > 0){
// Get the class name
set clase = $Order(^Ens.MessageBodyD(pos,1))
if (clase="MensajesRestResponse")
{
// Do the convertion
}
set pos = $Next(^Ens.MessageBodyD(pos))
}
set pos=$Order(^Ens.MessageBodyD(""))
while(pos > 0){
// Get the class name
set clase = $Order(^Ens.MessageBodyD(pos,1))
if (clase="MensajesRestResponse")
{
// Do the convertion
}
set pos = $Next(^Ens.MessageBodyD(pos))
}
but if I use a *.bas file (cache basic script), I'm not able to use these commands ($Order and $Next) and I don't know how to translate theses words.
please, could the comunity help me?
My goal is convert the content of the message (old mesages) from %String to %Stream.GlobalCharacter because now there are some values in string and other are on Stream.GloablCharacter and there is not match in ^Ens.MessageBodyS for these messages.
Best regards,
Francisco Lopez