User Answers

In addition, %request.Data contains any parameters included in the URL.


I was thinking that $SYSTEM.INetInfo.LocalHostName()

might be of help... however, that just gives the local host name, in my case "J2EDDEMOEL".

So, I tried the result of $SYSTEM.INetInfo.HostNameToAddr($SYSTEM.INetInfo.LocalHostName())
but that gives me an address that is valid only within my local area network (in my case, whereas one would need to get to my systems from outside of the local area.

Well, that's an interesting one.

One way to check whether the value of a string is a number is:

   If +value=value

which will work in most cases.

However, when the value of a string is something like "1E12345", you'd get an error (<MAXNUMBER>), because "exponential notation" is assumed. But in all other cases, that would work.



   If +value?1.N

Would get close to determining that a value is an integer, but "00000123" would also match that pattern, so

   If value?1.N,+value=valu

I'd create a new database, and then use the operating system utilities (copy and move or cp and mv) to switch the current database with the new one. That way, if there is any need for data from the "old" database, it's still retrievable.



The solution with ##class(%xsd.hexBinary).LogicalToXSD works, but be careful, it only works when all characters in the string have codes <256.

For instance:

USER>w x
USER>w ##class(%xsd.hexBinary).LogicalToXSD(x)


The code for pi (π) is 960, and its hex rendition is three characters (3C0).