Most of us are familiar with using Option 91-94 to drill down from process to process, and for jumping to the target of GOSUB/GOTO in the ILF Editor, but did you know that you can also jump to the Data Dictionary? Simply position the cursor on any field or file name on any ILF command, and press Option 94. If you are on a file name, you will be taken to the File header in the Data Dictionary. If you are on a field name, you will be taken directly to that field in the Data Dictionary. If the field uses a Domain, you can go to the Domain Name, and press Option 94 again, and you will be taken to the Domain itself. This is very useful when you need to quickly check the attributes of a file or field.
Also note that after using Option 94 to jump to the target of a GOSUB/GOTO, then PREVIOUS IMAGE (F4) will return you to the original GOSUB/GOTO statement. This makes it easy to follow a program's logic by jumping between the main processing and individual subroutines.
Another useful feature of Option 94 is on a BEG READ or BEG LOOP statement. Option 94 on the BEG READ / BEG LOOP will jump to the associated END READ / END LOOP statement, and PREVIOUS IMAGE will return you to the BEG READ / BEG LOOP.
Old Modes and EP Execution
Release 4.2 introduced some changes in the order of Event Point execution and mode switching. When returning from an optional child, APPX will now execute the frame level event points (Pre-Display, Pre-Display/Verify). This is generally an improvement as we now have the opportunity to update the image with new information, etc, where we couldn't before. However, this may also prevent some programs from working as designed under 4.1. You can set the environment variable APPX_41_EPS to any non-blank value to force APPX to use the 4.1 rules for event point execution. This allows you to install 4.2 without worrying about what impact the new execution order will have on your existing processes. Also, it gives you an opportunity to test the new execution order while getting the other benefits of 4.2 immediately.
The other change in 4.2 is that APPX retains the current record when changing modes (similar to SPEED II) in non-scrolling inputs. So, if the user is viewing a record in Inquire mode, they can just press the Change key to reselect it in change mode without having to recall the record. This is also a welcome improvement but may trip up some programs that were expecting the old behaviour. You can tell APPX to revert to the old way by setting APPX_OLD_MODES to a non-blank value. Note that these environment variables are not compatible with the Application Design environment. You must ensure that you have at least one session or port where these variables are not enabled in order to run Application Design in 4.2.
--- OPTION and the HTML Viewer
In the HTML viewer control, we can build references like:
<a href=1>Run Option 1</a><p>
Appx will make the text clickable, and when the user clicks it, it will set --- OPTION = USER x, depending on which line they clicked. This gives us an alternative way to present a list to the user and have them click on an item on the list to do some processing or to select a record.
The problem is that each line on the list needs its own OPTION value (so that we know which one they clicked) and --- OPTION can only go from USER 1 to USER 255. If we have more than 255 items on the list, we can’t use this technique.
Or can we? The --- OPTION PDF is a token field but, by definition, it’s really an index into the token table. The index values can go as high as 32767, which give us many more values than the 255 we thought. Some of the higher values are used by Appx, therefore keep your values in the range of 30101 to 32767. This gives us over 2000 values to put in our list, which gives us a lot more flexibility.
We can’t directly test for USER 32000, since that’s not in the token table. Instead, move ---
OPTION to a work field, then test the numeric value of the work field:
SET --- II = --- OPTION IF --- II = 32000 T [do something useful]Note that values over 32767 will wrap around to -32768 and count down as the option value increases, i.e., 32768 becomes -32768, 32769 becomes -32767, etc.
For additional information, contact firstname.lastname@example.org
[back to top]