Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

create compile listing from cobol program load

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: create compile listing from cobol program load
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

Moderator


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

PostPosted: Tue Aug 13, 2013 8:30 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Tue Aug 13, 2013 8:35 pm    Post subject: Re: create compile listing from cobol program load
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    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Tue Aug 13, 2013 9:11 pm    Post subject:
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

Site Director


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

PostPosted: Tue Aug 13, 2013 9:14 pm    Post subject:
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: 1715
Location: UK

PostPosted: Tue Aug 13, 2013 9:45 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Aug 13, 2013 9:47 pm    Post subject: Reply to: create compile listing from cobol program load
Reply with quote

There's a company in the Atlanta-area who specialize in creating source listings from load modules -

http://www.source-recovery.com/

HTH....
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 13, 2013 10:29 pm    Post subject: Reply to: create compile listing from cobol program load
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

Senior Member


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

PostPosted: Wed Aug 14, 2013 3:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us