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


Article ID: 50976


Updated On:


CA Datacom CA DATACOM - AD CA Ideal CA CIS CA Common Services for z/OS CA 90s Services CA Database Management Solutions for DB2 for z/OS CA Common Product Services Component CA Common Services CA Datacom/AD CA ecoMeter Server Component FOC CA Easytrieve Report Generator for Common Services CA Infocai Maintenance CA IPC Unicenter CA-JCLCheck Common Component CA Mainframe VM Product Manager CA Chorus Software Manager CA On Demand Portal CA Service Desk Manager - Unified Self Service CA PAM Client for Linux for zSeries CA Mainframe Connector for Linux on System z CA Graphical Management Interface CA Web Administrator for Top Secret CA CA- Xpertware



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?


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.


Component: DB