lg - Loyd Goodbar wrote:
> 
> few years.) Is there a way to change the WAITRCD parameter from within
> RPG, or is that at CL-only function. For instance, a patron runs their
> card through the machine, and the account is still on the system. (We
> merge accounts periodically and mail the patron new cards, but
> sometimes the old one gets used.) If the account is valid, I want the
> screen to time out after 10 seconds. But if the account number is
> invalid, I'd like a timeout of say, 5 seconds...

Loyd,

INVITE is probably not the way to do this. You can specify the interval
with OVRDSPF, CRTDSPF or CHGDSPF. None of these are particularly good
options, since in all cases, the display file must be closed before the
command will have an impact. In the case of CRTDSPF and CHGDSPF, the
command won't even run unless the display file is closed. For your
application, a data queue is probably a better option. This will allow
you to specify a different interval each time you process a wait if you
want to. Create a data queue and attach it to the display file with the
DTAQ parameter of CHGDSPF, then in your program, write the display, but
instead of reading it again, execute a call to the QRCVDTAQ API,
specifying the wait time in seconds. The required parameters are:

 1  Data queue name    Input   Char(10)
 2  Library name       Input   Char(10)
 3  Length of data     Output  Packed(5,0)
 4  Data               Output  Char(*)
 5  Wait time          Input   Packed(5,0)
 
When the API returns to your program, compare the data parameter with
*BLANKS. If it is blank, the wait timed out. If not, read the display. I
haven't done this for a while either, but this should get you pretty
close.

-- 
Pete Hall
peteh@earth.inwave.com
http://www.inwave.com/~peteh/

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-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 ...

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.