On Sat, Dec 16, 2017 at 8:21 AM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
Is there an repeat-undo process in RPG? Something similar to Ctrl-z in
text editors?
Booth,
You didn't provide any context other than "text editors" for what you may
have meant by "undo". That may have led others besides me to wonder what
half-baked idea you might have had in mind. Thankfully, Buck and Jon
surmised that you were talking about undoing database updates. I'm aware of
a number of valid use-cases for that.
In fact, we provide that for school teachers who are filling out a grades
worksheet. The UI is browser based and the screen looks and behaves a lot
like an Excel worksheet. The columns show all the class assignments and
tests for the year. The rows show all the students in the class. The cells
in the middle contain student-class-assignment grades.
Teachers occasionally need to undo grade values that were keyed into cells.
Every change to a cell is immediately recorded in an IBM i DB table. I
think a product like Google Sheets operates like that too.
At any rate, and as you suspected, we keep track of database changes in an
internal array, and provide an "undo" key that invokes a DB update, a
screen update, and removes the last array entry.
If multiple people were editing the same worksheet at the same time, we
would have to come up with something more entailed in order to accommodate
that. I'd probably have all editors share the same session and keep all the
screens in sync.
The 5250 paradigm is not really geared for that. But I wouldn't have any
problem doing that with the type of plumbing that we have for web browsers.
As an Amazon Associate we earn from qualifying purchases.