MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieving Source Code

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Jimmy_Lu
Beginner


Joined: 23 Sep 2015
Posts: 9
Topics: 4

PostPosted: Fri Oct 09, 2015 6:54 am    Post subject: Retrieving Source Code Reply with quote

For some of my modules cobol source code is missing and only load module is there.BUt now i want these source codes to recompile due to cobol update.

So my task here was to recover the source code and then recompile.

We have IBM debugger in our shop.So i thought to hit the code in debugger and then copy the code line by line.
Because to hit the code in debugger we only need to specify load module in JCL.

But i am not able to hit the code in Debugger after running the debug job.
Error i am getting in debug tool is "Source or Listing data is not available, or the CU was not compiled with
he correct compile options"
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Fri Oct 09, 2015 7:23 am    Post subject: Re: Retrieving Source Code Reply with quote

Jimmy_Lu wrote:
For some of my modules cobol source code is missing and only load module is there.BUt now i want these source codes to recompile due to cobol update.

So my task here was to recover the source code and then recompile.

We have IBM debugger in our shop.So i thought to hit the code in debugger and then copy the code line by line.
Because to hit the code in debugger we only need to specify load module in JCL.

But i am not able to hit the code in Debugger after running the debug job.
Error i am getting in debug tool is "Source or Listing data is not available, or the CU was not compiled with
he correct compile options"



Jimmy LU,

How did you arrive that IBM Debugger would be able to retrieve the source code?

Please search before posting. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=7725&postdays=0&postorder=asc&highlight=Load%20Module%20to%20Source%20Code&&start=15
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jimmy_Lu
Beginner


Joined: 23 Sep 2015
Posts: 9
Topics: 4

PostPosted: Fri Oct 09, 2015 8:11 am    Post subject: Reply with quote

Hi Kolsu

Thanks for reply !!!

We compile source and produce load module.After getting the load module we can debug it using the debug tool.

In debug tool when this source is hit we can debug code line by line.

Hence i thought to use load module to hit the source code.But that was crab.

I have already gone through this link but could not found any way to retrieve the code.

AMBILST reffered in the link is used to know the version of cobol used and the code posted by Mike is not to generate the source code.

Apologies if i have understood anything wrong
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Oct 09, 2015 8:50 am    Post subject: Reply with quote

Once something is deleted it is gone. If you are lucky there may be a backup but that depends when it went and how long backups are kept. Another alternative is if you have the compile listing you should be able to regenerate the source from that
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Fri Oct 09, 2015 9:24 am    Post subject: Reply with quote

Jimmy_Lu wrote:

AMBILST reffered in the link is used to know the version of cobol used and the code posted by Mike is not to generate the source code.

Apologies if i have understood anything wrong


The rexx is incomplete you can actually retrieve a psuedo code from the amblist which actually reads every statement in the load module and can generate an equivalent source statement, however it is not 100% accurate.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jimmy_Lu
Beginner


Joined: 23 Sep 2015
Posts: 9
Topics: 4

PostPosted: Tue Oct 13, 2015 4:46 am    Post subject: Reply with quote

Hi Kolsu

Amblist with which SYSIN statements you are refering ?

Thanks in Advance !
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Tue Oct 13, 2015 5:36 am    Post subject: Reply with quote

You have a link to the AMBLIST documentation. If what you are looking for isn't there, it isn't there.

If you have lost one or more sources and have exhausted all possible back-ups without locating them, then presumably you don't work at any sort of a financial institution.

A Debugger uses a compile listing to match executing code to source code. If you have a compile listing, you can get your source back.

Otherwise, you have two choices. Use a Disassembler and your knowledge of Assembler to work out what the program is doing, and re-code the source from that.

By search-engineing, locate a company which can recover the source for you. Locate a source recovery company.

It won't be cheap, and the quality of data-names depends on the quality of information that you can provide, but it will be 100% accurate.
Back to top
View user's profile Send private message
Jimmy_Lu
Beginner


Joined: 23 Sep 2015
Posts: 9
Topics: 4

PostPosted: Thu Oct 15, 2015 3:09 am    Post subject: Reply with quote

Quote:
Use a Disassembler and your knowledge of Assembler to work out what the program is doing, and re-code the source from that.


Shocked Sad
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Thu Oct 15, 2015 4:39 am    Post subject: Reply with quote

Yes, it's a tough one. It's always best not to lose a source. Also work out how to stop it happening ever again.

You can also look at recoding from specs, you have test-data existing, yes, or lost that as well?

The source recovery service isn't cheap, but it is very good. Depends how important the program(s) is/(are).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group