Skip to content
Buck Calabro edited this page May 31, 2016 · 1 revision

Welcome to the SEUEXIT wiki!

SEUEXIT is an exit program for the IBM i native editor SEU. Check the SEU manual for details on using SEU. Chapter 8 has the details of how to write an exit program.

This implementation is not intended to be a turnkey application. Rather, it is intended to demonstrate the principles of communicating with SEU via the documented API.

SEU communicates with the exit program via a user space (QSUSPC in QTEMP) and 3 pointers passed to the program as parameters. The user space contains 3 blocks of information:

  • Information about the data being passed from SEU to the exit program
  • Information about the data being passed back to SEU from the exit program
  • The affected lines of code

The parameter list is three pointers; one to each of the blocks noted above.

SEU doesn't create the user space until it encounters either a line command it does not recognise, or F7, or F8. When any of those conditions occur, SEU creates the user space and populates it with a subset of the source lines. If F7 or F8 are pressed, SEU passes only the line the cursor is on plus the next line (2 lines). If an unknown line command is entered on one line, the same situation occurs: SEU passes the line the line command is on plus the next one. If an unknown line command is entered on two (or more!) lines, SEU passes all of the lines from the first to the last, plus one more. The key thing to remember is that SEU dynamically creates the user space and only passes affected lines, not the entire source member.

Clone this wiki locally