27
VSAM to DB2 MIGRATION Business Reasons & Technical Solution Overview Thomas Beyer Brian Lee Dave Dando Lightyear Consulting Ltd. 1-877-LIGHTYR [email protected] www.lightyr.com L I G H T Y E A R

Lightyear VSAM to DB2 presentationapps.adcom.uci.edu/EnterpriseArch/Legacy/Lightyear_VSAMtoDB2... · • DB2 already includes a sound and established ... • SAMPLE COBOL, ... Flag

Embed Size (px)

Citation preview

VSAM to DB2 MIGRATIONBusiness Reasons

&Technical Solution Overview

Thomas Beyer Brian Lee Dave Dando

Lightyear Consulting Ltd. 1-877-LIGHTYR

[email protected]

L I G H T Y E A R

VSAM to DB2 Migration - Agenda• BUSINESS ISSUES FOR VSAM to DB2 MIGRATION

• Who are Lightyear Consulting and Circle Computer ?

• VS2 OVERVIEW

• MIGRATION PROCESS OVERVIEW

• DB2 TABLE DESIGN + MAPPING / DATA MIGRATION

• SW INSTALLATION and SUPPORT

• POST-MIGRATION APPLICATION MAINTENANCE

• RUN TIME CONSIDERATIONS

2

Lightyear Consulting Ltd.

• formed 1991 in W-Canada, expansion into USA in 1996• IBM BESTeam Partner• IBM Beacon Award Winner in 1999• Winner of Best IBM OS/390 SW Distributor in 2000• Skilled in and certified by IBM in IMS, DB2, CICS and OS/390 (z/OS),

WEBSPHERE, VISUALAGE FOR JAVA• Education, Consulting, Software Development• Offices in Calgary, Palo Alto, Los Angeles, Phoenix, Austin• signed distributor agreement for DL/2 and VS2 specifically to address customers that have stated their intent/desire to move off IMS and/or VSAM without re-write• in-house consultants and external contractor network for VSAM, IMS, DB2, JAVA, WebSphere or DL/2 specific skills and/or project management, incl. IBM CERTIFIED DB2, WEBSPHERE, CICS, VISUALAGE FOR JAVA

L I G H T Y E A R

3a

CIRCLE COMPUTER GROUP

• FORMED IN 1978

• SW Manufacturer of DL/2 and VS2

• SKILLS ORIENTED and TECHNICAL FOCUS

• EDUCATION, CONSULTANCY, SOFTWARE

• US OFFICE - mainly for CICS/DB2 Education

• S/W Distributors in USA, Scandinavia, Germany, Italy, France, Japan, South America, Israel, Australia

• IBM BEST Team Partner

• Ownership of all CICS courses run by IBM world wide

3b

Moving from VSAM to DB2 - Options

3

O P T I O N 1 M i g r a t e V S A M a p p l i c a t i o n s a n d d a t a s e t s t o D B 2 e n v i r o n m e n t

Unrea l i s t i c cos t , r i sky e f for t , unreachable goa l s cons ider ing evo lv ing bus ines s pr ior i t i e s

O P T I O N 2 P e r f o r m e x t r a c t s a n d q u e r i e s d i r e c t l y o n V S A M d a t a s e t s

E x p e n s i v e , t i m e c o n s u m i n g , f r u s trat ing , non -f l ex ib l e for 24x7 or rea l t ime purposes , l ack o f too l s and sk i l l s .

O P T I O N 3 D u p l i c a t e V S A M d a t a s e t s t o D B 2

Forever dup l i c i ty , ongo ing da ta c l eans ing , s y n c h r o n i z a t i o n / r e s t r u c t u r i n g b e c o m e s m a j o r r e s o u r c e t a x , n o r e a l t i m e o r 2 4 x 7 benef i t s , d a y o l d d a t a s y n d r o m e

O P T I O N 4 M i g r a t e o n l y t h e d a t a a n d i t s a c c e s s t o D B 2

V S 2

B o t h q u i c k e s t a n d m o s t r e l i a b l e , s o u r c e c o d e r e m a i n s u n c h a n g e d , r e m o v a l o f V S A M d e p e n d e n c i e s , m i g r a t i o n r i s k m i n i m i z e d , qua l i ty o f da ta and SLA's , p l en ty o f t oo l s , a c c e p t a b l e p e r f o r m a n c e t a x , r e a l t i m e d a t a ava i lab le a t a l l t imes to a l l cus tomers ( s ing le s o u r c e o f d a t a ) , Y o u r c o m p a n y a n d I B M ' s s tra teg ic d irec t ion across a l l p la t forms .

VS2 - What are the Benefits (1) ?

Conventional Migration Effort From VSAM To DB2

Analysis Re -programming effort Testing

Analysis VS2 Testing

VSAM To DB2 using VS2

• SIGNIFICANT RISK ELIMINATION AND COST REDUCTION• Application code is unchanged• Application functionality is not compromised• Dataset by Dataset migration - phased-in approach• Use VSAM and DB2 concurrently during migration• Use of modern relational approaches to write new programs (ODBC, JDBC, SQL, Java, tools, …) and change data structures• Relational skills (both DBA and programming) readily available in

marketplace 4a

VS2 - What are the Benefits (2) ?

4b

A c k n o w l e d g e d S t r e n g t h s • V S 2 c o m e s f r o m t h e s a m e s t a b l e a s D L / 2 w h i c h i s a s o l i d p r o d u c t

b e i n g e x p l o r e d b y n u m e r o u s L e g a c y o r g a n i z a t i o n s w o r l d w i d e , w i t h a c o m p r e h e n s i v e s u p p o r t s y s t e m a l r e a d y i n p l a c e .

• V S 2 p r o v i d e s L e g a c y d a t a i n D B 2 f o r m f o r a n a l y s i s , q u e r y , e - p u r p o s e . • P r e s e r v i n g t h e i n v e s t m e n t i n a p p l i c a t i o n L e g a c y c o d e , i . e . , a p p l i c a t i o n s

k e e p r u n n i n g u n c h a n g e d , V S 2 t r a n s p a r e n t l y r e d i r e c t s d a t a s e t c a l l s t o e i t h e r V S A M o r D B 2 w h i c h e v e r i s a p p r o p r i a t e .

• N o s o u r c e c o d e c h a n g e s a r e r e q u i r e d f o r t h e c o n v e r s i o n . • N e w a p p l i c a t i o n d e v e l o p m e n t c a n b e 1 0 0 % D B 2 b a s e d . • V a r i o u s l e v e l s o f c o n v e r s i o n a r e a v a i l a b l e i . e . , F r o m b a s i c K e y a n d D a t a

t h r o u g h a f u l l y f u n c t i o n i n g D B 2 d a t a b a s e . B u s i n e s s r e q u i r e m e n t a n d a v a i l a b l e r e s o u r c e d e t e r m i n e c o n v e r s i o n l e v e l s . M i x i n g a n d m a t c h i n g o f a v a i l a b l e o p t i o n s i s a l s o a v a i l a b l e .

• D u r i n g m a i n t e n a n c e , a p p l i c a t i o n s c a n b e o p t i m i z e d f o r D B 2 a s a n d w h e n

r e s o u r c e s b e c o m e a v a i l a b l e o r b u s i n e s s i m p e r a t i v e s d i c t a t e s o . • M i n i m u m r i s k m i g r a t i o n , a t c u s t o m e r ' s p a c e o n a d a t a s e t b y d a t a s e t b a s i s .

T h i s g r a d u a l p r o c e s s a l l o w s f o r d a t a c l e a n s i n g a n d e a s e o f a u d i t a b i l i t y p r o c e d u r e s .

• V S A M d a t a s t r u c t u r e s a r e r e - e n g i n e e r e d t o D B 2 m o d e i n e i t h e r o f t h e s e

w a y s :

V S A M d a t a s e t D B 2 d a t a b a s e O n e R e c o r d O n e T a b l e R e c o m m e n d e d D e s i g n O n e R e c o r d S e v e r a l T ab l e s ( u p t o 5 ) U s e r E x i t s R e q u i r e d S e v e r a l R e c o r d s O n e T a b l e U s e r E x i t s R e q u i r e d

VS2 - What are the Benefits (3) ?

4c

Additional Benefits • Organizations can refocus on growing its business and technical

capabilities under a single data infrastructure paradigm ♦ Potential for faster deployment of new applications or application

upgrades ♦ Single source of production data, available at all times to all

customers alike ♦ Consistent quality-of-data and quality-of-service across the board

to all customers • Simplifies data maintainability and future database restructuring • Effective assistance toward the Continuous Availability and Real

Time needs for 24x7 purposes • Significant economy-of-scale savings are possible in certain

elements: ♦ CPU and DASD usage, DRP complexity ♦ Application and Data maintainability ♦ Reduced set of production and development OEM tools

• Facilitates the running of Sysplex environments

♦ Provides simplification to the Real Time Operability challenges ♦ Allows for better management of standards and measurements ♦ Simpler set-up and operation of test streams

• Harmonizing potential

♦ Planning, Development and Service Delivery resources/Skills ♦ Change Management and Control processes

Immediate Gains • Removal of long-existing VSAM dataset

limitations

♦ Not necessary to evaluate and acquire more VSAM scaffolding features.

• DB2 already includes a sound and established

Partition Tablespace feature

♦ No logical storage limitations • All related business data can be moved quickly

into one single type of database

♦ Most organizations have a mixed set of VSAM datasets and DB2 databases

è VS2 will allow for a clearly-defined, recognized, supported data architecture direction

When should you NOT migrate off VSAM

• If you have a heavy dependency on features that are not supported with VS2 (see chart near end of presentation)

• If you have no DB2 in-house and no intention to acquire it• If you envision increased usage/investment into new VSAM

applications• If you have written extensive non-VSAM applications interfacing

into VSAM via the Operating system

5

• ISPF MAPPING/GENERATION FACILITY> Map VSAM fields to DB2 Columns> Generate VS2 driver programs

• CALL INTERCEPTION FACILITY> Intercepts VSAM calls and directs them to VS2 for

processing

• VS2 MAPPER

• SAMPLE COBOL, PL/1 AND ASSEMBLER EXITS SUPPLIED

VSAM COMPONENTS

6

DB2 Database DesignDB2 Database Design

Write/test exits

LOAD DB2

MIGRATION PROCESS OVERVIEW

• REQUIRES APPL KNOWLEDGE AND VS2 SKILL

MAP

TEST TEST

REMAP

PROTOTYPEPROTOTYPE• MIGRATION BY File or File group

7

AnalysisAnalysis

Test Appls

Appl Prog

VSAM

VSAM call

EXECUTION PROCESS FLOW - 1

BEFORE VS2 AFTER VS2 - PART 1 OF 2

VSAM record

Appl Prog

VSAM

SUBSYS=CIRSon ‘DD’

NO

DB2

YES

VSAM call

8

EXECUTION PROCESS FLOW - 2

FOLLOWING CONVERSION TO VS2 - PART 2 OF 2

Appl Prog

VIDMAIN SQL Driver

DB2

VSAM call

DB2 I/O Area

FBE IRD

APPLICATION I/O AREA

9

VS2 generatedstatic SQL driver

VS2 EXITS

PHYSICAL DB2 DATABASE DESIGN

• ONE DB2 TABLE FOR EVERY VSAM file set (Base, AIX, Path)

• VSAM BASE CLUSTER KEY BECOMES DB2 PRIMARY KEY

• COPYBOOK FIELD BECOMES DB2 COLUMN (typically) • REDEFINED RECORD LAYOUTS HANDLED THROUGH EXITS

• OBSOLETE (Filler ?) FIELDS DO NOT NEED TO BE MIGRATED TO DB2

10

VS2 MAPPING

VSAM RECORD

Base Key Index 1 Index 2

DB2 I/O AREA

• FIELD to COLUMN Relationship using VSAM Copybook

• Mapping performed through VS2 ISPF Dialogues or by VS2 MAPPER

• ONE TIME ACTIVITY

C1 C2 C3 C4 C5 C6 C7 C8

11

MAPPING PROCESS

12

1. CREATE DB2 DATABASE

2. MAP RECORDS

3. GENERATE SQL DRIVERS

4 UNLOAD DATA FROM VSAM (VS2 utility)

5. CONVERT UNLOAD FILE AND LOAD DB2 TABLES

6 IN BATCH - JCL changeIN CICS - Add file to VS2 Table (Macro driven

7. TEST> MAPPING> EXITS Test Applications

RE-ENGINEERING

• VSAM PICTURE FIELDS ==> DB2 DATE> Typically 4 byte packed field X’0971229C’ becomes 1997-12-29

• OBSOLETE FIELDS

> Omit from DB2 Table (Fields defined as ‘FILLER’)

• MOVING FIELD POSITION

• CHANGING FIELD ATTRIBUTES > Extending field size> Numeric fields to DECIMAL, INTEGERER, SMALLINT

• ADDING ADDITIONAL COLUMNS> For future use by ‘new’ DB2 applications

13

• COPYBOOK REDEFINES

• PROBLEM VSAM allows differing data types in the same record structure Handled by applications using masks.

• RESOLUTION VS2 provides granularity through Exits and additional DB2 tables

RE-ENGINEERING

ADDITIONAL RE-ENGINEERING THROUGH FBE & IRD EXITS

14

REDEFINED RECORD

15

LAYOUT=A

LAYOUT=B

LAYOUT=C

XCOMMON AREA

DB2TAB_COMMON KCOL_A, KCOL_B + Common area columnsDB2TAB_LAYOUT_A KCOL_A, KCOL_B + Layout=A columnsDB2TAB_LAYOUT_B KCOL_A, KCOL_B + Layout=B columnsDB2TAB_LAYOUT_C KCOL_A, KCOL_B + Layout=C columns

1. FIELD BUILD EXIT TO READ APPROPRIATE TABLE BASEDFIELD BUILD EXIT TO READ APPROPRIATE TABLE BASEDON FIELD XON FIELD X2. IRD EXIT REQUIRED FOR UPDATE PROCESSING BASED ONIRD EXIT REQUIRED FOR UPDATE PROCESSING BASED ONFIELD XFIELD X

OTHER POTENTIAL SOLUTIONS

VSAM RECORD

USER FIELD BUILD EXIT - POSSIBLE USE

• TO ENRICH DB2 DATA

Name Town City

DB2 Record Layout

VSAM record

National Phone

• MANY OTHER POSSIBILITIES

Street Ctry

Name Town City InternationalPhone

Street Country name

Flag resolved by Appl pgm

Translated by FBE

nn

Mapped

to

16

BIND LINK

SQL DRIVER GENERATION

STAGE I STAGE ll

VS2 job

VS2

Prog logic;--EXEC SQL;--END EXEC;-End;

VID_SRC

Precompile

DBRM ASSEMBLE

17

- Mapping tables

RUN-TIME CONSIDERATIONS

• VSAM APPLICATIONS NOW BECOME DB2 APPLICATIONS > Housekeeping Utilities in DB2> Local and Disaster Recovery Implications

• PACKAGE BIND / EXPLAIN

• DB2 PERFORMANCE / CAPACITY IMPLICATIONS

• CHANGES TO DB2 APPLICATION ENVIRONMENT> VS2 Drivers May need to be Re-Genned

18

POST-MIGRATION APPL MAINTENANCE

• APPLICATION CHANGES CAN BE SQL-BASED> New SQL calls can be Added to Application Programs> Existing VSAM calls can be changed

19

INSTALLING VS2

• UNIQUE ‘RIGHT TO USE’ KEY FOR EACH CPU EXTENDED ANNUALLY

• ISPF TAILORING APPLICATION> Customised INSTALL AND SAMPLIB libraries

• VS2 LOAD LIBRARY and DRIVERS LIBRARY;> LPALIB in Batch - Subsystem> DFHRPL in CICS> LPA changes

• BATCH JCL CHANGES FOR ACCESS TO DB2

• OPTIONALLY> Enable supplied Trace and Debugging Facilities

• FIXES DELIVERED BY EMAIL - USUALLY AMASPZAP FORMAT

20

FEATURES NOT SUPPORTED

• VSAM ESDS Datasets

• VSAM LDS Datasets

• RBA Processing

21

Next Steps:

• Follow-up on some technical issues

• Pilot porting project to assess validity (billable)

• Mentoring/training onsite or at Lightyear’s or Circle’s offices

• Development of a migration project

23

Upcoming Lightyear Events• October 21 to 25 - DB2 (and CICS + IMS) City-to-City Roadshow - hosted by IBM and Lightyear

(with Lightyear and IBM speakers)– pick a 1/2 day or a full day agenda– Oct. 21- Seattle– Oct. 22 - Pasadena / Los Angeles– Oct. 23 - Phoenix, AZ– Oct. 24 - Dallas, TX– Oct. 25 - Kansas City, MO– register now !

• November 6: z/OS Update - What new beyond OS/390• November 19 or 20: IMS to DB2 Conversion without application re-write• December or early next year: DB2 Stored procedures - What Options do you have ?• Early Next year: Wireless Access to Legacy Data - Options• Early Next year or later this year: Application Construction with WebSphere Studio Application

Developer (aka VisualAge for Java Vnext) and/or Host-on-Demand - what is a better option ?• Details at: www.lightyr.com - you will get an e-mail invite once details are finalized !