Marc
Marc

Reputation: 31

Run time screen input fields

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.

Upvotes: 3

Views: 300

Answers (2)

RockBoro
RockBoro

Reputation: 2473

here is a good post on using the USRDFN DDS keyword: https://archive.midrange.com/rpg400-l/199907/msg00462.html

but yeah, you would get much more mileage from using PHP or even CGI to write a dynamic file editor that runs in the browser.

Upvotes: 2

Charles
Charles

Reputation: 23783

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.

Upvotes: 1

Related Questions