Method 1
Although we've used VESOFT to implement this, it wouldn't be difficult to create a
system logon udc (or account level logon udc) that attempted to build a file - and if the
build fails then the user is already logged on. You would also have to remember to purge
the file when the user logs off. You would also have to have a script ready to purge these
signal files when the user manages to logoff without
E.g. I logon as ADS,PROG.DEVELOP with the unique bit that identifies me being the "ADS" part.
Thus I would then attempt to build a file called !HPJOBNAME.TEMPAREA and check the CIERROR.
Method 2.
Or in the logon UDC, send the results of the following SHOWJOB command to an indirect file and look at the EOF
Eg.
S:showjob job=ads,prog.develop
JOBNUM STATE IPRI JIN JLIST INTRODUCED JOB NAME
#S2820 EXEC 19 19 FRI 9:10A ADS,PROG.DEVELOP
#S2823 EXEC 28 28 FRI 9:17A ADS,PROG.DEVELOP
2 JOBS (DISPLAYED):
0 INTRO
0 WAIT; INCL 0 DEFERRED
2 EXEC; INCL 2 SESSIONS
0 SUSP
JOBFENCE= 1; JLIMIT= 20; SLIMIT= 60
S:do 65
S:showjob job=xyz,prog.develop
NO SUCH JOB(S)
JOBFENCE= 1; JLIMIT= 20; SLIMIT= 60
S:Now do the above to an indirect file and look at the number of records in the file - use whatever variables
you want HPJOBNAME, HPUSER or HPACCOUNT in the showjob expression below
PURGE TEMPFILE
SHOWJOB job=!hpjobname,prog.develop >tempfile
if finfo("tempfile",19) = 3
echo "you can logon "
else
echo "you're already logged on "
endif
S:listftemp tempfile,2
TEMPORARY FILES FOR PROG.DEVELOP,TONY
ACCOUNT= DEVELOP GROUP= TONY
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
TEMPFILE 256B VA 3 10000 1 16 1 * (TEMP)
>>> "Emerson, Tom # El Monte" <[log in to unmask]> 03/10/00 19:24:21 >>>
> -----Original Message-----
> From: DeLisa DeVee [mailto:[log in to unmask]]
>
> We need to limit certain users to one session. We are exceeding our
> session limit for our software application (MACS). Our HP
> users license
> is not a problem. If we could limit specific user one
> session it would
> eliminate our problem. We are using operating system 5.5.7.
>
> Does anyone have any suggestions?
There are "commercial" solutions: VEsoft's Security/3000 has an option to
limit logons in a variety of ways. SAF/3000 I believe will do this as well.
[there might even be a contributed library solution, but I haven't checked
with that for a long time now]
> I found the below job at
> http://www.denkor.com/hp3000/command_files/XEQs/onelogon.txt
>
> Can someone explain to me exactly what this job would do or offer any
> possible solution to our problem?
The purpose of this section of code is to check, at the time someone logs
on, how many "other" users are already logged on "the same way". If over a
certain limit (1, in this example), then the the "bye" command is executed
causing the session to log off before any "application" level programs start
up. [i.e., your "menu"]
> # onelogon.xeq - Paul H. Christidis
> #
> # when used within an 'option logon' udc, this routine will
> # prevent more than one logon per user/account combination.
>
> if hpjobtype = "S" then
> setvar __oldmsgfence hpmsgfence
> setvar hpmsgfence 2
> tell !hpjobname,!hpuser.!hpaccount Someone is using your signon.
> if cierror <> 1620 then
> echo * Duplicate logons are not allowed..
> bye
> endif
> setvar hpmsgfence __oldmsgfence
> deletevar __oldmsgfence
> endif
>
> Thanks in advance,
>
>
> DeLisa DeVee
> Operation Administrator
> Musician's Friend
>
|