How can I adjust RC/Query DDL generation for a view?

book

Article ID: 38054

calendar_today

Updated On:

Products

CA RC/Migrator CA Endevor SCM Interface DB2 Administration CA RC Compare for DB2 for z/OS CA RC Extract for DB2 for z/OS CA RC/Query CA RC Secure for DB2 for z/OS CA RC Update for DB2 for z/OS

Issue/Introduction

 

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
;

Environment

Release:
Component: RCQ