SysWorks©

SysWorks
Application Development Guide


Previous Contents Index

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 table 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. Table 10-3 provides a list of common types. The record or workspace name will be of the form appl_object-code_REC (see below).

Table 10-3 Procedure Types
Verb Usage
GET Retrieve a page form a table, or a row or table from the database into a record or workspace, or from one record or workspace into another.
INI Initialize a record, workspace, server or other object.
RET Return (eg. reformat, sort etc) information in a record or workspace.
UPD Updates a row or table in the database from a record or workspace.
VAL Validate a field, row or table held in a record or workspace.

appl[_type]_object-code_PROG

A report or other batch program. Relevant file types include 3GL file types and .LIS, .MAP, .OBJ and .OPT. Table 10-4 provides a list of common types. The record or workspace name will be of the form appl_object-code_REC (see below).

Table 10-4 Program Type
Verb Usage
RCV Receive records in a flat file from another system and insert or update them in the database tables.
SND Fetches database tables into records in a flat file and sends them to another system.
UPD Similar to RCV, but is normally performing updates rather than inserts.

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. Table 10-5 provides a list of extra structure types, not typically used with record names.

Table 10-5 Structure Types
Type Usage
DTL Contains non key fields. Useful with DECforms to perform a `get details' transceive.
KEY Contains fields used to contain a tables key. Useful with DECforms to perform a `get key' transceive.

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:

Table 10-6 Page Record Suffices
Suffix Usage
_PG_COL_MAX A field which contains the maximum number of columns that a two dimensional appl_object-code_PG_REC record may hold. See appl_object-code_MAX for one dimensional records.
_PG_COL_SIZ A field which contains the number of columns used in a two dimensional appl_object-code_PG_REC record. See appl_object-code_PG_SIZ for one dimensional records. If this number is greater than the appl_object-code_PG_COL_MAX field, the record has overflowed.
_PG_ROW_SIZ A field which contains the maximum number of rows that a two dimensional appl_object-code_PG_REC record may hold. See appl_object-code_COL_MAX for one dimensional records.
_PG_ROW_SIZ A field which contains the number of rows used in the last used column of a two dimensional appl_object-code_PG_REC record. See appl_object-code_PG_SIZ for one dimensional records. If this number is greater than the appl_object-code_PG_ROW_MAX field, the record has overflowed.
_PG_LIM A field which contains the current maximum number of rows that the current page of a one dimensional appl_object-code_PG_REC may hold. For each page except the last page, this field should contain the same value as the _PG_MAX field. On the last page, a value less than the _PG_MAX value, indicates the page size is not a factor of the associated appl_object-code_TBL_REC table size.
_PG_MAX A field which contains the maximum number of rows that a one dimensional appl_object-code_PG_REC record may hold. See appl_object-code_COL_MAX and appl_object-name_ROW_MAX for two dimensional records.
_PG_SIZ A field which contains the number of rows used in a one dimensional appl_object-code_PG_REC record. See appl_object-code_COL_SIZ and appl_object-name_ROW_SIZ for two dimensional records. If this number is greater than the appl_object-code_PG_MAX field, the page has overflowed.
_PG[_n][_qual]_STR A structure within the appl_object-code_PG[_n]_REC record definition. 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.

Table 10-7 Table Record Suffices
Suffix Usage
_TBL_MAX A field which contains the maximum number of rows that the appl_object-code_TBL_REC record may hold.
_TBL_SIZ A field which contains the number of rows in the appl_object-code_TBL_REC record. If this number is greater than the appl_object-code_TBL_MAX field, the record has overflowed.
_TBL[_qual]_STR A structure within the appl_object-code_TBL_REC record definition. The _qual format is used when a record has more that one structure. Note that any fields specific to a record should be included within its source.

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_SIDXn

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 appl[_type]_object-code_OC, appl[_type]_object-code_FC and appl[_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 table. When only a single row based on the primary key is to be retieved, there should only be one appl_object-code_SS procedure.

Table 10-8, 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.

Table 10-8 SQL Module Procedure Suffices for a Singleton Select of List of Byte Varying
Suffix Usage
_SS_OC Open the read table cursor.
_SS_FC Read the table row from the table cursor.
_SS_FC_OC Open the read list cursor.
_SS_FC_FC Read a segment from the list cursor.
_SS_FC_CC Close the read list cursor.
_SS_CC Close the read table cursor.

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 definition. 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 example 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_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 appl[_type]_object-code_DR, appl[_type]_object-code_IR, appl[_type]_object-code_SS and appl[_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:
Oper Usage
DEL After delete
INS After insert
UPD After update

or the more complete:
Oper Usage
AD After delete
AI After insert
AU After update
BD Before delete
BI Before insert
BU Before update

appl[_type]_object-code_TSK

An ACMS application task definitition used to manipulate an object-code. Relevant file types include .TDB and .TDF .

Table 10-1, 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 indicated 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.

Table 10-9, 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.

Table 10-9 SQL Module Procedure Suffices for Updating a List of Byte Varying
Suffix Usage
_UR_OC Open the update table cursor.
_UR_FC Fetch a row from the table cursor.
_UR_UC Update the row in the table cursor.
_UR_UC_OC Open the insert list cursor.
_UR_UC_IC Insert a segment into the list cursor.
_UR_UC_CC Close the insert list cursor.
_UR_CC Close the update table cursor.

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 traditional message line. This is a fixed DECforms name.


Previous Next Contents Index