How can the content or SQL source of a Datacom SQL VIEW be obtained?
search cancel

How can the content or SQL source of a Datacom SQL VIEW be obtained?

book

Article ID: 50976

calendar_today

Updated On:

Products

Datacom DATACOM - AD Datacom/AD Datacom/DB Datacom/Server

Issue/Introduction

The DDUTILTY INDEX report (-RPT INDEX,VIEW) will list the VIEWs and that DDUTILTY DETAIL report (-RPT DETAIL,VIEW) will list the attribute-types and the current attribute-values for the VIEWs. But, how can the content of an SQL VIEW be printed?

Environment

Release: Datacom

Resolution

To see the content of an SQL VIEW, you can either run DDUTILTY TEXT report:

RPT TEXT,VIEW,authid.viewname(PROD)

Or, you can run the DDTRSLM utility EXPORT feature to extract the VIEW:

EXPORT VIEW authid.viewname;

With EXPORT, the CREATE VIEW syntax can be found in the TRANSF output between the %DDLSTART and %DDLEND statements.

Both methods will give all of the SQLSOURCE text associated with the VIEW, showing the original DDL CREATE VIEW statement.