MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

prevent simultaneous access to an online ISPF application

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Wed Sep 19, 2018 1:31 am    Post subject: prevent simultaneous access to an online ISPF application Reply with quote

I have an online application using ISPF, REXX, VSAM. It has to be restricted in such a way that only 1 user can access at the same time

So I need to build a logic to detect this

Is it possible to do it using ISPF Pool variables (VGET, VPUT)

I tried to use a profile pool variable by specifying ‘new application’ and ‘newpool’ option in ISPF SELECT command
The value seems to be retained for the user across that users session.

When i use shared pool variable, it is available across the REXX source codes of that application run and not across different users
Is this understanding correct

So for me it looks like using pool variable may not be the correct choice and currently we have used ISPF table

Please advise
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Wed Sep 19, 2018 2:11 am    Post subject: Reply with quote

Why not allocate a control dataset as DISP=OLD.

DISP=OLD requires exclusive access, so this allows RC checking in the ALLOCATE command and error / success messages issued at the time.

So if I have it allocated as OLD, then you cannot allocate it at all.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 628
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Sep 19, 2018 11:26 pm    Post subject: Reply with quote

I was going to suggest a row in a DB2 table, but your suggestion is even simpler.
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Thu Sep 20, 2018 10:55 am    Post subject: Reply with quote

misi01 wrote:
I was going to suggest a row in a DB2 table, but your suggestion is even simpler.


misi01,

Can you elaborate on this? Unless you have ROW-LEVEL locking I am not sure as to how you can have exclusive lock?. Are you suggesting to create a a brand new table within a tablespace with Table/ROW lock and then use it to update ? That is long winded solution when you can simply use the system enqueue.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 628
Topics: 176
Location: Stockholm, Sweden

PostPosted: Sun Sep 23, 2018 1:52 am    Post subject: Reply with quote

My immediate thought was a simple table with one row containing the userid of the person using the system, but as expat suggested, his (?) suggestion is much better if the application crashes. All the user has to do is log off and it's available to other users.

There's more than one way to skin a cat, and some methods are better than others Very Happy
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Mon Sep 24, 2018 1:04 am    Post subject: Reply with quote

Definitely a HIS - Very Happy
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group