COBOL/400 program object source

Tags:
COBOL
RTVCLSRC
A Search400.com reader has asked this question: I am facing a problem regarding a COBOL/400 program object without source. Is there any utility like RTVCLSRC to retrieve the source code?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Afraid I don’t know too much about COBOL/400, but if you can get the program into interactive debug STRISDB or STRDBG OPMSRC(*YES), then you should be able to get the source. I’m guessing this won’t work for ILE programs though.

There are probably some vendors out there who offer a utility for source retrieval (although it seems that many of the vendors who used to have such utilities no longer exist).

Regards,

Martin Gilbert.

Discuss This Question: 3  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
  • Sloopy
    A while ago I wrote a utility to recover source from ILE RPGIV modules. You could presumably do the same thing for COBOL. You need to use DMPOBJ to dump the program or module object. Look at the dump listing, and work out how to recognise the start of the source section, and the record separator character or method. From that, a program can be written that will take the dump output and extract the source lines into a source member. I can publish the code for the RPGIV utility, if you like, which may help you to make a start. Unfortunately, here we do not use COBOL, and I have not got time to investigate further. :-( Sloopy
    2,195 pointsBadges:
    report
  • TomLiotta
    OPM COBOL and RPG don't store source in the compiled object. DMPOBJ won't show anything useful for them. If STRDBG brings up source for COBOL/400, it's because the source is available on the system. Tom
    125,585 pointsBadges:
    report
  • Cwc
    To clarify above, whether or not source is stored in the object depends on how a high level language program is compiled, regardless of whether it's OPM or ILE. In our change management system, we have program objects created with the parameters DBGVIEW(*LIST) for ILE and OPTION(*LSTDBG) for OPM. The source does get added into the object, which greatly aids in debugging since the source doesn't have to be on the system. Otherwise, if the object was not compiled with those options, retrieving the source from it is not possible, as far as I know.
    4,290 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