ims explorer lab presentation - ims ug may 2013 philadelphia

78
Advanced Technical Skills (ATS) North America © 2010 IBM Corporation 06/21/22 Succeeding at Enterprise Mobility with IMS Nancy Stein IBM IMS Advanced Technical Skills [email protected]

Upload: ibm-ims

Post on 16-Apr-2017

800 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation05/03/23

Succeeding at Enterprise Mobility with IMS

Nancy SteinIBM IMS Advanced Technical [email protected]

Page 2: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

IMS User Group Meeting – 2013 IMS Open Database, ODBM & IMS Explorer

– What is it?

– Why should I set it up?

– What is it good for?

– How can I use it?

IMS Enterprise Suite Explorer for Development - Lab– Download & install the IBM Installation Manager and IMS Explorer

– View and modify DBDs/PSBs

– Experiment with SQL to access IMS Databases

2

Page 3: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

IMS Enterprise Suite Explorer for Development

3

Page 4: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Quickly and easily model, display, and edit IMS database and program definitions.

Use rich GUI controls and contextual help.

Simplify segment mapping.

Securely and intuitively view and edit z/OS data sets and z/OS Unix files, submit JCL, and view output and job logs.

Gain a relational view of IMS data.

Build SQL statements to use with IMS data.

Integrate with IMS 12 catalog and simplify your application tasks even more.

Exploit new structure and array types that are accessible thanks to IMS 12 catalog support.

IMS Explorer runs on Windows systems and supports cross-product integration (shell-sharing) with IBM Rational Developer for System z, IBM Data Studio, and IBM Problem Determination Tools plug-ins for Eclipse.

4

IMS Explorer Capabilities

Page 5: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation5

• Copy the entire “IMS User Group Lab” directory from the Flash Memory device to your laptop

• The directory contains 2 zip files and various documentation files

Copy IMS Explorer Software vs Download

Page 6: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Start at the IBM IMS Home Page: www.ibm.com/ims

Select the IMS Enterprise Suite

6

IMS Enterprise Suite Software

Page 7: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation7

Select the IMS Enterprise Suite Explorer for Development

IMS Enterprise Suite Software

Page 8: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation8

IMS ES Explorer Software

Select & download the Brochure: IBM IMS Enterprise Suite Explorer

Then return to

previous webpage

Page 9: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation9

IMS ES Explorer Software Download

Link to ES 2.2 Information Center

Select the IMS Enterprise Suite download website

If desired, select the Rational Developer for System z website link

Page 10: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation10

You will need an “IBM ID” to Sign-in and download IBM software

IMS ES Explorer Software Download

Page 11: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation11

IMS ES Explorer Software Download

Select IMS Enterprise Suite Explorer for Development Version 2.2.0.1

Click Continue at bottom of this screen

Page 12: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation12

IMS ES Explorer Software Download

Answer the registration questions

Select your preferred Privacy level

Select I agree Click Confirm at bottom

of this screen

Page 13: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation13

IMS ES Explorer Software Download

Recommended: Select Download Director

Recommend: Download and use the IBM Installation Manager

Click The Installation repository file for IMS Explorer …or…

Click Select all Files to download both the standalone and the “shell-sharing” versions of IMS Explorer

Click Download now at bottom of this screen

Page 14: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

With downloads running, review the following related documentation

The IBM Installation Manager V1.5.3 documentation and install instructions can be found in the IBM Support Portal: IBM Installation Manager DocThe IMS ES Explorer documentation can be found in the IBM Information Management InfoCenter: IMS Explorer for Development DocumentationThe IMS ES Explorer installation instructions can be found in the IBM IM InfoCenter: IMS Explorer Installation InstructionsThe latest IMS ES Explorer “README” containing a cumulative list of changes to components, related installation information, and known issues and workarounds can be found at: IMS Explorer README

Known limitations Installing IMS Explorer Version 2.2.0.1 Prerequisites information Verifying IMS Explorer installation Obtaining IMS Explorer Version 2.2.0.1 List of updates Installing IBM Installation Manager Additional information

14

Software Documentation

Page 15: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Installation Manager helps you install, update, modify, roll back, and uninstall software packages on your computer

Install the Installation Manager for Windows V1.5.3– Use the version of software you downloaded previously or download

now from Installation Manager• agent.installer.win32.win32.x86.zip (110 MB) - installer package

– Extract the compressed file to a directory

– Install using the Installation Manager user interface• Open the directory where you extracted the compressed file• Double-click the install.exe file • Follow the installer wizard pages to install Installation Manager

15

IBM Installation Manager Install

Page 16: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Use Installation Manager to search for software updates and fixes(BTW: You must have an internet connection)

1. Start Installation Manager2. Verify that updates are enabled: Click File > Preferences > Updates and select Search for Installation Manager update3. Verify that service repositories are searched: Click File > Preferences > Repositories and select Search service repositories during installation and updates4. Click OK5. On the main page of the Installation Manager, click Update

16

IBM Installation Manager Install

Installation Manager V1.6.2is the most current version

and can be installed with the update function

Page 17: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

IMS Explorer combines a graphical front end with an integrated development environment built on the Eclipse platform, an open software development environment that provides a standard GUI-based framework. – IMS Explorer can be integrated with other Eclipse-based plug-in tools—such

as IBM Rational® Developer for System z and IBM Data Studio—to support the entire IMS application development cycle.

– Developers familiar with Eclipse-based tools can use their existing skills to immediately start manipulating IMS data through IMS Explorer.

Install IMS Enterprise Suite Explorer for Development V2.2.0.1– Use Installation Manager to install the standalone version of IMS Explorer

• Add a repository and specify the location, including the zip file name, where the IMS Explorer repository file is located - IMSExplorer2201.zip (770 MB)

• Click File -> Preferences -> Repository -> Add Repository -> Browse• Click OK to add the repository location to the list• Click OK to go back to the IBM Installation Manager main screen• Click Install

17

IMS Explorer Software Install

Page 18: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation18

IMS Explorer Software Install

Page 19: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation19

IMS Explorer Software Install

Page 20: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation20

IMS Explorer Software Install

Page 21: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation21

IMS Explorer Software Install

Page 22: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation22

IMS Explorer Software Install

• Select the check boxes for IMS Enterprise Suite Explorer for Development and click Next

• Accept the terms in the license agreement, then click Next

Page 23: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation23

IMS Explorer Software Install• For installation location, select Create a new package group, and specify the

IMS Explorer Installation Directory• Click Next

Page 24: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation24

IMS Explorer Software Install• Click Next to not extend

an existing ECLIPSE instance

• For languages, English is already selected, click Next

• Select the check box for the feature to be installed and click Next

Page 25: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation25

IMS Explorer Software Install• Click Install

Page 26: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation26

IMS Explorer Software Install• When the installation process completes, click Finish• Click File -> View Installed Packages

Page 27: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Verify your installation of IMS Explorer– Click Start > All Programs > IMS Enterprise Suite Explorer for

Development > IMS Enterprise Suite Explorer for Development

27

Verify IMS Explorer Install

- Select a name for your Explorer workspace directory, click OK

Page 28: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Review IMS Explorer Task Launcher topics– Overview– Getting Started Tasks– DBD and PSB Tasks– SQL and pureQuery Tasks

28

Verify IMS Explorer Install

Page 29: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Click Help on the Explorer toolbar and select Welcome Review Welcome window topics

– IMS Explorer Product and Project Overviews– Importing DLIModel Utility Plug-In Projects– IMS Enterprise Suite Web Resources– First Steps – Create an Explorer Project, Create/Edit PSBs & PCBs,

Visualize IMS DBs and Edit field attributes in DBDs, Create/Run SQL queries to access IMS DBs

– Tutorials via YouTube– Sample DBDs

• C:\Program Files\IBM\IMS Enterprise Suite Explorer for Development_2201\IMS Explorer samples

Review the Welcome panel information and close the window pane

29

Verify IMS Explorer Install

Page 30: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation30

Verify IMS Explorer Install

Page 31: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Experiment with IMS Enterprise Suite Explorer for Development– Visualization of IMS Database Segment Hierarchy

– Modification of DBDs and PSBs

– Creation of Metadata

– Connecting to IMS Control Region

– SQL Access to IMS DBs

– Accessing Metadata in the IMS Catalog

To get started, open the IMS Explorer perspective by clicking – Window > Open Perspective > Other > IMS Explorer

31

IMS Explorer Experimentation

Page 32: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Create an IMS Explorer Project in the IMS Explorer Perspective– From the main menu bar, click File > New > IMS Explorer Project– In the Project name field, type the name of your project

• Ie. User_Group_Lab_2013– Click Next to proceed to the wizard to import IMS resources into the project– Select an Import Source – Local file system, z/OS system, or IMS catalog– Click Next

32

IMS Explorer Experimentation

Page 33: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

– Import an IMS PSB resource into the IMS Explorer Project• Select Add PSB• Select DFSIVP1.txt• Click Open• PSB DFSIVP1 is imported• Referenced DBDs will be

imported automatically, if they are in the same directory as the PSB source file

33

IMS Explorer Experimentation

Page 34: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

–Click Finish–Resources are imported and Java Metadata Classes are generated in the Project

(If the PSB file is valid, Explorer searches for any DBD files that are referenced by the PSB in the same file directory or subfolder within the directory and selects them to be imported into the project. If the imported PSB references any DBDs that are not in the same file directory or subfolder within the directory as the PSB file or that have not been added explicitly, the missing DBDs are listed in the DBDs to import for selected PSBs or DBDs table. Click Add DBD to add the missing DBD files.)

34

IMS Explorer Experimentation

Page 35: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

New IMS Explorer Project : User_Group_Lab_2013

The new project is displayed in the Project Explorer view

You can now create or import the IMS resources that you need to plan, analyze, and make changes to your IMS databases

35

IMS Explorer Experimentation

Page 36: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Import resources to an existing IMS Explorer Project – From the main menu bar, click File > Import >

IMS > IMS Resources …or…

– Right-click on an existing project in the Project Explorer view, then click Import > IMS > IMS Resources

– Click Next to proceed to the wizard to import IMS DBD and PSB resources into the project

– Select the Project name– Select an Import Source – Local file system,

z/OS system, IMS catalog

– Click Next

36

IMS Explorer Experimentation

Page 37: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

– Select Add DBD– Select AUTODB.dbd– Click Open

37

IMS Explorer Experimentation

Page 38: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

– The DEALERDB DBD within the AUTODB.dbd file is imported

– Referenced DBDs are not pulled in because they are not in the same directory, but the missing DBDs are listed under DBDs to import

– Click Finish– The DBD is imported and the Java

Metadata Classes are generated in the Explorer Project

– Import all remaining sample DBDs via the Add DBD function• AUTOLDB.dbd• EMPDB2.dbd• EMPLDB2.dbd

38

IMS Explorer Experimentation

Page 39: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

After the IMS resource import are finished– PSB and DBD source is imported and parsed

– IMS Program definition model generated for PSBs in the “PSB” folder

– IMS Database definition model generated for DBDs in the “DBD” folder

– IMS Universal Driver metadata generated for PCB DatabaseView

– Imported and Generated PSB and DBD Source is stored in the Package

39

IMS Explorer Experimentation

Page 40: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

IMS Explorer Project & Package: User_Group_Lab_2013

40

IMS Explorer Experimentation

Page 41: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

From the Project Explorer or package Explorer panel - double click the DBD …or… right click the DBD name > Open With > IMS DBD Editor– Visualizes an IMS database structure and segment hierarchy

– Visualizes the database structure of logical relationships and indexes• For a logical DBD, the view shows concatenated segments • A concatenated segment represents segments from two DBDs that are

associated through a logical relationship • A concatenated segment can be accessed by application programs as a

segment in a physical DBD– Displays the properties / attributes for a DBD, database segment or a field in a

segment

– Use the visualization to plan and design database changes to support application requirements

41

Visualization of IMS Databases

Page 42: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation42

Visualization of IMS Databases Right click the DBD

name > Open With > IMS DBD Editor

or

Double click on the DBD name

Page 43: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation43

Visualization of IMS Databases

Click on the graphical DBD name: IVPDB1, the segment A1111111 or the various fields to see the “Properties” of each

Page 44: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation44

Visualization of IMS Databases

DBD

Page 45: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation45

Visualization of IMS Databases

SEGMENT

Page 46: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation46

Visualization of IMS Databases

FIELDS

Page 47: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation47

Visualization of IMS Databases

Logical Database modeler view

– This mode shows the different data structures that are possible given the existing secondary indexes and logical relationships that are defined for a given DBD

– Logical relationships: segments labeled as logical child segments are part of a logical relationship

– Secondary indexes: segments labeled as targets of a secondary index are defined in the DBD as secondary index target segments

Page 48: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation48

Visualization of IMS Databases Logical database visualization shows concatenated segments

Page 49: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation49

Visualization of IMS Databases Logical relationship between physical database and logically related database

– Graphically represented by an arrow from the bottom of the logical parent segment to the top of the logical child segment.

Page 50: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Add or Edit Fields in a DBD– From the Project Explorer, right click the DBD name > Open With >

IMS DBD Editor– From the IMS DBD editor, right-click the segment name that contains the

physical DBD field(s) you want to add or edit and click Add or Edit Fields

– The Add or Edit Fields for Segment xxxxxxxx wizard opens with the unmapped fields (fields that are not yet part of a map) displayed

– Optional: In the Add or Edit Segment Maps wizard, select the Segment Map and Map Cases that contains the field that you want to add or edit

50

Modification of DBDs and PSBs

Page 51: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation51

Modification of DBDs and PSBs

Page 52: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation52

Modification of DBDs and PSBs Add a new physical DBD field or edit or remove an existing field

Page 53: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation53

Modification of DBDs and PSBs Modify the <empty> field to assign a Name and an Alias

– Double click the <empty> Name cell

Click Next

Page 54: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Click the IMS field radio button

Modify the Field name, the Alias and the IMS data type

Click Next

54

Modification of DBDs and PSBs

Page 55: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation55

Modification of DBDs and PSBs

Modify the Data type, the Length and the Converter type

The fill in the Character encoding field

Click Finish

Page 56: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation56

Modification of DBDs and PSBs

Review field modifications

Click Finish

Page 57: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

At the IMS DBD Editor pane, note the new “MYFLD” field in the MODEL segment

57

Modification of DBDs and PSBs

Page 58: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Save the changes to your DBD by pressing <Ctrl+S>

Review the DBD source code changes– From the Package Explorer

– Expand the DBD Source directory > expand the Generated Source

– Double click DEALERDB to review the generated DBD source code

58

Modification of DBDs and PSBs

Page 59: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Verify that the field at offset 34 now has a NAME of MYFLD

59

Modification of DBDs and PSBs

Page 60: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Edit or Add PCBs in a PSB– You can modify properties in PSBs and associated PCB statements by using the PSB

summary page and the IMS PCB editor in IMS Explorer.– From the Project Explorer, open the DFSIVP1 PSB by double-clicking the DFSIVP1.psb

program definition model

60

Modification of DBDs and PSBs

Page 61: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Edit the PSB and PCB statements that are associated with the DFSIVP1 PSB– Specifying an alternate PCB

An alternate PCB statement describes an alternate message destination where a message can be sent when the destination of a message differs from the place where it was entered. Use the alternate PCB statement section of the PSB summary page to create or modify an alternate PCB statement.

– Creating or modifying full-function or Fast Path database PCBsUse the full-function or Fast Path database PCB statement section of the PSB summary page to create or modify a full-function or Fast Path database PCB statement.

– Creating or modifying GSAM database PCBsGeneralized sequential access method (GSAM) databases are sequentially organized databases that are designed to be compatible with z/OS® data sets. Use the GSAM database PCB statement section of the PSB summary page to create or alter a GSAM database PCB statement. The GSAM database PCB statement defines a view that controls how application programs can access the GSAM database.

61

Modification of DBDs and PSBs

Page 62: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Edit the PSB and PCB statements that are associated with the DFSIVP1 PSB– Specifying PSB generation properties

Use the PSB generation statement section of the PSB summary page to specify property values for the PSBGEN statement, which describes the characteristics of an application program.

– Specifying segment sensitivityYou can use the IMS PCB editor to define which segments an application program is sensitive to in the database program communication block (PCB) for the hierarchy that contains those segments. An IMS application program can access only data to which it is sensitive. Segment sensitivity can prevent an application program from accessing all the segments in a particular hierarchy. The sensitivity tells IMS which segments in a hierarchy the program is allowed to access.

– Specifying field sensitivityYou can use the IMS PCB editor to define which fields an application program is sensitive to in the database program communication block (PCB) for the hierarchy that contains those fields. An IMS application program can access only data to which it is sensitive. Field sensitivity can prevent an application program from accessing all the fields in a particular hierarchy. The sensitivity tells IMS which fields in a hierarchy the program is allowed to access.

62

Modification of DBDs and PSBs

Page 63: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Edit or Add PCBs in a PSB– After you have modified the PSB and/or PCB(s), save your modifications by

pressing <Ctrl+S> • If there are unsaved changes, an asterisk (*) is displayed in the PSB tab

– When changes are saved in the PSB summary page or the IMS PCB editor, IMS Explorer generates a Java metadata class (DLIDatabaseView) for the PSB and a PSB source file

– The generated Java metadata class is located in the Project Explorer, under a package named after the PSB name (you can use the Java metadata class to connect to an IMS database from the Data Source Explorer in IMS Explorer, or to develop Java applications for IMS)

– The generated PSB source file is located in the Package Explorer, under Package name > PSB Source > Generated Source

– To connect to an IMS database using the IMS Explorer, you must generate a Java metadata class that provides the application view of the IMS database specified by a program specification block (PSB) and its related Program Control Blocks (PCBs). A Java metadata class is also required to develop Java applications for IMS.

63

Modification of DBDs and PSBs

Page 64: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Review the PSB source code changes– From the Package Explorer– Expand the PSB Source > expand the Generated Source – Double click DFSIVP1 to review the generated PSB source code

64

Modification of DBDs and PSBs

Page 65: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Connect to an IMS DB System For SQL Access– The IMS Connect, CSL (SCI and OM components), and ODBM tasks must be

installed, configured, and executing within the IMSplex

– In the Data Source Explorer, right-click the Database Connections folder, and click New

65

Connecting to an IMS DB Control Region

Page 66: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Build the New Connection Parameters– Select IMS as the database manager

– Select IMS V12 Universal JDBC Driver Default as the JDBC driver

– Enter the following connection Properties• Connection name: IMS USER GROUP LAB• Data Store: IMSB• Host: zserveros.demos.ibm.com• Port number: 7013• User name: IMPOTxx (where xx = 60,or 61,62,63…72)• Password: IBM12POT

– Scroll down and enter the Metadata source• Local IMS Explorer project

– Project: User_Group_Lab_2013 (Project name you used)– PSB: DFSIVP1

66

Connecting to an IMS DB Control Region

Page 67: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation67

Connecting to an IMS DB Control Region You need to use

specific connection properties based on the IMS system you connect to.

You can select to use metadata from a Local file system, Local IMS Explorer project, or from the IMS Catalog (if a catalog is enabled and populated)

Test Connection Click Finish

Page 68: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Access to IMS Databases Using SQL – In the Data Source Explorer,

expand Database Connections > expand IMS LAB DB and all sub-levels

– Right click the A1111111 table, then click Data, then click Return All Rows or Sample Contents to retrieve sample data from the A1111111 segment in the IVPDB1 IMS DB

68

SQL Access to IMS Databases

Page 69: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation69

SQL Access to IMS Databases

In the SQL Results tab, several windows of information are returned from the call: – SQL call Status

– Actual SQL call executed

– Results Set

Page 70: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation70

SQL Access to IMS Databases

Create a Data Development Project to create/run custom SQL calls and scripts– Click File > New > Other >

Data > Data Development Project

– Click Next

Page 71: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation71

SQL Access to IMS Databases– Enter a Project name:– Click Next

– Use existing connection or create new connection

– Click Finish

– Click Yes

Page 72: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation72

SQL Access to IMS Databases From the Data Project Explorer, expand the UserGroupLabScriptProject project you created

–Create an SQL Script• Right click the SQL Scripts folder > New > SQL or XQuery Script

• Enter a name for the Script (ie. INSERT)• Click Finish

Page 73: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation73

SQL Access to IMS Databases

– In the opened INSERT.sql window, key in your INSERT SQL values:

• INSERT INTO PCB01.A1111111 VALUES (‘1234567890’,’0987654321’,’0001112222’,’7777777’,’333’)

– Replace ‘1234567890’ with last name and ‘0987654321’ with first name– Replace ‘0001112222’ with phone #, ‘7777777’ with zipcode, and ‘333’ with filler value– If needed, look at the DBD for the A1111111 segment layout

Page 74: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation74

SQL Access to IMS Databases Create an SQL statement using the SQL Query Builder

– Right click the SQL Scripts folder > New > SQL or XQuery Script– Enter a name for the Script (ie. SELECT) and choose the statement type

– Click Finish

Page 75: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation75

SQL Access to IMS Databases

Right click in the middle window to Add Table and then use the pop-up menu

– Choose the table you want to SELECT data from (ie. PCB01 A1111111)

– Click OK

Page 76: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation76

SQL Access to IMS Databases

Basic SQL call formatted

Choose the fields in the table you want returned

Right click in the SELECT.sql window > Run SQL

Use <CRTL-S> to save your script

Page 77: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation77

SQL Access to IMS Databases SQL call results

Experiment with SELECT, INSERT, UPDATE, DELETE– Please DELETE any data you add to the IVPDB1 database – Thank You!

Take what you have learned back to your office and share with others– Open your IMS Explorer project and build a connection to your IMS test datastore– Access your IMS data using SQL calls– Enable and populate the IMS Catalog

• Import IMS resources into Explorer from the Catalog• Use the database metadata stored in the Catalog for SQL calls from Explorer

– With IMS Explorer, import COBOL copybook and/or PL/I include data structures into DBDs

Page 78: IMS Explorer Lab Presentation - IMS UG May 2013 Philadelphia

Advanced Technical Skills (ATS) North America

© 2010 IBM Corporation

Accessing Metadata in the IMS Catalog– For you to do on your test system !!!!!

78

Accessing Metadata in the IMS Catalog