Is there a way to recover the source code from a program?

415 pts.
Tags:
AS/400
AS/400 debugging
Hi, I lost the source code of a program with a couple of modules, but I have the *PGM and *MODULE which were compiled with *ALL in debug option. is there a way to dump the source code in a source physical file or in some place? Thanks.

Software/Hardware used:
V7R1

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Programming could be created to do it. Simplest way without programming is probably by running STRDBG over the program to show the *LIST view. Use your emulator to select/copy/paste the page showing on the screen, page down and repeat. Paste into a simple PC text file. After the first or second page-copy, record the sequence as a macro. Then start the macro to have it run through the full compiler listing. When done, save the text file into your IFS /home directory. And finally, use CPYFRMSTMF to put it all back into a source member. A macro will run through long listings without getting tired, and you can use it again later. By doing it manually a couple times, you'll be certain that the key sequence is correct. -- Tom
    125,585 pointsBadges:
    report
  • GraceP
    Thank you, I just thought that there were a command , I will try with the macro it sounds useful.
    415 pointsBadges:
    report
  • ToddN2000
    There is a command for recovering CL programs. You may be thinking of RTVCLSRC command. As far as I know debugging your program to get the source would be the easiest way. That is as long as the object was compiled with the correct debug options. Good luck.
    15,080 pointsBadges:
    report
  • GraceP
    Thanks ToddN2000 :)
    415 pointsBadges:
    report
  • TomLiotta
    Prior to i 7.1, RTVCLSRC could be used to retrieve a form of the CL statements used as source for an OPM CL program that was compiled with the ALWRTVSRC(*YES) option. As of 7.1, the command can also be used for ILE CL programs and modules that specify the same compile option. I should have asked if the question was about CL, but most often it's about RPG. My fault. -- TOM
    125,585 pointsBadges:
    report
  • Divyakapoor
    Debugging the program would be great way to recovery.
    45 pointsBadges:
    report
  • GraceP
    Ohh no was my fault, I did not clarify the language, I was searching to recover the source code of ILE C. Knowing the command for CL can be useful for the future. Thanks for your answers.
    415 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following