use environment variable in [FILES] section of Assignment file

Author: knut.ivar.alvestad@logica.com (knutia)

Hi In the help page of [FILES] in Uniface 9.4.01 help doc the argument talks abote : $Path—name of a network path, a user-defined path that redirects to a network path, or an environment variable that redirects to a physical path. The path can be to a ZIP archive. Whit this in mind I set out to set my location of frms by using an environment variable on my windows pc. i set the environment variable "myfrm=c:\myprog\frm" and added "*.frm = myfrm\*.frm" to my Assignment file. When i try to create frm it reports "Error on creation form/application file myfrm\'name of a file'" in the log. Changing it to "*.frm = $myfrm:\*.frm" or "*.frm = myfrm:\*.frm" makes no difference to the error message. Setting "*.frm = $myfrm:*.frm" or "*.frm = myfrm:*.frm" only makes a $myfrm or a myfrm file in the startup Directory. What is the syntax to use? Is it even possible?

7 Comments

  1. Hi knut, it's a bit complicate because it looks in the helpfile "environment variables" can be defined in the ini file. perhaps assigning the variable followed by a colon may work for you. *.frm = myfrm:*.frm HIH, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Hi Sorry that diden't work. added "myfrm=c:\myprog\frm" to usys.ini in common and uniface adm + to my personal ini file i use for startup. no errors in logg just a "myfrm" file whit 0 kb in the startup Directory


    Author: knutia (knut.ivar.alvestad@logica.com)
  3. so perhaps you contact your local CPWR sales person for help or open a call to clear this situation. Another option is the new helpfile feedback routine at the bottom of the help page in question. This will send a message to very kind people doing their best to improve the help documentation.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Hi To anyone else who sees this problem, the variables need to start whit usys. Variable "usysmyfrm" in any ini file or as a windows (probably also linux) environment variable can be used in the [FILES] section of Assignment file by using "*.frm = usysmyfrm:\*.frm".


    Author: knutia (knut.ivar.alvestad@logica.com)
  5. GREAT! Thanks for sharing i added a feedback on the help pages of 9.5 and 9.6 so your hints may be added to the helpfile.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  6. Hi Knut (and Uli), The environment variable name must start with a dollar sign ($) (which is why the syntax is $Path, not Path) 1. Create an environment variable $myfrm and give it the "c:\myprog\frm" 2. Add "*.frm = $myfrm\*.frm" to the assignment file This works for me. Adding USYS to the name works for a different reason. In this case you are defining a USYS path logical. For more info, see the topic "USYS Path Logicals" in the Uniface Library. Regards --- B.


    Author: Barbara Douma (barbara.douma@uniface.com)
  7. Hi Barbara, thanks for this very complete description what needs to be done. I will add this to my development environment design to make it even more flexible Nice holidays, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)