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...
interrupt(5,"USYS")
uniface = $result
EDIT: Thank you to James Rodger for pointing out the alternative in his comment...
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.
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...
interrupt(5,"USYS")
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.
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.
ReplyDeletevUnifacePath = $valuepart($fileproperties("usys:..\bin\uniface.exe", "FULLPATH"))
I only have access to the 9.5 help right now but this page might shed some light on the USYS path variables.
ReplyDeletehttp://frontline.compuware.com/doc/UF/UF95/html/deliverable/index.html?file=USYS_PathLogicals_82CC2CD606BAE71FA8CD8636A59C31D8.html
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.