Your SlideShare is downloading. ×
Download "Developing DB2 SPs using Developer Workbench ...
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Download "Developing DB2 SPs using Developer Workbench ...

1,083
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,083
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Note: Content Assist requires an assigned connection to happen. So, if the editor is launched from the Database Explorer launch bar as opposed to the connection folder, content assist is not active.
  • Saved statements are “imported” later on. Execute using the Run > Run SQL
  • * Some setup required on the z/OS side to enable actual costing
  • To launch the wizard, you need to Create a data development project Right-click > New > Other Expand the Data folder > SQLJ Applications > SQLJ File
  • Java stored procedures pertain to both dynamic SQL (JDBC) and static SQL (JDBC) Java stored procedures
  • When deploying a native SQL SP using binaries, the tooling will call the built in procedure SYSPROC.DSNTBIND and pass in a constructed BIND PACKAGE DEPLOY command containing any options specified by the user. The bind option ACTION(REPLACE) is always used. The COPYVER() option will always be specified and the version-id passed in will be that of the native SQL procedure selected for deploy. The REPLVER() version-id will be set to the same as the one for COPYVER. This will ensure that the procedure's versions match up between the source and target DB2 systems. All other options (e.g., WLM environment, runtime options, external security etc...) will be ignored by the tooling.
  • Source, parameter list and options are stored in catalog Procedural statements are converted to a native representation and stored in packages Run native SQL stored procedure executes the package. This is the package that DB2 for z/OS creates on behalf of native SQL SPs.
  • The CREATE PROCEDURE statement registers a SQL procedure as a new object with an initial version. Default value is “V1”. Additional versions can be added with the ALTER statement with the ADD VERSION clause. One or more versions of a procedure may exist, but only one version is active. When a routine is first created, that initial version is active. The new CURRENT ROUTINE VERSION special register can be used to override which version is the active one for a connection. This does not, however, result in a change to the active version recorded in the catalog. The special register allows a level of control to invoke a routine version without having to fully activate it.
  • In DB2 for z/OS, the default version is V1. DWB is different so user can identify easily the Version id.
  • For native PSM, the “procedure options” have been expanded to allow the user to specify the usual routine options, bind options and runtime options. Routine options such as: DETERMINISTIC, CALLED ON NULL INPUT, MODIFIES SQL, etc. Bind options such as: ISOLATION LEVEL, REOPT, VALIDATE(BIND / RUN) Runtime options such as: ASUTIME, WLM ENVIRONMENT
  • 1 - User may not have specified these keywords in V8 NFM; or may have edited them out of the DDL.
  • - Each jar in the Jars folder in the Database Explorer (under its respective Schema node) will have a drop option in its context menu. It is necessary to have supporting jars in the Database Development project so that they are available for local Java stored procedure compilation and for setting the proper associations on the server. - Supporting jars contain classes referenced by another class in another jar. In LUW, it is enough to simply install the jars because of the way jars are searched at runtime. In z/OS, the - Properties view extracts information from SYSIBM.SYSJAROBJECTS.
  • Deployment of supporting jars: When a supporting jar is imported or drag and dropped to a project, a Jars folder will be created. The folder contains the supporting jars. Each jar will have information regarding the location of the jar file in the local file system, the SQL jar name, and the Java Path. 2. Deployment of a complex Java stored procedure The deploy process will deploy all of the jars specified in the Java path, so that the user doesn’t have to do so before deploying the Java stored procedure New Stored Procedure changes The New Stored Procedure wizard, the user will be able to select a jar node from the Jars folder, under the same Database Development project, where the procedure should be packaged in.
  • Prior to V9, if customers wanted to debug a SQL SP, they had to purchase the IBM Distributed Debugger. To debug a Java SP, the customer had 2 options Create comparable DDL and SQL on a DB2 for LUW connection and use the Distributed Debugger to debug the Java SP on the client. When the debugging is successful, copy and paste the Java SP to DB2 for z/OS; OR Write a bunch of System.out.println and System.err.println Check redbook for setting up JAVAERR and JAVAOUT DD statements with JDK 1.3; or using the JAVAENV variable, WORK_DIR to set up the files for receiving the println output.
  • Example of nesting: SQL stored procedure that calls a Java stored procedure, or a Java stored procedure that calls an SQL stored procedure. .Net addin, IBM Database tools for Visual Studio 2005 also exploits the Unified Debugger in their tool.
  • ALTER SP to switch from ALLOW to DISALLOW will require a recompile of the routine to remove or insert the debugger hooks. Switching from ALLOW to DISALLOW will require a recompile Switching from DISALLOW to DISABLE will NOT require a recompile; changes catalog information only Switching from DISABLE to ALLOW or DISALLOW is not permitted. Routine must be dropped first. DEBUG_MODE = 1, enabled; 0 – not enabled; N – can never be enabled
  • The user can define XML Queries and test them out in DWB. After they are created satisfactorily, they can be embedded in applications and stored procedure bodies. All created XML Query artifacts are stored in the XML Queries folder in a Data Development Project.
  • You must build an example instance document for every document you intend to include in the query. This is necessary so that the query builder knows the structures of the documents to build the appropriate XPaths, etc.
  • You must also associate the instance documents you supplied (or created in this wizard) with an XML column from the database. Select each column and click on the Associate… button to bring up a dialog that allows you to navigate to XML columns in the database. You can do this at a later time, but if you do not do it up front, you will be prompted for this association every time you execute the query in the tooling.
  • You can drag and drop resources from the left-hand side of the XQuery editor to the palette on the right-hand side. When you build the query, you can drill down elements and go up from where you drilled down.
  • The upper right button allows you to step up the hierarchy and the one next to the resource in the palette (For Logic) allows you to drill-down for refinement.
  • You can view the source that is generated for the XML Query by clicking on the Source tag in the lower-left of the editor. Note that you cannot modify the Source pane to change the query in this release; it is only for reading.
  • There are a few ways of executing the XML Query. First you save the editor and then you can go to the created XML query in the XML Queries folder and launch the Run… action. If you did not associate the documents with XML columns when creating the query, you will be required to do so at this time.
  • To launch the Migrate DC wizard, select File->New->Other... then Select Data"DB2 Development Center Project" and click Next. OR: File->Import... .Select Data"DB2 Development Center Project" and click Next. Development Center supported multiple database connections per project; DWB projects have single connections.
  • Transcript

    • 1. Developing DB2 stored procedures using Developer Workbench Marichu Scanlon IBM Silicon Valley Lab San Jose, CA, USA [email_address]
    • 2. Agenda
      • Overview
      • Basic Eclipse concepts
      • DWB concepts
      • SQL tools
      • Stored procedure and UDF development
      • Ad-hoc database development
      • SQLJ development
      • Advanced Topics
    • 3. IBM Developer Workbench (DWB)
      • Data application development tool
        • User-defined functions
        • Stored procedures
        • SQL scripts
        • Develop, deploy, test, debug
      • Integration tool
        • Data objects with Java applications
      • Eclipse based
        • Common team support interface
        • Common user experience model
      • Runs on Windows or Linux workstations
      • Connects to DB2 UDB for z/OS
        • Works also with DB2 UDB for iSeries and LUW, as well as Derby
        • Connect to DB2 for z/OS V9 currently in Beta
    • 4. Activities and benefits of DWB
      • Builds, parses and runs SQL statements
      • Visually explains execution of SQL statements
      • Guides developing of stored procedures and user defined functions
      • Deploys stored procedures and user defined functions
      • Provides a single debugger for SQL and Java SPs
      • Helps keep track of history
    • 5. Activities and benefits of DWB
      • Increases code reuse
        • Access supporting Java jars during development
      • Makes development of SQLJ applications easier
      • Creates modules for binary deployment
      • Supports runtime binding of package variations for stored procedures
      • Helps working with XML
      • Maps XML schemas (XSD) to relational schemas
    • 6. Eclipse
      • A consortium of companies developing open source development platforms
        • Initiated by IBM
        • Currently most successful open source project by number of contributing participants
      • The major delivery is the Eclipse Integrated Development Environment (IDE)
        • Defines extensibility interfaces and integration points
        • Several specialized projects extend the basic IDE (Web Tools Project – WTP, Data Tools Project – DTP)
    • 7. Eclipse concepts
      • Workspace
        • The space to save all user metadata – scripts, XSD, configuration
        • Implemented by root directory on the filesystem
        • Can not be nested
        • Can be shared
        • User works in exactly one workspace at a certain point of time
        • Set when starting the environment
    • 8. Eclipse concepts
      • Project
        • A logical storage concept used to store related user metadata
        • Assigned to one workspace
        • Implemented as a directory in a workspace
        • Can be shared
        • User can work in any number of projects at the same time
        • Can be dynamically opened and closed
      • View
        • A visual tool providing defined functionality that can be placed on the user interface
        • Examples are: property view, error log view, data output view, project explorer
    • 9. Eclipse concepts
      • Editor
        • A visual tool assigned to a specific type of element (SQL script, project, XSD) able to modify the element
      • Perspective
        • Saved configuration of views, editors, and menus typically used to realize specific activities (for example SQLJ development)
        • One perspective is active
        • Any number of perspectives can be defined
        • User can change perspectives
    • 10. Most important Eclipse concepts Database view Project view Editor Properties view Perspec-tive Output view
    • 11. DWB concepts
      • Data Project Explorer view
        • Displays projects and is starting point for development features
        • Development objects are saved independently of the database
        • Deployment and execution assigned with the database
      • Database Explorer view
        • Defines Connections to databases using JDBC interface
        • Ad-hoc features for stored procedures, user defined functions and SQL
    • 12. DWB concepts
      • Data output view
        • Reporting of execution related activities and results
      • Data perspective
        • Tools for development of SQL applications
        • Default perspective
      • Java perspective
        • Tools for development of SQLJ applications
      • Note: to change perspectives, click on
        • Window > Open Perspective
    • 13. Database connection
      • Defined in the Database Explorer
        • Type of the database
        • Server address
        • Port
        • JDBC driver
      • Context dependent start of ad-hoc functions
      • Database explorer is “reverse-engineered” catalog of objects saved in databases
        • Filtering of objects available
    • 14. Data Development Project
      • Assigned to database connection
        • Capabilities dependent on the type of the database
      • Functions dependent on objects being manipulated
      • Logical folders for object types
        • SQL scripts
        • Stored Procedures
        • User-Defined Functions
        • XML Schema Documents (XSD)
      • Contains objects being developed
        • Everything created in the database explorer must be saved in a project
    • 15. SQL Tools
      • SQL builder
        • User interface to visually build and edit SQL-DML statements
        • Syntax and some semantic validation (e.g. table/column resolution, correlation ids)
        • Possibility to omit specified schema from generated SQL for portability
        • Launch Visual Explain and Actual Costing (z/OS)
        • Keyword highlighting and content assist
    • 16. SQL Tools
      • SQL editor
        • Supports multiple statements with configurable statement terminator
        • Supports execution of any valid SQL statement
        • Keyword highlighting and content assist
      • SQL wizard
        • Launched from or embedded within other wizards to assist with SQL creation
    • 17. SQL builder
      • Guided statement creation
      • Three pane editor
        • SQL statement
        • Graphical description
        • Statement options
      • You can parse and save SQL statements in your project for re-use or further development
      • You can execute the SQL statement and view the results in the Data Output View
    • 18. SQL editor
      • Edit any SQL statement
      • Execute the content of the editor (even without saving)
      • Format SQL
      • Content tip
      • Content assist
    • 19. Stored procedure and UDF development
      • Display existing routines from a database server
      • Create a new DB2 or Derby routine via a wizard
      • Import a routine source file or copy an existing procedure into the development project
      • Edit the procedure source and properties with the routine editor
    • 20. Stored procedure and UDF development
      • Build and deploy the procedure to a database
      • Export procedures for IDE independent batch deployment
      • Run a routine
      • Debug stored procedures (SQL and Java for DB2, Java for Derby)
      • Drag and drop routines from a database connection to the project
    • 21. Creating stored procedure or UDF The New action launches a multi-page wizard that allows you to customize the generated stored procedure The first page allows the selection of the language: Java using JDBC, Java using SQLJ and SQL
    • 22. Creating stored procedure and UDF The SQL page of the wizard allows you to import existing SQL statements, write your own with the SQL wizard or manually type or paste it in
    • 23. Store procedure and UDF – actual cost Actual cost of running the SQL statement can be invoked from the SQL Statement page of the create procedure wizard. Only available for projects connected to a DB2 z/OS
    • 24. Stored procedure and UDF – visual explain You can invoke Visual Explain for the given SQL statement from within the wizard. You can also invoke it from within the routine editor for SQL routines. Visual Explain is available for DB2 z/OS V8 (windows clients) and DB2 LUW.
    • 25. Stored procedure and UDF – import The import action launches a multi-page wizard that allows you to create a stored procedure or UDF by importing a routine source file or by selecting an existing routine from another project . In a source file with multiple routines, only one routine can be imported at a time
    • 26. Stored procedure and UDF – editor and actions
      • Routine editor supports both the project and Database Explorer
      • Actions available on a stored procedure in your project
      • Results of execution displayed in the Data Output view
    • 27. Stored procedure and UDF – deployment, execution
      • Develop on one database, deploy it to a different database server (e.g. develop on DB2 LUW and deploy to DB2 z/OS)
      • Specify the schema qualifier during deploy
      • The Run action executes a call of the stored procedure
      • Run asks for input parameter values
    • 28. Stored procedure and UDF – export and deploy
      • Export to file system
        • Generates DB2 script file, for Java an ANT script and a properties file for customization
        • Allows deployment of the stored procedure independent of the IDE
      • Batch Deploy for Java and external SQL SPs
        • Properties file for customized settings
          • Target database, username and password, procedure options like WLM environment
          • To deploy run from command prompt: ant -buildfile [filename].xml
      • Batch deploy for native SQL routines on z/OS V9 or SQL routintes on LUW
        • Customize the DB2 script file directly
    • 29. Ad-hoc database development functions
    • 30. SQLJ database development functions
      • New SQLJ File Wizard
        • Generates code based on IBM or user customized templates
      • SQLJ Editor
        • SQLJ clause highlighting
        • Syntax errors within SQLJ statements and Java code are flagged in the editor and task view
        • Code assist for Java statement
        • Wizards provided to insert new SQLJ clauses
      • SQLJ translation
    • 31. SQLJ database development functions
      • Customize/Bind of SQLJ Profiles
        • Generates Ant scripts to customize SQLJ profiles and bind packages to the target database
      • Debugging
        • Supports using the .sqlj file as the source file during debugging
    • 32. Stored Procedure and UDF development tooling: Language and Server Support Not supported SQL (scalar and table), special table UDFs (MQSeries) Not supported Not supported before v8 new-function mode; no table UDFs User Defined Functions Derby (IBM Cloudscape) DB2 LUW V8 – V9 DB2 iSeries: V5R1,V5R2 - V5R3 - DB2 zOS V7 – V9 Java Java (JDBC and SQLJ) and SQL SQL Java (JDBC and SQLJ) and SQL Java (JDBC and SQLJ) and SQL Stored Procedures
    • 33. SQL Tools SQL editor SQL builder Any database that DWB supports Any database that DWB supports Database Server
    • 34. Stored Procedure/UDF tooling and SQL statements: Special Features Support Routine development tooling in Data Development Project Routine debugging Statement Cost from routine wizard Visual Explain Special Feature DB2 (LUW, iSeries, z/OS) and Derby (IBM Cloudscape) Java and SQL procedures for DB2 v9 and Java procedure for Derby (IBM Cloudscape) DB2 z/OS DB2 LUW and DB2 z/OS (Client Windows platform) Database Server
    • 35. SQLJ Tooling SQL customization SQLJ translation DB2 v8 and v9 for z/OS and LUW, V5 for iSeries Any supported DWB database given a valid sqlj.jar for the target database. Database Server
    • 36. Additional Features for DB2 for z/OS in Developer Workbench Marichu Scanlon IBM Silicon Valley Lab San Jose, CA, USA [email_address]
    • 37. Agenda
      • V8 and V9:
        • Enhanced deploy functions for stored procedures
        • Package variation for SQL and SQLJ stored procedures
        • Unified Debugger for SQL and Java stored procedures
      • V9 only:
        • Native SQL stored procedures
        • Multiple jar support for Java stored procedures
        • XML Support
      • V8 only
        • DC Project Migration
    • 38. Enhanced deploy functions in DWB
      • Deploy SQL and Java stored procedures to unlike servers
        • DB2 for LUW to DB2 for iSeries
        • DB2 for LUW to DB2 for z/OS
        • DB2 Cloudscape (Java only) to DB2 LUW
      • Deploy DB2 for LUW, iSeries and z/OS Java stored procedures from an exported file using ant script
      • Deploy DB2 for z/OS SQL Stored Procedures from an exported file using ant script
      • Binary Deploy of DB2 for LUW and DB2 for z/OS stored procedures to a like server
        • Optionally copy the source as well
    • 39. Deploy Wizard external changes User needs to enter the target dataset for the load module Specify “Deploy using binaries if available in the database”
    • 40. Binary Deploy of DB2 for z/OS stored procedures
      • Requirements / Restrictions
        • External SQL stored procedures
          • Need to customize z/OS enablement stored procedure job, DSNTIJCC
          • Setup authorization for z/OS enablement stored procedures
          • Target load library needs to be preallocated
        • Java stored procedures
          • Connect to target z/OS server with IBM DB2 Universal Driver
          • Cannot binary deploy Java stored procedures originally built using DSNTJSPP
        • Native SQL stored procedures
          • Only the following bind options are valid for binary deploy of native SQL stored procedures
            • target COLLECTION ID
            • QUALIFIER
            • OWNER
    • 41. Package Variation - overview
      • Create variations of packages with different bind options for SQL and SQLJ java stored procedures on a DB2 z/OS system.
      • Display the packages under the Package folder in the Database Explorer.
      • Allow users to select the package of their choice before executing the stored procedure using Collection ID field in Run Settings Options panel.
      • Allow users to view the properties of these packages in the Properties View.
      • Allow users to drop these packages from the Database Explorer.
      • Available from the Database Explorer as packages are associated only with the DB2 server.
    • 42. Package Variation Usage
      • Initially deploy a SQL or SQLJ stored procedure on a DB2 z/OS server using NO COLLID option
        • Allows the user to select the collid at runtime.
      • Bind the collid you want the new package to reside in using com.ibm.db2.jcc.DB2Binder, otherwise will get -805 at execution time.
      • In Database Explorer, create new package variation
        • Right-click on Stored Procedure -> Packages -> New
      • Specify bind options for Bind Copy in the Package Variations wizard.
      • Click Finish to deploy the new package to the server.
    • 43. Package Variation – executing the stored procedure
      • Select another collection id
        • Right-click on Stored procedure > Run Settings > Options tab > Collection ID > Browse button
      • Displays list of collection Ids associated with this package.
      • Right-click on Stored procedure > Run to execute this package.
    • 44. Package Variation - properties
      • Select specific package from the Database Explorer
      • Select Package tab to view the properties in the Properties View
    • 45. Native SQL Stored Procedures
      • DB2 for z/OS V9 now supports 2 kinds of SQL SPs:
        • External or Generated-C SQL stored Procedure
          • User specifies FENCED or EXTERNAL keywords in the Create Procedure DDL
        • Native SQL stored procedure
      • Features of Native SQL stored procedures:
        • Ability to version a stored procedure
        • Ability to “activate” a particular version of a stored procedure
    • 46. Native SQL stored procedures - Versioning
      • SAME schema, procedure name, number of parameters, and parameter type
      • Allows difference in procedure body, parameter names and options
      • Only one version is ACTIVE
        • When routine is first created, the initial version is activated
        • “Activate” a version by right-click on stored procedure > Set Active
      • Create additional versions from the Database Project Explorer only
        • Right-click on specific stored procedure > Add Version
    • 47. Create new Native SQL SP
      • Create using the Create SP wizard
        • Right-click on Stored Procedure > New
      • DWB Version default = VERSION1
      • Versions show in same level as the first version in the Data Project Explorer
    • 48. Adding a Version
      • To create a new version of a SP: Right-click on SP > New Version
      • Versions must have the same SP name and number of parameters and parameter types
        • Can change some parm attribute, e.g. VARCHAR(20) to VARCHAR(200)
      • Body of the procedure can be changed
      • Procedure options can be changed (e.g. ISOLATION CS to ISOLATION RR)
      • Can set ALLOW and DISALLOW debug
    • 49. Native SQL SP – Procedure options
      • WLM environment can be specified only when “Enable for debugging” is checked
        • Click “Advanced” button
      • Procedure options specified in the Create Procedure DDL
      • Collection ID is initially set to schema; specify different collection id in PACKAGE bind option
      • Build owner set through CURRENT SQLID field in project properties
    • 50. Native SQL SP – Migration / Fallback issues
      • When DB2 for z/OS server migrates to V9 new function mode
        • External stored procedures without FENCED or EXTERNAL 1 keywords can be “converted” to native SQL stored procedures by redeploying the routine. DB2 assigns a version of V1.
      • When DB2 for z/OS server re-enters V9 compatibility mode
        • Disallow changes to native SQL stored procedures
        • Allow Run capabilities only
        • Disallow drag and drop of native sql stored procedures to a project associated with a connection in compatibility mode.
    • 51. Multiple Jar Support
      • Allows users to reference classes in other jar files installed in the server
      • Exploits the SQLJ.ALTER_JAVA_PATH function
        • Java stored procedures can reference classes that are neither in the CLASSPATH of the associated Java stored procedure WLM proc, OR in the jar that the stored procedure resides in.
      • Ability to associate an installed jar file with a Java path
    • 52. Multiple Jar Support – Database Explorer
      • View / browse all jars installed on the server
      • View jars that are dependent on a particular jar
      • Drop supporting jars
        • A “supporting jar” is a jar that will be referenced by another jar at runtime.
      • Drag and drop/paste a supporting jar from the Database Explorer to a Database Development project for use by one or more routines
      • View the catalog data and Java path in the Property Browser for each jar
    • 53. Multiple Jar Support Dependencies folder Java Path
    • 54. Multiple Jar Support - Data Project Explorer
      • Add supporting jars to a stored procedure via:
        • Import Wizard - imports a jar from the file system
          • This creates a Jar node in the Stored Procedure folder
        • Drag and drop from Database Explorer
      • Deploy one or multiple supporting jars to the server using the Deploy Jar wizard.
      • Ability to drop or replace the jar if already installed in the server; or to exit deployment.
      • Edit the supporting jar characteristics, such as Java path during deploy.
      • Deploy Java stored procedure and all its supporting jars into the same jar file
    • 55. DB2 Unified Debugger
      • Development Center v8.2 had SQL Debugger for debugging DB2 for z/OS external SQL stored procedures; no support for debugging Java stored procedures.
      • DB2 9 One debugger for multiple platforms. Shipped with:
        • DB2 for LUW V9
        • DB2 for zSeries V8 and V9, and
        • DB2 for iSeries V5R4
      • DWB is the client front end that:
        • allows users to remotely debug server side SQL and Java stored procedures.
        • allows users to perform source-level debugging using the Debug Perspective
    • 56. DB2 for z/OS V9 Unified Debugger Features
      • Stand alone mode support
        • Debugging a single a SQL/Java procedure
        • Debugging a nested SQL/Java procedures
      • Cross-language application support
        • Nested SQL/Java procedures
        • C#/VB application calling SQL procedures
      • Cross-platform support
        • DB2 for z/OS v8/v9, DB2 for LUW v8/v9, DB2 for iSeries v5r4
      • Client or Server-side Session Manager
        • for .Net, Session Manager is only on Server
    • 57. DB2 Unified Debugger features
      • For V9, supports debugging a specific version of a native SQL stored procedure
      • CREATE / ALTER options
        • Specify DISALLOW / ALLOW / DISABLE DEBUG MODE
        • WLM ENVIRONMENT FOR DEBUG (for Native PSM)
      • New column in SYSIBM.SYSROUTINES: DEBUG_MODE
      • Session Manager can be on the client or server.
        • If on the client, user can point to any z/OS system to debug.
    • 58. Unified Debugger - Preferences
      • Select where Session Manager will be launched
      • Session Manager on DB2 V9 for LUW can be started when DB2 starts
        • Need to setup port in the services file
      • WLM Environment to be used by the stored procedure when debugging can be specified in the Preferences >
      • Session Manager on DB2 for z/OS started by issuing console command:
        • START DB2UDSMD
    • 59. Unified Debugger – Debug Perspective
      • DWB leverages the Debug Perspective of Eclipse
      • Has all of standard debug views (source code, variables, call stack, and break points)
      • Supports all standard debug commands (step into, step over, set break point, update variable…)
    • 60. Unified Debugger – Debug Perspective variables source Debug commands
    • 61. Query building – launching the XML Query builder
    • 62. Query building – specifying representative documents for the XML Query builder
    • 63. Query building – XML Query builder – associating documents with XML columns to query against
    • 64. Query building – XML Query builder work area
    • 65. Query building – stepping into and out of resources in the XML Query builder
    • 66. Query building – XML Query builder source view
    • 67. Query building – running an XML Query
    • 68. Migrating a Development Center Project to DWB
      • Reuse projects created in DC; continue work in DWB
      • Existing projects can exploit DWB functions
      • Migrate projects using the Migrate DC Project wizard
      • Wizard allows creating new connections if an existing connection is not found
    • 69. Migrate DC Project wizard
      • Input DC project must be a .dcp file
      • Point to the .dcp file using a File Browser
      • Once project is loaded, all DC project connections are shown
        • DC projects allowed multiple connections; DWB projects only have one
      • DWB will attempt to match the selected connection to existing connections in the Database Explorer.
    • 70. References
      • IBM Redbook, “DB2 for z/OS Stored Procedures: Through the Call and Beyond”, SG24-7083-00
        • http://publib-b.boulder.ibm.com/abstracts/sg247083.html?Open
      • “ Build once, deploy everywhere: Binary deploy of DB2 for z/OS stored procedures”;
        • http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0607scanlon/index.html
      • “ Create package variations for z/OS DB2 stored procedures”
        • http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0608parmeshwar.html
    • 71. References
      • “ DB2 Developer Workbench, Part 1: Developer Workbench concepts and basic tasks”;
        • http://www-128.ibm.com/developerworks/edu/dm-dw-dm-0608eaton-i.html
      • “ DB2 Developer Workbench, Part 2: Developer Workbench and stored procedures”;
        • http://www-128.ibm.com/developerworks/edu/dm-dw-dm-0609eaton-i.html
      • “ DB2 Developer Workbench, Part 3: Developer Workbench and XML”;
        • http://www-128.ibm.com/developerworks/edu/dm-dw-dm-0610eaton-i.html