There are ways of doing this, but they’re quite complex to use.
using API’s it is possible to design dynamic screen at run time.
Thanks for the feedback, we don’t get enough of it.
This question comes up from time-to-time.
If this were easier we would have developed a fraction of the screens that exist.
- – - – - – - – - – - – - – - – - – - – - –
There are 2 practical ways of doing this.
Using the DSM routines is feasible, though it’s more like working in Assembler, and carries with it a need for thorough design and careful constructio to make it maintainable. You will also find that it takes maybe 3 iterations to become modestly proficient.
secondly, as a 5350 screen in 24×80 mode carries only 1920 characters, you can design screens in rpg using this as a template. insert hex start and end fild characters and constan ts as needed. When reading back the screen DS you need to examine the entire ‘buffer’ to spot changes. Logical add used to be good for this.
Extending this idea though, as you say you want to recreate WRKDBF, then provide a subfile with a single visible field, and construct the content of the line as needed.
So – you provide a select panel taken from the field list you derived with the API, the user selects the fields wanted and sequences them, and you then move each to the ‘field’ in the requested sequence, with a separator.
Users won’t know the difference, and it’s all done in rpg.
Keep at it – we’d all like an open source version of WRKDBF back in the bulletin boards.