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



Got this to work, yeah!

As Scott pointed out, the job should be set to devrcyacn(*MSG)
ie "chgjob devrcyacn(*MSG)". Once that is done...


This worked for normal interactive type screen -

monitor;
exfmt SCREEN1;
on-error PERM_IO_ERROR; // 1251
// This code executes when user 'X's 5250 session
in *lock myda;
clear myda;
out myda;
endmon;

This worked on a 'timeout' type screen scenario -

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;
on-error PERM_IO_ERROR; // 1251
// This code executes when user 'X's 5250 session
in *lock myda;
clear myda;
out myda;
endmon;


Also, instead of trying to exclusively lock the data area, i check
to see it it is blanks or not. If it's not blank, the process is
being used by someone. Reason for abandoning the check locks on
data area scheme is because it contains information about the user
who is locking the process and the time they started.

ie, If the first user has a lock on the data area, i couldn't get at the
data area for the information in there which i use to tell the second
user who is currently using the process.

fyi - 1331 tells if the display timed out so i can kick them out
if they've been in there too long.

Thx for all replies.

John B.

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.