ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Ending a program because user went to lunch or left for the day

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ending a program because user went to lunch or left for the day

    Hi,
    How can I end a program that is displaying a screen where the user has walked away, gone to lunch or left for the day?
    We have maintenance programs where users select records but do nothing and then walk away from their desk leaving the program running and holding locks.
    Have told them many times not to do this but that those words seem to fall on deaf ears.

    What I'm looking for specifically is code I can place in the program that will time-out the program after a set interval, not time-out the session. The system inactivity timer will do that but that is set to 70 minutes and that is too long. I need to end the program after a few minutes of inactivity.

    I was in a JD Edwards shop years ago and they had code in their programs that did just this. Some kind of time-out function within the program. I do not know if it was JDE propriety code or the shops code.

    Any assistance will be greatly appreciated.

    Thank you in advance,
    Michael.
    Everyday's a school day, what grade are you in?

  • #2
    Hi,
    Just a quick idea, we have used the WAITRCD() parmeter on the CRTDSPF to provide a maximum wait time for the operator to respond to the screen request for input.
    If they don't respond the program continues with an exception that defaults to a response as if the F3=Exit has been pressed. Even if the program logic is
    buried in multiple program calls eventually the process will end and in our environment sign the user out. We have used a value of WAITRCD(900) seconds or 15 minutes
    as a good compromise with operators to give them time to review data before ending their display process. (they can always press F5=Refresh to recycle for another 15 minutes.
    Hope this helps, Merry Christmas.

    Comment


    • #3
      Originally posted by roverbyte View Post
      Hi,
      Just a quick idea, we have used the WAITRCD() parmeter on the CRTDSPF to provide a maximum wait time for the operator to respond to the screen request for input.
      If they don't respond the program continues with an exception that defaults to a response as if the F3=Exit has been pressed. Even if the program logic is
      buried in multiple program calls eventually the process will end and in our environment sign the user out. We have used a value of WAITRCD(900) seconds or 15 minutes
      as a good compromise with operators to give them time to review data before ending their display process. (they can always press F5=Refresh to recycle for another 15 minutes.
      Hope this helps, Merry Christmas.
      Great idea, thank you.
      Merry Christmas to you as well.
      Everyday's a school day, what grade are you in?

      Comment


      • #4
        Just remember that you can not use EXFMT with WAITRCD.
        You have to use a WRITE and READ instruction

        Comment

        Working...
        X