63
IMS 13 DB and DBRC Enhancements Nancy Stein IBM – IMS Advanced Technical Skills Spring 2013 COIUG and SeMIUG Meetings “IMSTWIT” Insert Custom Session QR if Desired.

IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

  • Upload
    ibm-ims

  • View
    613

  • Download
    4

Embed Size (px)

Citation preview

Page 1: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

IMS 13 DB and DBRC Enhancements

Nancy SteinIBM – IMS Advanced Technical Skills

Spring 2013 COIUG and SeMIUG Meetings

“IMSTWIT”InsertCustomSessionQR if Desired.

Page 2: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Acknowledgements and Disclaimers:

© 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, System z, zEC12, z196, z10EC, zBX, zIIP, zAAP, ICF, SAP, SoftwareXcel, zOS, IMS, InfoSphere, DB2, CICS, RACF and WebSphere, 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.

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.

2

Page 3: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

3

Database Enhancements

• Database Versioning• HALDB Alter• DEDB Alter• FP Secondary Index Enhancements• DBRC Enhancements

3

IMS 13 QPP was just announced in 4Q2012. The QPP Customers are beginning their IMS 13 installs and testing. There is no guarantee that these line items

will be included in the IMS 13 General Availability product.

Page 4: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Database Versioning

Page 5: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Database Versioning

• IMS 13 allows application programs to use different versions of the same physical database• Multiple views of the physical data are maintained in the IMS

catalog• Application programs can use different views of the same physical

IMS database

• Benefit• Customers can support multiple versions of an IMS database• Physical database structure can be changed without having to

modify all the exiting application programs using the database

5

Page 6: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

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

6

Can be used in conjunction with IMS 13 database alter functions.

Page 7: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

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

• DEDB• HDAM• HIDAM• PHDAM• PHIDAM

• Database Versioning supports the following structure changes to a database• For all supported database types• Increasing the length of a segment• Adding a new field to space at the end of a segment

• For Full-Function and HALDB database types • Adding a new field(s) that remap existing field(s) and space in a

segment

7

Page 8: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

• Database Versioning requires enablement of the IMS catalog• DBD version definitions must be stored in the IMS catalog

• Version numbers must be maintained in incremental values• Specified on the DBD

• Applications programs can specify the desired database version• System default setting

• PSB setting

• PCB in the PSB

• DL/I INIT call

Database Versioning Overview (cont’d)

8

Page 9: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

• DFSDFxxx PROCLIB: new keywords in DATABASE section• DBVERSION= new keyword to enable database versioning

• DBLEVEL= new keyword to indicate default version to be used

• Database and Program Generation Statements• DBD: DBVER= database version number

• PCB: DBVER= database version number

• PSBGEN: DBLEVEL= new parameter used to override the default version specified in DFSDFxxx PROCLIB member

• “INIT VERSION” DL/I Call • Access a specific version of the database

• Override the version number specified on the PCB statement

• 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 RUG March 2013 Columbus

Implementation – DFSDFxxx PROCLIB Member • New keywords added to DATABASE section

• DBVERSION = Y | N• Enables database versioning• Database versioning is disabled by default

• 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 RUG March 2013 Columbus

Implementation – Database Generation Statement

• New parameter added to DBD Statement • 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 RUG March 2013 Columbus

Implementation – Program Generation Statement

• New parameter added to PCB Statement • 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 RUG March 2013 Columbus

Implementation – Program Generation Statement• New parameter added to PSBGEN Statement • 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 RUG March 2013 Columbus

Implementation – DL/I INIT Call • New VERSION function added to the INIT call interface

• Program specifies the database name(s) and the DBD version(s) to use when accessing the database(s)

• Specified version number must match a version number defined on a DBD for the named database and stored in the IMS catalog

• Takes precedence over all other version number specifications and defaults (ie. PCB statement, PSBGEN statement, DFSDFxxx)

• 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

• Can only issue one INIT VERSION call for a specific database within an application

14

Page 15: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

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

• I/O Area contains the VERSION call function • “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 subparameters with a comma

• no duplicates allowed

15

Page 16: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Solution Overview – DBD Version Number

• If database versioning is enabled, the database version used to return the IMS data is determined by the following hierarchy:

1. DL/I “INIT VERSION" call

2. PCB Statement DBVER= parameter

3. PSBGEN Statement DBLEVEL= parameter

4. DFSDFxxx DATABASE Section DBLEVEL= parameter

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

16

Page 17: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

• Enable IMS Catalog• Populate catalog with DBD version definitions• Before Database Versioning is enabled for a database, IMS

continues to only recognize the current active database definition

• All systems in an IMSplex must be running IMS 13• DBRC MINVERS value of “13.1” required

• Enable Database Versioning

Database Versioning Migration Requirements

17

Page 18: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter

Page 19: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter

• IMS 13 provides ability to make structural changes to a HALDB database without a database outage• Structural changes can be made to DB segment definitions • HALDB Online Reorganization is used to apply the structural

changes to the online database• Online Change process is used to activate the new ACBLIB

member(s) in the online IMS system

• Benefit• Eliminate a database outage when structural changes must be

made to segment definitions in a DBD • Improved online availability of HALDB databases

19

Page 20: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Overview

• Structural changes can be made to online HALDB databases • PHDAM• PHIDAM

• Types of structural changes• Add a new field to space at the end of an existing segment• Define new fields that remap existing fields and space in a

segment• Increase the length of an existing segment

20

A

B C

A

CB

Page 21: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

FIELD 1

FIELD 1

FIELD 2 Space

FIELD 2 NewFIELD 3

Add a new field to space at the end of a segmentExample 1

Example 2

FIELD 1

FIELD 1 FIELD 2

FIELD 2 Space

NewFIELD 3

21

Sp.

Sp.

Page 22: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

FIELD 1

FIELD 1

FIELD 2

SpaceFIELD 2

Define new fields to remap existing fields in a segmentExample 1

Example 2

FIELD 1

FIELD 1 FIELD 2

FIELD 2

Space

OverlayFIELD 2A

NewFIELD 3

OverlayFIELD 2B

NewFIELD 3

Space

Space

OverlayFIELD 2A

22

Sp.

Sp.

Page 23: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

FIELD 1

FIELD 1

FIELD 2

SpaceFIELD 2

Example 1

Example 2

FIELD 1

FIELD 1 FIELD 2

FIELD 2

Space

OverlayFIELD 2A

NewFIELD 3

OverlayFIELD 2B

NewFIELD 3

Space

Space

OverlayFIELD 2A

23

Sp.

Sp. Space

Space

Increase the length of an existing segment

Page 24: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Overview (cont’d)

• After changes are made to segment definitions in a DBD• Online Reorganization process is used to alter the online

database from the current structure to the new structure• DB unload / reload not required

• Type-2 INITIATE OLREORG

• Online Change process is used to activate the changed ACBLIB members in the IMS online system

• Application programs can start using the new database structure

24

Page 25: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Preparation• Change a DBD

• Define new fields in space at the end of segment(s)• Specify new FIELD statements

• Increase the length of a segment(s)• Specify new length in the BYTES= parameter of SEGM statement

• Define new fields to remap existing fields & space in a segment(s)• Specify overlay and new FIELD statements

• Run DBDGEN • Modified DBD source used as input

• Run ACBGEN• Create a new member in a staging ACBLIB

25

Page 26: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Online Process

• Use Online Reorg to alter the structure of a HALDB database • Type-2 INITIATE OLREORG NAME(masterdb) OPTION(ALTER)• Reads the new DBD from a staging ACBLIB• Applies structural changes to the online HALDB database

• All database partitions are included in the reorg process• TERM OLREORG or /TERM command is allowed while the

database structure change is in progress• INIT OLREORG with OPTION(ALTER) command will restart the

database structure change where it left off

26

New DMB IMSStaging ACBLIB

Old DMBActive

ACBLIB

Input data setsA – J, X

Output data setsM – V, Y

OLR

Page 27: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Online Process (cont’d)

• Stop access to the altered HALDB database• Use Type-2 UPDATE or Type-1 /DBR command

• Issue Online Change commands to complete the alter process for the changed ACBLIB member(s)

• Implement necessary modifications to application programs• Start access to the altered HALDB database• New HALDB database structure can be used by modified

application programs

27

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

Page 28: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Operational Considerations• Software Requirements• All systems in an IMSplex must be running IMS 13• DBRC MINVERS value of “13.1” required

• 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

28

Page 29: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter

Page 30: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter

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

• Alter the physical attributes of a DEDB Area

• SIZE, UOW, or ROOT specifications

• Change the randomizer used for a DEDB Area

• Benefits• Improved DEDB Area availability

• Make definitional modifications without taking the Area offline

• Improved management of DEDBs

• Provide flexibility in implementing Area changes into the system

• Eliminate system down time for DEDB definition changes

30

Page 31: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter Overview

• A new DEDB Alter utility is provided to dynamically modify a DEDB database• Runs as a standard Fast Path IFP utility• DEDB Areas remain online during utility execution

• A 2-stage randomizer must be used• Enables areas to be processed individually

• DEDB alter does not support DEDB databases in VSO or SVSO mode• 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

31

Page 32: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Fast Path IFP Utility for DEDB Alter• TYPE ALTER• Invoke DEDB Alter utility

• ALTERAREA area_name | REPLRAND • ALTERAREA area_name• Modify the active DEDB AREA statement • SIZE, UOW, ROOT, RMNAME

• REPLRAND• Modify the active DEDB AREA statement • RMNAME

• Prep work needed for ALTERAREA and REPLRAND• Modify DEDB DBD• Assemble and bind any new randomizer• Run the DBDGEN utility to create new DEDB DBD definitions• Run the ACBGEN utility for all PSBs that reference the changed DEDB DBD• New ACBs are added to staging ACBLIB data sets

32

Page 33: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter ALTERAREA Function• ALTERAREA area_name• Changes SIZE, UOW, ROOT on DEDB DBD statement while DEDB online

• SIZE - Change the CI size of an Area in a DEDB database • UOW and ROOT - Change the Root Addressable and Independent Overflow parts

of DEDB area• Changes Randomizer in RMNAME DEDB DBD statement while DEDB online

• During DEDB Alter, read active DEDB Area with old randomizer• Migrate Active Area to Target area with new randomizer

• After DEDB Alter, new randomizer replaces old randomizer• All Areas in DEDB database use new randomizer• New name must be 2-stage randomizer• New name must be different than original name active for DEDB area

• Only one active DEDB Area can change at a time• Concurrent DEDB Alter for another Area in same DEDB not supported

• ALTERAREA does not support DEDB databases with SDEPs• Can replace randomizer using REPLRAND function for DEDBs with SDEPs

33

Page 34: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter REPLRAND Function

• REPLRAND• Changes Randomizer in RMNAME DEDB DBD while DEDB online• New name must be 2-stage randomizer• Existing randomizer must be a 2-stage randomizer• New name must be different than original name active for DEDB area• After DEDB Alter, new randomizer replaces old randomizer• All Areas in DEDB database use new randomizer

• Only one active DEDB Area can change at a time• DEDB Alter runs concurrently only if for another DEDB

• Supports DEDB database with or without SDEPs

34

Page 35: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Secondary Index Enhancements

Page 36: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Fast Path Secondary Index Enhancement• IMS 13 enhances the DEDB secondary index support that

was added in IMS 12• Add ability to use Boolean Operators to SSAs (Segment Search

Arguments)• AND * or &• OR + or |

• Support specific Command Codes with Secondary Index field searches

• Benefits• New and simplified programming opportunities with DEDBs• Allows ability to refine DL/I calls to Fast Path DEDBs• Commands supported when secondary index is accessed as a DEDB

36

Page 37: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

IMS 12 PTFs Forwarded to IMS 13

APAR 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 tbd Command Code, Multiple SSA, Qualified Get Call support for FP Secondary Index DL/I calls(Target Segment ≠ Root)

37

Page 38: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

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

Target & SourceHOSPITAL

WARD

PATIENT SKILL

CLERK

Example Statement ResultGU 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)

38

Page 39: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

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.

39

Page 40: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

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

40

Page 41: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Fast Path Secondary Index Enhancement

• IMS 13 enhances the DEDB secondary index support that was added in IMS 12• Add ability to use Boolean Operators to SSAs (Segment Search

Arguments)• AND * or &• OR + or |

• 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• New and simplified programming opportunities with DEDBs• Allows ability to refine DL/I calls to Fast Path DEDBs• Commands supported when secondary index is accessed as a DEDB

41

Page 42: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DBRC Enhancements

Page 43: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DBRC Coexistence with IMS 13

• DBRC Coexistence SPEs• IMS 11 APAR PM53134 / PTF UK80026

• IMS 12 APAR PM53139 / PTF UK80027

• Upgrade RECON data set to the IMS Version 13• 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• IMS 11 “11.1”

• IMS12 “12.1”

• IMS 13 “13.1”

43

Page 44: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DBRC Support for HALDB Alter

• INIT.PART command enhanced with new functionality for the BLOCKSIZE keyword• Use this keyword to define Control Interval (CI) sizes for VSAM data sets

• CHANGE.PART command enhanced with a new keyword, ALTERSZE• Used before HALDB alter to specify new partition block sizes or CI sizes

• CHANGE.DB command enhanced with two new keywords (ALTER or NOALTER) • Used to change the HALDB partition status to indicate it is being altered

• Status cannot be changed if the partition is authorized

• The NOTIFY.REORG command is enhanced with an ALTER keyword• Used to indicate the online reorganization process is altering a HALDB

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

44

Page 45: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DBRC Support for HALDB Alter (cont’d)

• DB (TYPE=HALDB) record is changed• 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• Two new flags added to indicate the partition is being altered and to

indicate the alter process has completed

• An array of new OSAM block sizes / VSAM CI sizes used during the HALDB alter process is added

• 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

45

Page 46: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DBRC Support for DEDB Alter

• INIT.ADS command is enhanced with new SHADOW and SHADOW IC keywords• Use to register shadow area data sets and shadow image copy

data sets to DBRC

• DBDS (TYPE=FP) record is enhanced• 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

• A list of the shadow area data sets is added

• DB (TYPE=DEDB) record is enhanced • New counter field indicates DEDB alter is active

46

Page 48: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

48

Page 49: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Solution Overview – Current Flow

DBJK21DBJK22DBJK23

Application

DBJK21

DBJK22

DBJK23

IMS

DBJK21 DBJK22 DBJK23

ACBLI B

DBJK21 V0DBJK22 V0DBJK23 V0

IMS Catalog

DBJK21 DBJK22 DBJK23

DBDLIB

PSBJK

PSBLIBPSBGEN

--------------------------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

49

Page 50: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Solution Overview – Database Versioning Flow #1

DBJK21DBJK22DBJK23

Application

IMS

DBJK21 V1DBJK22 V1DBJK23 V1

ACBLI B

DBJK21 V0,V1DBJK22 V0,V1DBJK23 V0,V1

IMS Catalog

DBJK21 V1DBJK22 V1DBJK23 V1

DBDLIB

PSBJK

PSBLIBPSBGEN

--------------------------PCB--------------------------DBJK21 V0DBJK22 DBJK23 V1

PSB=PSBJK Source

DBJK21 V1

DBD Source

DBJK22 V1

DBJK23 V1

DBDGEN

PSBGEN

DBJK21 V0DBJK22 V1DBJK23 V1

DLI

Retrieve DBJK21 from Catalog

DBJK21 V1DBJK22 V1DBJK23 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

50

Page 51: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Solution Overview – Database Versioning Flow #2

DBJK21DBJK22DBJK23

Application

IMS

DBJK21 V2DBJK22 V2DBJK23 V2

ACBLI B

DBJK21 V0,V1,V2DBJK22 V0,V1,V2DBJK23 V0,V1,V2

IMS Catalog

DBJK21 V2DBJK22 V2DBJK23 V2

DBDLIB

PSBJK

PSBLIBPSBGEN DBLEVEL=BASE--------------------------PCB--------------------------DBJK21 V1DBJK22 DBJK23 V2

PSB=PSBJK Source

DBJK21 V2

DBD Source

DBJK22 V2

DBJK23 V2

DBDGEN

PSBGEN

DBJK21 V2DBJK22 V2DBJK23 V2

DBJK21 V1DBJK22 V0DBJK23 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

51

Page 52: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Solution Overview – Database Versioning Flow #3

DBJK21DBJK22DBJK23

Application

IMS

DBJK21 V3DBJK22 V3DBJK23 V3

ACBLI B

DBJK21 V0,V1,V2,V3DBJK22 V0,V1,V2,V3DBJK23 V0,V1,V2,V3

IMS Catalog

DBJK21 V3DBJK22 V3DBJK23 V3

DBDLIB

PSBJK

PSBLIBPSBGEN DBLEVL=CURR--------------------------PCB--------------------------DBJK21 V1DBJK22 DBJK23 V2

PSB=PSBJK Source

DBJK21 V3

DBD Source

DBJK22 V3

DBJK23 V3

DBDGEN

PSBGEN

DBJK21 V3DBJK22 V3DBJK23 V3

DBJK21 V3DBJK22 V2DBJK23 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)

52

Page 53: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

HALDB Alter Example• DBA updates DBD for database MASTER

• 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)

• IMS allocates staging ACBLIB and retrieves new DMB• 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 updates application programs• Start MASTER DB access

A

B

C

New DMB IMSStaging ACBLIB

Old DMBActive

ACBLIB

Input data setsA – J, X

Output data setsM – V, Y

MASTER DB

OLR

53

Page 54: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

OLR CURSOR

MASTER DB

Return 30 bytes for Segment B

from the Output data set

IMS

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• When the record is found before the OLR cursor• IMS reads segment B from the output data set whose size is 40 bytes

• IMS checks the delta table before returning the segment to the application• Based on the table, IMS uses old DMB and returns 30 bytes of data to

the application

Name Input OutputB 30 40

Delta table

Input data sets

Output data sets

OLR

MPP: GU “B” KEY1

KEY1 is before the cursor

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

54

Page 55: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter

Page 56: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Preparation for DEDB Alter (cont’d)

• Allocate Shadow Area data sets • Shadow Area data sets used for migrating existing data from Active Areas• Single Area Data Sets (SADS)• Single Shadow data set is required

• Multiple Area Data Sets (MADS)• 2 to 7 Shadow data sets are required

• SADS can become MADS and MADS can become SADS after DEDB Alter• Depends on the number of allocated Shadow Area data sets

• Shadow data sets are not accessible by the IMS System• Accessible to DEDB Alter utility only

• Allocate Shadow IC data sets:• Created while DEDB Alter migrates data to Shadow Area data sets

56

Page 57: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Preparation for DEDB Alter (cont’d)• Format Shadow data sets with DEDB Area Init Util (DBFUMIN0)• Shadow Area data sets and Shadow IC data sets formatted• Two new control cards:• ACTIVE = Format Area data sets for DEDB Area• SHADOW = Format Shadow Area and Shadow IC data sets

• Formats Active or Shadow data sets in one execution, but not both• 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:• Shadow Area data sets are marked “SHADOW AVAIL”• Shadow IC Area data sets are marked “SHADOW IC AVAIL”

• Shadow data sets must be formatted • Before DEDB Alter utility runs

57

Page 58: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter Utility Control Statements

• TYPE ALTER• Invoke DEDB Alter utility

• ALTERAREA area_name | REPLRAND • TARGNAME SHADOW | ACTIVE

• SHADOW: The target Area data set is set to the Shadow Area data set• ACTIVE: The target Area data set is set to the Active Area data set• Notes:

1. With ACTIVE, the Active Area data sets are renamed2. Ignored for REPLRAND functions

• TIMEOUT timeout_value (1-999) | 15 seconds• # of seconds for DEDB Alter DL/I activity to be quiesced

58

Page 59: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter Utility Control Statements (cont’d)

• RETRY NO | YES | retry_value (1-99)• NO: Do not retry after TIMEOUT value expires.• YES: Retry after TIMEOUT value until the utility completes successfully• retry_value: Number of utility retries after TIMEOUT value occurs

• RETRYWAIT retrywait_value (1-999) | 60• If RETRY YES or RETRY retry_value• Number of seconds to wait before retrying the commit process

• GO• Execute the DEDB Alter utility

59

Page 60: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Post-DEDB Alter Utility Execution

• If DEDB Alter is Successful• Shadow Area data set is promoted to Active Area data set• Old active area data set is demoted to SHADOW area data set

• 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

6060

Page 61: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Post-DEDB Alter Utility Execution

• If DEDB Alter is Unsuccessful• Active Area data sets remain active and accessible to IMS systems• 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

• 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

61

Page 62: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

DEDB Alter Utility Execution (REPLRAND)

• Complete preparation steps:• Assemble and bind new randomizer• Modify DEDB DBD with new randomizer, run DBDGEN, run

ACBGEN• Execute DEDB Alter Utility (REPLRAND)

A. Load new randomizer from IMS SDFSRESL STEPLIB concatenation

B. Load the new ACB from the Staging ACBLIBC.Commits new randomizer change

1. Active DEDB database is quiesced causing DL/I calls are suspended2. DEDB database is un-quiesced and suspended DL/I calls are resumed

62

Page 63: IMS 13 DB and DBRC Enhancements - IMS RUG March 2013 Columbus

Post-DEDB Alter Utility Execution

• If DEDB Alter is Successful• New Randomizer replaces existing randomizer

• If DEDB Alter is Unsuccessful• Existing Randomizer remains in effect

63