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




John,

Instead of using a data area, why not looking if the display file is locked ? Just my 2 cents !

Marc



“If you think education is expensive, try ignorance"
(Derek Bok, pres. of Harvard Univ. 1971-1990)




From: jrusling@xxxxxxxxxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Trap 5250 session disconnect in an rpg program.
Date: Tue, 14 Dec 2010 16:45:55 +0000

Thanks Brian.

What I really need is - if the session is being disconnected, I want
to delete a data area. After that, i don't care about recovering
the job. If the data area doesn't get deleted, then no other users
can use the rpg program.

This particular rpg program can only be used by a single user at
one time and the data area existence is my mechanism for accomplishing
this.

I should add that the rpg/display file for this program is setup to timeout
after nn minutes so that a user can't lock other users out of using the
rpg program for too long.

John B

All you need is exception handling around your display file I/O statements.
Inspect the job log of a job so-ended to see what exceptions (*ESCAPE
messages) are sent to the program.

If you want to enable reconnect, check the Device recovery action
(DEVRCYACN) attribute used for your users. Start with their job description
to see how DEVRCYACN is set. Hint: pick one of the disconnect options. In
addition you will want to make sure their emulation sessions specify a
specific device name so they will attempt to use the disconnected session
when the relaunch their emulation session.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.