Problem solve Get help with specific problems with your technologies, process and projects.

Remove comment lines from source

Read how you can quickly remove source file comment lines in your source file.

Sometimes trying to read code that has been commented out or changed many times is difficult. You can quickly remove source file comment lines in your source file. I suggest you do this in the development library.

Code: Create an SQL source member with the following statement:

DELETE FROM DEVLIB/QRPGLESRC WHERE substr(srcdta,6,2) = 'C*'

Then do the following command:

OVRDBF FILE(QRPGLESRC) TOFILE(DEVLIB/QRPGLESRC) MBR(PROGRAM) 

Then run the following:
(DEVLIB/QSQLSRC) = substitute with your SQL source LIB/FILE
DELCOMMENT = substitute with the name of the source member you created above

RUNSQLSTM SRCFILE(DEVLIB/QSQLSRC) SRCMBR(DELCOMMENT) COMMIT(*NONE)

This was last published in August 2001

Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close