dynamically loop through database connections with datamigrator presented by kathy getz, omnicare...
DESCRIPTION
Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc. Agenda. Presenter Introductions Omnicare Business Overview Omnicare Architecture Challenges/Solution Questions/Answers. Omnicare Business Overview. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/1.jpg)
Dynamically Loop Through Database Connections With DataMigrator
Presented byKathy Getz, Omnicare Inc.
Lori Pieper, Information Builders Inc.
![Page 2: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/2.jpg)
Agenda Presenter Introductions Omnicare Business Overview Omnicare Architecture Challenges/Solution Questions/Answers
![Page 3: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/3.jpg)
Omnicare Business Overview Omnicare, Inc. OCR, a Fortune 500 company
based in Covington, Kentucky, is a leading provider of pharmaceutical care for the elderly. Omnicare serves residents in long-term care facilities and other chronic care settings comprising approximately 1.4 million beds in 47 states, the District of Columbia and Canada. Omnicare is the largest U.S. provider of professional pharmacy, related consulting and data management services for skilled nursing, assisted living and other institutional healthcare providers as well as for hospice patients in homecare and other settings. Omnicare's pharmacy services also include distribution and patient assistance services for specialty pharmaceuticals. Omnicare offers clinical research services for the pharmaceutical and biotechnology industries in 30 countries worldwide.
![Page 4: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/4.jpg)
iWay Data Migrator Architectural Diagram
![Page 5: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/5.jpg)
Environmental Challenges Combining AS/400 data with HP-UX data
For reporting from Windows Metadata – Table names shared
16 AS/400 database 64 HP-UX Schemas
Standardized Metadata across platforms
![Page 6: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/6.jpg)
Metadata Names by Default
AS/400 Metadata
HP-UX Metadata
![Page 7: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/7.jpg)
Metadata Names Shared
•Standardized naming conventions
•User Friendly Metadata
![Page 8: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/8.jpg)
Available Options Maintain 80 sets of Metadata per Table
Maintain 80 dataflows per iDM job Share Metadata and loop through databases
Solution: Share Metadata and loop through databases
![Page 9: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/9.jpg)
Solution Details Dynamically Create Access files (.ACX)
AS/400 change table names dynamically
![Page 10: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/10.jpg)
Solution Details Dynamically Create Access files (.ACX)
HP-UX change connection dynamically
![Page 11: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/11.jpg)
Dynamically Creating Access Files
Controlling program obtains system connection information AS/400
Changing “Tablename” Parameter HP-UX
Changing “Connection” Parameter
![Page 12: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/12.jpg)
Setting owner name value
Setting table name value
Required file def for .ACX file
Writing .ACX file
Required
![Page 13: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/13.jpg)
Setting connection value
Required file def for .ACX file
Writing .ACX file
Required
![Page 14: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/14.jpg)
Obtaining Connection Information Controlling Database informationSystem Connection CompanyID Active
AS400 OASISDB02 KY4 YAS400 OASISDB03 IND YAS400 OASISDB04 MA1 Y
System Connection CompanyID ActiveHP-UX ALEDX Y HP-UX ALQDX YHP-UX AMADX Y
Controlling the Loop
-SET &TAB_NAM6=&SYS_CONN || '/MSCMPP';
-SET &CONN_NAME=&SYS_CONN;
![Page 15: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/15.jpg)
The LoopRead System Connections
Is this AS400?
Yes No
Process AS400 Process HP-UX
Is this HP-UX?
Yes No
Issue Message
Are there more system connections?
YesNo
?
?
?
Exit
![Page 16: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/16.jpg)
Reading the System Connections
EX PULL_ACTIVE_DBS_FROM_PHARMACY DM_FOLDER=&DM_FOLDER -SET &NUM_CONNECTIONS = &LINES; -IF &NUM_CONNECTIONS = 0 THEN GOTO NO_CONNS; -SET &LOOP_CNT = 1;
SQL DELETE FROM &Target_DBEND -RUN -START_PROC
-READ SYS_CONNECTIONS NOCLOSE &SYS_NAME.A25.
&SYS_CONN.A20. &CMPY_ID1.A3. &ACTIVE.A1.
![Page 17: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/17.jpg)
Reading the System Connections
EX PULL_ACTIVE_DBS_FROM_PHARMACY DM_FOLDER=&DM_FOLDER -SET &NUM_CONNECTIONS = &LINES;
Use Focexec to pull the system information needed:
•Active –vs- in-active
•Hold output as ALPHA
Set Loop control
![Page 18: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/18.jpg)
Reading the System Connections
Set up Loop controls
-IF &NUM_CONNECTIONS = 0 THEN GOTO NO_CONNS; -SET &LOOP_CNT = 1;
SQL DELETE FROM &Target_DBEND -RUN
![Page 19: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/19.jpg)
Reading the System Connections
Read in the information from the ALPHA HOLD file created using the Focexec above.
-START_PROC -READ SYS_CONNECTIONS NOCLOSE &SYS_NAME.A25.
&SYS_CONN.A20. &CMPY_ID1.A3. &ACTIVE.A1.
![Page 20: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/20.jpg)
Process AS/400ENGINE SQLEDA SET AS400
-REMOTE BEGINEX WRITE_ACCESS_FILE SYS_CONN=&SYS_CONN-REMOTE END
EX CMASAP REQ_NAME=AS400_data_flow, CM_ASYNC=OFF, PARMS="CMPY_ID1=&CMPY_ID1"
Point to AS/400 Sub System
Since source systems are on the sub servers we need to create the ACX files on those sub servers.
Execute the iDM Data Flow to pull the AS/400 data, passing the “company ID” as a parameter.
![Page 21: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/21.jpg)
Parameter as Filter
![Page 22: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/22.jpg)
Process HP-UX
ENGINE SQLEDA SET HP-UX
-REMOTE BEGINEX WRITE_ACCESS_FILE SYS_CONN=&SYS_CONN-REMOTE END
EX CMASAP REQ_NAME=HP-UX_data_flow, CM_ASYNC=OFF, PARMS="SYS_CONN=&SYS_CONN"
Point to HP-UX Sub System
Since source systems are on the sub servers we need to create the ACX files on those sub servers.
Execute the iDM Data Flow to pull the HP-UX data, passing the system connection information.
![Page 23: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/23.jpg)
Parameter as Transformation
![Page 24: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/24.jpg)
Final Step -INCR_LOOP-SET &LOOP_CNT = &LOOP_CNT + 1;-IF &LOOP_CNT LE &NUM_CONNECTIONS THEN GOTO
START_PROC ELSE GOTO DONE;
Increment the Loop counter and test to see if there are more connections to process.
![Page 25: Dynamically Loop Through Database Connections With DataMigrator Presented by Kathy Getz, Omnicare Inc. Lori Pieper, Information Builders Inc](https://reader036.vdocuments.site/reader036/viewer/2022062814/56816849550346895dde376d/html5/thumbnails/25.jpg)
Questions and Answers