Chapter 8 of the IBM Source Entry Utility (SEU) manual describes how to create user-defined options and line commands. There are also two sample programs (SEU001 and SEU002) in the appendices. The former provides the basis for the two example programs provided with this article.
The first example program (SEU003) defines line commands for highlighting and coloring source lines--either a single line or a block of lines. They can also be used to highlight text within a line by positioning the cursor immediately to the left of the target string (there must be a blank space available to write the hex code to). There is also a command to clear all highlighting.
The second example program (SEU004) is designed for use with display file DDS source. It enables the F7 key, which when pressed with the cursor on a line containing a MSGID or MSGCON, will retrieve the message text and send it to line 24 (as a regular message). This sure beats hunting around message files to find text strings! Just be sure that the required message file is in the library list for the option to work (unless the message file name is qualified with the library name).
There are two methods of implementing SEU exit programs. The first is for a single program. Start an SEU edit session and press F13 (Change session defaults). Page down and enter the required program and library name against the "User exit program" prompt.
The second method is to use the Work with Registration Information (WRKREGINF) command to register one or more exit programs. The exit point for SEU user-defined options is QIBM_QSU_LCMD. Option 8 allows you to work with the exit programs for that exit point. Exit programs can then be added/removed as required (check out the Help text for more details).
The default setting in SEU is to use the registration facility. The session defaults will only need to be changed if you defined a filter string. The latter can be used to tailor exit programs to individual users or groups of users.
Phil Hope has been an iSeries developer for the last decade, starting with Patient Administration systems in the UK Health Service, through Electronic Data Interchange for a leading UK food manufacturer, to Sales and Warehousing systems for major UK retailers. You can reach Phil at Phil.Hope@nsb.co.uk.
I\'ve always wanted to know about how to write my own SEU line commands and along comes this tech tip that does NOT bother to tell me. No explanation whatsoever on how the programs interface with the operating system - how is the source member data presented to the exit program and how do we feed it the changed info back? Oh, I know I can try to figure it out from the examples he provided, but some explanation would be nice. (You can figure out for yourself everything you\'ve ever read in a tech tip, but then what\'s the point of the tech tip? Registering exit programs isn\'t always easy either but this guy\'s answer if for me to hit the help key - Hey thanks for the insight! Then you look at the source downloads, in a word document, instead of a save file I could just upload, and his comment for SEU004 is just to compile it to a level that allows pointer math - LAZY! What would it have taken for the author to recompile the program a few times specifying ever receding release levels until the compile failed & then let us know what release was needed? Furthermore, who is the technical editor for this stuff? Said person is either, overworked, uniformed or lazy as well. This article is way sub-par for professional work.