Introduction:
One of the task of Object Framework Service(OFS) is for regenerating a DDL based on an object definition. If you have variable RCQ_OFS(YES) active in CDBAPARM(ENABLExx) member, where xx stands for the SUFFIX, and your Database Administration would not like to get the table columns listed when generate DDL for a view .
Question:
How to adjust DDL generation for a view without the column names listed when using RC/Query (RCQ) ?
Answer:
Check member CDBAPARM(OFS) for variable GENERATE_COLUMN_NAMES_WITH_SELECT(*)
Y-Yes, To generate all the column names in a CREATE VIEW statement with select *
N-No, To suppress all the column names in a CREATE VIEW statement with select *
Example:
· ENABLExx : (RCQ_OFS(YES)) and CDBAPARM(OFS) : GENERATE_COLUMN_NAMES_WITH_SELECT(*) (N)
The ddl is generated by OFS and columns names are suppressed.
.CONNECT SSID
SET CURRENT SQLID = 'USER10';
SET PATH = "SYSIBM","SYSFUN","SYSPROC","USER04";
CREATE VIEW CREATOR.VIEW AS
SELECT * FROM CREATOR.VIEW
;
· ENABLExx : (RCQ_OFS(YES)) and CDBAPARM(OFS) : GENERATE_COLUMN_NAMES_WITH_SELECT(*) (Y)
The ddl is generated by OFS and columns names are not suppressed.
.CONNECT SSID
SET CURRENT SQLID = 'USER10';
SET PATH = "SYSIBM","SYSFUN","SYSPROC","USER04";
CREATE VIEW CREATOR.VIEW
( COL1
, COL2
) AS
SELECT * FROM CREATOR.VIEW
;