Kbase 14103: How To Compile Data Dictionary And Security Login Programs
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
How To Compile Data Dictionary And Security Login Programs
The Progress Data Dictionary programs (including the Security Login
program) are compiled rcode modules that can run against any database.
This kbase describes how this is achieved. This information is
essential if you need to recompile any of the Dictionary programs, for
example if you modify the _login.p procedure to add enhanced
functionality, or if you want to integrate one of the schema
maintenance procedures into your application (such as loading a .df
or .d file). NOTE: It may not be necessary to alter and recompile a
copy of the Dictionary module; many of the modules can be called
directly and passed parameters. But, in the event that they would
need to be recompiled, the following guidelines must be followed to
allow the resulting rcode to be "database-independent".
There are a couple of rules that must be understood and followed:
1. The first PROGRESS database connected during a given session
receives the DICTDB alias.
It is the logical name of the database having the DICTDB alias that gets put
gets put into the rcode to resolve any unqualified metaschema
references.
So, you can control which logical database name gets put into the
rcode by first assigning the alias "dictdb" to the desired logical
database name before compiling. However, this would still make the
rcode only able to run against a single database.
2. The key to making the Dictionary programs work against any database is the
is the fact that they are all compiled against a database whose
LOGICAL name is DICTDB. To do this, simply connect to any database
(it can be an empty database) and assign it the logical name DICTDB
e.g.,
$ pro dbname -ld DICTDB
As stated above, Progress will automatically assign an ALIAS of
DICTDB to the first database that you connect to, and it will
always use the logical name of the connected database having the
alias DICTDB to resolve any unqualified metaschema references in
the rcode. So, all programs compiled during the above session
would reference the database named DICTDB (unless a specific
database name was explicitly used in the 4GL code).
3. Now, with all metaschema file references in the rcode specifying
the database name DICTDB, we can simply assign the alias DICTDB to
the logical database name that we want to direct the specified
action to (such as loading a .df or .d file) by using (in your 4GL
program)
CREATE ALIAS DICTDB FOR DATABASE some_logical_db_name.
RUN prodict/load_df.p (INPUT your_df_name.df).
This is how the Dictionary allows you to "Select the working
database". It only works because the utility programs all refer to
the DICTDB database, such as
CREATE DICTDB._File. /* this would create a new file in
whatever database currently has the
alias DICTDB */
See the BASIC DEVELOPMENT TOOLS manual for more information about the Data
Data Dictionary utilities, and the LANGUAGE REFERENCE VOLUME 1 for
more information about the CREATE ALIAS statement.
Progress Software Technical Support Note # 14103