SEU Exit Program

Warning: The sample code is not complete and is intended primarily for ILE RPG use.

One of the more recent releases (maybe as late as V4R2) introduced a new exit point that you can use for providing new functionality to SEU.

Use WRKREGINF and change the QIBM_QSU_LCMD to add a exit program to SEU.

RSEU001 is the exit program in this example. It adds the following function to SEU:

  • F8 - Split line at cursor position, if any non blank characters under/after it, or Join the next line with the current line at cursor position.
  • Line command GSA/GSB - Generate source before/after - Generate eval statements for all fields of a file

The split/join logic lets an extended calc "flow" onto the corresponding fields of the next line.

This makes it easy to move the "extra code" to the next source line if, for instance, your and/or logic doesn't fit on one line.

RSEU002/DSEU002 This program is called for line commands GSA/GSB to let you specify what you want to do.

RSEU001 uses a service program called UTLSYS. This consists of several modules, but only two is needed here:

    UTLSYS - Some general modules for message handling, etc. If you already have written your own, I'd stick to them, since the ones used here are old and not very good.

    DBRTVFD2 - Routines for reading field names and descriptions using the QDBRTVFD API

I've included the full prototype source, and binder source for the service program, and you will have to remove those routines that are not included (or needed) for this example.

Also included are the sources for two PF's and LF's which I use to store the template ("prototype") source for all exported functions/procedures in our service programs:

5th February 1999