Run time screen input fields

Viewed 87

I have a RPGLE program to display and or update a random file chosen by the user. Similar to parts of DBU.

I can get all the fields for a file and their definitions when a file is selected. At run time, how do I display an input capable field on the screen, defined for the correct length of a particular field?

For example. I could generate the DDS source and compile the display file at run time. But that's pretty crude and slow.

I know there's a way to send the whole display format as a string with the layout defined somehow, but I can't find any details. It would be even better if I could define an input field on the screen, then set it's length at run time as length 1, or 6, or 20, etc.

Maybe there's a hex code that marks the end of an input capable field? I could define the field as length 40, then embed the hex code at the proper position to mark the end of input.

Maybe someone can point me in the direction of some info. Thanks.

2 Answers

Assuming you're talking about 5250, you'll want to take a look at the Dynamic Screen Manager (DSM) APIs

Personally, I wouldn't bother. I'd just buy DBU. There used to be a freeware/shareware alternative, but I think it's disappeared. EDIT: actually it's back, check out WRKDBF

And if I really had to build my own, I'd strongly consider something web based.

In fact, I think the web based IBM Navigator for i might have something similar already.

Related