True, but the problem definition is:

If both fields are numeric and the result of subtraction of field1-field2 is positive.

My understanding/interpretation is that the subtraction and further test should be performed only "If both fields are numeric", so the code should check that condition.

If the first part of the problem (If both fields are numeric) is irrelevant....then the question/problem definition is misleading.

From the other old post:

Characters with accents are encoded with two characters in Unicode while it's only one character in Latin1. 

Unicode IRIS:

USER>w $zv
IRIS for Windows (x86-64) 2024.2 (Build 247U) Tue Jul 16 2024 09:52:30 EDT
USER>w $l("è")
1
USER>w $a("è")
232
USER> 

232 is 0xE8, it correspond to è in both latin1 and Unicode.

Do not confuse Unicode with utf-8.

The reason why it happen is explained in the Indirection (@) documentation:

Important:

All variables referenced in the substitution value are public variables, even when used in a procedure.

So, I'd write your method something like:

ClassMethod test() [ PublicList = arg ]
{
    new arg
    s arg = "asd"
    s routine = "say^hello(arg)"
    do @routine
}

What we are seeing is that IRIS.WorkQueue globals are being defined for these calls but then the IRIS.WorkQueue is not being cleaned up and taking up large amounts of Memory.

You mention IRIS.WorkQueue globals consuming/using memory, but globals don't consume memory, they reside on disk.

I never seen any IRIS.WorkQueue globals, can you provide some detail?
What component is creating/using these globals?

You need to check the Storage defined in your class, typically automatically generated when the class is first compiled.

For example I have created a ConfigUtils.ConfigSettingsTable class:

Class ConfigUtils.ConfigSettingsTable Extends %Persistent
{

Property Name As %String;

Storage Default
{
<Data name="ConfigSettingsTableDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Name</Value>
</Value>
</Data>
<DataLocation>^ConfigUtils.ConfigSetti1ADBD</DataLocation>
<DefaultData>ConfigSettingsTableDefaultData</DefaultData>
<IdLocation>^ConfigUtils.ConfigSetti1ADBD</IdLocation>
<IndexLocation>^ConfigUtils.ConfigSetti1ADBI</IndexLocation>
<StreamLocation>^ConfigUtils.ConfigSetti1ADBS</StreamLocation>
<Type>%Storage.Persistent</Type>
}

}

In this case the globals used by my class are:

^ConfigUtils.ConfigSetti1ADBD (Data)
^ConfigUtils.ConfigSetti1ADBI (Indices)
^ConfigUtils.ConfigSetti1ADBS (Streams)
 

Instead of the 3 single globals, you can map ^ConfigUtils.ConfigSetti1ADB*

Note that you MUST check the actual global(s) name(s) used by your class.

If your class extends another persistent class, then the storage is defined in the superclass that define the extent (the first persistent class in class hierarchy).