You can write a java application to create or modify an active DBD or PSB in an IMS system.
Procedure
-
Create a connection to an IMS system by using the
Universal Drivers.
-
Create a statement and execute the DDL query.
-
Execute a query called Commit DDL.
For example:
ds = FVTConnectionFactory.getIMSDataSource(alias, driverType,
host, port, userName,
password, url);
con = ds.getConnection();
Statement st = con.createStatement();
st.executeUpdate("CREATE DATABASE MYDB ACCESS SHSAM CCSID 'Cp1047'
VERSION '2.0'");
st.executeUpdate("CREATE TABLE MYTABLE (COLUMN1 DECIMAL(5,2)
INTERNALNAME COLUMN1 TYPE C BYTES 10 START 1) AMBIGUOUS INSERT LAST IN MYDB");
st.executeUpdate("CREATE TABLESPACE tb1 IN MYDB BLOCK PRIMARY
32768");
st.executeUpdate("COMMIT DDL");