ims 13 db and dbrc enhancements - ims ug hartford & boston 10-2013

69
IMS 13 Database and DBRC: Greater Resiliency for Your Data Session Number IMS-2566 Nancy G. Stein IBM / Advanced Technical Skills IMS [email protected] © 2013 IBM Corporation PREVIEW for IMS User Groups

Upload: ibm-ims

Post on 20-May-2015

278 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

IMS 13 Database and DBRC: Greater Resiliency for Your Data

Session Number IMS-2566

Nancy G. Stein

IBM / Advanced Technical Skills – IMS

[email protected]

© 2013 IBM Corporation

PREVIEW for

IMS User Groups

Page 2: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

2

IMS 13 Database and DBRC Enhancements

• Database Versioning

• HALDB Alter

• DEDB Alter

• FP Secondary Index Enhancements

• DBRC Enhancements

Page 3: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

IMS 13 Database Versioning

Page 4: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Database Versioning

• IMS 13 allows application programs to use different versions of

the same physical database

o Multiple views of the physical data are maintained in the IMS

catalog

o Application programs can use different views of the same physical

IMS database

• Benefit

o Customers can support multiple versions of an IMS database

o Physical database structure can be changed without having to

modify all the exiting application programs using the database

4

Page 5: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Database Versioning Overview

• Provides the ability to assign user-defined version identifiers

to different versions of an IMS database structure

• Enables structural changes to a database while providing

multiple views of the physical IMS data to various

applications

• Applications referencing a new physical database structure

can be brought online without affecting applications that use

previous database structures

• Applications not requiring sensitivity to the new physical

database structure can continue to access the database

without any modifications or recompilation

5

Can be used in conjunction with IMS 13 Database ALTER function.

Page 6: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Database Versioning Overview (cont’d) • Database Versioning supports the following database types

o DEDB

o HDAM

o HIDAM

o PHDAM

o PHIDAM

• Database Versioning supports the following structure

changes to a database

o For all supported database types

• Increasing the length of a segment

• Adding a new field to undefined space at the end of a

segment

o For Full-Function and HALDB database types only

• Adding a new field that defines an alternative mapping of

bytes in a segment

6

Page 7: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

• Database Versioning requires IMS catalog enablement

o DBD version definitions must be stored in the IMS catalog

• Populate catalog with DBD version definitions

• All systems in an IMSplex must be running IMS 13

o DBRC MINVERS value of “13.1” required

Database Versioning Overview (cont’d)

7

Page 8: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

• Before Database Versioning is enabled for a database

o IMS continues to only recognize the current active database

definition

• Version numbers must be maintained in incremental values

o Specified on the DBD

• Applications programs can specify a desired database version

o System default setting

o PSB setting

o PCB in the PSB

o DL/I INIT call

Database Versioning Overview (cont’d)

8

Page 9: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

• DFSDFxxx PROCLIB: new keywords in DATABASE section

o DBVERSION= new keyword to enable database versioning

o DBLEVEL= new keyword to indicate default DB version to be used

• Database and Program Generation Statements

o DBD: DBVER= database version number

o PCB: DBVER= database version number

o PSBGEN: DBLEVEL= new parameter used to override the default

version specified in DFSDFxxx PROCLIB member

• “INIT VERSION” DL/I Call

o Access a specific version of the database

o Override the version number specified on the PCB statement

o Must be issued before issuing a DL/I call to the database

Database Versioning Implementation

9

Page 10: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Implementation – DFSDFxxx PROCLIB Member

• New keywords added to DATABASE section

o DBVERSION = Y | N

• Enables database versioning

• Database versioning is disabled by default

o DBLEVEL = CURR | BASE

• Ignored when DBVERSION=N

• CURR (default)

• IMS returns data from all databases using the current DBD

version, which is the current physical level, unless a specific

version is specified

• BASE

• IMS returns data from all databases using the lowest DBD

version number retrieved from IMS Catalog, unless a specific

version is specified

10

Page 11: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Implementation – DBD Generation Statement

• New parameter added to DBD Statement

o DBVER=n

• Specifies a DBD version number to be associated with a database

structure change

• Supports ACCESS types DEDB, HDAM, HIDAM, PHDAM & PHIDAM

• Numeric values from 1 – 2147483647 (2 Gigs)

11

Page 12: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Implementation – PCB in PSB Generation Statement

• New parameter added to PCB Statement

o DBVER=n

• Specifies the version of the DBD to use when accessing the database

• Must match a defined DBD version number stored in the IMS catalog

• If multiple PCBs within a PSB refer to the same database, each PCB

must specify the same DBD version number

• Numeric values from 0 – 2147483647 (2 Gigs)

• If not specified, the DBD version used depends on DBLEVEL= parm in

the PSBGEN statement or the DFSDFxxx PROCLIB member

12

Page 13: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Implementation – PSB Generation Statement

• New parameter added to PSBGEN Statement

o DBLEVEL=CURR | BASE

• Specifies the default database version level returned to programs using

this PSB and not requesting specific database versions

• DBLEVEL=CURR

• PCBs within the PSB which do not specify a DBVER= parm will

access the database using the current physical structure

• DBLEVEL=BASE

• PCBs within the PSB which do not specify a database version on

the DBVER parameter will use the lowest base version from the

IMS catalog

• Overrides the default setting for DBLEVEL specified in DFSDFxxx

PROCLIB member

13

Page 14: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Implementation – DL/I INIT Call

• New VERSION function added to the INIT call interface

o Program specifies the database name(s) and the DBD version(s) to

use when accessing the database(s)

o Specified version number must match a version number defined on

a DBD for the named database and stored in the IMS catalog

o Takes precedence over all other version number specifications and

defaults (ie. PCB statement, PSBGEN statement, DFSDFxxx)

o INIT call for versioning database(s) has to be executed prior to the

first DL/I database call(s) but not before first “GU” call to IOPCB

o Can only issue one INIT VERSION call for a specific database

within an application

14

Page 15: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Implementation – DL/I INIT Call (cont’d)

• I/O Area contains the VERSION call function

o “VERSION(dbnameA=version#,…,dbnameZ=version#,…)”

• dbname: specifies a physical database name

• version: specifies a DBD version number to be used when accessing the database

• separate sub-parameters with a comma

• no duplicates allowed

15

Page 16: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

16

Customer Account Segment

Account Number

• BASE version of the customer account segment

• Segment is fixed length

• No space remaining for new Rewards Points field

Member Name Balance Credit Limit

Versioning Example

Page 17: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

17

Customer Account Segment

Account Number

• New version of the customer account segment defined in DBD

o Expands the length of the segment

o New field called “Reward Points” defined in expanded space

• Existing applications are not updated

o Existing applications do not have to know the new field exists

o Existing applications do not see or update the new field

Member Name Balance Credit Limit Reward Points

New Segment Version

Page 18: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

18

• Application scheduled using the BASE version of the database

o Read a Customer Account segment

o Update the Balance to 2,000,000 with a REPL call

• Only the credit balance field is changed

• Reward points field is left unchanged

Account Number Member Name Balance Credit Limit

555555 Vern Watts 100,000 5,000,000

Reward Points

50,000

Customer Account segment before replace

Account Number Member Name Balance Credit Limit

555555 Vern Watts 200,000 5,000,000

Reward Points

50,000

Customer Account segment after replace

Segment READ/REPLACE Behavior

Design Change - See PM82346 (DEDB) & PM89215 (FF/HALDB)

Page 19: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Database Version Determination

• If database versioning is enabled, the database version used to return the IMS data to a program is determined as follows:

DFSDFxxx DATABASE Section DBLEVEL= parameter

PSBGEN Statement DBLEVEL= parameter

PCB Statement DBVER= parameter

DL/I “INIT VERSION" call

19

DL/I INIT VERSION call takes precedence over all other database version number specifications and defaults

Page 20: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

IMS V13 HALDB Alter

Page 21: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter

• IMS 13 provides ability to make structural changes to a

HALDB database without a database outage

o Structural changes can be made to DB segment definitions

o HALDB Online Reorganization is used to apply the structural changes to the online database

o Online Change process is used to activate the new ACBLIB member(s) in the online IMS system

• Benefit

o Eliminate a database outage when structural changes must be made to segment definitions in a DBD

o Improved online availability of HALDB databases

21

Page 22: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Overview

• Structural changes can be made to online HALDB databases

o PHDAM

o PHIDAM

• Types of structural changes

o Add a new field to space at the end of an existing segment

o Define new fields to remap fields and space in an existing segment

o Increase the length of an existing segment

22

A

C B

A

B C

Page 23: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

FIELD 1

FIELD 1

FIELD 2 Space

FIELD 2 New

FIELD 3

Add a new field to space at the end of a segment Example 1

Example 2

FIELD 1

FIELD 1 FIELD 2

FIELD 2 Space

New FIELD 3

Sp.

Sp.

23

BASE

V2

V2

BASE

Page 24: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

FIELD 1

FIELD 1

FIELD 2

Sp FIELD 2

Define new fields to remap fields & space in a segment Example 1

Example 2

FIELD 1

FIELD 1 FIELD 2

FIELD 2

FIELD 2A FIELD 3A FIELD 2B

FIELD 3B

Space

Space

FIELD 2A FLD 3A

FLD 4

24

FIELD 3 Sp.

FIELD 3 Sp.

V2

V3

V2

V3

Page 25: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

FIELD 1

FIELD 1

FIELD 2

Space FIELD 2

Example 1

Example 2

FIELD 1

FIELD 1 FIELD 2

FIELD 2

pace

FIELD 2A New

FIELD 3 FIELD 2B

Sp

FIELD 2A

Sp. Space

Space

Increase the length of an existing segment

25

FIELD 3A

Sp FIELD 3A FLD

4

FIELD 3B FLD 3A

V3

V4

V3

V4

FLD 4

pace FIELD 3B FLD 3A

Page 26: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Overview (cont’d)

• After changes are made to DBD segment definitions

o Online Reorganization (OLR) is used to alter the online

database from the current structure to the new structure

• DB unload / reload not required

• Type-2 INITIATE OLREORG

o Online Change (OLC) is used to activate the changed

ACBLIB members in the IMS online system

o Application programs can start using the new database

structure

26

Page 27: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Preparation

• Change the DBD source code

o Define new fields in space at the end of segment(s)

• Specify new FIELD statements

o Define new fields to remap existing fields & space in a segment(s)

• Specify new FIELD statements

o Increase the length of a segment(s)

• Specify new length in the BYTES= parameter of SEGM statement

• Run DBDGEN

o Modified DBD source used as input

• Run PSBGEN(s) (if needed)

o Modified PSB source used as input

• Run ACBGEN

o Create a new member in a staging ACBLIB

• Modify or code new application programs to use new fields

27

Page 28: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Online Process

• Use Online Reorg to alter the structure of a HALDB database

o INITIATE OLREORG NAME(masterdb) OPTION(ALTER)

• Reads the new DBD from a staging ACBLIB

• Applies structural changes to the online HALDB database

o All database partitions are included in the reorg process

o Type-2 TERM OLREORG or Type-1 /TERM command allowed

while the database structure change is in progress

o INIT OLREORG with OPTION(ALTER) command will restart the

database structure change where it left off

28

Page 29: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Online Process (cont’d)

• Stop access to the altered HALDB database

o Use Type-2 UPDATE or Type-1 /DBR command

• Issue Online Change commands to complete the alter process

for the changed ACBLIB member(s)

• Start access to the altered HALDB database

• Implement new or modified application programs

29

For application programs accessing the altered database:

Until OLC is completed, IMS reads the database using

the unaltered DBD and returns the unaltered segment structure

New HALDB database structure can now be used by modified or

new application programs needing the new segment fields

Page 30: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Operational Considerations

• Software Requirements

o All systems in an IMSplex must be running IMS 13

• DBRC MINVERS value of “13.1” required

o Type-2 Command environment required

• Common Service Layer (CSL)

• Structured Call Interface (SCI)

• Operations Manager (OM)

• Type-1 /INITIATE OLREORG command is not supported

• OLR processing is done for all partitions in a HALDB database

• Member OLC is recommended to bring the new ACBLIB online

• Several new DBRC commands & modified LIST outputs

30

Page 31: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

IMS 13 DEDB Alter

Page 32: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

DEDB Alter

• IMS 13 adds ability to dynamically modify a DEDB Area while

the Area remains online

o Alter the physical attributes of a DEDB Area

• SIZE, UOW, or ROOT specifications

o Change the randomizer used for a DEDB Area

• Benefits

o Improved DEDB Area availability

• Make definitional modifications without taking the Area offline

o Improved management of DEDBs

• Provide flexibility in implementing Area changes into the system

• Eliminate system down time for DEDB definition changes

32

Page 33: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

DEDB Alter Overview

• A new DEDB Alter utility is provided to dynamically modify a

DEDB database

o Runs as a standard Fast Path IFP utility

o DEDB Areas remain online during utility execution

• A 2-stage randomizer must be used

o Enables areas to be processed individually

• DEDB alter does not support DEDB databases in VSO or SVSO

mode

o Must be unloaded with /VUNLOAD before executing Alter utility

• DEDB areas to be altered must be registered to DBRC

• DBRC MINVERS value in RECON for all IMS subsystems that

share the DEDB area must be "13.1" or later

33

Page 34: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Fast Path IFP Utility for DEDB Alter

• TYPE ALTER o Invokes the DEDB Alter utility

• ALTERAREA area_name | REPLRAND o ALTERAREA area_name

• Modify the active DEDB AREA statement

• SIZE, UOW, ROOT, RMNAME

o REPLRAND

• Modify the active DEDB DBD statement

• RMNAME

• Prep work needed for ALTERAREA and REPLRAND o Modify the DEDB DBD (ie. AREA or RMNAME parameters)

o Assemble and bind any new randomizer (if being changed)

o Run the DBDGEN utility to create new DEDB DBD definitions

o Run the ACBGEN utility for all PSBs that reference the changed DEDB DBD

definitions to the staging ACBLIB

o Allocate and register to DBRC “Shadow Area” and “Shadow IC” data sets

34

Page 35: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Run DEDB Alter Utility - ALTERAREA Function

• ALTERAREA area_name

o Change SIZE, UOW and ROOT values to increase the size of DEDB Area

while DEDB Area remains online

• SIZE - Change the CI size of an Area dataset in a DEDB database

• UOW and ROOT - Change the Root Addressable and Independent

Overflow parts of an Area in a DEDB database

• During DEDB Alter execution

• Migrate Active Area to Shadow Area with new space definitions

• After DEDB Alter completes

• Shadow Area data set promoted to Active Area data set

• Old Active Area data set demoted to Shadow Area data set

o Only one active DEDB Area can be Altered at a time

• Concurrent DEDB Alter for an Area in same DEDB database is not supported

• Concurrent DEDB Alter for an Area in another DEDB database is supported

o ALTERAREA does not support DEDB databases with SDEPs

o ALTERAREA supports randomizer change while altering an Active Area

35

Page 36: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Run DEDB Alter Utility - REPLRAND Function

• REPLRAND

o Change Randomizer in RMNAME of DEDB DBD while DEDB online

• Existing Area randomizer must be a 2-stage randomizer

• New Area randomizer must be 2-stage randomizer

• New randomizer name must be different from original name for the Area

• During DEDB Alter execution

• Read the active DEDB Area with the old randomizer

• Migrate Active Area to Target Area with new randomizer

• After DEDB Alter completes

• New randomizer replaces old randomizer

• All Areas in DEDB database use new randomizer

o Only one active DEDB Area can be changed at a time

• Concurrent DEDB alter for another Area in same DEDB is not supported

• Concurrent DEDB Alter for an Area in another DEDB database is supported

o REPLRAND supports DEDB databases with or without SDEPs

36

Page 37: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Secondary Index Enhancements

Page 38: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Fast Path Secondary Index Enhancement

• IMS 13 includes the DEDB secondary index support

enhancements that were added by several IMS 12 APARs

o Add ability to use Boolean Operators in SSAs (Segment Search

Arguments)

• AND * or &

• OR + or |

o Support specific Command Codes with Secondary Index field

searches

• Supported: C, D, F, L, N, P, Q, U, V, - (NULL)

• Unsupported: A, G,M, O, R, S, W, Z

• Benefits

o New and simplified programming opportunities with DEDBs

• Allows ability to refine DL/I calls to Fast Path DEDBs

• Command codes supported when secondary index accessed as a DEDB

38

Page 39: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

IMS 12 PTFs Forward Fitted to IMS 13

IMS12 APAR IMS12 PTF Description

PM59166 UK81798 Boolean Operator support for Fast Path

Secondary Index DL/I calls

PM49031 UK81799 Command Code, Multiple SSA, Qualified Get

Call support for FP Secondary Index DL/I calls

(Target Segment = Root)

PM59181 UK91477 Command Code, Multiple SSA, Qualified Get

Call support for FP Secondary Index DL/I calls

(Target Segment ≠ Root)

39

Page 40: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Boolean Support: AND = * or &, OR = + or |

Target & Source

HOSPITAL

WARD

PATIENT SKILL

CLERK

Example Statement Result

GU HOSPITAL (IXSAIDX =Elm Street |

IXSAIDX =Doe Street) Get the Hospital

information for the hospital

on “Elm Street” or “Doe

Street”.

Note: Boolean operators work with FPSI accessed as a database (ACCESS=INDEX)

40

Page 41: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Supported Command Codes

Command

Code

Explanation

C Use the concatenated key of a segment to identify the segment

D Retrieve or insert a sequence of segments in a hierarchic path using only one call, instead

of using a separate (path) call for each segment.

F Back up to the first occurrence of a segment under its parent when searching for a

particular segment occurrence. Disregarded for a root segment.

L Retrieve the last occurrence of a segment under its parent.

N Designate segments that you do not want replaced when replacing segments after a Get

Hold call.

P Set parentage at a higher level than what it usually is (the lowest-level SSA of the call).

Q Reserve a segment so that other programs cannot update it until you have finished

processing and updating it.

U Limit the search for a segment to the dependents of the segment occurrence on which

position is established.

V Use the hierarchic level at the current position and higher as qualification for the segment.

- Null. Use an SSA in command code format without specifying the command code.

41

Page 42: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Unsupported Command Codes

Command

Code

Explanation

Status

Code

A Clear positioning and start the call at the beginning of the

database

AJ

G Prevent randomization and search the database

sequentially

AJ

M Move a subset pointer to the next segment occurrence

after your current position

AJ

O Qualify by Position AD

R Retrieve the first segment occurrence in a subset AJ

S Unconditionally set a subset pointer to the current

position

AJ

W Set a subset pointer to your current position, if the subset

pointer is not already set

AJ

Z Set a subset pointer to 0, so it can be reused AJ

42

Page 43: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

IMS 13 DBRC Enhancements

Page 44: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

DBRC Coexistence with IMS 13

• DBRC Coexistence SPEs

o IMS 11 APAR PM53134 / PTF UK80026

o IMS 12 APAR PM53139 / PTF UK80027

• Upgrade RECON data set to the IMS Version 13

o Issue a CHANGE.RECON UPGRADE command

• MINVERS value must be set to the lowest level of IMS that uses

or shares the RECON data sets

o IMS 11 “11.1”

o IMS12 “12.1”

o IMS 13 “13.1”

44

Page 45: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

DBRC Support for HALDB Alter

• INIT.PART command enhanced with new functionality for the

BLOCKSIZE keyword

o Use this keyword to define Control Interval (CI) sizes for VSAM data sets

• CHANGE.PART command enhanced with a new keyword, ALTERSZE

o Used before HALDB alter to specify new partition block sizes or CI sizes

• CHANGE.DB command enhanced with two new keywords (ALTER or

NOALTER)

o Used to change the HALDB partition status to indicate it is being altered

o Status cannot be changed if the partition is authorized

• The NOTIFY.REORG command is enhanced with an ALTER keyword

o Used to indicate the online reorganization process is altering a HALDB

• An "ALTER" indicator is added to the reorganization (REORG) record

45

Page 46: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

DBRC Support for HALDB Alter (cont’d)

• DB (TYPE=HALDB) record is changed

o Two counter fields are added to Indicate the number of partitions to be

altered and the number of partitions that have been altered

• DB (TYPE=PART) record is changed

o Two new flags added to indicate the partition is being altered and to

indicate the alter process has completed

o An array of new OSAM block sizes / VSAM CI sizes added and used

during the HALDB alter process

o Record size increased by 80 bytes when the HALDB alter process is active

and the offset of a new array of OSAM block sizes or VSAM CI sizes is not

zero

• Several DBRC API requests are enhanced to provide the new

information stored in the RECON data sets

46

Page 47: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

DBRC Support for DEDB Alter

• INIT.ADS command is enhanced with new SHADOW and

SHADOW IC keywords

o Use to register shadow area data sets and shadow image copy

data sets to DBRC

• DBDS (TYPE=FP) record is enhanced

o Two counters are added to show the number of available shadow

data sets and the number of shadow data sets that are registered

to DBRC

o A list of the shadow area data sets is added

• DB (TYPE=DEDB) record is enhanced

o New counter field indicates DEDB alter is active

47

Page 48: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Communities

• On-line communities, User Groups, Technical Forums, Blogs, Social networks, and more

o Find the community that interests you …

• Information Management bit.ly/InfoMgmtCommunity

• Business Analytics bit.ly/AnalyticsCommunity

• Enterprise Content Management bit.ly/ECMCommunity

• IBM Champions

o Recognizing individuals who have made the most outstanding contributions to Information Management, Business Analytics, and Enterprise Content Management communities

• ibm.com/champion

48

Page 49: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Become Part of Our Community!

bit.ly/IMS_YouTube

twitter.com/IBM_IMS Twitter.com/IMSTWIT

imsmadesimple.tumblr.com facebook.com/IMSFans

imslistserv.bmc.com ibm.co/IMS_dWBlogs

linkd.in/IBM_IMS

www.slideshare.net/ibmims

ibm.com/vrm/newsletter/11069

ibm.co/IMS_RUGs

49

Page 50: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Thank You Your feedback is important!

• Access the Conference Agenda Builder to complete your session surveys

o Any web or mobile browser at http://iod13surveys.com/surveys.html

o Any Agenda Builder kiosk onsite

IMS 13 Database & DBRC Enhancements

Session

IMS-2566

IMS 13 TM Enhancements

Session

IMS-2561

IMS 13 System Enhancements

Session

IMS-2564

50

Page 51: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Acknowledgements and Disclaimers Availability. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates.

The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.

© Copyright IBM Corporation 2013. All rights reserved.

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

IBM, the IBM logo, ibm.com, zOS, IMS, DB2, CICS, InfoSphere, WebSphere, RACF, System z, zEC12, zBC12, z196, z10EC, zBX, zIIP, zAAP, ICF, and SoftwareXcel are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml

Other company, product, or service names may be trademarks or service marks of others.

51

Page 52: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

52

BONUS SLIDES

52

Page 53: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

53

IMS 13 Database Versioning

53

Page 54: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Solution Overview – Current Flow

DBJK21 DBJK22 DBJK23

Application

DBJK21

DBJK22

DBJK23

IMS

DBJK21 DBJK22 DBJK23

ACBLI B

DBJK21 V0 DBJK22 V0 DBJK23 V0

IMS Catalog

DBJK21 DBJK22 DBJK23

DBDLIB

PSBJK

PSBLIB

PSBGEN -------------------------- PCB -------------------------- DBJK21 DBJK22 DBJK23

PSB=PSBJK Source

DBJK21

DBD Source

DBJK22

DBJK23

DBDGEN

PSBGEN

DBJK21 DBJK22 DBJK23

DLI Active

ACBGEN

No Version numbers on DBDs

-> Catalog entries

have version “V0”

Database Versioning not enabled ->

data returned to app at physical level

54

Page 55: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Solution Overview – Database Versioning Flow #1

DBJK21 DBJK22 DBJK23

Application

IMS

DBJK21 V1 DBJK22 V1 DBJK23 V1

ACBLI B

DBJK21 V0,V1 DBJK22 V0,V1 DBJK23 V0,V1

IMS Catalog

DBJK21 V1 DBJK22 V1 DBJK23 V1

DBDLIB

PSBJK

PSBLIB

PSBGEN -------------------------- PCB -------------------------- DBJK21 V0 DBJK22 DBJK23 V1

PSB=PSBJK Source

DBJK21 V1

DBD Source

DBJK22 V1

DBJK23 V1

DBDGEN

PSBGEN

DBJK21 V0 DBJK22 V1 DBJK23 V1

DLI

Retrieve DBJK21 from Catalog

DBJK21 V1 DBJK22 V1 DBJK23 V1

Active

ACBGEN

Version “V1” of DBDs put into

ACBLIB & Catalog

Database Versioning enabled -> data

returned to app at V0 & V1 levels

DBJK21

DBJK22

DBJK23

55

Page 56: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Solution Overview – Database Versioning Flow #2

DBJK21 DBJK22 DBJK23

Application

IMS

DBJK21 V2 DBJK22 V2 DBJK23 V2

ACBLI B

DBJK21 V0,V1,V2 DBJK22 V0,V1,V2 DBJK23 V0,V1,V2

IMS Catalog

DBJK21 V2 DBJK22 V2 DBJK23 V2

DBDLIB

PSBJK

PSBLIB

PSBGEN DBLEVEL=BASE -------------------------- PCB -------------------------- DBJK21 V1 DBJK22 DBJK23 V2

PSB=PSBJK Source

DBJK21 V2

DBD Source

DBJK22 V2

DBJK23 V2

DBDGEN

PSBGEN

DBJK21 V2 DBJK22 V2 DBJK23 V2

DBJK21 V1 DBJK22 V0 DBJK23 V2

DLI

Retrieve DBJK21 & DBJK22 from Catalog

Active

ACBGEN

DBJK21

DBJK22

DBJK23

Version “V2” of DBDs put into

ACBLIB & Catalog

Database Versioning enabled -> data

returned to app at V0, V1 & V2 levels

56

Page 57: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

Solution Overview – Database Versioning Flow #3

DBJK21 DBJK22 DBJK23

Application

IMS

DBJK21 V3 DBJK22 V3 DBJK23 V3

ACBLI B

DBJK21 V0,V1,V2,V3 DBJK22 V0,V1,V2,V3 DBJK23 V0,V1,V2,V3

IMS Catalog

DBJK21 V3 DBJK22 V3 DBJK23 V3

DBDLIB

PSBJK

PSBLIB

PSBGEN DBLEVL=CURR -------------------------- PCB -------------------------- DBJK21 V1 DBJK22 DBJK23 V2

PSB=PSBJK Source

DBJK21 V3

DBD Source

DBJK22 V3

DBJK23 V3

DBDGEN

PSBGEN

DBJK21 V3 DBJK22 V3 DBJK23 V3

DBJK21 V3 DBJK22 V2 DBJK23 V1

DLI

Retrieve DBJK22 & DBJK23 from Catalog

Active

ACBGEN

Version “V3” of DBDs put into

ACBLIB & Catalog

Database Versioning enabled -> data

returned to app at V1, V2 & V3 levels

DBJK21

DBJK22

DBJK23

INIT VERSION(DBJK21=3,DBJK22=2,DBJK23=1)

57

Page 58: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

58

IMS 13 HALDB Alter

Page 59: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Example

• DBA updates DBD for database MASTER

o Increases the size of segment B from 30 bytes to 40 bytes

• Run DBDGEN

• Run ACBGENs into staging ACB library

• Make updates to affected application programs

• DBRC CHANGE.PART ALTERSZE() to alter BLK or CI size, if necessary

• Issue INIT OLREORG NAME(MASTER) OPTION(ALTER)

o IMS allocates staging ACBLIB and retrieves new DMB

o IMS builds old input DMB and new output DMB control blocks

• The output DMB blocks are built based on the new DMB in the staging ACBLIB

• IMS allocates the output database data sets

• Backup active ACBLIB members affected by changes

• Stop MASTER DB access

• Perform Online Change

• Implement updated application programs

• Start MASTER DB access

A

B

C

MASTER DB

59

Page 60: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

HALDB Alter Example (cont’d)

• As part of building the input and output DMB blocks, IMS compares the segments and fields and creates a delta block for the differences

• While ALTER is processing, an application program reads “MASTER” looking for segment “B” with KEY1

o When the record is found before the OLR cursor

• IMS reads segment B from the output data set whose size is 40 bytes

o IMS checks the delta table before returning the segment to the application

o Based on the table, IMS uses old DMB and returns 30 bytes of data to the application

Until ALTER and OLC are complete, IMS reads the segment using the old DMB and returns the unaltered segment structure.

60

OLR CURSOR

MASTER DB

Return 30 bytes for Segment B

from the Output data set

IMS Name Input Output

B 30 40

Delta table

Input data sets

Output data sets

OLR

MPP: GU “B” KEY1

KEY1 is before the cursor

Page 61: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

61

IMS 13 DEDB Alter

Page 62: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

62

Preparation for DEDB Alter (cont’d)

• Allocate Shadow Area data sets

o Shadow Area data sets used for migrating existing data from Active Areas

o Single Area Data Sets (SADS)

• Single Shadow data set is required

o Multiple Area Data Sets (MADS)

• 2 to 7 Shadow data sets are required

o SADS can become MADS and MADS can become SADS after DEDB Alter

• Depends on the number of allocated Shadow Area data sets

o Shadow data sets are not accessible by the IMS System

• Accessible to DEDB Alter utility only

• Allocate Shadow IC data sets:

o Created while DEDB Alter migrates data to Shadow Area data sets

62

Page 63: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

63

Preparation for DEDB Alter (cont’d)

• Format Shadow data sets with DEDB Area Init Util (DBFUMIN0)

o Shadow Area data sets and Shadow IC data sets formatted

o Two new control cards:

• ACTIVE = Format Area data sets for DEDB Area

• SHADOW = Format Shadow Area and Shadow IC data sets

o Formats Active or Shadow data sets in one execution, but not both

o When DBRC=Y, formats both Shadow Area and Shadow IC in one execution

• Formats Shadow DSs while associated Area DSs are online

• After utility completes, flags are set in RECON:

o Shadow Area data sets are marked “SHADOW AVAIL”

o Shadow IC Area data sets are marked “SHADOW IC AVAIL”

• Shadow data sets must be formatted

o Before DEDB Alter utility runs

63

Page 64: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

64

DEDB Alter Utility Control Statements

• TYPE ALTER

o Invoke DEDB Alter utility

• ALTERAREA area_name | REPLRAND

• TARGNAME SHADOW | ACTIVE

o SHADOW: The target Area data set is set to the Shadow Area data set

o ACTIVE: The target Area data set is set to the Active Area data set

o Notes:

• With ACTIVE, the Active Area data sets are renamed

• Ignored for REPLRAND functions

• TIMEOUT timeout_value (1-999) | 15 seconds

o # of seconds for DEDB Alter DL/I activity to be quiesced

64

Page 65: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

65

DEDB Alter Utility Control Statements (cont’d)

• RETRY NO | YES | retry_value (1-99)

o NO: Do not retry after TIMEOUT value expires.

o YES: Retry after TIMEOUT value until the utility completes successfully

o retry_value: Number of utility retries after TIMEOUT value occurs

• RETRYWAIT retrywait_value (1-999) | 60

o If RETRY YES or RETRY retry_value

• Number of seconds to wait before retrying the commit process

• GO

o Execute the DEDB Alter utility

65

Page 66: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

66

Post-DEDB Alter Utility Execution

• If DEDB Alter is Successful

o Shadow Area data set is promoted to Active Area data set

• Old active area data set is demoted to SHADOW area data set

o Shadow IC data set is promoted to user Image Copy

• Registered in DBRC as “user image copy”

• Counted as user image copy in GENMAX value

• Not a standard image copy

• Instead, it is an image of Active Area data set

• To recover the Area with this image copy

• (1) Notify DBRC that Area was restored

• NOTIFY.RECOV DBD(name) AREA(name) RCVTIME(time_stamp)

• time_stamp = time when SHADOW IC was created by DEDB Alter utility

• (2) Issue GENJCL.RECOV with no image copy

• GENJCL.RECOV DBD(name) AREA(name) USEAREA

66

Page 67: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

67

Post-DEDB Alter Utility Execution

• If DEDB Alter is Unsuccessful

o Active Area data sets remain active and accessible to IMS systems

o If Shadow Area data sets are marked as AVAIL:

• Shadow Area data sets have not been written to

• Can be used in subsequent DEDB Alter utility executions

o If Shadow Area data sets are marked as UNAVAIL:

• Shadow Area data sets have been written to

• Shadow Area data set must be:

• Re-allocated

• Re-formatted with DBFUMIN0

67

Page 68: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

68

DEDB Alter Utility Execution (REPLRAND)

• Complete preparation steps:

o Assemble and bind new randomizer

o Modify DEDB DBD with new randomizer, run DBDGEN, run ACBGEN

• Execute DEDB Alter Utility (REPLRAND)

1. Load new randomizer from IMS SDFSRESL STEPLIB concatenation

2. Load the new ACB from the Staging ACBLIB

3. Commits new randomizer change

a. Active DEDB database is quiesced causing DL/I calls to be suspended

b. DEDB database is un-quiesced and suspended DL/I calls are resumed

68

Page 69: IMS 13 DB and DBRC Enhancements - IMS UG Hartford & Boston 10-2013

69

Post-DEDB Alter Utility Execution

• If DEDB Alter is Successful

o New Randomizer replaces existing randomizer

• If DEDB Alter is Unsuccessful

o Existing Randomizer remains in effect

69