decompiler

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

decompiler

Post by ppalka »

Is this possible to decompile routines bytecode to source code?

Best regards,
Piotrek
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes, you can decompile DS/Basic and UV/Basic code.
There is a product available out there which you can purchase. This will decompile programs and routines. Years ago I wrote a decompiler and it wasn't too difficult {I don't have the specs anymore, so can't help you}.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Do not think this is easy. Arnd has been using Universe for many years. This is something he has a great deal of knowledge about.
Mamu Kim
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kim - I shouldn't have said "not too difficult" :wink:

Piotrek - The engine is stack based (think of inverse-Polish notation or the programming of old HP calculators); there aren't too many compiled OPCodes but there are special ones that have variable number of parameters (i.e. elements to pop off the stack) and job variables are referenced in two different ways. All in all a working decompiler requires a list of opcodes as well as description of the current file layout (which parts are code, xref, linking, parameter, etc.) and it will be impossible to do without documentation that none of us have access to.

It is possible to use VLIST on a program and to get a rough idea of what is going on. Any previous low-level programming experience will help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Anyone gonna ask for the 'why' behind the question? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

Post by ppalka »

chulett wrote:Anyone gonna ask for the 'why' behind the question? :? ...
I was just curious, cause some time ago I have a situation, that I export my project, but without source code and unfortunately I delete my project.
So I am wondering about how could I retrieve all my project source code in such situation.

Regards,
Piotrek
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The purchased decompiler (can't recall who sells it anymore) will retrieve everything but common block variable names and CASE constructs (they compile down to embedded IF-THEN-ELSE statements. But you would still need to take those programs and put them back into the repository. This can be done for function and routines but cannot be done for compiled DataStage jobs; there is no decompiler at the job level.
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

Post by ppalka »

ArndW wrote:All in all a working decompiler requires a list of opcodes as well as description of the current file layout (which parts are code, xref, linking, parameter, etc.) and it will be impossible to do without documentation that none of us have access to.
So how you wrote a decompiler some time ago if you haven't access to that documentation? :>
Thanks a lot for provided information.

Best regards,
Piotrek
ppalka
Participant
Posts: 118
Joined: Thu Feb 10, 2005 7:25 am
Contact:

Post by ppalka »

ArndW wrote:The purchased decompiler (can't recall who sells it anymore) will retrieve everything but common block variable names and CASE constructs (they compile down to embedded IF-THEN-ELSE statements. But you would still need to take those programs and put them back into the repository. This can be done for function and routines but cannot be done for compiled DataStage jobs; there is no decompiler at the job level.
I think that my problem doesn't worth buying decompiler. But I will remember that there is such possibility.

Best regards,
Piotrek
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I seriously doubt that the UniVerse decompiler will work with DataStage version 6.0 or later. There are traps in the object code to reflect that they are different products; code compiled on the one can not be executed on the other.

You can visit Source Recovery Service to find out about the UniVerse decompiler.

Having recovered the source code, what do you intend to do with it? You do not have any means to run it.

Why not just restored the deleted project from backup?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ascen
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 12, 2006 6:47 am
Contact:

Post by ascen »

ray.wurlod wrote: Why not just restored the deleted project from backup?
But what if I haven't backup?
Nevermind, that was some test project, it wasn't important.

Best regards,
Piotrek
Post Reply