|
On Aug 11, 2021, at 5:47 PM, Peter Dow <petercdow@xxxxxxxxx> wrote:
Well, the quote says it will read the contents without requiring an AID key to be pressed. However, I've never used it; I would've thought getting the handles would be the major drawback.
I seem to remember way back pre-internet someone writing a utility to share a screen that, unlike STRCPYSCN, showed the screen without waiting for an AID key.
I'll take a look at the Redpiece.
On 8/11/2021 2:22 PM, Jon Paris wrote:
Be in treating to see if that works Peter. I've used the DSM APIs a few times but never for this purpose.
I suspect that it may not work because we are dealing here with a block mode terminal - and if no key has been pressed (such as enter or an F key) that would cause data to be sent then I suspect that this API will not get the exact current content.
As to the handles etc. the RPG Redpiece on Error Handling includes code to do that because we used the API to grab the screen content in the event of an error.
Jon Paris
On Aug 11, 2021, at 1:24 PM, Peter Dow <petercdow@xxxxxxxxx> wrote:
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
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.