The following code allows users to define a location and file name through a create file dialog.
$vdocref:=Create document("";"TXT") `allows the user to pick a location and name
CLOSE DOCUMENT($vdocref) `closes the document
DELETE DOCUMENT(document) `deletes the document
After using this method, the internal variable "document" holds the path and name of the file that the user created. You can then use this variable to retrieve the complete pathname.