How to strip comments from CL program?

945 pts.
Tags:
CL
CL Comment Stripping
CL programs
CL utility
Anyone know of a utility that will strip comments out of a CL program? We have many programs with more comments than actual code (for history purposes) and I'd like to see just the actual code. And no, I don't want to RTVCLSRC and lose indentation, etc.

Answer Wiki

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

Hi,

In RPG you have specific places where comments can exist or specific lines of code which are comments, however in CL the comments can be on separate lines or before or after your CL commands.

It shouldn’t be so difficult to write something to do this – maybe there’s already a tool available on the net. One thing to bear in mind is that comments are normally placed to help future maintenance of programs – however bad or incorrect comments are more misleading than no comments.

Regards,

Martin Gilbert.

Discuss This Question: 2  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
  • philpl1jb
    It would be a pretty simple rpg program OverRide to the member name Read each line 1. Scan for /* if found replace every space from there to */ with blanks repeat 1 until not found 2. if line is blank delete it. else update it. Phil
    49,830 pointsBadges:
    report
  • Splat
    Don't forget that comments, notoriously those attached to a command, can be continued on to multiple lines.
    7,115 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