Adding custom tables
To import a custom data set
Create a data set with the SQL data for import. The data set requires the following properties:
- Sequential data set
- Fixed-block record format
- User-defined record length
- User-defined block size
- User-defined data set size
Within this data set, observe the following guidelines:
- Make sure the SQL lines end with a semicolon (;).
- Use two hyphens (--) at the beginning of a line to mark a comment.
In the SPMParms parameter group, enter ImportDataset datasetName.
Replace datasetName with then name of the data set created in the previous step.
For more information, see Security Policy Manager parameters and IMPORTDATASET.
The following code displays sample SQL data from a custom data set, as defined in Step 1:
***********************************************************
BEGIN TRANSACTION;
DROP TABLE IF EXISTS customtable;
-- Create a test table
-- to test custom table import
CREATE TABLE customtable ( access CHAR(1) NOT NULL,
value CHAR(8),
numeric INTEGER);
INSERT INTO customtable VALUES( "R", "READ", "3");
INSERT INTO customtable VALUES( "U", "UPDATE", "5");
INSERT INTO customtable VALUES( "A", "ALTER", ”6");
INSERT INTO customtable VALUES( "C", "CONTROL", ”4");
INSERT INTO customtable VALUES( "N", "NONE", "1");
INSERT INTO customtable VALUES( "E", "EXEC", "2");
INSERT INTO customtable VALUES( "T", "TRUST", ”7");
END TRANSACTION;
**********************************************************
BEGIN TRANSACTION;
DROP TABLE IF EXISTS customtable;
-- Create a test table
-- to test custom table import
CREATE TABLE customtable ( access CHAR(1) NOT NULL,
value CHAR(8),
numeric INTEGER);
INSERT INTO customtable VALUES( "R", "READ", "3");
INSERT INTO customtable VALUES( "U", "UPDATE", "5");
INSERT INTO customtable VALUES( "A", "ALTER", ”6");
INSERT INTO customtable VALUES( "C", "CONTROL", ”4");
INSERT INTO customtable VALUES( "N", "NONE", "1");
INSERT INTO customtable VALUES( "E", "EXEC", "2");
INSERT INTO customtable VALUES( "T", "TRUST", ”7");
END TRANSACTION;
**********************************************************
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*