Identifying Database Objects from Uniface Models / Entities

Author: nturne@essex.ac.uk (NTurner)

Hi, please forgive me if this has been asked before. I did search and didn't come up with anything. I'm new to uniface, and trying to get my head around one simple concept which doesn't seem to be very well documented anywhere (that I could find, at least). How does uniface map models and entities to the databases and tables that they represent? I can't see anywhere in the UDE to find out where a given entity lives in the database, and poking though the DICT metadata isn't helping either. I can see some of our models map via entity.asn which seems to redirect some models to other names, but doesn't contain all of them. I'm just really confused. If someone could walk me through the sequence of actions uniface takes when it needs to know, or show me an easy way to get the mapping of models to databases, entities to tables, it would be really helpful. Thanks. P.s. I'm on 9.5 if that makes any difference.

1 Comment

  1. Short answer, it's the ASN. In the model, you give the entity a data path. In the asn, you map that data path (Usually $DEF) to a database path. $DEF = MSS:dsn_name:database_name|user|password Sometimes, this is actually mapped via the urouter $DEF=TCP:server+port|userver|password|UST which is then passed on to userver on the named server, using urouter.asn which then has another asn which maps the data to the database as above. Sometimes, there are multiple paths defined in the asn, and the [ENTITIES] section redirects different entities to different paths by name. [PATHS] $JIM=MSS:dsn_name:database1|user|password $BILL=MSS:dsn_name:database2|user|password $FRED=OD0:dsn_name2:|user|password [ENTITIES] *.SYSTEM=$JIM:*.SYSTEM CUSTOMERS.ACCOUNTS=$BILL:CUSTOMERS.ACCOUNTS *.ACCOUNTS=$FRED:*.ACCOUNTS The above will send all queries/updates for entities in the model system to JIM (i.e. database 1) all queries/updates for customer.accounts to BILL (i.e. database 2) and all queries/updates for the other entities in the accounts model to FRED (i.e. the ODBC database on dsn_name2) Any that aren't mentioned in [ENTITIES] are routed via the path defined in the model, as above. Iain


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)