Generating reports
Generating a report allows you to save or print information about Db2® objects for later use.
Procedure
To generate a report:
- On the DB2 Administration Menu (ADB2) panel, specify option 1, and press Enter.
- On the System Catalog (ADB21) panel, specify any
filtering criteria at the bottom of the panel and one of the following options, and press Enter:
- D
- Databases
- S
- Table Spaces
- T
- Tables, views, and aliases
- A
- Aliases
- Y
- Synonyms
- H
- Schemas
- E
- Data or distinct types
- F
- Functions
- G
- Storage groups
- O
- Stored procedures
- J
- Triggers
- Q
- Sequences
These options support the ability to generate a report. You cannot generate reports for the other objects that are listed on the System Catalog (ADB21) panel.
- On the resulting object panel, issue the REP line command or REP primary command as
follows:
- To generate a report for the single object, issue the REP line command.
- To generate a report for all of the listed objects, issue the REP primary command.
The following figure shows the REP command issued against a database.Figure 1. Databases panel (ADB21D) - Example of issuing the REP command to generate a report DB2 Admin ------------------- DD1A Databases ---------------------- Row 1 of 4 Command ===> Scroll ===> PAGE Commands: GRANT MIG DIS STA STO UTIL MOVETB Line commands: T - Tables S - Table spaces X - Indexes G - Storage group ICS - IC status DIS - Display database STA - Start database STO - Stop database A - Auth ? - Show all line commands Storage Buffer Created Index Select Name Owner Group Pool DBID By T E BPool I * * * * * * * * * * ------ -------- -------- -------- -------- ------ -------- - - -------- - DSNATPDB DB2ADM SYSDEFLT BP0 260 ISTJ E BP2 Y DSNDB04 SYSIBM SYSDEFLT BP0 4 SYSIBM BP0 N REP DSNDB06 SYSIBM SYSDEFLT BP0 6 SYSIBM E BP0 N DSN8D81A DB2ADM DSN8G810 BP0 258 ISTJ E BP2 Y DSN8D81P DB2ADM DSN8G810 BP0 259 ISTJ M E BP2 Y ******************************* END OF DB2 DATA ******************************* - On the Generate Report from DB2 Catalog (ADB2REPB) panel, specify the following items, and press
Enter:
- The types objects that you want included in the report. Specify Y for each object type that you want included in the report.
- Whether to have the column properties for objects that have associated columns included in the report. This field is displayed only when it is applicable.
- The data set information for the report output.
The exact fields that are included on the panel depend on the type of object for which the REP command was issued.
Figure 2. Generate Report from DB2 Catalog (ADB2REPB) panel ADB2REPB ------------ DD1A Generate Report from DB2 Catalog ------------ 13:24 Option ===> Generate batch report for database DSNDB06 DB2 System: DD1A DB2 SQL ID: ADM001 More: + Object types to be included from the DB2 catalog: Database . . . . . . . . . Y (Y,N) Table space . . . . . . . Y (Y,N) Table . . . . . . . . . . Y (Y,N) View . . . . . . . . . . . N (Y,N) Index . . . . . . . . . . N (Y,N) Synonym . . . . . . . . . N (Y,N) Alias . . . . . . . . . . N (Y,N) Trigger . . . . . . . . . N (Y,N) Storage group . . . . . . N (Y,N) Plan/package . . . . . . . N (Y,N) Include column data . . . . Y (Y,N) Output file: Data set name . . . . . . 'USER.DB0024.REPORT' > Data set disposition . . OLD (OLD, SHR, or MOD) BP - Change batch job parameters
The batch jobs to create the report are generated, and an ISPF Edit session is displayed.
- Verify and submit the generated jobs.
The report is created in a printed format and written to the data set that was specified.