d $	Verify :== 'F$Verify(0)'
 $	!**************************************************************
,$	!
$	!	ALOGIN.COM	Application Users Login Procedure
$	!			Skeleton Sample Procedure
X$	!
$	!	   Date     Initials   Description
 $	!
$	!	28 May 81    BLJ	Initial Implementation
$	!	 9 Jun 81    BLJ        Set NOCONTROL_Y
L$	!	20 Jul 81    BLJ	MENU from SSCOM:
$	!	27 Sep 81    BLJ	ASSIGNTRN-Transaction Files
$	!	21 Jan 82    BLJ	Add SSCOM:GUARDIAN Logic
x$	!	23 Feb 82    BLJ	Check SYS$STATE Status Code
$	!	24 Mar 82    BLJ	Redefine SUBMIT Command
@$	!	30 Mar 82    BLJ	Relocate SUBMIT Redefinition
$	!	 3 Aug 82    BLJ	Set Default Protection
$	!	 2 Sep 82    BLJ        Restrict Network Access
l$	!	12 Nov 82    BLJ	Add Graphics User access
$	!	14 Dec 82    BLJ	Add Logoff w/clear screen
4$	!	20 Jan 83    BLJ	EXIT if access mode is NETWORK
$	!	 2 Feb 83    BLJ	Add DTR,EDT Monitor Procedures
$	!	 4 Mar 83    BLJ	Allow RC280 Users FORESIGHT Access
`	$	!	__________  ________   ______________________________
	$	!
(
$	!**************************************************************

$	!

$	!	This procedure is specified in the User Authorization
T$	!	File specification for every INMOS Application User.
$	!	The procedure validates system status according to the
$	!	logical assignment of SYS$STATE and if system is not
$	!	available to interactive users displays reason, else
$	!	the procedure displays System Message of the Day,
H$	!	invokes the MENU Processor, and performs the System
$	!	Logoff Procedure.
$	!
t$	!**************************************************************
$	!
<$	!	SYS$STATE Codes :  0 - System Available
$	!			   1 - Month-end Processing in Progress
$	!		 	   2 - System under hardware maintenance
h$	!			   3 - System software testing
$	!                          4 - Future Use
0$	!			   5 - Future Use
$	!
$	!**************************************************************
\$	!
$	@SSCOM:ASSIGNTRN/Output=NLA0:		! Transaction Files
$$	!
$	Set Protection=(S:rwed,O:rwed,G:rwed,W)/Default
$	!
P$	!	System Available - Procedure Continues
$	!
$	Submit :==Submit/Priority=3
|$	!
$	Mode := 'f$MODE()'			! Identify process mode
D$	IF Mode .EQS. "BATCH" THEN Goto BMODE	! Bypass Body if BATCH
$	IF Mode .EQS. "NETWORK" THEN Exit 	! Exit Network access 
$	!
p$	Set NOCONTROL_Y				! Disable Control_Y
$	!
8$	!	Assignments for Interactive User commands
$	!
 $	User  :== 'f$User()'
d$	Begn   == 'f$Locate(",",User)' + 1
$	Grup   == 'F$Extract(1,Begn-2,User)
,$	Unum  :=  'f$Extract(Begn,3,User)'
$	Rbrk   == 'f$Locate("]",User)'
$	!
X$	Vact = F$GetJPI("","ACCOUNT")
$	IF Vact .EQS. "280     " THEN Goto Chekstat
 $	IF Unum .LTS. "200" THEN Goto Chekstat
$	IF Unum .EQS. "241" THEN Goto Chekstat
$	IF Grup .EQS. "213" THEN Goto Chekstat
L$	!
$	DIR*ECTORY:==@SSCOM:GUARDIAN/Output=NLA0:
$	ED*IT :==@SSCOM:GUARDIAN/Output=NLA0:
x$	!
$	!
@$	!	Check System Availability Status
$	!
 $Chekstat:
l $	Clear :==@Sys$Manager:CLEAR "Dummy"
 $	!
4!$	State := 'F$Logical("SYS$STATE")
!$	Goto State'State'
!$	!
`"$State0:
"$	@SSCOM:MESSAGE
(#$	!
#$	!	Invoke Application Menu Processor OR Graphics Monitor
#$	!
T$$	IF Grup .LE. 211 THEN @Sscom:Logmenu		! Menu Processor
$$	IF Grup .EQ. 213 THEN @Ddev:[Graphics]Plato	! Graphics Monitor
%$	IF Grup .EQ. 231 THEN @Sscom:Logmenu            ! Mail monitor
%$	IF Grup .EQ. 214 THEN @Ddev:[EDT]Empire		! Editing Monitor
%$	!IF Grup .EQ. 120 THEN @Ddev:[DTR]Diablo		! DTR Monitor
H&$	IF Grup .EQ. 120 THEN @Sscom:Logmenu
&$	!
'$	!	Invoke System Logoff Procedure
t'$Offsys:
'$	@SSCOM:LOGOFF
<($	!
($	!	System Unavailability Messages
)$	!
h)$State1:
)$	Clear
0*$	Write Sys$Output " Month-end Processing In Progress     "
*$	Write Sys$Output " Normal Processing Resumes  9:00 a.m. "
*$	Wait 0:0:5.0
\+$	@Sscom:Logoff
+$State2:
$,$	Clear
,$	Write Sys$Output " System Under Hardware Maintenance    "
,$	Write Sys$Output " Normal Processing Resumes  6:00 p.m. "
P-$	Wait 0:0:5.0
-$	@Sscom:Logoff
.$State3:
|.$	Clear
.$	Write Sys$Output " System Software Testing In Progress  "
D/$	Write Sys$Output " You will be notified when system is available "
/$	Wait 0:0:5.0
0$	@Sscom:Logoff
p0$State4:
0$	Clear
81$	Write Sys$Output " System Unavailable !                 "
1$	Write Sys$Output " You will be notified when system is available "
 2$	Wait 0:0:5.0
d2$	@Sscom:Logoff
2$State5:
,3$	Clear
3$	Write Sys$Output " System Unavailable !                 "
3$	Write Sys$Output " You will be notified when system is available "
X4$	Wait 0:0:5.0
4$	@Sscom:Logoff
 5$Bmode:
5$	@LOGICAL			! Invoke Application Logicals
5$	EXIT				! Exit Procedure
