Previous Topic: Understanding Generator TypesNext Topic: Changing Values


Model Values

Model-specific values control particular features of the interactive use of CA 2E, code generation, and implementation.

For more information about what a model value is, see the "Using Your Development Environment" chapter in the Administration Guide.

The model values you need when building access paths are:

YALCVNM

The Allocate Valid Name (YALCVNM) model value specifies whether DDS and SQL object names are to be allocated automatically by CA 2E or by a specific standard you establish for the CA 2E model.

YOBJPFX

The Object Prefix (YOBJPFX) model value specifies the prefix to be used when generating system objects.

YFILPFX

The Last Used File Prefix (YFILPFX) model value contains the last 2-character identifying mnemonic CA 2E used when creating a new file. These two characters occupy positions three and four of the new file name, following the model object prefix.

For more information about object name prefixes, see the following:

You can set your source generation type by doing the following:

For more information about setting the source generation type for your model, see the "Creating and Managing Your Model" chapter in the Administration Guide.

YSQLLIB

The SQL Library (YSQLLIB) model value specifies the library (collection) in which the SQL objects needed to implement an SQL database should be placed.

Note: Earlier, when CA 2E used to generate SQL/DDL artifacts, the SQL collection mentioned in YSQLLIB was hard-coded into the generated source. Upon compilation the objects were placed in that SQL collection. The SQL/DDL generation has now been modified to do the following

  • The YSQLLIB model value can now hold a normal library (non-SQL collection).
  • The user is given the option to decide whether to generate the hard-coded value present in the YSQLLIB model value, through the YSQLCOL model value.
  • If the library/SQL collection is not generated into the source during generation, when a compile is submitted to create the SQL/DDL objects, the objects are created into the library/SQL collection specified for the YSQLLIB model value.

YSQLVNM

The SQL Naming (YSQLVNM) model value specifies whether to use the extended SQL naming capability. You can specify one of the DDS names (the shipped default), the names of CA 2E objects in the model (extend SQL naming), or the long names of the CA 2E objects in the model along with the DDS or implementation names.

Note: If a table that has a valid system name (less than or equal to 10 bytes in length), is generated with YSQLVNM model value set as *LNG or *LNT, and when you set the Enhance SQL Naming option on the Edit File Details panel to Y and then generate the source, the table is created with (underscores) "_"s and "TABLE" as suffix, so that the name of the table becomes more than 10 char long.

Examples:

  • CUSTOMER is generated as CUSTOMER_TABLE along with its 2E implementation name.
  • CUST is generated as CUST__TABLE along with its 2E implementation name.
  • C is generated as C_____TABLE along with its 2E implementation name.
  • To generate or regenerate a function with RLA code for DDL database, set the YSQLVNM model value to *DDS or *LNG or *LNT, or *LNF and set the YDDLDBA model value to *RLA.

YSQLLEN

The SQL Naming Length (YSQLLEN) model value is a numeric value that controls the length of the extended SQL name. Its maximum value is 25. This model value is used only when YSQLVNM is *SQL.

For more information about extended SQL naming, see the "SQL Implementation" appendix in the Administration Guide.

YDBFACC

The Database Access Method (YDBFACC) model value lets you specify whether to access data from a table or from a view when an access path and the table over which it is based contain the same fields.

For more information about direct table access, see the "SQL Implementation" appendix in the Administration Guide.

You can set your model values when you create your model or change the model value with the YCHGMDLVAL command. However, once you have set your model values, you can then override many of these defaults for a specific access path using the access path detail options.

For more information about model values and how to set model values, see YCHGMDLVAL in the CA 2E Command Reference Guide.