× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Multi user programming?
  • From: jpcarr@xxxxxxxxxxxx
  • Date: Thu, 13 Jul 2000 11:59:41 -0400


> Suppose I'm running a program which is used to edit a record.  Now let us
say
> I'm in edit mode, editing a record.  And when I try to run the same
program in
> one more terminal and try to edit the same record, which is already used
by
> one more user, the system shows blank screen with "X" at the bottom.  How
to
> rectify this problem.  How do the network programming works.  How to lock
and
> unlock the records.
>
> Can u help me in this regards,
>
> Rajendren K. G.
> TMSI. INDIA.
>

No program should ever(99.999%)  go down for a locked wait on a record.
You should never leave a locked record on the screen during user key/think
time.


Have RTNDTA on DDS format of the "Change Screen"
Have one is externally defined data structure(DSx) of file being updated
Have one standalone field(Fldx)  big enough to hold the above D/S.

Get Record with No-Lock
Eval   Fldx  = DSx
Put record on screen.
User changes info
Chain to file,
IF     DSx <> Fldx
     Some one has changed record in the mean time.
     send error message represent the screen to redo input
Else
READ screen format again(this is the reason for RTNDTA)
Update file
End

No locked waits EVER,,   No blind updates by someone else in meantime EVER.

This is a system design problem.   This should have been thought of before
you get
500+ programs out there that lock a record for update and put it up on the
screen.
Shop Standards!

Person gets record,   Program puts screen up,  Person goes to lunch or 4hr
meeting.

Not Good.

John Carr

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.