TechTalk: RPG Comments Made Easy

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Here is a technique for inactivating RPG source statements by converting them to comment statements. You can also activate statements that were converted to comments. Use the CHANGE SEU line command in combination with the F17 (Repeat change) key. Here's how it works.

To convert a statement to a comment, key the following in the SEU command line:

 CHANGE ' ' '*' 7 

Position the cursor on the statement you want to convert to a comment and press Enter. An asterisk is placed in position 7 of the statement. Then, if you want to convert the next statement to a comment, press F17. Continue to press F17 until every statement you want to convert becomes a comment.

To convert a commented statement to an active statement, key the following in the SEU command line:

 CHANGE '*' ' ' 7 

Position the cursor on the statement you want to activate and press Enter. You can use the F17 key to activate the next commented statement in the source member.

You can use the F17 key to convert a block of source statements; however, if there are many statements in the block, you may get tired of pressing the F17 key. A better approach to converting a block of source statements to comments is to exclude the block of statements with the Exclude lines (Xn) command or the Block Exclude (XX) command. Then, key this in the SEU command line:

 CHANGE ' ' '*' ALL X 7 

All of the excluded statements will change to comments. To activate a block of comments, follow the same procedure, except key this in the SEU command line:

 CHANGE '*' ' ' ALL X 7 

? Jim Schecklman

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: