I was working on a small task where user need an autocomplete field on Green Screen. Autocomplete fields are very simple elements in GUI where based to field value a list of suggested values are displayed and with change in Field value suggestions also get updated.
RPG/DSPF does not have a event model like HTML or other GUI frameworks where you can track every key stroke. So technically its not possible to write a autocomplete style functionality in RPG /DSPF. So I considered to look into emulator side.
TN5250j is a very good and OPEN SOURCE 5250 emulator. So after some modifications in TN5250j I was able to fire required AID actions to replicate autocomplete on green screen. Code is completely written in RPGLE/DSPF and TN5250j manage events based on position of field in the screen.
Please let me know what you think on this