Adabas Table/Cluster/View with Adabas SQL Gateway

This function is used to create table descriptions, cluster descriptions or views in an Adabas SQL Gateway catalog / ConnX data dictionary (CDD).

Predict Object(s) Generated Command Result
One Adabas file corresponding to one SQL table CREATE TABLE DESCRIPTION Adds a description of a table in an Adabas SQL Gateway catalog without creating an Adabas file.
One AT file corresponding to one SQL table
Multiple AT files corresponding to multiple SQL tables CREATE CLUSTER DESCRIPTION Adds description of several base tables containing multiple value fields or periodic groups with variable occurrences in Adabas SQL Gateway.

From files of type B or CX, a CREATE VIEW statement is generated.

See also section Adabas SQL Gateway in the Predict and Other Systems documentation.

This document covers the following topics:


Calling the Function

Display the Generate Files into CDD screen with function code G and object code ZD in a Predict main menu, or with the command GENERATE CONNX-ENTRY.

14:03:07             *****  P R E D I C T  *****                     2009-07-31
Plan   0                - Generate Files into CDD -                            
                                                                               
                                                                               
                                                                               
File ID ..................*                                                    
SQL Server ...............* DADB29                           DADB29            
                                                                               
                                                                               
Add table / view .......... Y (Y,N)             Use Vista access-nr ..* N      
Replace table / view ...... N (Y,N)                                            
Drop table / view cascade . N (Y,N)                                            
                                                                               
List SQL statements ....... Y (Y,N)                                            
                                                                               
Protocol saved in member .. *                                                  
               in library . CNXLIB                                             
                                                                               
                                                                               
                                                                               
Command ===>                                                                   
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Help  Next  Stop  Last  LnkEl Flip  Print Impl  AdmFi SelFi Prof  Main   

Parameters

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 Connx Dictionary Defaults screen. See Generation Defaults.
Count of saved actions Number (0-99) of generation actions which are stored in the protocol specified under Protocol saved in member/library. If 99 is entered, all generation actions are stored. This is the default setting at installation.
Parameters
File ID

ID of the Predict file object from which the definitions are to be generated.

To generate an Adabas table, the file must be of

  • type A (with parameter SQL usage set to Y) or

  • type AT.

To generate an Adabas view, the file must be of type B.

To generate an Adabas cluster, the file must be of type AT. Enter only one file from the cluster; all files in the cluster will be used for generation.

SQL Server The SQL server, the object will be implemented in. The value is preset with the value specified in the user or system profile.
Use Vista access-nr
N Vista access number is not used.
Y

Vista access number is used, but no testing is performed.

If no database ID is specified and the file contains a Vista access number, an Adabas table/view isgenerated with the access number taken from the file.

If the file has no Vista access number, an error message is given.

Add table/view
Y A new Adabas table, view or cluster is created.
If the external object does not exist, this parameter must be set to Y.
Replace table/view
Y If the Adabas table or view already exists, an Adabas statement DROP TABLE DESCRIPTION or DROP VIEW is generated first.
If a cluster already exists for one of the files in the cluster structure, a DROP CLUSTER DESCRIPTION statement is generated.
Drop table/view cascade
Y

For tables: Tables and all dependent views will be dropped. The statement DROP TABLE DESCRIPTION <file-ID> CASCADE is generated first.

For clusters: All tables in the cluster will be dropped. The statement DROP CLUSTER DESCRIPTION <cluster-name> CASCADE is generated first. The cluster-name is taken from the catalog.

Notes:

  1. If the table already exists and Replace table/view and Drop table/view cascade are set to Y, the dependent views are listed. If the purge is confirmed, the table and all dependent views will be deleted and only the table will be generated. Dependent views must then be generated separately.
  2. For clusters, all base tables which belong to the cluster and all dependent views are listed. If the purge is confirmed, all listed objects will be deleted.
List SQL statements
Y Generated SQL statements are listed.
Protocol saved in member

SQL statements generated for the implementation of the database can be saved in a Natural source member (protocol) on the FDIC file.

A member name for the protocol is only required when the Adabas table/view is generated for the first time. SQL statements generated in subsequent generation runs are concatenated to the protocol.

The protocol can be displayed using the Display function of the Administration Implemented File menu.

Protocol saved in library Library where the protocol is to be saved.

Note:
All tables in a cluster are given the same member/library name.

Generate Connx Entry in Batch Mode

Command: GENERATE CONNX-ENTRY

Enter parameters on next line in positional or keyword form. File ID is obligatory, all other parameters are optional. If a parameter is not specified, the default value is taken.

Field Keyword Position
File ID FILE-ID 1
SQL Server SQL-SERVER 2
Add table/view ADD-TABLE 3
Replace table/view REPLACE 4
Drop table/view cascade CASCADE 5
List Adabas statement LIST 6
Protocol saved in member MEM 7
Protocol saved in library LIB 8
Use Vista access-nr USE-ACCESS-NR 9