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

Loading the DB2 tables using IMS database unloads


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

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Mon Nov 19, 2012 3:36 pm
Reply with quote

Hi Guys,

I have a requirement wherein I have to load the DB2 tables using the unloads of IMS databases. I am not sure, how its done. I would like to know if there are any utilities to perform this functionality which can be used in the JCL.

Please let me know incase more information is needed.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Nov 19, 2012 4:26 pm
Reply with quote

You know, of course, that IMS and DB2 are completely different in terms of organization (and other things, but that's the most immediate problem). Assuming that your DBAs have the tables and the RI set up correctly, you can use your sort product to split up the IMS unload into segment types and load using whatever DB2 utilities you have to hand (IBM or BMC are the two most widely used).
Back to top
View user's profile Send private message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Mon Nov 19, 2012 5:07 pm
Reply with quote

Unfortunately, the requirement is to create DB2 tables first (that should be done by me as well). Once, these tables are created, the unloading of the IMS databases should be done and then, this data needs to be loaded in these DB2 tables.

And moreover, I do not have any tools that split up the IMS unload into segment types.

I am not aware of the utilities that perform the loading of DB2 tables using the IMS unloads. That's what my query is actually about. icon_smile.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Nov 19, 2012 5:48 pm
Reply with quote

Well, I'm not a DBA, although I sometimes perform low-level DBA tasks. There are better people on this board to advise you, particularly GuyC; until they come along, however, I'll try to muddle through.

Familiarize yourself with the LOAD utility. Note that it permits you to load from sources that are not laid out identically to the table to which the data are to be loaded.

All the information to reload an IMS data base is in the unload itself. I don't have my notes here at home, but essentially there are headers that name the segments and map them to sequence numbers and hierarchical levels. Then the data records are prefixed with those sequence numbers and other information that is (probably) not relevant to your task.

So: take the unload and use whatever sort product (DFSORT, Syncsort, etc.) your shop has to strip off the headers and prefixes and write the segments of each type to a different data set. Create the tables, each with the same layout as a segment. Use the DB2 LOAD utility to load each data set to a table.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Mon Nov 19, 2012 7:28 pm
Reply with quote

Is this a part of IMS DB to DB2 migration?

Please do googling on "IMS DB to DB2 migration" for more information like migration approach and tools.
Back to top
View user's profile Send private message
Kunal Surpurkar

New User


Joined: 15 Nov 2012
Posts: 47
Location: India

PostPosted: Tue Nov 20, 2012 11:09 am
Reply with quote

Hi Gnanas,


This is not a part of IMS DB to DB2 migration.

I just got a requirement to perform these activities, as part of regular work. I would be happy, if I could know the procedure to do this.

1. How to load the DB2 tables using IMS database unloads. or rather, is it possible to load a DB2 table using an IMS unload, or the unload of the database has to be converted into a flat file and then load into DB2 table.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 20, 2012 2:46 pm
Reply with quote

an IMS database unload is understood from the reload counterpart

to load a DB2 table You must transform the data to something that DB2 understands.

as usual You are the innocent victim of an IDIOT
who assigned You a task without checking about Your knowledge about it
and without providing You the proper <documentation>

You should have handy ...
the DB2 tables DDL ( which fortunately gives You the names of the colums)
ALL the IMS segments Layout ( copybooks )
ALL the relations of what goes where
IMS segment - DB2 table / IMS field - DB2 column relations

and after that start writing
- DFSORT control cards
- COBOL programs
to remap <things> and build all the files needed for the DB2 reload

anyway I cannot do anything but CONFIRM that
the person who invented and assigned to You the task are ..
morons/idiots/... add as many derogatory adjectives as You like

(*) I said invented ... not PLANNED.
I see very little planning here

as You see, given the complexity of the task the chances of getting conclusive help on a forum are pretty slim

also the task of converting IMS databases to DB2 tables is not something
that can be simply assigned to a person,
with a GO BOY we are all behind You (*)

(*) to to have certain people behind is pretty dangerous for Your well being
icon_wink.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 20, 2012 6:58 pm
Reply with quote

Well - it's not that straight as you state it, Kunal. There is no direct tool to do IMS to DB2 load unless, you've some custom made tool available for the given structures of DBs at your shop.

At minimum - you've to have the DDL of DB2 table and the copybook structure of IMS segments, as Enrico says. And then, as a analyst, you need to write a bit of code to make the unload compatible for DB2 load.
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 What database does Jobtrac use CA Products 4
No new posts Need to fetch data from so many DB2 t... DB2 9
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
No new posts Products/Tools to Optimize Adabas Dat... Compuware & Other Tools 2
No new posts How to: PK does not exist in several ... DB2 6
Search our Forums:

Back to Top