The following types of external objects can be generated for Natural:
The Replace Verification Rule function can be applied only to rules of status automatic. A rule is assigned status automatic by applying the function Generate DDM to the file containing the field that the corresponding Verification object is linked to via "Is verified by VE".
The function Replace Verification Rule replaces the code of the rule; all links to fields remain unchanged.
The following topics are covered below:
Values for fields which have been locked by the data dictionary administrator cannot be overwritten. These fields are skipped when positioning the cursor with the TAB key. See Generation Defaults.
Parameters | |||||
---|---|---|---|---|---|
List related fields |
|
||||
List related maps |
|
||||
List generated code |
|
The schema generation wizard uses the following keywords when showing the command that is to be processed:
Field | Keyword |
---|---|
Rule ID | RULE-ID |
List related fields | RELATE |
List generated code | LIST |
List related maps | RELATED-MAPS |
If a parameter is not specified, the default value is taken.
Link of Verification GEN-CHECK-ZERO to Elementary Fields File Name Field Name Remark -------------------------------- -------------------------------- ------------- GENERATION-EXAMPLE ELE-N-9V5 activ ELE-PS-5V2 activ PC-MC-PS-6V1 activ Gen-examples Ele-N-9V5 not activ Ele-PS-5V2 not activ PC-MU-PS-6V1 not activ Rule: GEN-CHECK-ZERO 0010 * ********************************************************************** 0020 * Verification: GEN-CHECK-ZERO generated by Predict * 0030 * with format: Numeric; Type: Not Equal; * 0040 * on: 2007-05-31; at: 13:03:46; from user: SMR; * 0050 ************************************************************************ 0060 IF & = 0 0070 REINPUT 'Invalid value(s): ''0'' .' 0080 MARK *&
The following topics are covered below:
If Natural Security is installed and the specified file is defined to Natural Security, the same checks are performed as are performed before a DDM can be regenerated or a file can be added. See description of the parameter DDM Modifier in the section File Maintenance of the Natural Security documentation.
A DDM generated for a physically coupled file contains the ID of the file to which it is coupled and the short names of the fields via which they are coupled as a comment. For example: "Coupled via AA to GA of FINANCE".
The names of the Predict file and its userviews begin with SYSDIC. When a DDM is generated for a file whose name begins with SYSDIC, the logical database number (255) and logical file number (253) that point to the FDIC are taken.
If the file (which has a DDM) was renamed, the old DDM is purged in the Generate DDM function and the new DDM is added. If Natural Security objects or Super Natural objects exist for the old DDM, these objects are renamed too.
Note:
Rules applying to the generation of DDMs for use with IMS or
Adabas Vista are described in the sections
Generating DDMs
for Use with IMS and
Generating a DDM
for Use with Adabas Vista.
When generating DDMs in Windows or UNIX environments and the FDIC file is located on the mainframe, the DDM will not be available on the mainframe. It will be stored only in the file system where FDDM is located. When generating DDMs on the mainframe and the FDIC file is also located on mainframe, the DDM will not be available in the Windows or UNIX environment. The function must be executed twice.
Database fields containing Unicode data are represented with the format U in the DDM, when running with Natural Version 4.2 for Mainframes or above, Natural Version 6.2 for UNIX or above and Natural Version 6.2 for Windows or above.
Whether a field contains Unicode data, is determined in the following way:
For DB2 files (file types D, E, MT), the CCSID definition of the table (or of the underlying tables in case of views and materialized query tables) in the SQL Server specified in the DDM Generation defaults is evaluated.
If it is set to U, the fields with format A, AV, AL or LO, and character set option set to S or to M and fields with format G, GV, or GL are represented with format U in the DDM. If no CCSID value is given, the CCSID definition of the related dataspace in the given SQL Server is checked.
For Adabas files (file types A, U, AT) each field with format A, AV, AL or LO and character set option M is represented with format U in the DDM.
Before the following page is shown, another page may appear in which you have to select a database from a drop-down list box. Its appearence depends on specific defaults defined by the administrator and/or the object that has been selected on the first page of the wizard.
Example for Adabas:
Values for fields which have been locked by your data dictionary administrator cannot be overwritten. These fields are skipped when positioning the cursor with the TAB key. See Generation Defaults.
Presettings | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The parameters below can be changed in the Modify DDM Defaults screen of Predict. See Generation Defaults. | |||||||||||
Specification DB ID |
|
||||||||||
Money format (for SQL) |
|
||||||||||
Date/Time representation |
|
||||||||||
SQL Server | The server that should be used for data access from
Natural.
Note: |
||||||||||
Super Natural file DBNR | The database number of the Super Natural system file must be supplied by the DDA if the Super Natural file is not the current FUSER file at generation time. This parameter is set to 0 at installation. | ||||||||||
VSAM trailing BLANK char | If a VSAM prefix name contains trailing blanks, these blanks must be represented in Predict with a special character (because trailing blanks cannot be entered in Predict). When generating a DDM for Natural VSAM the special character specified is removed and the correct representation of a blank inserted. A VSAM trailing BLANK char. is not defined at installation. We recommend setting this parameter to $. | ||||||||||
Super Natural file FNR | The file number of the Super Natural system file must be supplied by the DDA if the Super Natural file is not the current FUSER file at generation time. This parameter is set to 0 at installation. | ||||||||||
Parameters | |||||||||||
Replace |
|
||||||||||
List generated code |
|
||||||||||
Adabas version | The version of Adabas for which the DDM is to be generated (see Adabas Version for more information). The Adabas version you specify for DDM generation is independent of your installation platform. | ||||||||||
Field name prefix | Prefix to be used for each generated field name.
Note: |
||||||||||
Line comments |
|
||||||||||
Abstract | The number of Predict abstract lines to be included in the generated code as lines beginning with an asterisk. | ||||||||||
General comments |
|
||||||||||
Generate verification rules |
|
||||||||||
Replace verification rules |
|
||||||||||
List verification rules |
|
||||||||||
For Adabas | |||||||||||
Use Vista access-nr | See table
Meaning of
Parameter Use Vista access-nr.
Note: |
||||||||||
Long fields as DYNAMIC |
|
||||||||||
For SQL | |||||||||||
Truncate creator |
|
||||||||||
NAT-l for long fields |
|
||||||||||
For IMS | |||||||||||
Generate UDFs |
|
||||||||||
Replace UDFs |
|
||||||||||
List UDFs |
|
||||||||||
IMS field suffix |
|
||||||||||
For Natural subsystems | |||||||||||
Define in security |
|
When generating a DDM for one of the IMS file types, the following fields are included:
For all file types (I, J, K)
KEY fields from the higher level IMS segments
KEY fields from the current IMS segment
KEY fields from the lower level IMS segment if data is accessed via an AIX index
Additionally for IMS Segments (file type I)
user-defined fields of all IMS segment layouts (file type J)
user-defined fields of the related logical child or logical parent segment
IMS Segment (file type J)
user-defined fields of the named IMS segment layout
user-defined fields of the related logical child or logical parent segment
IMS userview (file type K)
user-defined fields of the named IMS User View file
user-defined fields of the related logical child or logical parent segment
If an Vista access number is used for generating a DDM, the virtual machine of the Vista element used for generation must be linked to the current network.
Changing the Current VM and Current Network is described under Miscellaneous in the Predict Administration documentation.
If using Schema Generation with Adabas Vista distributed data processing, we recommend the following:
Always enter Vista access numbers for Adabas files and userviews (Add, Modify file in Predict).
Set the parameter Specification DB ID in the Modify DDM defaults screen of Predict to D (database ID may not be specified when generating a DDM from an Adabas file/userview) or to N (database ID may be specified but is not mandatory). If this parameter is set to Y, the user is forced to enter a database ID when generating a DDM from an Adabas file/userview.
Set the parameter Use Vista access-nr in the Modify DDM defaults screen of Predict to T, but do not protect the field.
Do not enter a database ID when generating a DDM. This ensures the Vista access number is used for generation.
If you do not want to use Adabas Vista:
Set the parameter Use Vista access-nr in the Modify DDM defaults screen of Predict to N and deactivate the option by blanking out the preceding X.
The table below illustrates the use of the parameter Use Vista access-nr.
Specification DB ID | Use Vista Access-Nr | Database ID specified | Result |
---|---|---|---|
D,N | N | no | DDM is generated with DB ID=0 |
D,N | Y | no |
If the file does not contain Vista access numbers, an error message is given. If the file contains Vista access numbers, a DDM is generated with the access numbers taken from the file. |
D,N | T | no |
If the file does not contain Vista access numbers, an error message is given. If the file contains Vista access numbers, the system tests whether a Vista element with the same numbers exists for this file. If so, a DDM is generated with this access numbers. |
N,Y | N | yes | [1] If the file is not defined as partitioned in this database and the Adabas attribute Vista access only is not set to Y: the DDM is generated with the physical database number and physical file number (defined with file maintenance function Modify Adabas attributes). |
N,Y | N | yes |
[2] If the file is defined as partitioned in this database or the Adabas attribute Vista access only=Y: the system checks whether a Vista element for this file and database exists. If exactly one element exists, the DDM is generated with the Vista numbers defined in this Vista element. If more than one Vista element is found, no DDM is generated and an error message is given. |
N,Y | T,Y | yes |
Same as above, except that if several Vista elements exist for the file and database, the system checks whether the Vista access numbers of the file are identical to the Vista numbers of one of these Vista elements. If identical, the DDM is generated.If not, no DDM is generated and an error message is given. |
The schema generation wizard uses the following keywords when showing the command that is to be processed:
Field | Keyword |
---|---|
File ID | FILE-ID |
Database ID | DATABASE-ID |
Replace | REPLACE |
Field name prefix | PREFIX |
Line comments | LINE-COM |
General comments | GENERAL-COM |
Abstract | SHORT-COM |
List generated code | LIST |
Generate verification rules | GENERATE-RULE |
Replace verification rules | REPLACE-RULE |
List verification rules | LIST-RULE |
Generate UDFs | GENERATE-UDF |
Replace UDFs | REPLACE-UDF |
List UDFs | LIST-UDF |
Adabas version | ADA-VER |
Truncate creator | TRUNC-CREATOR |
IMS field suffix | IMS-SUFFIX |
Use Vista access nr. | USE-ACCESS-NR |
Define in security | ADD-SECURITY |
Status 1) | STATUS |
DDM Modifiers 1) | MODIFIER1 |
DDM Modifiers 1) | MODIFIER1-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER2 |
DDM Modifiers 1) | MODIFIER2-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER3 |
DDM Modifiers 1) | MODIFIER3-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER4 |
DDM Modifiers 1) | MODIFIER4-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER5 |
DDM Modifiers 1) | MODIFIER5-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER6 |
DDM Modifiers 1) | MODIFIER6-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER7 |
DDM Modifiers 1) | MODIFIER7-COUNTER-SIGN |
DDM Modifiers 1) | MODIFIER8 |
DDM Modifiers 1) | MODIFIER8-COUNTER-SIGN |
Owner 1) | OWNER1 |
Owner 1) | OWNER1-COUNTER-SIGN |
Owner 1) | OWNER2 |
Owner 1) | OWNER2-COUNTER-SIGN |
Owner 1) | OWNER3 |
Owner 1) | OWNER3-COUNTER-SIGN |
Owner 1) | OWNER4 |
Owner 1) | OWNER4-COUNTER-SIGN |
Owner 1) | OWNER5 |
Owner 1) | OWNER5-COUNTER-SIGN |
Owner 1) | OWNER6 |
Owner 1) | OWNER6-COUNTER-SIGN |
Owner 1) | OWNER7 |
Owner 1) | OWNER7-COUNTER-SIGN |
Owner 1) | OWNER8 |
Owner 1) | OWNER8-COUNTER-SIGN |
Security Notes 1) | NOTE1 |
Security Notes 1) | NOTE2 |
Security Notes 1) | NOTE3 |
Security Notes 1) | NOTE4 |
Security Notes 1) | NOTE5 |
Security Notes 1) | NOTE6 |
Security Notes 1) | NOTE7 |
Security Notes 1) | NOTE8 |
Security Notes 1) | NOTE9 |
Security Notes 1) | NOTE10 |
NAT Length | NAT-LENGTH |
Long fields as DYNAMIC | LONG-DYNAMIC |
If a parameter is not specified, the default value is taken.
1) Only available in Natural Security. For further details and possible values see the Natural Security documentation.
DBID: 180 FNR: 171 DDM: GENERATION-EXAMPLE DEF.SEQ: T L DB NAME F LENG S D REMARKS - - -- -------------------------------- - ----- - - ----------------------- * Generation started * at 2007-05-31 13:19:05 * by user MSZ * * * EXAMPLE FILE FOR THE * GENERATION SUBSYSTEM * G 1 AA GROUP-1 2 AB ELE-N-9V5 N 9.5 N HD=ELE/HEADER VER: GEN-CHECK-ZERO G 2 AC GR-IN-GROUP 3 AD ELE-B-4 B 4.0 F D VER: GEN-VER-EXAM 3 AE ELE-PS-5V2 P 5.2 N VER: GEN-CHECK-ZERO * MU field in group redefined two * times M 3 AF MU-B-4 B 4.0 N 2 AG ELE-A-42 A 42.0 N VER: GEN-CHECK-BLANK VER: GEN-VER-EXAM 2 AH ELE-F-8 F 8.0 F 2 AI ELE-B-3 B 3.0 N * Superfield and superdescriptor 1 AJ SB-ELE-A-5 A 5.0 N * -------- SOURCE FIELD(S) ------- * ELE-A-42(10-14) 1 S1 SP-DE-A-24 A 24.0 N S * -------- SOURCE FIELD(S) ------- * ELE-B-3(1-3) * ELE-A-42(20-36) * ELE-PS-5V2(1-4) * * PE-group with automatic counter * P 1 AL PC-OCC-7 2 AM PC-ELE-DE-NS-7V3 N 7.3 N D * counter for MU-field in PE-group M 2 AN PC-MC-PS-6V1 P 6.1 N D VER: GEN-CHECK-ZERO * G 2 AO PC-GR 3 AP PC-ELE-I-2 B 2.0 F Format 'INTEGER' changed to 'BINARY'. 3 AQ PC-PS-20V7 P 20.7 N 2 AR PC-ELE-F-4 F 4.0 F * Formats: date,time,logical 1 AS ELE-D D 6.0 N 1 AT ELE-T T 12.0 N 1 AU ELE-L L 1.0 N * Hyperdescriptor with MU field * and source field of a PE-group M 1 S2 HQ-DE-I-4 I 4.0 H * -------- SOURCE FIELD(S) ------- * PC-ELE-I-2 * MU-B-4 ***** DDM replaced *****