16
5th CA 2E/Plex Worldwide Developer Conference Darryl Millington, HawkBridge Pty Ltd June 2, 2011 Session 6B CA 2E Data Model Cleanup

HawkBridge - CA 2E Data Model Cleanup v3

Embed Size (px)

Citation preview

Page 1: HawkBridge - CA 2E Data Model Cleanup v3

5th CA 2E/Plex Worldwide Developer Conference

Darryl Millington, HawkBridge Pty Ltd

June 2, 2011

Session 6BCA 2E Data Model Cleanup

Page 2: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Session Abstract

2 Jun 2011 26B - CA 2E Data Model Cleanup

> There are many reasons for 2E data model cleanup, yet many developers often are unaware how to go about it

> The complexity of the inter-relationships of the 2E objects sometimes makes it difficult to understand where to begin:> Should fields be deleted first or unreferenced functions?

> What if an object is used outside of 2E in a 3GL application?

> Coupled with the reduction in the size of development teams and the need to enhance applications faster - redundant objects in the data model actually increase the time to perform the necessary changes to applications

> This session will provide some technical tips and techniques on accomplishing this in order to ensure performance and consistency for your generated 2E applications

> These tips and techniques come from our extensive experience in data model cleanups as part of the migration from CA 2E to CA Plex using the Freedom/Plex and ADC tools

> HawkBridge have developed an automated data model cleanup process whereby models are submitted by ADC via a web interface for processing and delivered back to ADC via a web interface

Page 3: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Speaker Bio

2 Jun 2011 36B - CA 2E Data Model Cleanup

> Darryl has worked as a CA

2E developer since 1988

travelling extensively as an

independent consultant

throughout Australia, New

Zealand, USA, UK and Asia

> He is a regular speaker at

CA conferences and has

been speaking on CA 2E-

related topics since 1991

> [email protected]

Page 4: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Session Agenda

46B - CA 2E Data Model Cleanup

> Why Cleanup

> Benefits for a Cleanup

> What do you Cleanup

> How do you Cleanup

> Measuring Cleanup Success

> Questions

2 Jun 2011

Page 5: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Why Cleanup

56B - CA 2E Data Model Cleanup

> 10+ years of development in a single data model by many

people

> Data models contain large numbers of redundant, retired and

superceded objects

> Longer timeframes and higher costs to maintain objects no

longer required and used

> Size of data model impacts performance of developers and

increases generation times

2 Jun 2011

Page 6: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Why Cleanup

66B - CA 2E Data Model Cleanup2 Jun 2011

> Last model cleanup removed 15% of 94,000+ model objects> 17% of 8,506 access paths

> 31% of 87 arrays

> 22% of 17,397 conditions

> 1% of 1,491 files

> 19% of 33,273 fields

> 3% of 27,337 functions

> 32% of 6,047 messages

> Another model cleanup removed 30% of 66,000+ model objects> 5% of 5,334 access paths

> 18% of 255 arrays

> 9% of 9,211 conditions

> 2% of 1,216 files

> 4% of 14,606 fields

> 54% of 31,494 functions

> 16% of 4,555 messages

Page 7: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Benefits for a Cleanup

76B - CA 2E Data Model Cleanup

> Data model size will be greatly reduced

> Lower ongoing project costs and timeframes

> Better quality documentation and understanding of

development environment

> More accurate impact assessments and development

estimates

2 Jun 2011

Page 8: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

What do you Cleanup

86B - CA 2E Data Model Cleanup

> Job Lists

> Model Object Lists

> Fields

> Conditions

> Files

> Access Paths

> Functions

> Action Diagrams

> Arrays

> Messages

2 Jun 2011

Page 9: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

How do you Cleanup

96B - CA 2E Data Model Cleanup

> Step 1: Save a copy of the data model before cleanup so that

you can recover from deleting incorrect objects

> Step 2: Rebuild *ALLOBJ model object list using:

> WARNING: Do not perform this on Change Control Models

> CLRPFM YMDLOBJRFP

> CALL YLODOBJH1I

> Step 3: Rebuild data model *USRSPC object(s) using:

> YDLTOBJTBL

2 Jun 2011

Page 10: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

How do you Cleanup

106B - CA 2E Data Model Cleanup

> Step 4: Remove data model inconsistencies:

> YCHKMDL in *UPDATE mode

> Step 5: Verify and fix data model consistency:

> YCHKMDL in *ANALYZE mode

> Step 6: Remove unwanted Job Lists:

> RMVM on all the YJOBLST* files in the data model

> Step 7: Remove unwanted Model Object Lists:

> YWRKMDLLST and option 4

2 Jun 2011

Page 11: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

How do you Cleanup

116B - CA 2E Data Model Cleanup

> Step 8: Remove ALL commented-out action diagram code

> HawkBridge have a custom program for this

> Step 9: Delete all unreferenced fields

> Y2 USER(*DSNR) OPNACC(*NO)

> F7, F11 and Option D

> Step 10: Delete all unreferenced internal functions:

> YDOCURF OBJTYP(*FUN) OUTLST(MYLST)

> YFLTMDLLST MDLLST(MYLST) GENATR(*INTFUN)

> YEXCMDLLST MDLLST(MYLST) ERRLVL(*NOMAX)

RQSDTA('YDLTMDLVSN OBJSGT(&Y@)')

2 Jun 2011

Page 12: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

How do you Cleanup

126B - CA 2E Data Model Cleanup

> Step 11: Delete all unreferenced non-current versions:

> YBLDMDLLST OBJNAM((*ALL *ALL *FUN)) MDLLST(MYLST)

CUROBJ(*NO)

> YFLTMDLLST MDLLST(MYLST) CUROBJ(*NO)

> YEXCMDLLST MDLLST(MYLST) ERRLVL(*NOMAX)

RQSDTA('YDLTMDLVSN OBJSGT(&Y@)')

> Step 12: Loop back to Step 9 until no objects deleted

> Step 13: Delete all unreferenced access paths:

> YDOCURF OBJTYP(*ACP) OUTLST(MYLST)

> YWRKMDLLST and option 24

2 Jun 2011

Page 13: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

How do you Cleanup

136B - CA 2E Data Model Cleanup

> Step 14: Delete all unreferenced conditions:

> YDOCURF OBJTYP(*CND) OUTLST(MYLST)

> YFLTMDLLST FILTER(*OMIT) MDLLST(MYLST) OBJNAM((*ALL *ALL

*CND)) OBJATR(VAL)

> YFLTMDLLST FILTER(*OMIT) MDLLST(MYLST) OBJNAM((*ALL '*ALL

values' *CND)) OBJATR(LST)

> YWRKMDLLST and option 24

2 Jun 2011

Page 14: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

How do you Cleanup

146B - CA 2E Data Model Cleanup

> Step 15: Delete unused files:

> SELECT T01.OBJATR, T01.FIL FROM YFILDTARFP T01 WHERE

T01.@@FIL NOT IN (SELECT T02.@@OBJ FROM YRELDTARFP T02

WHERE T02.RELCDE <> '005') AND T01.@@FIL NOT IN (SELECT

T03.@@FIL FROM YMSGDTARFP T03)

> Y2 USER(*DSNR) OPNACC(*NO)

> ’Rel Lvl’ = ’DFN’

> Search for file defined as relation and use Option D

2 Jun 2011

Page 15: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Measuring Cleanup Success

156B - CA 2E Data Model Cleanup

> Run the measures before and after cleanup

> Summarise Model Objects

> SELECT OBJTYP, OBJATR, COUNT(*) FROM YMDLOBJRFP GROUP BY

OBJTYP, OBJATR ORDER BY OBJTYP, OBJATR

> Summarise Function Complexity

> SELECT COUNT(*) FROM YMSGACTRFP ACT WHERE ACT.ELMTYP =

'CND‘ AND ACT.@@ELM >= 1000000 AND ACT.@@SUB2 >= 0

> Summarise Model Library Size

> WRKLIBPDM and F14

2 Jun 2011

Page 16: HawkBridge - CA 2E Data Model Cleanup v3

Copyright © 2011 HawkBridge Pty Ltd. All rights reserved

Questions

166B - CA 2E Data Model Cleanup2 Jun 2011