Download - HALDB Mirgrations - IMS UG Singapore 8-2013
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
HALDB Migration
How to get from FF to HALDB
AGENDA
• Understand the HALDB Partition naming conventions
• Understand and practice the Migration process
– FF DB with no secondary indexes
– FF DB with secondary indexes
© Copyright IBM Corporation 2008
Current Structure for RxCSTP
ADJSMNTS PAYMENTS CUSTINV CUSTLOCN DISTRICT
CUSTOMER
CUSTORDN ADDRLINE
ORDNINDX INVYINDX
DSG3
DSG4
DSG5
DSG1
DSG1
DSG2
RxORDY RxINVY
The world depends on it Naming Standard Example
DBDname DDname DSN RxCSTP RxCSTP1 USERID.CMW46.RxCSTP1
RxCSTP RxCSTP2 USERID.CMW46.RxCSTP2
RxCSTP RxCSTP3 USERID.CMW46.RxCSTP3
RxCSTP RxCSTP4 USERID.CMW46.RxCSTP4
RxCSTP RxCSTP5 USERID.CMW46.RxCSTP5
RxCSTX RxCSTX USERID.CMW46.RxCSTX
RxINVY RxINVY USERID.CMW46.RxINVY
RxORDY RxORDY USERID.CMW46.RxORDY
• Partition Name – 7 characters – 5 characters to identify the partition
• Partition ID – Numeric number allocated from 00001 for each Database
• DDnames – Partition name SUFFIX (A,X,L) depending on data set
• A for primary HALDB (base data set group) • B – J for data set groups data sets (if any) • X for primary index • A for Secondary index data sets
• DSN – USERID.CMW46.partitionname.Apartionid – See next slide
© Copyright IBM Corporation 2008
Naming Standard Example DBD name
Partition name
DD name
DSN
RxCSTP Rxpart RxpartA USERID.CMW46.Rxpart.A00001
RxCSTP Rxpart RxpartA USERID.CMW46.Rxpart.A00002
RxCSTX Rxpart RxpartX USERID.CMW46.Rxpart.X00001
RxINVY Rxpart RxpartA USERID.CMW46.Rxpart.A00001
RxORDY Rxpart RxpartA USERID.CMW46.Rxpart.A00001
Partition Naming conventions
© Copyright IBM Corporation 2008
CA251DBX CS251DBX VSAMP240.CA251.NOTICEX1.CL
CA251DBD CA251DG1 OSAMP240.CA251.NOTICEG1.CL
CA251DG2 OSAMP240.CA251.NOTICEG2.CL
CA251DG3 OSAMP240.CA251.NOTICEG3.CL
CA251DG4 OSAMP240.CA251.NOTICEG4.CL
CA251DG5 OSAMP240.CA251.NOTICEG5.CL
CA251DG6 OSAMP240.CA251.NOTICEG6.CL
CA251SX1 CS251SX1 VSAMP240.CA251.NOTICES1.CL
CA251SX2 CA251SX2 VSAMP240.CA251.NOTICES2.CL CA251SX3 CS251SX3 VSAMP240.CA251.NOTICES3.CL
CA251SX4 CA251SX4 VSAMP240.CA251.NOTICES4.CL CA251SX5 CS251SX1 VSAMP240.CA251.NOTICES5.CL CA251SX7 CA251SX2 VSAMP240.CA251.NOTICES7.CL CA251SX9 CS251SX3 VSAMP240.CA251.NOTICES9.CL
CA251SXA CA251SXA VSAMP240.CA251.NOTICESA.CL
CA251SXB CA251SXB VSAMP240.CA251.NOTICESB.CL
CA251SXC CA251SXC VSAMP240.CA251.NOTICESC.CL
CA251SXD CA251SXD VSAMP240.CA251.NOTICESD.CL
CA251SX1 YA2511A YA2511AA VSAMP240.CA251.NOTIC1A.CL.A00001 YA2511B YA2511BA VSAMP240.CA251.NOTIC1B.CL.A00002 CA251SX3 YA2513A YA2513AA VSAMP240.CA251.NOTIC3A.CL.A00001 YA2513B YA2513BA VSAMP240.CA251.NOTIC3B.CL.A00002 CA251SX4 YA2514A YA2514AA VSAMP240.CA251.NOTIC4A.CL.A00001 CA251SX5 YA2515A YA2515AA VSAMP240.CA251.NOTIC5A.CL.A00001 CA251SX9 YA2519A YA2519AA VSAMP240.CA251.NOTIC9A.CL.A00001 YA2519B YA2519BA VSAMP240.CA251.NOTIC9B.CL.A00002 CA251SXA YA251AA YA251AAA VSAMP240.CA251.NOTICAA.CL.A00001 YA251AB YA251ABA VSAMP240.CA251.NOTICAB.CL.A00002 CA251SXB YA251BA YA251BAA VSAMP240.CA251.NOTICBA.CL.A00001 YA251BB YA251BBA VSAMP240.CA251.NOTICBB.CL.A00002 CA251SXC YA251CA YA251CAA VSAMP240.CA251.NOTICCA.CL.A00001 YA251CB YA251CBA VSAMP240.CA251.NOTICCB.CL.A00002 CA251SXD YA251DA YA251DAA VSAMP240.CA251.NOTICDA.CL.A00001 YA251DB YA251DBA VSAMP240.CA251.NOTICDB.CL.A00002
CA251DBD CA251A9 CA251A9A OSAMP240.CA251.NOTICA9.CL.A00001 CA251A9X OSAMP240.CA251.NOTICA9.CL.X00001 CA251A9L OSAMP240.CA251.NOTICA9.CL.L00001 CA251B9 CA251B9A OSAMP240.CA251.NOTICB9.CL.A00002 CA251B9X OSAMP240.CA251.NOTICB9.CL.X00002 CA251B9L OSAMP240.CA251.NOTICB9.CL.L00002 CA251C9 CA251C9A OSAMP240.CA251.NOTICC9.CL.A00003 CA251C9X OSAMP240.CA251.NOTICC9.CL.X00003 CA251C9L OSAMP240.CA251.NOTICC9.CL.L00003
CA251D9 CA251D9A OSAMP240.CA251.NOTICD9.CL.A00004 CA251D9X OSAMP240.CA251.NOTICD9.CL.X00004 CA251D9L OSAMP240.CA251.NOTICD9.CL.L00004
Full Function to HALDB
© Copyright IBM Corporation 2008
FF Database
HALDB 3 Partitions
FF Database Secondary Index 1
Secondary Index 2
Secondary Index 1 2 partitions
HALDB 3 Partitions
Secondary Index 2 3 partitons
The migration process options
1. HALDB with no secondary indexes
2. HALDB with secondary indexes – migration with out external tools (utilities not supplied as part of the base IMS product)
1. Unload secondary indexes independently
2. Unload secondary indexes during HD Unload
3. HALDB with secondary indexes – migration with some external tools (utilities not supplied as part of the base IMS product)
1. Rebuild secondary indexes after HD Reload
© Copyright IBM Corporation 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
HALDB without Secondary Indexes
Migrate the HALDB only
1. HALDB with no Secondary Indexes
© Copyright IBM Corporation 2008
FF DBD
1. HALDB with no Secondary Indexes
• HD Unload • Unload with
MIGRATE=YES • Single output file
© Copyright IBM Corporation 2008
Unload File
HD Unload
FF DBD
DBDLIB RECON
1. HALDB with no Secondary Indexes
• DBDGEN • Generate changed
DBDs • DBDLIB not usable
for FF DBD anymore (including IC,Recovery
© Copyright IBM Corporation 2008
Unload File
HD Unload
DBDGEN
FF DBD
DBDLIB
DBDLIB
RECON
1. HALDB with no Secondary Indexes
• DBRC • DELETE.DB FF DBD
• Removes all DBRC history information including recovery information
• INIT.DB • TYPE=TYPHALDB
• INIT.PART • PART • KEYSTRNG • DSNPREFX
© Copyright IBM Corporation 2008
Unload File
HD Unload
DBRC
DBDGEN
FF DBD
DBDLIB
DBDLIB
RECON
RECON
1. HALDB with no Secondary Indexes
• IDCAMS • Define all data sets
• DFPUPNT0 • Initialize the partition
© Copyright IBM Corporation 2008
Unload File
HD Unload
IDCAMS DFSUPNT0
DBRC
DBDGEN
FF DBD
DBDLIB
DBDLIB
RECON
RECON
ILDS Primary index HALDB
Migration Path – Simpliest Form
• HD UReload • Reload all partitions • Sets IC needed for
each partition loaded • Not all partitions may
get data loaded.
© Copyright IBM Corporation 2008
Unload File
HD Unload
HD Reload
IDCAMS DFSUPNT0
DBRC
DBDGEN
FF DBD
DBDLIB
DBDLIB
RECON
RECON
ILDS Primary index HALDB
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
HALDB with Secondary Indexes Option 1
Migrate the secondary indexes
2. HALDB with secondary indexes Option 1
© Copyright IBM Corporation 2008
Primary ndex FF DBD
Sec Index
Sec Index
2. HALDB with secondary indexes Option 1
© Copyright IBM Corporation 2008
Primary ndex FF DBD
DBDLIB
Unload File
HD Unload
Sec Index
Sec Index
DBDLIB
Unload File
HD Unload
RECON RECON
2. HALDB with secondary indexes Option 1
© Copyright IBM Corporation 2008
Primary ndex FF DBD
DBDLIB
DBDLIB
Unload File
HD Unload
DBDGEN
Sec Index
Sec Index
DBDLIB
Unload File
HD Unload
RECON
DBDLIB
DBDGEN
2. HALDB with secondary indexes Option 1
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
DBRC
DBDGEN
RECON
Sec Index
Sec Index
DBDLIB
Unload File
HD Unload
RECON
DBDLIB
DBDGEN
DBRC
RECON
2. HALDB with secondary indexes Option 1
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
IDCAMS DFSUPNT0
DBRC
DBDGEN
RECON
Sec Index
Sec Index
ILDS Primary index
HALDB
DBDLIB
Unload File
HD Unload
RECON
DBDLIB
DBDGEN
DBRC
RECON IDCAMS DFSUPNT0
2. HALDB with secondary indexes Option 1
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
HD Reload
IDCAMS DFSUPNT0
DBRC
DBDGEN
RECON
Sec Index
Sec Index
ILDS Primary index
HALDB
DBDLIB
Unload File
HD Unload
RECON
DBDLIB
DBDGEN
DBRC
RECON IDCAMS DFSUPNT0
HD Reload
SEC INDEX
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
HALDB with Secondary Indexes Option 2
MIGTRATX=YES
2. HALDB with secondary indexes Option 2
© Copyright IBM Corporation 2008
Primary ndex FF DBD
Sec Index
Sec Index
2. HALDB with secondary indexes Option 2
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
Unload File
HD Unload
Sec Index
Sec Index
SORT SORT
DFSSRT01 DFSWRK01
DFSSRT02 DFSWRK02
2. HALDB with secondary indexes Option 2
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
DBDGEN
Sec Index
Sec Index
SORT SORT
DFSSRT01 DFSWRK01
DFSSRT02 DFSWRK02
2. HALDB with secondary indexes Option 2
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
DBRC
DBDGEN
RECON
Sec Index
Sec Index
SORT SORT
DFSSRT01 DFSWRK01
DFSSRT02 DFSWRK02
2. HALDB with secondary indexes Option 2
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
IDCAMS DFSUPNT0
DBRC
DBDGEN
RECON
IDCAMS DFSUPNT0
Sec Index
Sec Index
IDCAMS DFSUPNT0
SORT SORT
ILDS Primary index
HALDB
DFSSRT01 DFSWRK01
DFSSRT02 DFSWRK02
2. HALDB with secondary indexes Option 2
© Copyright IBM Corporation 2008
Primary ndex FF DBD
RECON DBDLIB
DBDLIB
Unload File
HD Unload
HD Reload
IDCAMS DFSUPNT0
DBRC
DBDGEN
RECON
HD Reload
IDCAMS DFSUPNT0
Sec Index
Sec Index
IDCAMS DFSUPNT0
SORT SORT
HD Reload
ILDS Primary index
HALDB
DFSSRT01 DFSWRK01
DFSSRT02 DFSWRK02
PSINDEX PSINDEX
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
HALDB with HD Reload Options
HD Reload Options
HD Reload
SYSIN
• HD Reload • SYSIN DD *
• Blank • ILDS update during
reload processing • Not in key
sequence • CA/CI splits • Performance poor
BLANK
HD Reload Options
HD Reload
SYSIN
• HD Reload • SYSIN DD *
• Blank • ILDS update during
reload processing • Parallel ILDS load
processing • Not in key
sequence • CA/CI split • Performance better
NOILDS
DFSPREC0 DFSPREC0 DFSPREC0
HD Reload Options
HD Reload
SYSIN
• HD Reload • SYSIN DD *
• Blank • ILDS update during
reload processing • Data spaces used to
sort data into key sequence
• Performance better
ILDSMULTI
MVS Data Spaces