View previous topic :: View next topic
|
Author |
Message |
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
hi all,
i have lost some copybook members. they were deleted by mistake, maybe years back.
as of now programs run fine in production.
but they cannot be debugged/tested as i cannot compile them again due to missing copybooks.
is it possible to create a compile listing from load member of the cobol program, kind of reverse engineering. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
So copybooks are deleted and compile listing are not stored at all?
Did you search across all level your copybook library available in your system?
I would suggest you to talk to your Admin about this |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
t5590ag wrote: |
is it possible to create a compile listing from load member of the cobol program, kind of reverse engineering. |
Not without a lot of manual effort. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
cannot be recovered systematically in any way. checked at all levels and all libraries.
@ Akatsukami, what kind of manual effort it would be, in that case i will see if its worth it or not. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
t5590ag wrote: |
@ Akatsukami, what kind of manual effort it would be, in that case i will see if its worth it or not. |
Assume, for the sake of simplicity, that there is only one copybook used in a source module.
All variables used in a COBOL program must be defined in the Data Division. Therefore, list all variables referenced, and all variables not so defined must be in the copybook. The defined fields used as sources and/or targets may help determine usage and picture of the copybook fields. This will not give their order, nor reveal the existence of unreferenced fields or filler, but if it is known what the copybook represents, e.g., a record layout in a data set, it may be possible to deduce more.
Or it may not. In any case, there is no tool or algorithm for reconstructing the copybook; nothing can be substituted for a thorough knowledge of the logic and purpose of the program. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you look at the data, map the fields, and re-source the "copybooks".
Then use the newly created copybook(s), recompile with a different nane, and test. Compare the outputs. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
How about looking at your oldest source library backups? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
There's a company in the Atlanta-area who specialize in creating source listings from load modules -
www.source-recovery.com/
HTH.... |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your Audit procedures may require preservation of source such that systems as-at reporting periods could be re-created. So, as NicC suggests, there may be a number of back-ups that you don't know about, but someone should.
The Source Recovery Company are very good. Get a quote, and balance against your need.
If doing it yourselves, find a "disassembler" and use that on the object code in question.
How many copybooks are missing? More than one from the same program? Sounds odd. Other programs must be affected (else the code wouldn't have been in a copybook). Might give you extra information, and you need to find them anyway. More than only copybook missing is a bit mch for "accidental". |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
That's a kind of "reverse-engineering" and there are quite a good number of companies who have this profession as their bread and butter - which means it's not easily doable without investing in pay-for-products. (and I'm not sure how successfull they get in this.)
OTOH, you might try AMBLIST. AMBLIST can be used to verify an object module, map CSECTs within a load module, verify the contents of the nucleus, trace modifications to the executable code within a CSECT, and map link pack areas. And perhaps, you might need to write a REXX to make you get "a source code" from the logs AMBLIST will generate for you. I've not tried it much BUT even if the you get a "source code", it will not be (and it can not be) the original source code using which the load was generated - how would 'some program' know the variable names from the load module or any unused variables which might be present in the "original source code". |
|
Back to top |
|
|
|