1 R elational D ata B ase A id Copyright © 2002 Sakman Software Corp.
2 What is RDBA? Relational Database Aid (RDBA) is a productivity tool that lets application developers and end-users perform DB2- related functions easily and rapidly. RDBA is a cluster of programs that run under TSO and/or CICS, thus making itself available to end-users.
3 What functions can RDBA perform? Browsing/Editing Tables Developing and Maintaining Queries Creating and Executing Dynamic SQLs for SELECT, INSERT, UPDATE, DELETE, EXPLAIN, CREATE (TABLE, INDEX, etc.), DROP, etc. Providing application programmers with basic DBA functions Exporting/Importing DB2 table data onto/from flat files, and into text files for MS Office products, such as Word and Excel Interacting with BATCH environment to submit BATCH jobs accompanied by RDBA-maintained parameters Producing formatted reports from the results of SQL queries
4 What can RDBA do for non- programmer users? Enables them to develop their own virtual queries To inquire, update, print, and export into flat files from databases, without a knowledge of SQL, through user- friendly query-specification panels on which: Names and attributes of tables and columns are presented, Row and column selections are possible, Sort orders can be specified, Selection criteria can be specified, saved and re-used Provides them with means to inquire and update tables through queries that were previously created by SQL programmers within RDBA environment. Through Export functions, enables them to work with Data in MS Office environment.
5 What can RDBA do for programmers? In addition to the capabilities given to the non-technical users, RDBA: Gives the power of dynamic SQL coding, (For updating tables, or browsing tables via single-table or multiple table (JOIN) Queries) Expedites the testing process, (Test data creation, and testing program logic utilizing SQL) Serves as an SQL training material, (Writing SQL with ease, and work with the results of calls to DB2.) Provides application programmers with basic DBA functions (child-parent table relationships, parent-child table relationships, get VSAM data set name of a table's TABLESPACE/INDEXSPACE, list of columns in a table with null & index info, list of DB2 storage groups, list of table creator-table names, packages of a program, view compositions) Provides a rapid report development and database update environment for ad hoc end-user requests.
6 Usage Scenarios Browse or Edit Scenarios Query/Dynamic SQL Maintenance and Execution Scenarios
7 Browse or Edit Scenarios TABLE-DRIVEN Table to be browsed (or edited) is specified By the user, or Selected through lists of: Table-creators, Table-names, or Pairs of Table-creator and Table-name. (The resulting query may also be saved.) QUERY-DRIVEN Table(s) to be browsed (or edited) is selected by specifying the name of a previously-created query directly, or by selecting it from a list of queries.
8 Query/Dynamic SQL Maintenance and Execution Scenarios MAINTENANCE of the LIST OF QUERIES: INSERT a New Query Name UPDATE the Name of an Existing Query DELETE a Query COPY the contents of a Query under a different name Enter a New Query or Update an Existing One Using RDBA’s Query Editor Execute a SELECT Query to Produce a Browse List of a Table or JOIN of Tables Execute a Maintenance Query to Perform INSERT, UPDATE, or DELETE on a Table.
9 Primary Options Menu
10 Browse/Edit Menus On this form, without any field entered: Option 1 gets a list of all Creator- Table Name pairs. Option 2 gets a list of all Queries. If the user knows the Creator, Table-Name, or Query- Name beforehand, s/he may directly type them. In the case of Query-Name, first letter(s) of the name followed by “*” gets a list of Queries satisfying the wild- card search.
11 Browse/Edit Mode – Option 1 “1” is entered on the Option. This entry produces a List of Creator-Table Name pairs. An “S” on the line command causes a template of this table to be generated. (Primary Command “F”ind can be used for locating an entry.)
12 Browse/Edit Mode – Option 1 An “Enter” command brings the template of this table. If the Creator and Table-Name are known:
13 Browse/Edit Mode – Option 1 - Template Template of the Chosen Table F4 With these entries, the user specifies: A Selection of Columns, A Sort Order, and A Selection Criterion. PF4 on this screen shows the text of the query with these selection parameters
14 Browse/Edit Mode – Option 1 - Query Text If the user desires to see and/or Save the resulting Query. F4 Query Text F3 PF3 - Return to the template
15 Browse/Edit Mode – Option 1 – Selected Rows When PF6 is entered on the Template, the selected Rows/Columns are displayed: A maintenance on a row is performed thru Line Command entries: “D”elete the Row, “I” nsert a Row, or “U”pdate a Row (Primary Command “F”ind can be used for locating an entry.)
16 Browse/Edit Mode – Option 1 – Vertical View Line command “V” causes that row to be displayed vertically:
17 Browse/Edit Mode – Option 1 – Vertical View Line command “H” causes that row to be displayed hexadecimal- vertically:
18 Browse/Edit Mode – Export/Import export Command “EXPORT” produces a flat file thus data can be moved from one DB2 Sub-systems to another “IMPORT” inserts rows to the current table from a flat file based on a copybook, or creates SQL statement to the same affect to be used outside RDBA. “IMPORT” may be given parameters for directing replacement or ignoring of duplicating rows. After performing “IMPORT” RDBA generates a report showing the statistics and results of the process.
19 Browse/Edit Mode – Export to MS Office export text “EXPORT TEXT” produces a text file which can be used in PC environment File opened in MS Word File imported in MS Excel
20 Browse/Edit Mode – Special Cases/Errors Attempting to Delete or Update Rows that have not been selected thru fully-qualifying columns.
21 Browse/Edit Mode – Special Cases/Errors Which would cause an SQL Error, when PF6 is entered. The user, inadvertently, enters an alphabetic data on a TIMESTAMP column.
22 Browse/Edit Mode – Special Cases/Errors DB2 Error Message F3
23 Browse/Edit Mode – Special Cases/Errors F3 Lines with error are marked
24 Browse/Edit Mode – Option 2 By choosing Option 2, the user Gets a List of Queries. If the Query Name is known beforehand, the user may directly type it. Or, the first letter(s) of the name followed by “*” gets a list of Queries satisfying the wild-card search, from which list a certain Query may be chosen.
25 Browse/Edit Mode - Option 2 Partial Query Name is Entered
26 Browse/Edit Mode - Option 2 – List of Queries List of Queries satisfying wild-card search. An “S’ on a Line Command brings the contents of that Query.
27 Browse/Edit Mode – Option 2 – Query-driven Edit/Browse Text of the Query PF6 gives result of the Execution of the Query F6
28 Browse/Edit Mode – Option 2 – Query-driven Edit/Browse Result of the Execution of the Query
29 Query/Dynamic SQL Maintenance and Execution Mode On this screen, Maintenance line commands “I”nsert, “U”pdate, “D”elete, and “C”opy are available. Line command “S” causes the query to be displayed. List of Queries Main Menu Option 3
30 Query/Dynamic SQL Maintenance and Execution Mode – Display a Query Displays the text of the Query (The query in this example is a join of three tables.) PF6 brings the result of the execution of the Query F6
31 Query/Dynamic SQL Maintenance and Execution Mode – Display a Query The result of the execution of the Query
32 Query/Dynamic SQL Maintenance and Execution Mode -Query Editor All essential TSO/ISPF Line Commands are available: “C”opy, “M”ove, “A”fter, “B”efore, “D”elete, “R”epeat, “I”nsert, and Block Commands, “CC”, “MM”, “DD”, and “RR”. (This is an example of Block Repeat.)
33 Query/Dynamic SQL Maintenance and Execution Mode -Query Editor An example of “C”opy “A”fter.
34 SQL Error Screens If any SQL error is encountered during processing, the resulting SQLCODE is displayed along with a description of the error.
35 Help Screens A context-sensitive help is available on all screens.
36 Access grant "Browse" and “Edit" functions of the tool may be disabled; where users may run previously created queries but may not use browse and edit functions of the tool "Dynamic query maintenance" (changing the contents of a query) may be restricted; thereby users may run queries without the ability to modify them "Query grouping“ under this mode, the query list is given to the users based on the group they belong to Ability to access certain queries can be restricted to only administrators
37 Epilogue RDBA, with its Ease of Installation The end-user accessible Run Environment (CICS in addition to TSO) Ease of Usage Simplicity despite versatility Rapid Processing Speed compared with competing products Reasonable price Would be a trustable companion of every DB2 User.