hawkbridge - integrating ca 2e with existing database applications v9

of 33/33
Integrating CA 2E with Existing Applications CA 2E Track Darryl Millington, HawkBridge Pty Ltd (Australia)

Post on 08-Feb-2017




1 download

Embed Size (px)


PowerPoint Presentation

Integrating CA 2E with Existing ApplicationsCA 2E TrackDarryl Millington, HawkBridge Pty Ltd (Australia)

This session will provide an under the covers look at how HawkBridge have integrated their Freedom suite of products with the internal data model files. All of the Freedom tools have been developed using a common CA 2E data model where the internal database files of CA 2E have been imported so that new functions can be created over them using CA 2E itself. Catch a sneak preview of the Freedom/Pre-Compiler which provides the changes to generated CA 2E source to enable the integration to be performed using existing CA 2E physical and logical files.Session Abstract

Darryl MillingtonHawkBridge Pty Ltd

Darryl has worked as a CA 2E developer since 1988 travelling extensively as an independent consultant throughout Australia, New Zealand, USA, UK and AsiaHe is a regular speaker at CA conferences and has been speaking on CA 2E-related topics since 1991 Speaker Bio

IntroductionUsing Keyed Physical FilesUsing Multi-Format Logical FilesInvoking Freedom/Pre-CompilerFreedom/Pre-Compiler CommandsQuestionsAgenda

How can you use CA 2E to integrate non-CA 2E applications?Especially where database is not pure CA 2EFreedom tools do just thatCA 2E internal data model files are not pure CA 2EFreedom tools use the existing CA 2E physical and logical filesIncluding keyed physicals and multi-format logical filesWith no need for additional logical files to be createdAlthough additional CA 2E internal objects are requiredFreedom/Pre-Compiler enables thisAutomatically fine tunes generated CA 2E sourceIntroduction

Review and assess file and database relationsDraw a quick diagram of the files and relationshipsCA 2E functions will use dummy access pathsDetermine if a new access path can be easily supportedObject management may be of concernField names may be different if file was assimilatedNo additional index is created as it will share the keyed physical indexIf yes, generate and compile the new access pathUse the new access path in place of the keyed physicalIf no, use pre-compile processing to override fileWe will address this in a later sectionY2ABDAP is a keyed physical file in CA 2E

Using Keyed Physical Files

Review the file definitionYDOCF FILE(Y2ABDAP)

Note the keyed access and unique sequence informationNote the key fields

Check database relations for other database filesDSPDBR FILE(Y2ABDAP) and YDOCF FILE(Y2ABDAP0)

Existing PHY will not have key fieldsDo not generate or use!Functions need to be based on default UPD and RTVDo not generate UPD and RTVAdjust generated source to use correct file, format and field namesNeed a new RSQSelect correct key order and sequenceIgnore Select/OmitDo not generate RSQAdjust generated source to use correct format and field namesY2ABDAP (*PF)Format:@ACDAYQAccess:*KEYEDSequence:*UNIQUE


K1 AAABCD K2 AAACCDK3 AAACSQSelect AAACCN > +0Omit *ALLDepends onBased on

Import physical file and define primary keyYRTVPFMDL FILE(Y2ABDAP) RMVFLDPFX(*NO)

Define the primary key sequence by changing Has to Known-by relationships

Review file entriesE=Edit File Entries

Note the assigned DDS names for the fields which differ from the physical file format entries

Setup dummy access pathsZ=Edit File Details

Use the UPD and RTV as dummies for the physical file, and create a new RSQ dummy for the logical fileNotice that UPD and RTV have new implementation names, and RSQ uses the logical implementation name

Setup dummy access path key sequenceZ+Z=Edit Access Path Format Entries

Setup the correct key sequence for the logical file

Setup Pre-Compile Processing Directive

Insert call to EXCUSRSRC in any function based on associated dummy ACPCall the Pre-Compile Processing Program that will adjust generated sourceCreate one EXCUSRSRC function for each dummy ACP that needs to be adapted for use within CA 2E functions

Generated source before and after changes 0000.30 >>>>>Y* CALL HPRCPREDIR (UUAHUFR &C &M &F &L) CHG 0000.30