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

Easy way to comment out a block of code

Commenting out executable RPG code properly can be a time consuming task.

By search400 user, David Shafer

Commenting out executable RPG code properly can be a time consuming task. We hope you are filling the entire line with asterisks, and not just 1 asterisk in column 7. SEU has a built in function to do this for you rather easily.

Utilize the "exclude block" function of SEU, by putting an 'XX' on the first line to comment out, and an 'XX' on the last line. Hit ENTER. This will exclude the block from your display. Then evoke the FIND/REPLACE function by hitting F14. Under 'FIND', put ' ' (a blank). Under the CHANGE, key a '*'(an asterisk). Under the FROM/TO columns, put FROM 7 TO 66 (close to end of line). For 'Occurrences to Proces', put 2 (all). For "Records to Search', put 2 (excluded). Press F17 to perform the update. The entire block has been commented out! This will work similarly for other SEU source types as well.


Dig Deeper on RPG iSeries programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close