jack786
14th November 2004, 05:54
Hi
I want to create one session,but that should be run or open by only one user at one point of time .So where can I restrict the same in the code??
rgds,
jack
avpatil
14th November 2004, 16:48
Jack,
You can write a code in before program section. You can acehive this by setting application ock and then once the user exits, delete the application lock.
Arvind
mihaelagr
15th November 2004, 12:27
functions:
function set.application.lock() |in before.program
if (appl.set(session code,APPL.EXCL-APPL.WAIT) ) then
mess("this session is blocked by another user")
stop()
endif
function delete.application.lock() |in after.program
ret = appl.delete(session code)
jack786
15th November 2004, 13:04
In the message How can I give the user name who opened the session.
richard
15th November 2004, 13:11
Example:
if ( appl.set("etatmex.tdsls0445m942",APPL.EXCL+APPL.WAIT) ) then
appl.get.user("etatmex.tdsls0445m942",utibloc)
message("Procédure en cours par %s",utibloc)
if not job.process then
stop()
endif
endif