Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

Uniface 9: $RSO and redirection of compiled forms

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

27 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

Hello Ingo One can spread Uniface development objects in different resources: directories or uar files. The standard approach uses a fixed structure. However within [RESOURCES] one can have several resources [RESOURCES] Z:\\\\ufs\\u_DTF Z:\\\\vfs\\v_DTG ....... Each resource can be created by setting $resources_output when compiling: For your w forms it would be $resources_output = Z:\\\\ufs\\u_DTF this will create Z:\\\\ufs\\u_DTF\\frm\\w*.frm Z:\\\\ufs\\u_DTF\\sig\\w*.sig $resources_output can even point to a network path: $resources_output=$TCP:.\\app1.uar Compared to the classic approach the disadvantage for the standard approach is that you'll need to change $resources_output per resource that needs to be created. The advantage is the easy deployment via [RESOURCES]: no more need for ulana , usysana , dol , uobj ...: adding an extra line in [RESOURCES] is enough and one can easily switch between versions by enabling the desired version via [RESOURCES]. Uniface development objects end up in a resource: [FILES] no longer applies. More flexibility in the standard approach could be an option but would be complicated and will cost performance. Not needing all those redirections in [FILES] is something to get used to. However I find it in the end more simple. Peter


Author: PBeugel (peter.beugel@uniface.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

diseli said Hi Ingo
istiller said Loading from different UAR is not the problem. I want to store FRMs to different directories. So I'm sure, that our customers got only the "application" components.
What's the difference between storing FRMs in different directories to storing them in different UARs? Seems to be more or less the same.
istiller said Doing this manual is too fault-prone
 You don't need to do this manually. The required steps can be easily automated. Let's say you've compiled everything to customer_package.uar. You then just have to move all w*.frm files to a new UAR-file; e.g.

urm.exe move customer_package.uar:frm\\w*.frm internal_package.uar:frm\\ Moving the related signatures is a bit more tricky, but you can create a list of the signatures using 'urm list' and then loop over it with 'urm move'; e.g.

for /F %%F in ('urm list internal_package.uar:frm\\w*.frm customer_package.uar:sig\\w*.sig 2^> nul') do (   urm.exe move %%F internal_package.uar:sig\\ ) I'm sure that there are more elegant ways to do this (like PowerShell or some other scripting language), but this works. And if you want to make sure that the customer does not get any internal components you can check the customer_package.uar with 'urm list'; e.g.

urm list customer_package.uar:frm\\w*.frm This now should not return any files. Hope this helps. Daniel  

sound very "complicated" So  - as we don't have a workig whishlist - I do express my hish at this place: Bring back the easy way to do. Like in every version before 10  w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm Once done a global ASN-file and nobody have to care about it. No need for doing some things after compiling. Just compile and you find the component neat sorted ... Ingo


Author: istiller (i2stiller@gmx.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

Hi Ingo

istiller said Loading from different UAR is not the problem. I want to store FRMs to different directories. So I'm sure, that our customers got only the "application" components.

What's the difference between storing FRMs in different directories to storing them in different UARs? Seems to be more or less the same.

istiller said Doing this manual is too fault-prone

 You don't need to do this manually. The required steps can be easily automated. Let's say you've compiled everything to customer_package.uar. You then just have to move all w*.frm files to a new UAR-file; e.g.

urm.exe move customer_package.uar:frm\\w*.frm internal_package.uar:frm\\ Moving the related signatures is a bit more tricky, but you can create a list of the signatures using 'urm list' and then loop over it with 'urm move'; e.g.

for /F %%F in ('urm list internal_package.uar:frm\\w*.frm customer_package.uar:sig\\w*.sig 2^> nul') do (   urm.exe move %%F internal_package.uar:sig\\ ) I'm sure that there are more elegant ways to do this (like PowerShell or some other scripting language), but this works. And if you want to make sure that the customer does not get any internal components you can check the customer_package.uar with 'urm list'; e.g.

urm list customer_package.uar:frm\\w*.frm This now should not return any files. Hope this helps. Daniel


Author: diseli (daniel.iseli@uniface.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

diseli said Hi Ingo, As mentioned in my last post, you can create a separate UAR-file with the internal-use forms and then add it to the [RESOURCES]. E.g.
[RESOURCES]
internal_use.uar
application_base.uar

  That should work. Daniel  

Moin Daniel Loading from different UAR is not the problem. I want to store FRMs to different directories. So I'm sure, that our customers got only the "application" components. Doing this manual is too fault-prone Ingo


Author: istiller (i2stiller@gmx.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

Hi Ingo, As mentioned in my last post, you can create a separate UAR-file with the internal-use forms and then add it to the [RESOURCES]. E.g.

[RESOURCES]
internal_use.uar
application_base.uar

  That should work. Daniel


Author: diseli (daniel.iseli@uniface.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

diseli said

When using the Standardized Approach then file redirection will only work for non-Uniface files. Uniface application objects need to be stored in a standardized directory structure (as described in the doc). But what is the reason behind redirecting the forms? What are you trying to achieve here? Hope this helps. Daniel  

Hi Daniel As we do have some forms that are for interanl use only, we don't want them in the big bucket, but separate :-) it's like the tables, which some of them are global to all environments and will be redirected to special databases We done this for years, so why not continue in future? Ingo


Author: istiller (i2stiller@gmx.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:39 AM UTC

$RSO and redirection of compiled forms

Author: i2stiller@gmx.de (istiller)

Guude Just a simple question :-) I'm on switching a classic development to a standardized one  (as UnifAce calls it) In the classic version we redirect some forms - dependig on prefixes- to different directories. This is done by lines like w*.frm Z:\\\\ufs\\u_DTF\\frm_w\\w*.frm But how to rebuild the behavior with the standard approach? Any hints are welcome :-) Ingo

 

Hi Ingo,

You could create a separate UAR-file for these forms and add it to the [RESOURCES]. It's best to create the UAR-file using the Uniface Resource Manager (command line tool urm.exe). You can either use the copy or move operation for this.

When using the Standardized Approach then file redirection will only work for non-Uniface files. Uniface application objects need to be stored in a standardized directory structure (as described in the doc). But what is the reason behind redirecting the forms? What are you trying to achieve here? Hope this helps. Daniel


Author: diseli (daniel.iseli@uniface.com)