Presentation is loading. Please wait.

Presentation is loading. Please wait.

® IBM Software Group © 2013 IBM CorporationLast Update: August 2013 Workshops RDz Workbench – Using the Data Source Explorer Workshops.

Similar presentations


Presentation on theme: "® IBM Software Group © 2013 IBM CorporationLast Update: August 2013 Workshops RDz Workbench – Using the Data Source Explorer Workshops."— Presentation transcript:

1 ® IBM Software Group © 2013 IBM CorporationLast Update: August 2013 Workshops RDz Workbench – Using the Data Source Explorer Workshops

2 2 © 2012 IBM Corporation Using this PowerPoint Slide Deck There are two types of slides in this PowerPoint: 1.Workshop slides:  These are slides that will help you master RDz through technical development techniques and hands-on exercises  Workshop slides have this character:  in the slide header –Note that some workshop slides have the word "Workshop" in the slide header –However all workshop slides have the  character in the slide header 2.Learning content:  Any slide that doesn't contain a  character in the slide header contains conceptual learning material –To be read for understanding –Often these slides are preparation for the workshop exercises that follow There are additional Powerpoint slides that contain deep RDz learning content, without exercises and without lab instructions  Ifyou want to learn more about any particular RDz topic, you can learn more about it from the Powerpoint slides.

3 3 © 2012 IBM Corporation Data Perspective Workshop – Using Your Company's DB2 If you are connecting to DB2 on your own LPAR, with the help of your DBA and/or Systems Programming staff do the following: 1.Open the Data Perspective 2.Connect to a z/OS DB2 database 3.Filter the Schema to your table Owner name 4.Use the Data Source Explorer: 1.View some of the tables and their relationships through the Overview Diagram 2.Show a table’s Sample Contents 3.Code a few simple SQL statements (or copy/paste from a COBOL program) and run them in a SQL Query 4.Create a simple new SQL statement using the statement builder 5.Edit one of the DB2 tables you have update access to: –Add a few new rows - Update some values - Delete one or two rows Ctrl/S –Save your changes – Ctrl/S  The slides that follow provide good examples to exercise the techniques demonstrated in this section. Of course you will have to use your own tables, views, etc.

4 4 © 2012 IBM Corporation Data Perspective Workshop – Using Your Company's DB2 – IBM Data Studio – RDz v9 If you are using RDz v9 shell-sharing with IBM Data Studio 4.1 – return to slides 57  93 in this slide deck and: 1.Create connections – to DB2 and through Remote Systems Explorer (RSE) 2.Create a Property Group for the RSE connection to pick up your copybooks and DCLGEN includes 3.Create an MVS Subproject – and copy a few DB2/COBOL programs into the Subproject 4.Add Data Access Development Support to the Subproject 5.Open a DB2/COBOL program – and start following the use cases shown on slides: 72  84 in this slide deck, but using your own SQL statements/DB2 tables and views, etc.  Note that you may need your DBA’s assistance for doing things like creating the EXPLAIN/Plan Tables, etc. 6.If you have Optim Workload Query Tuner:  And start following the use cases shown on slides: 85  93 in this slide deck, but using one of your own SQL statements  Note that you may need your DBA’s assistance – especially for interpreting the Query Tuning reports, graphs and explorer  You may already have setup connections for DB2 and to your mainframe through RSE – and created an MVS Subproject.

5 5 © 2012 IBM Corporation  Workshop – Connecting to DB2 on zServerOS  For z/OS-DB2 you will need to provide a few different pieces of information, in order to connect: DB2 for z/OS Select: DB2 for z/OS as the database manager Location: EOSDB205 Host: zserveros.demos.ibm.com 5446 Port: 5446 User name/Password: Your assigned UID/PWD Example : RTPOTnn  Click Next >

6 6 © 2012 IBM Corporation  Workshop – Filtering Schemas and Tables  Recall:  In the DB2 world on z/OS databases could easily contain:  Tens of thousands of tables  Thousands of Schemas  To simplify working on your projects filter the available DB2 objects  Un -check: □ Disable Filter  Enter: DDS0001  In: ◙ Expression name

7 7 © 2012 IBM Corporation  Data Perspective Workshop – Data Source Explorer When your connection create process finishes, you will be returned to the Data Perspective, where you now can:  Expand:  Schemas –Synonyms –Tables –Table elements –Views  Explore and with the DB2 objects:  Expand RESULTS –Look at the various elements Expand

8 8 © 2012 IBM Corporation  Workshop – Data (Entity/Relationship) Analysis Next try the "Overview Diagram"  Select one or more tables  Right click and select: Add to Overview Diagram  Click OK  This opens an Entity/Relationship analysis view You can also w ork with a Table, View or Synonym's DDL:  Try the following with the CUST table: 1.Extract table data to a comma delimited file on your workstation 2.Generate the DDL for your table  Be sure to:  Browse  Browse and select one of your chapter folders  Check the option to  Open the DDL file for editing

9 9 © 2012 IBM Corporation  Workshop – View, Analyze, Export Data – v8.x To view your DB2 table data and export reports from it:  Select the table or view you wish to edit. Right click and select: Data > Sample Contents Sort your results Export your results

10 10 © 2012 IBM Corporation  Workshop – Read/Only View of a Table's Row Values – v9  From the Data Source Explorer, Right-click over CUST and  Browse the Data and Sample Contents  Try out: New “Select” Script  Press to run the Select script  Value Distributions > Multivariate  Repeat these steps with one or two other tables  Caution about the Browse Data and Sample Contents  Caution about the Browse Data and Sample Contents These options ignore the Preferences setting for maximum number of rows to return from DB2, and on a very large table will cause Workbench performance problems

11 11 © 2012 IBM Corporation  Workshop Edit Tables To edit your DB2 table data:  Select the table or view you wish to edit  Right click and select: Data > Edit  Note that you can open (edit) multiple tables. And project them out in multiple window views – so that you can analyze data, or copy/paste values from one table to another If you wish to edit subsets of large tables you can use the Optim Data Studio 3.1.1 – which is a free RDz plug-in

12 12 © 2012 IBM Corporation  Workshop – Table Filtering (v9) From the Data Source Explorer  Right-click CUST  Select: Data > Edit Data  Click: Filter the data This opens the Table Data Filter dialog Use the dialog to:  Add > Several columns  Add Row Selection  Click Add  Open the Column drop-down  Open the Operator drop-down  Specify a search value

13 13 © 2012 IBM Corporation  Workshop – Testing Interactive SQL Statements New SQL Script  Click New SQL Script  Type in SQL statements  Right-click over the Content Area and select: Run SQL  In the Results, for multiple statements you can expand and select one at a time  The Result1 tab shows statement results  You can Export results Optional  Copy and all of the commented SQL statements in the Slide Notes Format SQL  Try other Context Menu selections like Format SQL Statement Run Console Data Results

14 14 © 2012 IBM Corporation  Workshop – Testing Embedded SQL Statements v8 – 1 of 2  From the Remote Systems view:  Open.TEST.COBOL(CURSRAVG)  Right-click and from the Context menu select: Filter view > Embedded SQL/CICS/DLI  Select and Copy the Interactive portion of the SQL SELECT statement in this paragraph – minus all of the embedded COBOL syntax (shown below in the screen capture)

15 15 © 2012 IBM Corporation  Workshop – Testing Embedded SQL Statements v8 – 2 of 2  Swap back to the script editor and paste the copied embedded SQL inside the SQL script editing area  Right-click and select Run SQL  Try adding an additional where clause predicate  What happens when you run the query?

16 16 © 2012 IBM Corporation  Workshop – Testing Embedded SQL Statements v9 with IBM Data Studio 4.1 Open to slide 57 from the PowerPoint titled: RDz Workbench – Using the Data Explorer. Follow the slide instructions/screen captures and do the following: 1.Create connections – to DB2 and through Remote Systems Explorer (RSE) 2.Create a Property Group for the RSE connection to pick up your copybooks and DCLGEN includes 3.Create an MVS Subproject – and copy a few DB2/COBOL programs into the Subproject – from the COBOL programs you copied to the host from RDzClass:  CURSRAVG.cbl, TRTMNT.cbl, CADDDB2.cbl 4.Add Data Access Development Support to the Subproject 5.Open a DB2/COBOL program – and start following the use cases shown on slides: 72  84 in this slide deck, but using your own SQL statements/DB2 tables and views, etc.  Note that you may need your DBA’s assistance for doing things like creating the EXPLAIN/Plan Tables, etc. 6.If you are using the zserveros you can use IBM’s Optim Workload Query Tuner:  Start following the use cases shown on slides: 85  93 in the slide deck  Tune the SQL statement  From: CURSRAVG.cbl

17 17 © 2012 IBM Corporation Review – "How do I" (Using RDz, be sure you know how to do the following…)  Access the data tools in the RDz Workbench (how do you open the Data Perspective)?  Create a connection to a DB2 region?  Filter out Schemas you don't want to see in the Data Source Explorer?  View sample rows from a table, view or synonym?  Edit a DB2 table?  Save changes to my row/column edits?  List indexes for a DB2 table  Generate the table definition (DDL) for a DB2 table or view?  View the different values in a DB2 table column, and see the number of rows each value has in the table?  Understand the relationships among a set of DB2 tables – connected with Primary/Foreign key constraints?  i.e. Create an "Entity-Relationship Diagram"  List the primary or foreign key (constraints) for a DB2 table?  Understand how an index on a table is designed (to see if it will help make my SQL query faster)?  List the columns in a table or view?  Change the default maximum number of rows displayed or edited in a table?  Code a dynamic SQL statement?  Invoke (use) Content Assist to help you code a SQL statement (what two keys??)  Run a SQL statement?  Code and test (run) multiple SQL statements in one batch (like SPUFI)?  Perform (relative) SQL statement efficiency benchmarks?  Export rows from SQL results to a: web page, XML file, Excel spreadsheet?  "Explain" the plan DB2 will use to access the table?  DCLGEN a table?


Download ppt "® IBM Software Group © 2013 IBM CorporationLast Update: August 2013 Workshops RDz Workbench – Using the Data Source Explorer Workshops."

Similar presentations


Ads by Google