Welcome to KORG!

The SubStr command will extract a section of text from a string. In this case, the string is the Workstation Name (@WKSTA). The second parameter is the starting location - length of the computer name minus 2. The third parameter is the number of characters to return.

So - if the name is "MyWorkstation", the length is 13, the start is then 11, and 3 chars starting at position 11 are returned - "ion" in this case.

This is an extremely difficult and round-about method to get the last 3 characters of the hostname, which can be shorted (and simplified) to
 Code:
Right(@WKSTA, 3)
Glenn
_________________________
Actually I am a Rocket Scientist! \:D