>Another strange (to me) thing I found. On customer server where the directory name is set in UNC I checked the value of SYS(5) (right after SETDEFULT (cDirectName)) and it returned a long string: "\\someservername\app_name\" I thought that SYS(5) should return drive letter and in this case there is no drive letter (the drive is not mapped). Is it normal that in this case SYS(5) returns the folder name?
Yes and no. Yes, the \\servername\sharename\ part is de facto the disk you are accessing. That's what you'd have replaced with a drive letter had you mapped it.
No, this is not a folder name. It's a name of a share as published on the network. For you, it's a disk. Beneath that you have actual folders.