IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

create compile listing from cobol program load


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Aug 13, 2013 8:19 pm
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Aug 13, 2013 8:30 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Aug 13, 2013 8:35 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Aug 13, 2013 8:59 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Aug 13, 2013 9:11 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 13, 2013 9:14 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Aug 13, 2013 9:45 pm
Reply with quote

How about looking at your oldest source library backups?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Aug 13, 2013 9:47 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 13, 2013 10:29 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Aug 14, 2013 3:56 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Load new table with Old unload - DB2 DB2 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
Search our Forums:

Back to Top