LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-27-2011, 02:50 PM   #1
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Rep: Reputation: 31
migrate DB from cobol to postgresql


HI,
Is there a software or procedure to migrate DB from COBOL to SQL ( or postgresql)
thanks a lot
bela
 
Old 06-27-2011, 02:59 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
How is the data in the "COBOL" system being stored? DB2? Flat files?

Last edited by dugan; 06-27-2011 at 03:02 PM.
 
Old 06-27-2011, 03:03 PM   #3
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
Why this question?
Is there differents procedures ?
say both !

Is there a procedure from inside postgresql ffor example ??

thanks for help
regards
 
Old 06-27-2011, 03:09 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
Uhm, you don't know how the data you need to migrate is being stored or what format it's in? You don't know whether it's stored in files or in a DB2 database or in some other format? OBVIOUSLY, we need that information before we can recommend anything. Especially anything automated.

What you will likely end up doing is this. First you would create a script containing SQL CREATE statements to create the tables and relationships you need in the postgresql database. Then you would export the data you need from the "COBOL" system (note: COBOL is not a data storage format) and transform it into a script full of SQL INSERT statements. Then you would run both scripts on the postgresql system to create the tables and insert the data.

EDIT: if the data in the "cobol" system is in a db2 database, then you should read this document:

http://wiki.postgresql.org/wiki/File:DB2UDB-to-PG.pdf

Last edited by dugan; 06-27-2011 at 03:19 PM.
 
Old 06-27-2011, 03:15 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by abd_bela
Why this question?
Is there differents procedures ?
Let's not be daft here. COBOL is a programming language. How can we possibly advise you on migrating from a programming language to a database?

Migrating from legacy systems (read: large mainframe transactional systems) to new languages and databases is a huge undertaking. It often requires a well-coordinated staff of business experts, programmers, sysadmins, and database administrators. And these projects sometimes fail.

Did I misunderstand you? Are you asking how to migrate a single table from DB2 to PostgreSQL? Are you highly familiar with the table design and data?
 
Old 06-27-2011, 03:22 PM   #6
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
Thanks for help

In fact I have a Database written in Cobol, I want to migrate it to serveur using postgresql.

thanks a lot
 
Old 06-27-2011, 03:24 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
Then you already knew the answer to your original question: it's a proprietary database system used only in your organization, so obviously no automated tool or procedure exists.

I've told you what you need to do in post #4.
 
Old 06-27-2011, 03:30 PM   #8
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by anomie View Post
Let's not be daft here. COBOL is a programming language. How can we possibly advise you on migrating from a programming language to a database?



Migrating from legacy systems (read: large mainframe transactional systems) to new languages and databases is a huge undertaking. It often requires a well-coordinated staff of business experts, programmers, sysadmins, and database administrators. And these projects sometimes fail.


thanks


Did I misunderstand you? Are you asking how to migrate a single table from DB2 to PostgreSQL? Are you highly familiar with the table design and data?

Yes but you can create a database, at least this is our case. The database is install on HP server.
My goal is to transform this DB to sql BD.


THIS IS MY QUESTION? Is there a port which converts the DB in order to read it with SQL ?
 
Old 06-27-2011, 03:31 PM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
Quote:
Originally Posted by abd_bela View Post
THIS IS MY QUESTION? Is there a port which converts the DB in order to read it with SQL ?
[/SIZE][/COLOR]
Of course not.

If you can tell us the name of the database software that's written in COBOL, or any of the other information that I asked for, then the answer might change.

Last edited by dugan; 06-27-2011 at 03:35 PM.
 
Old 06-27-2011, 04:07 PM   #10
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'd add that if your proprietary database is hierarchical in design, you will want to do a complete analysis of the table data before attempting to stuff it into a relational database. (For instance: rows may need to be "flattened", and significant work may need to be done to determine suitable primary keys.)
 
Old 06-27-2011, 05:11 PM   #11
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
my recomendation would be to look at this http://www.simotime.com/cblcsv01.htm document and write a program to dump your data to csv files, then import them into your postgresql database.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Easily Migrate A PostgreSQL Server With Minimal Downtime LXer Syndicated Linux News 0 04-07-2010 01:40 PM
Migrate from Oracle 11g to Postgresql for a non-DBA GenePoole59 Linux - Server 3 08-12-2009 09:08 AM
LXer: Migrate from MySQL or PostgreSQL to DB2 Express-C LXer Syndicated Linux News 0 06-18-2006 04:54 PM
migrate from suse, what should i migrate to? any suggestions?:twocents: Siljrath Linux - General 4 12-26-2005 01:14 PM
differences+between+mainframe+cobol+and+AIX+cobol+data+type ssrividhya AIX 1 08-09-2004 09:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration