Yes, I’m perfectly aware there are numerous advanced editors available that handle RPG and CL, and perform the syntax checking we are all familiar with using SEU. However, it’s not always possible to use RSE or the other editors in all situations. Some companies may not want 3rd party software and editors accessing their iSeries, or maybe you’re working on a project where you find yourself plunked down at a desktop PC that’s either quite old or has limited capabilities.
You find yourself looking at an ugly, old green screen version of SEU. Yucko.
All hope is not lost. You can make SEU readable and be comfortable with SEU once again. It’s a simple little trick.
First, it will only work on very good 5250 emulators like Client Access that allow for semi-advanced keyboard mapping. I will use CA as the example since it’s what I use now.
Write down these codes. They will come in handy later. They are the hex values associated with a particular color on the 5250 display. When you use the COLOR attribute in a Display File, these codes are placed in a single byte in front of the text or field on a display to render the color. That is how the 5250 display works.
The codes I colored with red are those that make the most sense for me to use in SEU. You can experiment and see if the others make sense for you. (These are in no particular order).
|GRN||20||WHT||22||GRN UL||21||WHT UL||26|
|GRN RI||21||WHT RI||23||GRN UL RI||25||ND||27|
|RED||28||RED BL||2A||RED RI||29||RED BL RI||2B|
|RED UL||2C||RED UL BL||2E||RED UL RI||2D|
|TRQ||30||TRQ RI||31||YLW||32||YLW RI||33|
|TRQ UL||34||TRQ UL RI||35||YLW UL||36||ND CS||37|
|PNK||38||PNK RI||39||BLU||3A||BLU RI||3B|
|PNK UL||3C||PNK UL RI||3C||PNK UL RI||3D||BLU UL||3E|
Keep in mind – the colors TRQ (turquoise) and YLW (yellow) already have column separators on most displays, so underlining them looks atrocious. As does any BL (blinking) and some of the RI (reverse image). RED UL RI (red underlined and reverse image) makes my eyes spin out of control.
Now that you’ve picked your colors, it’s just a matter of mapping them into Client Access (or you favorite emulator). Just follow these simple steps.
Open your emulator and find the option for keyboard mapping. In the default Client Access configuration it’s a little icon on the second row of the toolbar that looks like a little tiny keyboard. If you hover you mouse over it the tooltip “Remap keyboard functions” should appear.
Click the icon. A large window that mimics a keyboard map will appear. In the upper half it says “Select a Key”. In the lower right it says “Change Current Actions for Selected Key”. When the window first opens, the Esc key should be highlighted. If you look in the lower right, you’ll see what the key does by default (Base), and what it does when used in a key combination (Shift+Esc, Ctrl+Esc, etc.).
I avoided using any of the Ctrl or Shift combinations since they are very common, and I certainly didn’t want to confuse myself with AltGr or CtrlShift. I settled on using the Alt key plus another key to set my colors. You can decide on another combination that suits you.
(Note: I did initially set up reverse image colors using the CtrlShift option, but I never use it. It was just too much colorization).
First, let’s set the color white (also know as highlight). Click on the letter ‘W’ in the keyboard map. In the box next to the control key you want to use (min would be Alt), type in “apl 22” (without the quotes).
From this point forward, clicking on Alt and the letter ‘W’ will set the color byte as x’22’ in your SEU source. Congratulations, you’ve set up your first color. At this point, you can click on File->Save, and close the window. The change will take place immediately.
Now, all you have to do is repeat the setup for any other colors you want. Here’s what I have set up, and it’s pretty easy to remember. Just prefix the code you enter in the text box with “apl” (i.e. – apl 22, apl 23, etc.).
Alt + W = White (highlight)
Alt + G = Green
Alt + R = Red
Alt + P = Pink
Alt + Y = Yellow
Alt + T = Turquoise
Alt + B = Blue
A few notes about using color.
First, don’t overdo it and colorize your source with too many variations. Set some standards – and follow them! I do most of my regular comments in White, important ones in Red or Pink. Blue doesn’t stand out too much, so I rarely use it. Yellow and Turquoise have the column separators, so they stretch across the SEU window. They are great for separating sections of code.
Oh, and if you page the SEU window to the left or right you might find the colors disappear. It depends on whether the color byte is “seen” by the 5250 interpreter.
- Collection of Keyboard Shortcuts Which Can be Used in All Browsers(amanchoudharycom.wordpress.com)
- Alt Codes ¡Olé!(tcsamantham.wordpress.com)