To import from Dynamic DDL files

CONNX provides an option to import metadata from scripts containing two of Software AG's specific SQL commands: CREATE TABLE DESCRIPTION and CREATE CLUSTER DESCRIPTION.

Note: If you wish to retain hyphens during a Windows import, you must first set the KeepHyphens variable.

  1. Start your Adabas database.

  2. Click the Import button in the CONNX Data Dictionary Manager window.

  3. The Import CDD dialog box appears.

    pic1_ddl.jpg
     

  4. Select Adabas Script DDL Import files in the Import Type list box.

  5. To import multiple files, enter a Database ID number.  

  6. Add the DDL File Script number, or use the Browse button to locate the file.

  7. Enter an ADASCR password, if you are using the ADASCR security method.

  8. If the database you are importing from is located on the same Windows machine that you are importing to, enter "localhost" in the Server text box. For all other instances, enter the TCP/IP address or server name in the Server text box. The CONNX Listener Task attempts to access the given server. If the server is unavailable or cannot be located, the following message appears: "The CONNX Listener process (CNXRUN##_MAIN) is not running on the system."

  9. Enter a CONNX user name and password.

  10. Click the OK button.

  11. CONNX searches for Master tables containing the various subtables. The CONNX Import Table Selection dialog box appears. Select a table, and then click the Add button.

  12. The Adabas Count Selection dialog box appears. Enter the number of maximum occurrences of each field under Max Repeat, and then click the OK button.

    image9.gif
     

  13. Save the CDD by selecting the File menu and then clicking Save. The imported tables appear in the CONNX Data Dictionary Manager window.
     

A script from the sample Employees file appears as follows. CONNX creates the various subtables as well as the relationships between the files.:

                                                                              

#######################################################################        

#  ASG Version    : x.x.x.x                                                    

#  Date/Time      : 04/01/04 10:50:38                                          

#  File           : 12:11                                                      

#######################################################################        

create cluster description CLUSTER_11                                          

database number 12                                                             

file number 11                                                                 

(                                                                              

    create table description EMPLOYEES                                         

   (                                                                           

       COL_SEQNO_0                      seqno(0)  not null                     

      ,PERSONNEL_ID                                                            

         shortname 'AA'                                                        

      ,FIRST_NAME                                                              

         shortname 'AC'                                                        

      ,NAME                                                                    

         shortname 'AE'                                                        

      ,MIDDLE_I                                                                

         shortname 'AD'                                                        

      ,MAR_STAT                                                                

         shortname 'AF'                                                        

      ,SEX                                                                     

         shortname 'AG'                                                        

      ,BIRTH                                                                   

         numeric (6, 0)                                                        

         shortname 'AH'                                                        

      ,CITY                                                                    

         shortname 'AJ'                                                        

      ,ZIP                                                                     

         shortname 'AK'                                                        

      ,COUNTRY                                                                 

         shortname 'AL'                                                        

      ,AREA_CODE                                                               

         shortname 'AN'                                                        

      ,PHONE                                                                   

         shortname 'AM'                                                        

      ,DEPT                                                                    

         shortname 'AO'                                                        

      ,JOB_TITLE                                                               

         shortname 'AP'                                                        

      ,LEAVE_DUE                                                               

         shortname 'AU'                                                        

      ,LEAVE_TAKEN                                                             

         shortname 'AV'                                                        

      ,primary key ( COL_SEQNO_0)                                              

# Number of columns for this table:   17.                                      

   )                                                                           

   ,create table description EMPLOYEES_ADDRESS_LINE                            

   (                                                                           

       COL_SEQNO_0                      seqno(0)  not null                     

      ,COL_SEQNO_1                      seqno(1)  not null                     

      ,ADDRESS_LINE                                                            

         shortname 'AI'                                                        

      ,foreign key ( COL_SEQNO_0) references EMPLOYEES                         

      ,primary key ( COL_SEQNO_0, COL_SEQNO_1)                                 

# Number of columns for this table:    3.                                      

   )                                                                           

   ,create table description EMPLOYEES_INCOME                                  

   (                                                                           

       COL_SEQNO_0                      seqno(0)  not null                     

      ,COL_SEQNO_1                      seqno(1)  not null                     

      ,CURR_CODE                                                               

         shortname 'AR'                                                        

      ,SALARY                                                                  

         shortname 'AS'                                                        

      ,foreign key ( COL_SEQNO_0) references EMPLOYEES                         

      ,primary key ( COL_SEQNO_0, COL_SEQNO_1)                                 

# Number of columns for this table:    4.                                      

   )                                                                           

   ,create table description EMPLOYEES_BONUS                                   

   (                                                                           

       COL_SEQNO_0                      seqno(0)  not null                     

      ,COL_SEQNO_1                      seqno(1)  not null                     

      ,COL_SEQNO_2                      seqno(2)  not null                     

      ,BONUS                                                                   

         shortname 'AT'                                                        

      ,foreign key                                                             

         (COL_SEQNO_0, COL_SEQNO_1)                                            

           references EMPLOYEES_INCOME                                         

      ,primary key ( COL_SEQNO_0, COL_SEQNO_1, COL_SEQNO_2)                    

# Number of columns for this table:    4.                                      

   )                                                                           

   ,create table description EMPLOYEES_LEAVE_BOOKED                            

   (                                                                           

       COL_SEQNO_0                      seqno(0)  not null                     

      ,COL_SEQNO_1                      seqno(1)  not null                     

      ,LEAVE_START                                                             

         shortname 'AX'                                                        

      ,LEAVE_END                                                               

         shortname 'AY'                                                        

      ,foreign key ( COL_SEQNO_0) references EMPLOYEES                         

      ,primary key ( COL_SEQNO_0, COL_SEQNO_1)                                 

# Number of columns for this table:    4.                                      

   )                                                                           

   ,create table description EMPLOYEES_LANG                                    

   (                                                                           

       COL_SEQNO_0                      seqno(0)  not null                     

      ,COL_SEQNO_1                      seqno(1)  not null                     

      ,LANG                                                                    

         shortname 'AZ'                                                        

      ,foreign key ( COL_SEQNO_0) references EMPLOYEES                         

      ,primary key ( COL_SEQNO_0, COL_SEQNO_1)                                 

# Number of columns for this table:    3.                                      

   )                                                                           

);