Databases function in iSeries Navigator

SQL JOIN

Do not expect any useful future mods to DDS

iSeries NavigatorIt will never be enhanced for database or display files. The Databases function in iSeries Navigator is the new GUI interface for maintaining your database and a fairly nifty way to ease yourself into the Data Definition Language of SQL. This is where you learn about Tables, Indexes and Views opposed to Physical and Logical Files. It is also where you get to play with the new database features.

While you are there, have a look at Database Navigator. It allows you to create a diagram of your database, showing all of the relationships. Think of it as a pictorial version of DSPFD and DSPDBR.

You can still enter the new keywords in SEU but they will not be validated.

Now it looks like this using DDL to define the SQL table instead of DDS to define the old Physical file:

 1900 CREATE TABLE TBL_BOB_EXAMPLE FOR SYSTEM NAME TBLBOB01 ( 
 2000 TBLBOB01_ID FOR COLUMN TBLBOB01ID BIGINT GENERATED ALWAYS AS IDENTITY 
 2100 ( START WITH 1 INCREMENT BY 1 
 2200 NO MINVALUE NO MAXVALUE 
 2300 CYCLE ORDER 
 2400 CACHE 20 ) 
 2500 , 
 2600 BOB_PROCESS 
 2700 FOR COLUMN BDPROC CHAR(10) CCSID 37 NOT NULL WITH DEFAULT, 
 2800 AS_OF_DATE 
 2900 FOR COLUMN BDDPROC DATE NOT NULL DEFAULT '0001-01-01', 
 3000 BOB_ACTIVITY_CODE 
 3100 FOR COLUMN BDACTC NUMERIC(2, 0) NOT NULL WITH DEFAULT, 
 3200 PROGRAM_ID 
 3300 FOR COLUMN BDPID VARCHAR(60) CCSID 37 NOT NULL WITH DEFAULT, 
 3400 USER_ID 
 3500 FOR COLUMN BDUSER VARCHAR(60) CCSID 37 NOT NULL WITH DEFAULT, 
 3600 DATE_UPDATED 
 3700 FOR COLUMN BDDUPDATE DATE NOT NULL DEFAULT CURRENT_DATE, 
 3800 TIME_UPDATED 
 3900 FOR COLUMN BDTUPDATE TIME NOT NULL DEFAULT CURRENT_TIME, 
 4000 
 4100 CONSTRAINT P_KEY_TBLBOB01_ID_00001 
 4200 PRIMARY KEY( TBLBOB01ID ) ) 
 4300 
 4400 RCDFMT IBOB01 ; 
 4500 
 4600 LABEL ON TABLE TBL_BOB_EXAMPLE 
 4700 IS 'TBL_BOB_EXAMPLE' ; 
 4800 
 4900 LABEL ON COLUMN TBL_BOB_EXAMPLE 
 5000 ( TBLBOB01_ID TEXT IS 'TBLBOB01_ID', 
 5100 BOB_PROCESS TEXT IS 'BOB_PROCESS', 
 5200 AS_OF_DATE TEXT IS 'AS_OF_DATE', 
 5300 BOB_ACTIVITY_CODE TEXT IS 'BOB_ACTIVITY_CODE', 
 5400 PROGRAM_ID TEXT IS 'PROGRAM_ID', 
 5500 USER_ID TEXT IS 'USER_ID', 
 5600 DATE_UPDATED TEXT IS 'DATE_UPDATED', 
 5700 TIME_UPDATED TEXT IS 'TIME_UPDATED' );