× 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 chaps,

Is there a way (API or set of APIs) that allow you to move a program from an
EXFMT without requiring the device to send data? I am aware of the INVITE
keyword, but for many reasons I do not want to use it.

Currently, I have written some software that allows me to refresh the screen
whenever I need to, but I would like a more gracious way to do it..

It works like this (simplified):

----------------------------------------------------------------------------
----------------------------------------------
init - enable signals, set a handler sub-proc for sigalarm signals.

dou f key pressed or whatever

prepare the screen (load subfile, etc)

call sub-proc to set an alarm in 1 second (send a signal via a call to
alarm() )
exfmt(e) the screen
call sub-proc to disable the alarm (call alarm(0) )

if %error and sds_excpid = MY_ALARM_ERROR
close display file
open display file
endif

process F keys

process entered data

enddo


The handler sub-proc checks some values and if the screen requires
refreshing it sends an *ESCAPE message to the program - this pops the screen
off the exfmt(e) and resets the screen - nothing pressed/ entered so the
screen loop causes the screen to be rebuilt and redisplayed. If it is not
necessary to re-display the screen the sub-proc sets the alarm to go in
another second, as so on...
----------------------------------------------------------------------------
----------------------------------------------


The benefit of this is that I only refresh the screen if something changes
before the user presses a valid F key or presses Enter. So in most cases it
is just like any normal screen process. However, I just don't like having to
use an *ESCAPE message to pop the screen off the EXFMT. The program still
thinks the device is waiting for input so I can't write to the display file
without closing and re-opening it - major drawback. Mostly it doesn't matter
because this technique would only be used on front-end screens anyway. It
does work like a charm though. The screens refresh really well, but only
when they need to. A guy here has written a cool demo chat application based
on it - google chat in RPG - who'd have thunk it! :-)


So, any ideas if there is a workstation API that will knock the program off
the EXFMT without putting the display file or device into an error state?

Your help would be appreciated.

Cheers

Larry Ducie




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.