Monday, 18 June 2012

Undocumented feature - interrupt - part nine

I know that I said I was done after part eight, but I've had a report of some additional functionality that I thought I should add.

5 - Uniface "usys" directory

As previously discussed, using numeric code "5" returns the working directory.  However, you can also use it to display the Uniface "usys" directory...   

  uniface = $result

EDIT: Thank you to James Rodger for pointing out the alternative in his comment...

  uniface = $valuepart($fileproperties("usys:","FULLPATH"))

This in itself seems to be an undocumented feature; I can't find any reference to "usys:" being accessible like this in $fileproperties or $lfileproperties.

I tried to access some other Uniface directories in a similar way, such as "adm" and "bin", but it seems that you can only access "usys".

Thank you to Mark R for point this one out.


  1. I've used something like this to find actual files, not sure if it works for just the path. I think it also works for usysuniface and such though.

    vUnifacePath = $valuepart($fileproperties("usys:..\bin\uniface.exe", "FULLPATH"))

  2. I only have access to the 9.5 help right now but this page might shed some light on the USYS path variables.

    The first sentence states that it's OK to use them in proc code. It basically just gives you access to paths defined in the ini file.