dumping progress 6.2 database

jdelange22

New Member
Hi there,

I'm new to the progress stuff. I'm looking for a way to make a dump from the progress 6.2 database so that I can import the data to MySQL or ORACLE. The database is running on a Novell 4.11 Server. It can run under DOS as well. Since I'm a young DBadmin I'm not very familiar with both Novell and Progress. Both are very outdated versions as you can see. Is there a simple way to get a dump or can someone point out some tools that can make CSF or someother readable file-format from the progress database??? I've tried running progress under DOS and ran every executable I could find but it simply doesn't make sense to me at all. Please give your advise... I'm a newbe to this.

Greetings,
Jan de Lange
 
If the database is active, your best bet would be to shut down the server, truncate the bi file, copy the .db file onto a local hard drive, then access the database using _progres.exe.

However, that might not make any sense to you.

If you just want the data, for a one-off dump to be reloaded into another database, which seems to be the case, then try this:
1. Copy the .db file from the Novell server to a local drive. (It would be better to have the remote db on a mapped drive, but you should be able to access it through Network Neighborhood)
2. find out where your V6 directory is (try SET under DOS and looking for the entry DLC=) and change to the directory under DLC, then change to the BIN directory. So, if you have DLC=P:\DLC62 then change to p drive p:, then change to the progress bn directory cd\dlc62\bin
3. Start the progress executable _progres.exe, but you might need some start-up parameters. For c:\temp\mydb.db, try _progres -1 -db c:\temp\mydb
4. Choose Tools - Data Dictionary
5. Choose Admin - Dump Data and Definitons - Table Contents (.d file)
6. Move the cursor to ALL and press ENTER
7. Press F1
8. If it asks you for a directory to put the files in, type in the directory required, e.g. c:\temp\dump - but make sure it exists before you carry on
9. Press OK and the screen should show that it is dumping the data from all the tables
10. Check the dump files are being created in the directory - they should be call something.d, somethingelse.d and so on, depending how they were originally set up.
11. You might need to open the data files with a text editor and take out the lines at the end, to make sure they are just a flat file. Have a look at one of the files to see what I mean.
12. The data is dumped in Progress' format, which means that character fields are dumped with quotes around them, integer and decimal fields are dumped as numbers, logical fields are dumped as yes, no or ? and dates are dumped in mm/dd/yy format. I am not sure how easy they are to load up, having never done it myself.

You may have some problems getting into the database, it might produce errors about missing BI, BI not found, or corrupted data. If you just copied the db file, that's the reason. Start up _progres with _progres -1 -F -db c:\temp\mydb

Without going into all the commands to stop and start servers, that might be all you need.

have a go and see how you get on.
 

jdelange22

New Member
Thanks for your reply. I'm getting along a lot better now. Unfortunately I recieve another error when loading the _progres executable. The errormessage I get is as follows: "this version of PROGRESS requires a start up procedure (495). That's it. It recognises the database just fine. Already got the DB copied on a VMware disk running MS-DOS. Any help on this one? Thanks!
 

gcampbell

Member
You'll probably want to run something like:

_progress -db DBNAME -p _edit.p



_edit.p is the Progress Procedure Editor. From there you can access the Db Admin.

Later,
Gordon
 

jdelange22

New Member
I'm sorry but I simply don't have a _edit.p or similar file in my DLC folder or anywhere on my PC. Am I missing some files here? I do have other procedure files. Can you send me the _edit.p file? I can load dict.p and have a look at all tables in the database. From there I have an option to dump database but it gives me an error I don't have the rights to compile. Do I need a license to compile?
 

jdelange22

New Member
This is the command I use to get progress running:
_progress.exe -1 -db c:\db\mydb\mydb.db -p dict.p

After that progress gives me an error about the database being damaged and I should dump the database. Just press spacebar and I enter Progress Data Dictionary. From there, I access Admin and Utilities. Whenever I want to make a dump I get an error:
This version of Progress does noet allow compiles (471)
Object file not located for "c'\dlc\prodict/misc/run_dump.i" (473)

The file run_dump.i is there on the system...perhaps wrong slashes? (/ in stead of \ ) Getting closer though :)
 
jdelange22 said:
This is the command I use to get progress running:
_progress.exe -1 -db c:\db\mydb\mydb.db -p dict.p

After that progress gives me an error about the database being damaged and I should dump the database. Just press spacebar and I enter Progress Data Dictionary. From there, I access Admin and Utilities. Whenever I want to make a dump I get an error:
This version of Progress does noet allow compiles (471)
Object file not located for "c'\dlc\prodict/misc/run_dump.i" (473)

The file run_dump.i is there on the system...perhaps wrong slashes? (/ in stead of \ ) Getting closer though :)

Don't worry about the error message about the database being damaged - it happens if you copy the .db file without truncating the bi file, or if you didn't copy the .bi file. It's nothing to worry about if all you want is to dump data.

As for the problem with the program not being found, have you tried checking the PROPATH to see whether the DLC directory is included? The PROPATH is an environmental variable that contains a list of directories that Progress looks for to run its programs. Check what it says and whether it includes the location of your Progress code. But there again, you perhaps can't check this without being able to run programs.

In my prodict\misc there is a file _rundump.i that is called from product\dump\_dmpdata.p, but because _rundump.i is sourcecode, not compiled code (.r) it won't run with your setup.

Hmmm, didn;t someone post some code etc to allow you to run admin from that kind of setup? Maybe it's worth checking that out.
 
The thread that might help you is:
http://www.progresstalk.com/showthread.php?t=92628
The attachment within it is :
http://www.progresstalk.com/attachment.php?attachmentid=278&d=1134897324

But, they are for V9, I think, as they don't compile in V8. Tricky.

OK, I've tried something on one of my PCs and it seems to work.

Open a DOS prompt and find your DLC directory and cd to BIN. Here, you will find a program called XCODE.EXE that is used to encrypt programs. Make a note of the path, say c:\dlc\bin\xcode.exe

Create a batch file c:\temp\mkdump.bat and type in:

c:
md c:\temp\src
md c:\temp\xcode
cd\temp\src
echo compile c:\temp\xcode\dump.p save. > c:\temp\src\compile.p
echo compile c:\temp\xcode\dump2.p save. >> c:\temp\src\compile.p
c:\dlc\bin\xcode -d c:\temp\xcode *.p
cd\temp
_progres.exe -1 -db c:\db\mydb\mydb.db -rx -p xcode\compile.p
_progres.exe -1 -db c:\db\mydb\mydb.db -rr -p xcode\dump.p
_progres.exe -1 -db c:\db\mydb\mydb.db -rx -p code\compile.p
_progres.exe -1 -db c:\db\mydb\mydb.db -rr -p xcode\dump2.p

Make sure you have the following directories created:
c:\temp\src
c:\temp\xcode

Now, go into a text editor, or the progress editor if you have it, create a file c:\temp\src\dump.p and type in the following code (or copy and paste it):

output to c:\temp\src\dump2.p.
put unformatted "def stream s_out." skip(1).
for each _file:
if _file._file-name begins "_" then next.
put unformatted
" output stream s_out to c:\temp\" _file._dump-name ".d." skip
"for each " _file._file-name " no-lock:" skip
" export stream s_out " _file._file-name "." skip
"end." skip
"output stream s_out close." skip (1).
end.
put unformatted "quit.".
output close.

Then run the batch file c:\temp\mkdump.bat and it should create the xcode directory, xcode the programs, compile dump.p (you'll get an error regarding dump2.p not existing, but ignore it), run dump.p to create dump2.p, compile dump2.p (no error message this time), then run dump2.p to dump out the data where you wanted it.

Whew! That's all there is to it .....

So, to summarise:
1. Create c:\temp\mkdump.bat as stated
2. Create c:\temp\src\dump1.p as stated
3. Run c:\temp\mkdump.bat from a DOS prompt
4. Sit back and have a cup of tea and a slice of cake

You can check that the files are being dumped by keeping having a look in the directory where you are dumping them.

Hopefully that will help you out. I know it is long-winded, but it might help.

Simon

 

jdelange22

New Member
I hate to say it... but there again I don't have any file that even looks like xcode.exe. I don't even have a BIN directory. It's named PROBIN on my machine and it has only a few files in it. Perhaps I must state again that I'm using a very outdated version (6.2) of progress. It seems to be a RUNTIME version only. The one that comes on 19(!) 1.44 MB discs. :lol: Too bad, I already checked the PROPATH var and it is set correctly. It's strange, because in this version from the file dump_d.p the procedure dumpdata.p is being called. From dumpdata.p the file run_dump.i is being called. That's when it goes wrong. The other files are being called/loaded just fine. So... I guess I'm stuck again. Thanks for your help so-far anyway!!!
 
jdelange22 said:
I hate to say it... but there again I don't have any file that even looks like xcode.exe. I don't even have a BIN directory. It's named PROBIN on my machine and it has only a few files in it.

I honestly can't remember whether V6 came with xocde.exe - it must have done as I have used it in V6. I wonder if xcode from a later version would work. I've just tried it with 3 versions of xcode.exe - v8, v9, v9.1e and they produce identical files. So, maybe you could try with another version of xcode.

I've attached a zip file with xcode.exe from different versions of Progress - maybe that will help. I've also included dump.p, compile.p and mkdump.bat

jdelange22 said:
Perhaps I must state again that I'm using a very outdated version (6.2) of progress. It seems to be a RUNTIME version only. The one that comes on 19(!) 1.44 MB discs. :lol: Too bad, I already checked the PROPATH var and it is set correctly.

Yes, but using XCODE.EXE, you get around the runtime limitations by being able to compile encrypted code. That way, you can write a short program to do some of the work, xcode it, compile it and run it on a runtime system.

jdelange22 said:
It's strange, because in this version from the file dump_d.p the procedure dumpdata.p is being called. From dumpdata.p the file run_dump.i is being called. That's when it goes wrong. The other files are being called/loaded just fine.

Not really, what is happening is that _dmpdata.p calls run_dump.i but passes run-time parameters to it. What this means is that Progress takes run_dump.i, checks the run-time parameters and substitutes them into the code, creating effectively an on-the-fly program, then runs it. That way, you can use the same program to the same thing with different database-tables, for instance. Unfortunately, this involves compiling the program on the fly, which is not allowed in a runtime system. Similarly, if you compiled the include file, you wouldn't get the right result as it would error because the run-time parameters are blank. Bummer.

If the dump programs don't work and you can't use xcode to create dump programs, then you probably need to try and access the progress database from some other language/system.

Simon
 

Attachments

  • xcode.zip
    114.1 KB · Views: 25

jdelange22

New Member
Simon,

Thanks for all your help sofar... I will try your method first thing tomorrow. I'll let you know if it was successful. Thumbs up!

Greetings Jan de Lange
 

jdelange22

New Member
Ok, that didn't work out. xcode can't be run from DOS so I ran xcode from WinXP using "xcode.exe -d c:\temp\xcode *.p" xcode compiled 2 files in c:\temp\xcode; compile.p and dump.p. Both containing a lot of garbage, so it seems to be compiled to me. Then I copied both files to my DOS machine and ran progress from there with the compiled versions of compile.p and dump.p, running the four last lines of your mkdump.bat. Progress gives me several errors this time:
"This version of PROGRESS only compiles encrypted programs (1086)"
"Unable to run c:\temp\xcode\compile.p" (=compiled file I copied there!)
Then on the next command:
"This version of PROGRESS does not allow compiles (471)"
"Object file not located for c:\temp\xcode\dump.p (473)"

And finally I get some error about dump2.p not being found, which is normal because there is no dump2.p.

I guess this version of xcode isn't compatible with my V6 progress, because progress doesn't recognise the encryption. I tried xcode from V8, V9 and V9.1. All won't work on V6. Got some more suggestions? I really appreciate your help!

I found this link that states V6 must likely have a different encryption:
http://www.progresstalk.com/showthread.php?t=69573&highlight=encrypted

Anyone got xcode from a V6 progress?
 
I'm surprised xcode didn't work from DOS - it works on my PCs.

If the V6 encryption is different to V8 encryption, then xcode will not work unless it is V6. The rest of it should work, though, assuming you can get hold of V6 xcode.

Sorry I couldn't have been of more help.
 

jdelange22

New Member
it@flude.co.uk said:
I'm surprised xcode didn't work from DOS - it works on my PCs.

If the V6 encryption is different to V8 encryption, then xcode will not work unless it is V6. The rest of it should work, though, assuming you can get hold of V6 xcode.

Sorry I couldn't have been of more help.

Thanks for all the help! Xcode does run from Windows-DOS but it refuses to run from my MS-DOS 7.1. I guess I'll have to drop this untill I get hold of a XCODE from V6. Thanks again for your input and help! It really helped me out so far.
 

jdelange22

New Member
Today I came across another DB-forum and a parameter "bulkload" was mentioned there. Could someone post some details about how bulkload works? I could try that perhaps...
 

MadMichael

New Member
jdelange22 said:
Today I came across another DB-forum and a parameter "bulkload" was mentioned there. Could someone post some details about how bulkload works? I could try that perhaps...

The Bulk Loader utility is used to load previously-dumped data into a Progress database. It is provided as a faster alternative to the Data Dictionary Load.

As you are trying to get data out of your database, I suspect it would not be of much use for you.
 
???????

One question, why are you dumping Progress???
Progress RDBMS is arguably the most efficent RDBMS available. M$ Access ha,ha,thud (laughing my head off). Oracle better attempt, shame about the 4GL, or lack of it!!
 
Top