Here's how to fix that. Open your favorite database editor and open the source member. Don't have a database editor that can handle HEX value editing? No problem. Years ago, I had the pleasure of working with Bill Reger, author of WRKDBF, one of the MOST POWERFUL and FREE (uh, yeah, FREE!) iSeries database editors. It's VERY powerful, comes with a money-back guarantee (giggle), and is so WELL written -- it's been unchanged since 2000. Go to www.wrkdbf.com and download and install this fantastic utility. (All examples in this article use this utility.)
OK -- commercial's over. So, what do we do now? Here's a SHORT list of good highlighting values.
|
Value
|
Description
|
|
X20
|
Normal (for Returning screen attributes)
|
|
X21
|
Reverse Image
|
|
X22
|
BOLD & BRIGHT
|
|
X23
|
BOLD & BRIGHT & REVERSE
|
|
X24
|
Underline
|
|
X28
|
RED
|
There are more values, but the above is the "best of." However, I'll show you what source looks like with all the values from 20 to 39 (Hex 40 is a space) displayed.
Wow! Pretty snazzy, huh? You can use these values in ANY 5250 application. Just remember: You sacrifice one byte to turn the attributes on and off (that's two bytes total). So, if you have the room, you highlight the screen without needing to program indicators or manipulate the DDS file for the display.
In the first example you see the sentence, "it's GREEN!!! not RED!!!" When I'm done, the sentence will read, "it's GREEN!!! notX29REDX20!!!" Note the X20 to END the attribute to turn the screen BACK to normal.
The screen is WRKDBF. While editing the record, the HEX editor was used by Hitting F8 -- entry is UP/DOWN format. (Note the exploded Example.)
What does our source look like now?
SWEET!
Now highlight the WHOLE line of comments.
COOL! I changed the Byte to the left of the "T" in "There's" to a HEX 22 -– the HIGHLIGHT attribute. More coolness. Let's look at it!
Dang, that's cool!
Now, for your IF/ELSE/ENDIF statement you need to know one trick. Unless the 5250 stream SEES the attribute change, the display will NOT change. Because of that, you'll need to MOVE your SEU display a little by hitting the F19 button. This will shift it to the left. In this example, I changed the Byte to the LEFT of the C statement to highlight my IF/ELSE/ENDIF statements.
OK -- this is a LITTLE ugly, but you see the difference ONLY when you move the margin over a little. Clearly you need to salt this to taste, but you can see a definite benefit to using this technique.
Hit F11 to move the code back into place.
Fun stuff. Enjoy WRKDBF. It's a GREAT solidly written utility -- and it contains an un-delete function, too. If you REALLY love it, send Bill a comment. If you see him at COMMON or any other event, BUY HIM DINNER! Tell him the Lazy Coder recommended it. See ya next month!
-----------------------------------------
About the author: Andrew Borts is webmaster at United Auto Insurance Group in North Miami, Fla. He is often a frequent speaker at COMMON and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.
|
Rate this Tip
|
To rate tips, you must be a member of Search400.com. Register now
to start rating these tips. Log in if you are already a member.
|


');
// -->
DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.
|
 |