IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on Best approach for IMS Key value Masking in Bulk


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kiran.Kumar

New User


Joined: 31 Mar 2012
Posts: 1
Location: India

PostPosted: Tue Mar 31, 2015 6:41 am
Reply with quote

Hi,

I have a requirement to change Key field values (Mask to another value) of the Root segment based on some criteria (Not all Root keys need to be modified). The DB is very large and it has multiple Child segments. Each Root occurence can have upto 5000 Child Segment Occurences.

The following is the structure of the DB:

Root Segment -- Level 0
----Child Segment A -- Level 1
--------Child Segment D -- Level 2
--------Child Segment E -- Level 2
-----Child Segment B -- Level 1
-----Child Segment C -- Level 1
---------Child Segment F -- Level 2
---------Child Segment G -- Level 2
--------------Child Segment H -- Level 3

I was initially thinking of using IMS unload and change the Key values in the Unloaded file and then Load it back. But it seems, the keys should be in sorted order. Hence this Approach seems to require a Group Sort of the data to be done. Also I am not sure if the key values are stored in the First 31 bytes of the Unloaded Data. The Actual Segment data starts from 32 Byte.

The only feasible option I could think of is to write a BMP program to Insert all the segments with new Values and delete the segments with old values. But it requires lot of IO for the Insert/Deletes.

Could you please suggest me a best approach that I could follow.
Back to top
View user's profile Send private message
Balasubramanian

New User


Joined: 23 Apr 2005
Posts: 13
Location: Bangalore

PostPosted: Wed Apr 01, 2015 2:59 pm
Reply with quote

Delete the old root segments and Insert the new root segments would be the possible approach.

Instead of holding the DB for all the roots while reading, the logic can be split into two programs.
1) One is to find & write the old root and its child segments along with the modified root details into a file with a indicator for Insert and Delete.
2) Second is to read the above file and do the DB call as per Insert or Delete indicator
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts masking data with HPU DB2 0
No new posts Need an opinion on the approach that ... CLIST & REXX 15
No new posts Need better approach to create a sort... DFSORT/ICETOOL 8
No new posts Masking Db2 data DB2 3
No new posts Import bulk PDF or TXT files into BLO... DB2 2
Search our Forums:

Back to Top