× 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.



Sure...

1) Put the keywords FRCDTA & INVITE in the DDS for each record in
    the display file.
2) Before your program runs, have another program (maybe a CL)
    create an 80-char long data queue in QTEMP.  It doesn't
    need to be keyed.
3) Before your program runs do:  OVRDSPF FILE(MYDSPF) DTAQ(QTEMP/MYDTAQ)
4) When your RPG program displays a screen, do a WRITE.  This will
    cause the screen to appear for the user.    Because you did an
    INVITE, they will also be able to type input.
5) When the user presses enter or a function key (etc) the display
    file will place an entry on the data queue.
6) In your RPG program, after you've done the WRITE to the screen,
    call the QRCVDTAQ API to receive data from the data queue.
    You can have that call time-out after a certain number of seconds.
    So, you might set it to be, say 15 minutes...   15 * 60 = 900 seconds
7) If your program gets a timeout on the data queue, it's "inactive" and
    you can then end your program in whatever manner you think is
    appropriate.
8) If your program does get an entry on the data queue, the user typed
    in data and pressed enter/functionkey/etc.  In that case, you do
    a READ to the display file, and handle the data appropriately.

Hope this explanation is helpful.  Next step in learning how to do this
is probably to look for information in the manuals.   I think the CL
programming manual is where I learned about it (though, that was a long
time ago) you might take a look...


On Thu, 15 May 2003, n wrote:

> We have users that don't signoff and leave certain applications running.
>
> I was wondering if there was a way (within the interactive program), to exit
> the program if it has been inactive for a certain period of time.
>
> Any help as always is appreciated.
>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.