Presentation RDBA part 1

advertisement
Sakman Utilities
Relational DataBase Aid
Copyright © 2002
Sakman Software Corp.
1
What is RDBA?
Relational Database Aid (RDBA) is a
productivity tool that lets application
developers and end-users perform DB2related functions easily and rapidly.
RDBA is a cluster of programs that run
under TSO and/or CICS, thus making
itself available to end-users.
2
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
3
What can RDBA do for nonprogrammer 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 userfriendly 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.
4
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.
5
Usage Scenarios
• Browse or Edit Scenarios
• Query/Dynamic SQL Maintenance and
Execution Scenarios
6
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.
7
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.
8
Primary Options Menu
9
Browse/Edit Menus
On this form,
without any field
entered:
Option 1 gets a
list of all CreatorTable Name
pairs.
Option 2 gets a
list of all Queries.
If the user knows the Creator, Table-Name, or QueryName 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 wildcard search.
10
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.)
11
Browse/Edit Mode – Option 1
If the Creator
and Table-Name
are known:
An “Enter” command brings the template of this table.
12
Browse/Edit Mode – Option 1 - Template
With these entries,
the user specifies:
A Selection of
Columns,
A Sort Order, and
A Selection Criterion.
Template of the Chosen Table
PF4 on this screen
shows the text
F4 of the query with
these selection
parameters
13
Browse/Edit Mode – Option 1 - Query Text
F4
F3
PF3 - Return
to the template
Query Text If the user desires to see
and/or Save the resulting
Query.
14
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.)
15
Browse/Edit Mode – Option 1 – Vertical View
Line command “V”
causes that row to
be displayed
vertically:
16
Browse/Edit Mode – Option 1 – Vertical View
Line command “H”
causes that row to
be displayed
hexadecimalvertically:
17
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
18
statistics and results of the process.
Browse/Edit Mode – Export to MS Office
export text
File opened in MS Word
“EXPORT TEXT”
produces a text file
which can be used in
PC environment
File imported in MS Excel
19
Browse/Edit Mode – Special Cases/Errors
Attempting to Delete or Update Rows that have not
been selected thru fully-qualifying columns.
20
Browse/Edit Mode – Special Cases/Errors
The user,
inadvertently,
enters an
alphabetic
data
on a
TIMESTAMP
column.
Which would cause an SQL Error, when PF6 is entered.
21
Browse/Edit Mode – Special Cases/Errors
F3
DB2 Error Message
22
Browse/Edit Mode – Special Cases/Errors
F3
Lines with error are marked
23
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.
24
Browse/Edit Mode - Option 2
Partial Query Name is Entered
25
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.
26
Browse/Edit Mode – Option 2 –
Query-driven Edit/Browse
PF6 gives result
of the Execution
of the Query
Text of the Query
F6
27
Browse/Edit Mode – Option 2 –
Query-driven Edit/Browse
Result of the Execution of the Query
28
Query/Dynamic SQL
Maintenance and Execution Mode
Main Menu
Option 3
List of Queries
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.
29
Query/Dynamic SQL
Maintenance and Execution Mode
– Display a Query
PF6 brings the
result of the
execution of the
Query
F6
Displays the text of the Query
(The query in this example is a join of three tables.)
30
Query/Dynamic SQL
Maintenance and Execution Mode
– Display a Query
The result of the execution of the Query
31
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.)
32
Query/Dynamic SQL
Maintenance and Execution Mode
-Query Editor
An example of “C”opy “A”fter.
33
SQL Error Screens
If any SQL error is encountered during processing,
the resulting SQLCODE is displayed along with a description of the error.
34
Help Screens
A context-sensitive help is available on all screens.
35
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
36
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.
37
Download