More SEU Tricks

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

After reading the February 1994 TechTalk item, "Helpful SEU Tricks," I felt one particular function, Copy/Overlay, was overlooked.

The Copy/Overlay function simply allows code in SEU to be copied (enter 'C' to copy) and overlaid (enter 'O' to overlay) on top of existing lines. Yet, it can make unwieldy or repetitive alterations much more straightforward.

For example, adding right-hand comments, such as a modification reference, can be done very quickly. First, create a blank SEU line containing only the required description, as shown in the first line of 7.

For example, adding right-hand comments, such as a modification reference, can be done very quickly. First, create a blank SEU line containing only the required description, as shown in the first line of Figure 7.

Then copy the newly created line by entering 'C' in the sequence column. Next, enter an 'O' followed by a 6 in the sequence column of the first target line. This results in a tidy packet of new, clearly commented code in your source. Of course, the initial line will generate a syntax error after the operation; but the line can quickly be removed because the cursor automatically returns to it.

Another use is in commenting out unnecessary sections of code. I have given a very suitable example in 8. It shows how one initially commented line (no syntax errors this time as it is a valid entry) can be made to overlay six more lines in just a few easy keystrokes. Just enter 'C' on the commented line, followed by O6 to overlay it on the next six lines.

Another use is in commenting out unnecessary sections of code. I have given a very suitable example in Figure 8. It shows how one initially commented line (no syntax errors this time as it is a valid entry) can be made to overlay six more lines in just a few easy keystrokes. Just enter 'C' on the commented line, followed by O6 to overlay it on the next six lines.

I am sure many people will find this a useful extra weapon in their armory.


More SEU Tricks

Figure 7 Propagating Comments with Overlay

 Before: C C MOD01 O6 C $SUBR BEGSR 0003.00 C Z-ADD1 COUNT 0004.00 C COUNT DOUEQ10 0005.00 C ADD 1 COUNT 0006.00 C END 0007.00 C ENDSR After: 0001.00 C MOD01 0002.00 C $SUBR BEGSR MOD01 0003.00 C Z-ADD1 COUNT MOD01 0004.00 C COUNT DOUEQ10 MOD01 0005.00 C ADD 1 COUNT MOD01 0006.00 C END MOD01 0007.00 C ENDSR MOD01 
More SEU Tricks

Figure 8 Commenting Out Code

 Before: C C**** O6 C $SUBR BEGSR 0003.00 C Z-ADD1 COUNT 0004.00 C COUNT DOUEQ10 0005.00 C ADD 1 COUNT 0006.00 C END 0007.00 C ENDSR After: 0001.00 C***** 0002.00 C***** $SUBR BEGSR 0003.00 C***** Z-ADD1 COUNT 0004.00 C***** COUNT DOUEQ10 0005.00 C***** ADD 1 COUNT 0006.00 C***** END 0007.00 C***** ENDSR 
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: