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



Hi Javier,

Take a look at https://www.ibm.com/docs/en/i/7.1?topic=ssw_ibm_i_71/apis/QsnReadScr.htm

"The Read Screen (QsnReadScr) API reads the contents of the entire screen without requiring an AID-generating key to be pressed."

The trick would be getting the input buffer and command handles.

That also has a link to https://www.ibm.com/docs/en/i/7.1?topic=ssw_ibm_i_71/apis/QsnReadImm.htm

"The Read Immediate (QsnReadImm) API reads the contents of all input fields on the display without requiring an AID key to be pressed."

Good luck!

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx>

/
On 8/11/2021 10:11 AM, Javier Sanchez wrote:
John/Daniel:

All that is already working. What I need is to know if there is a way to
enforce the system to actually read the display with what's on it if there
was anything typed in on it by the user. What I'm having now is working,
the 30-second timeout gives control back to the program, but I don't have
any modified data by the user.

I was looking after the use of the MDT indicator, but I'm not sure if when
it times out, it would turn the MDT's on and have any data back in the
program.

Thanks!!!

message: 2
date: Wed, 11 Aug 2021 15:56:23 +0000
from: John Rusling via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>
subject: RE: Using a timeout with display files

Javier,

Only way I know of is override the display file and then use write/reads
instead of exfmt on the display file.

My (old) example, all rpg . . .

o--------------------------------------------------------------------------
<=> - Timeout a workstations after nn period of inactivity
--------------------------------------------------------------------------
ftsusdp4d cf e workstn
f usropn
f maxdev(*file)

. . .

// Override waitrcd on the display file for shorter interval
gCmd = 'OVRDSPF FILE(TSUSDP4D) TOFILE(*LIBL/TSUSDP4D)
WAITRCD(30)';
gMsgid = utlty_RunCmd(gCmd);
if not %open(tsusdp4d);
open tsusdp4d;
endif;
- - - -
. . .
monitor;
// Write screen, wait for input
write SCREEN1;
read tsusdp4d;
on-error 1331;
msg_Completion('Due to inactivity, ' + %trimr(psds.Pgm)
+ ' auto-exited.':3);
exsr @exit;
endmon;

hth - john


------------------------------

message: 3
date: Wed, 11 Aug 2021 18:18:53 +0200
from: Daniel Gross <daniel@xxxxxxxx>
subject: Re: Using a timeout with display files

Man, these tricks a so long ago - I don't remember exactly, but is it
possible, that you need to code the INVITE keyword on DDS level?

I think I wrote something similar about 20-25 years ago for the logistics
company I worked for - but I don't remember exactly how I did it - but
INVITE plopped up in my mind, when I read your mail - but I don't know, if
it is right.

HTH
Daniel





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.