Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

acucobol decompiler

Status
Not open for further replies.

breilly

Programmer
Nov 12, 2002
17
US
My client has ACUcobol (version 4.3) and has lost all source code. The production application exists, runs fine and I hope it stays that way for a while.

All the programs have been compiled with the debug feature on. I do not know if they have been compiled with the -ZD or -ZS option because the script to compile them has also been lost. Opps, I forgot to mention it is running on a unix box.

When I start the application, I can enter the debugger and see all the source code. It is not pseudo code, funny addresses and labels, but the real honest-a-goodnes code that we want.

Does anyone know what time frame a company (ACUCORP for example) would take to recover the source. There are about 75 programs. And how recovery is charged (by the source code line, etc).

Or, if I my questions have been barking up the wrong tree, I would appreciate any comments on different options.

Thank You
Bruce Reilly - Consultant in front of the fan.
 
If you only have 75 programs then you can do that yourself.

Just start debugging each one of the programs, position yourself on the first line of the program and then page down until the end of program.

You need to do this within a terminal emulator capable of saving ALL the buffer to a file.

You may need to do a few pages at the time, but it should be farly quick to do, just a few hours. This assumes that ALL programs were compiled with the same source debug options, and that this includes any copybooks used.
If the copybooks are not part of the source they you will probably be out of luck.


Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks for the quick respopnse Frederico. Like a good client, they now ask what about 650 programs. That takes it out of the scope of your suggestion. (which is a graet one!).

So, I am back to my question of time and cost. Any ideas, any one ????

Bruce
 
Hi

We ran into the exact same thing here, and these were our options:

1. Contact AcuCorp and ask them to do it. We did so and they sounded like this had never been asked of them before. They did extract the code for us, though, and it was sent back later on the same day. But I did get the impression that they did not have a formal service set up for this sort of thing, so I don't know what they would charge you for 650 pgms or what the time frame would be (I'd be counting on big $$$).

2. We had the same scenario occur again sometime later (with another pgm ... we're not that disorganized ...). We ended up downloading a trial version of SnagIt ( and it worked beatifully. It's basically a capture utility that automatically scrolls through a window (that you point it at) and captures all the text within. The scrolling was not fast enough for my taste, but SnagIt is a pretty configurable thing, so there might be a way to speed it up.

I would recommend trying the capture method. You'll just have to figure out if there's a way to use it in a batch process, so that it goes through all the ACU files and saves the captured text to seperate files.

One more thing - you probably know this, but just in case: once you capture the text, you'll lose all thge COPY statements. I.e., all copybooks will already have been merged into the source. I don't know if this affects you, but it's good to keep in mind. In any case, the end result is a full compilable pgm, so it should do the trick for you.

Good luck, and let us know how it turns out!

.DaviD.
 
We're still trying to come up with alternatives other tha AcuCorp. A previous post mentioned that a terminal emulator capable of saving all buffer scrolled data to a file would be nice.

We have TNVT+, using WYSE-60 and I can only get the source code that fits in 1 page(screen). Is there a emulator that will let me scroll from top to bottom of the source inside the debugger and copy/paste or select it so I can begin a manual rebuild?

Still with hope....
 
I'm sure there must be a freeware one somewhere. We've used the WRQ Reflections series of emulators for ages and they have configurable screen buffers that should be able to hold a large COBOL program source.

Regards.

Glenn
 
The problem here is that the debugger only shows 25 lines at any time.
It also starts the program on the first line of the Procedure division.

So for this to work it is necessary to
1- start debugger
2- go to top of program
3- page down until end of program source.

Then save the buffer to a file.

Not easy, and if the program it very big the buffer may not be enough, so several "save's" may be needed.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
breilly -

One question - what platform is this being done on? Windows or something else?

If it's on Windows, then SnagIt can scroll through the debugger window and capture the code as it is scrolling. I understand that you don't want to use AcuCobol anymore, but you'll just need the runtime in order to run the debugger and capture the code. After that, you can do anything you like with it.

And no - I'm not trying to plug SnagIt [smile]. I just used it a couple of times and found that it does everything you're looking for ...

.DaviD.
 
OS is Unix.

I have tried SnagIt on a Windows Runtime and it is just too slow, as it scrolls 1 line at the time. Usable only if there is no other option, and in this case there is.

Breilly only asked for options that did not involve contacting AcuCorp for it, not that they are dropping Acucobol.


Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Ok, good to know. I knew the speed wasn't the greatest, but assumed there would be a way to speed it up and capture the screen in a quicker fashion.
 
Next client question. Let's suppose that we have a sample (half dozen) of programs that have been de-compiled back into source. How are you going to test them.

After I compile them, do i have an option of using a file compare utility. I know there are no line feeds and 'gobbly-goop' in the object code (compiled with the debug feature). If so which compare utility.

Otherwise, I see a few options.
1. Create a duplicate system and compile the new modules into the new system and go key stroke original system, key stoke new system and look at results. Repeat till coffee runs out.

2. Write functional test plans and perform testing on the new system.

3. Run the same process on both systems and look at the data files.

4. etc. etc.


Any comments or advice.
 
Breilly,

Following on the conversation we had privatelly there is no way you can compare the object program, as there are things that get ommited due to the copybook problem. Acucobol could do it, and so could anyone else if the start/end of each "section" of the object were known (this excluding the debug bits.

Based on the sample I have and if the compile options of each program are visible with a ccbl -???? option and if the same are used then I believe a simple test plan would be enough. Your customer choice though.


There are a few programs out there that allow for an automated testing, and you could setup two systems with same data, same test cases and then compare results.

All the ones I know of do take a lot of time and requires a very good knowledge of the system being tested. It is easier when you already have valid testers and test plans inforce.

test director is one of the options.
Search comp.software.testing newsgroup for comments on this one and others.


Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top