When using the RC/Query for Db2 for z/OS (RCQ) DDL command for a trigger defined as 'NOT SECURED', the 'NOT SECURED' clause is missing from the generated DDL.
CREATE TRIGGER trigger-name
NO CASCADE BEFORE INSERT
ON table-name
REFERENCING
NEW AS N
FOR EACH ROW MODE DB2SQL
BEGIN ATOMIC
trigger-action
END;
Why is the 'NOT SECURED' clause not generated?
If the GENERATE_DEFAULT_CLAUSES_IN_CREATE parameter is set to (N) in the OFS member of hlq.CDBAPARM,
then default clauses in the CREATE DDL will be suppressed.
'NOT SECURED' is a default clause and so will not be generated in the DDL if this parameter is set to (N).
If you wish to generate default clauses then you need to change this parameter to (Y).
This affects DDL generated by both the DDL and HDDL commands.