10. Naming Conventions
This chapter describes the suggested application object nam-
ing conventions. Note that while some language specific
issues are discussed, further information is available in
Chapter 9, Language Specifics.
appl MSG
The application message shareable image. Relevant file types
include .EXE and .OPT. A logical name should be defined for
this file.
appl RDBSHR
The application database shareable image. This additional
shareable image is used when an application has a substan-
tial number of common routines and calling images which
don't need the database. These would be put into the appli-
cation shareable image. The routines which need to use the
database would be placed in the application database share-
able image. Relevant file types include .EXE and .OPT. A
logical name should be defined for this file.
appl SHR
The application shareable image. Relevant file types include
.EXE and .OPT. A logical name should be defined for this
file.
appl SHRPRV
The application protected shareable image. Relevant file types
include .EXE and .OPT. A logical name must be defined for
this file.
appl _ envr _APL
The ACMS application definition for the whole application in
the specified environment. This object is a dictionary based
object. Relevant file types include .ADF. A .TAG_CDD file is
placed in the library directory after this source is successfully
loaded into the dictionary.
appl _DATABASE
An SQL script used to create a database. Relevant file types
include .SQL and .SQL_CPY .
appl _DOMAINS
The set of database domains. Relevant file types include .SQL
.
appl _FIELDS
The set of CDD/Plus dictionary fields. There are basically
three types of fields that should be defined in the common
set, these being database domains, database columns, and
common record fields. Fields specific to single record should
be placed in the source for the record (i.e. an appl _object-
code_REC). This object is effectivly a set of dictionary objects.
Relevant file types include .CDO , .CDO_GEN and .TAG_
CDD .
appl _GRP
The ACMS task group definition for the whole application.
This object is a dictionary based object. Relevant file types
include .GDF.
appl _MESSAGES
The messages for the application. This source is separately
compiled into two objects, appl _MESSAGES.OBJ and appl _
MESSAGES.SYM. The first object, appl _MESSAGES.OBJ,
is compiled with message text, but without the symbol val-
ues. It is then linked into the appl MSG.EXE shareable
image. The second object, appl _MESSAGES.SYM, is com-
piled with the symbol values, without text, and with a pointer
to the appl MSG.EXE shareable image. It is then placed into
the appl OBJ object library, from where it is linked into the
various executable images, such as appl _PROC_SRV.EXE.
appl _MNU
The root menu for the application which should consist of
entries for the top menu of each user class. Users would then
be given access to the appropriate user class menu directly
below the appl _MNU menu. Some super users may be given
direct access to the root menu.
appl _PROC_SRV
An ACMS server used to perform read only transactions.
Relevant file types include .EXE, .OBJ and .OPT. The ob-
ject module is produced by ACMS when the appl _GRP task
group is built. The options file is used to link the server im-
age. Note that both the appl _GRP task group definition and
the linker options file must list the procedures to be contained
in the image.
appl [_type]_object-code_CC
An SQL module procedure to close the associated appl [_type]_
object-code_CSR cursor. Note that this procedure must
be called after the appl [_type]_object-type_FC procedure
returns the SQL_END_OF_CURSOR status.
appl _table_CK n
An SQL script used to create a database table check con-
straint. Relevant file types include .SQL and .SQL_CPY
.
Since there can be more than one check constraint on a table,
a numeric suffix is used.
appl _object-code_COM
A report or other batch DCL command procedure. Relevant
file types include .COM , .COM_CPY and .COM_SRC .
appl [_type]_object-code_CSR
An SQL module cursor. There should be an associated appl [_
type]_object-code_OC procedure to open the cursor, a appl [_
type]_object-code_FC procedure to fetch the rows from the
cursor, and a appl [_type]_object-code_CC procedure (which
must be called) to close the cursor.
appl _table_DIDX
An SQL script used to create a database direct (i.e. hashed)
index. Relevant file types include .SQL and .SQL_CPY .
Although a database doesn't distinguish between different in-
dex uses, this naming convention is suggested to clarify the
index usage for developers and database administrators.
If the direct index is not used for clustering, it is based around
the primary key, and is normally stored in a mixed storage
area with the data of the associated table.
If it is involved in clustering, it is based around the first
segment of the primary key and is normsally stored in a
mixed storage area with the data of the associated and parent
tables.
appl _domain_DOM
An SQL script used to create a database domain. Relevant file
types include .SQL and .SQL_CPY .
appl _file-or-table_DOM
A Datatrieve script used to define a domain on a file or
database table.
appl [_type]_object-code_DR
An SQL module procedure to delete rows from the table in-
dicated by the object-code. The type variants are used when
there are differing delete options for the table. When only a
single row based on the primary key should be deleted there
should only be one appl _object-code_DR procedure.
appl [_type]_object-code_FC
An SQL module procedure to fetch a row form the the asso-
ciated appl [_type]_object-code_CSR cursor. This procedure
will evantually return the SQL_END_OF_CURSOR status,
whereupon the appl [_type]_object-code_CC procedure must
be called.
appl _table_FK n
An SQL script used to create a database foreign key. Since
there can be more than one foreign key for a table, a nu-
meric suffix is used. There should be a foreign key definition
for each relationship between tables.
Note that the use of foreign keys to reference data is en-
couraged, but using them largely prevents the ability to delete
reference rows. This is because the table which uses the
reference data would not normally have an index on the
columns used to access the reference table, and hence the
using table would be sequentially scanned to ensure that it
didn't use the reference data which is to be deleted.
appl _object_code_FNC
The function name used within appl _object-code_KEY and
appl _object-code_RSP DECforms include texts.
appl _routine_FNC
An SQL script used to create a function definition. Relevant
file types include .SQL and .SQL_CPY .
The function appl _routine is normally an entry point on the
appl SHR sharable image.
appl [_type]_object-code_FRM
A form used to manipulate an object-code. Note that for most
forms, there will be a corresponding ACMS task. Some com-
mon forms such as the appl _WORKING_FRM are shared
among some or all tasks. Form and Task Types provides a
list of form and task object types.
Typically a form manipulates information about the object-
code on panel ( appl _object-code_PNL. If the user presses
the list function key (i.e. Gold L) on a key field, panel appl _
object-code_PG_PNL is used to display the set of object-
code's a page at a time. In most cases this paging will need to
return to the task to get the next or previous page. Scrolled
pages within DECforms should only be considered when the
total table size is limited by nature (rather than by arbitrary
decision) to less than 2Kb. Relevant file types include .FORM,
.IFDL and .OBJ. appl [_type]_object-code_GRP A temporary
ACMS task group used to assist in debugging the appl [_type]_
object-code_TSK task. This object is a dictionary based object.
Relevant file types include .GDF and .TDB.
appl [_type]_object-code_IR
An SQL module procedure to insert a row into the table in-
dicated by the object-code. The type variants are used when
there are differing partial insertions for the table. When only
full insertion (i.e. no columns missing and no NULLs result-
ing) is required, there should only be one appl _object-code_IR
procedure.
SQL Module Procedure Suffices for Inserting a List of Byte
Varying lists the suggested names for the SQL module
procedures where a table has a list of byte varying column.
appl _object-code_KEY
A copy text for defining a function in a DECforms IFDL
module. For each appl _object-code_KEY copy text there
should be a corresponding appl _object-code_RSP copy text.
This object is a text library based object. Relevant file types
include .TXT.
Examples include:
.
appl _FIND_KEY
This copy text describes the find key definition that should
be used in every DECforms form which performs a ta-
ble lookup. Note that there is no standard reponse copy
test because responses are position dependent eg. some
responses are valid across a form, while others change at
some fields or are only valid at some fields.
.
appl _STD_KEY
This copy text describes the standard key definitions that
should be used in every DECforms form. Note that there
is no standard reponse copy test because responses are
position dependent eg. some responses are valid across a
form, while others change at some fields or are only valid
at some fields.
appl _object-code[_type]_LST
A DECforms record list. The list would would normally cor-
respond to a panel of the name appl _object-code_PNL. The
exception is when a separate send and receive record list are
used with a tranceive external response.
Examples include:
.
appl _object-code_RCV_LST
A DECforms record list used for receiving from a
transceive external response when its send and re-
ceive data requirements are substantially different. When
the requirements are not substantially different, the appl _
object-code_LST name should be used.
.
appl _object-code_SND_LST
A DECforms record list used for sending to a transceive
external response when its send and receive data require-
ments are substantially different. When the requirements
are not substantially different, the appl _object-code_LST
name should be used.
appl [_type]_object-code_OC
An SQL module procedure to open the associated appl [_type]_
object-code_CSR cursor. appl _object-code[_type]_PNL A
DECforms panel. The panel may appear directly in a form
definition or be included form the copy library. Relevant file
types include .TXT (when used via a copy library).
appl _table_PIDX
An SQL script used to create a database primary index.
Relevant file types include .SQL and .SQL_CPY .
Also, an SQL module used to access a table via its primary
index. Relevant file types include .OBJ and .SQLMOD .
Typically this module would include procedures of the form
~[_type]_object-code_OC, ~[_type]_object-code_FC and ~[_
type]_object-code_CC.
Although a database doesn't distinguish between primary
and secondary or alternate indices, this naming convention
is suggested to clarify the index usage for developers and
database administrators. The primary index is based around
the primary key. It would be used by application code to per-
form simple selections and by the database to validate the
primary key.
appl _table_PK
An SQL script used to create a database primary key.
Relevant file types include .SQL and .SQL_CPY .
There should be one primary key definition for each database
table. This source is kept separate from the database ta-
ble definition in order to keep to the model of one object per
source and to allow the key to be dropped and reapplied
during large scale databa operations if necessary.
appl _object-code_[PG[_n]]_PNL
A DECforms panel. The panel may appear directly in a form
definition or be included form the copy library. The PG_n
format is used when a form contains more than one panel.
appl [_type]_object-code_PROC
A 3GL procedure to use in an ACMS procedure server.
Typical file types include 3GL file types and .LIS and .OBJ.
Procedure Types provides a list of common types. The record
or workspace name will be of the form appl _object-code_
REC (see below).
appl [_type]_object-code_PROG
A report or other batch program. Relevant file types include
3GL file types and .LIS, .MAP, .OBJ and .OPT. Program Type
provides a list of common types. The record or workspace
name will be of the form appl _object-code_REC (see be-
low).
appl [_type]_object-code_SQL
An SQLMOD module. Relevant file types include .OBJ and
.SQLMOD .
This naming convention is used for SQLMOD modules which
are related to a 3GL modules with a name of the form appl [_
type]_object-code .
appl [_type]_object-code_STR or
appl _object-code[_type]_STR
A structure definition within a record definition. Note that all
records which are to be used with DECforms should normally
contain a structure immediately inside the record definition,
since DECforms ignores the outer record encapsulation. In
general the type usage is the same as for records. Structure
Types provides a list of extra structure types, not typically
used with record names.
appl [_type]_object-code_REC or
appl _object-code[_type]_REC
A record definition. This object is a dictionary based object.
Relevant file types include .CDO.
Examples include:
.
appl _MSG_VEC_REC
A record definition for an OpenVMS message vector
including the option words.
.
appl _object-code_PG[_n]_REC
A record used to hold one page of rows from table object-
code. See appl _object-code_TBL_REC for more details.
Page Record Suffices provides a list of the suffices for the
standard fields in a page record.
.
appl _object-code_REC
A record used to hold one row from table object-code.
Typically this record is used to allow a user to directly
enter the key for a row via DECforms, and than a call is
made to appl _GET_object-code_PROC to check that the
row exists, and return the non-key columns in the row.
This record is typically used in conjunction with appl _
object-code_RCV_LST record lists.
.
appl _object-code_TBL_REC
A record used to hold all (or at least a large number)
of rows from table object-code. The appl _GET_object-
code_TBL_PROC fetches the table from the database
into this record. The appl _GET_object-code_PG_PROC
procedure moves information from this table record (eg.
appl _object-code_TBL_REC) into a page based record
(eg. appl _object-code_PG_REC). Generally a table record
should not be passed to DECforms. Table 10-7 provides a
list of record specific fields and structures that are used.
appl _object-code_RSP
A copy text for defining a function response in a DECforms
IFDL module. For each appl _object-code_RSP copy text
there should be a corresponding appl _object-code_KEY copy
text. This object is a text library based object. Relevant file
types include .TXT.
appl _table_SIDX n
An SQL script used to create a database secondary index.
Relevant file types include .SQL and .SQL_CPY .
Also, an SQL module used to access a table via a secondary
index. Relevant file types include .OBJ and .SQLMOD .
Typically this module would include procedures of the form
~[_type]_object-code_OC, ~[_type]_object-code_FC and ~[_
type]_object-code_CC.
Since there can be more than one secondary index for a table,
a numeric suffix is used.
Although a database doesn't distinguish between primary
and secondary or alternate indices, this naming convention
is suggested to clarify the index usage for developers and
database administrators. Secondary indices would be used by
application code to perform alternative selections and by the
database to validate foreign keys.
appl [_type]_object-code_SS
An SQL module procedure to select a single a row from the
table indicated by the object-code. The type variants are
used when there are differing selection predicates for the ta-
ble. When only a single row based on the primary key is
to be retieved, there should only be one appl _object-code_SS
procedure.
SQL Module Procedure Suffices for a Singleton Select of List
of Byte Varying lists the suggested names for the SQL module
procedures where a table has a list of byte varying column.
appl [_type]_object-code_ST_RO
An SQL module procedure to start a read only transaction.
All the tables reserved in the procedure are reserved for read
access.
appl [_type]_object-code_ST_RW
An SQL module procedure to start a read write transaction.
At least one of the tables reserved in the procedure is reserved
for write access.
appl _object-code_STP
A copy text for an ACMS task step definition. Relevant file
types include .TDF_INC.
appl _object-code[_qual]_STR
A structure within the appl _object-code_REC record def-
inition. This should also be used as a group within the
DECforms form. The _qual format is used when a record
has more that one structure.
appl _object-code_SUB_PNL
A copy text for using within a DECforms panel. For exam-
ple appl _STD_MAIN_BOX_SUB_PNL draws the standard
outer box, current date and program information for all the
full screen panels. This object is a text library based object.
Relevant file types include .TXT.
Examples include:
.
appl _STD_MAIN_BOX_SUB_PNL
The standard main box for most full screen panels. This
includes the box, the standard task or program name and
version information, and the current date.
appl _table_TBL
An SQL script used to create a database table. Relevant file
types include .SQL and .SQL_CPY .
Also, an SQL module used to directly access a table via its
primary key. Relevant file types include .OBJ and .SQLMOD
. Typically this module would include procedures of the form
~[_type]_object-code_DR, ~[_type]_object-code_IR, ~[_type]_
object-code_SS and ~[_type]_object-code_UR.
appl _table_[oper_]TRGR
An SQL script used to create a database trigger. Relevant file
types include .SQL and .SQL_CPY .
Where there is more than one trigger required on a table, the
operation qualification is used.
Suggested values for this code are as follows:
or the more complete:
appl [_type]_object-code_TSK
An ACMS application task definitition used to manipulate an
object-code . Relevant file types include .TDB and .TDF .
Form and Task Types described with appl [_type]_object-
code_FRM, provides a list of form and task object types. This
object is a dictionary based object.
appl [_type]_object-code_UR
An SQL module procedure to update a row into the table in-
dicated by the object-code. The type variants are used when
there are differing partial updates for the table. When only
full update (i.e. no non primary key columns missing and no
NULLs resulting) is required, there should only be one appl _
object-code_UR procedure.
SQL Module Procedure Suffices for Updating a List of
Byte Varying lists the suggested names for the SQL module
procedures where a table has a list of byte varying column.
appl _table-or-view_[qalification_]VIEW or
appl _table-or-view_[qalification_]VW
An SQL script used to create a database view. Relevant file
types include .SQL and .SQL_CPY .
If the view is based on a single table, it should directly reflect
the table name. A qualification is required when more than
one view is based on a given table.
appl _object-code_VPT
A DECforms viewport. The viewport may appear directly
in a form definition or be included form the copy library.
Relevant file types include .TXT (when used via a copy
library).
DESCRIP.MMS
The MMS script used to build the application. Relevant file
types include .MMS .
MESSAGEPANEL
A field used by DECforms to display a message in the tradi-
tional message line. This is a fixed DECforms name.