ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How do I obtain the content or SQL source of a Datacom SQL VIEW?

book

Article ID: 50976

calendar_today

Updated On:

Products

Datacom DATACOM - AD Ideal CIS COMMON SERVICES FOR Z/OS 90S SERVICES DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS COMMON PRODUCT SERVICES COMPONENT Common Services Datacom/AD CA ecoMeter Server Component FOC EASYTRIEVE REPORT GENERATOR FOR COMMON SERVICES INFOCAI MAINTENANCE IPC UNICENTER JCLCHECK COMMON COMPONENT Mainframe VM Product Manager CHORUS SOFTWARE MANAGER CA On Demand Portal CA Service Desk Manager - Unified Self Service PAM CLIENT FOR LINUX ON MAINFRAME MAINFRAME CONNECTOR FOR LINUX ON MAINFRAME GRAPHICAL MANAGEMENT INTERFACE WEB ADMINISTRATOR FOR TOP SECRET Xpertware

Issue/Introduction

Description:

I know that 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 I print the content of an SQL VIEW?

Solution:

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.

Both the DDUTILTY and the DDTRSLM batch utilities are documented in the Datacom/DB Datadictionary Batch Reference Guide.

See also in the CA Datacom Video Library the following item: Getting the DDL from DDOL and from a DML query.

Environment

Release:
Component: DB