$Web Num LogMsg: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 2: Line 2:
<span class="pageSubtitle">Number of saved logon messages</span>
<span class="pageSubtitle">Number of saved logon messages</span>


<var>$Web_Num_LogMsg</var> retrieves the number of saved logon messages.


<var>$Web_Num_LogMsg</var> retrieves the number of saved logon messages.
==Syntax==
==Syntax==
<p class="syntax">%count = $Web_Num_LogMsg
<p class="syntax">%count = $Web_Num_LogMsg
</p>
</p>


<var>$Web_Num_LogMsg</var> takes no arguments and returns a number.  
<var>$Web_Num_LogMsg</var> takes no arguments and returns a number.  


If the port definition contains a <var>[[LOGMSGI (JANUS DEFINE parameter)|LOGMSGI]]</var> parameter, <var>$Web_Num_LogMsg</var> will always return a 0, otherwise it will return the number of messages issued to the <var class="product">[[Janus Web Server]]</var> thread's "terminal" at logon time. <var>$Web_Num_LogMsg</var> and <var>$Web_LogMsg</var> are probably most useful in a <code>JANUS WEB ON LOGONERR</code> routine but can be used in any <var>JANUS WEB ON</var> routine.
If the port definition contains a <var>[[LOGMSGI (JANUS DEFINE parameter)|LOGMSGI]]</var> parameter, <var>$Web_Num_LogMsg</var> will always return a 0, otherwise it will return the number of messages issued to the <var class="product">[[Janus Web Server]]</var> thread's "terminal" at logon time. <var>$Web_Num_LogMsg</var> and <var>$Web_LogMsg</var> are probably most useful in a <code>JANUS WEB ON LOGONERR</code> routine but can be used in any <var>JANUS WEB ON</var> routine.
<p class="code">For %i From 1 TO $Web_Num_LogMsg
<p class="code">For %i From 1 TO $Web_Num_LogMsg
%msg = $Web_LogMsg(%i)
%msg = $Web_LogMsg(%i)
Line 26: Line 25:
==See also==
==See also==
<ul>
<ul>
<li><var>[[$Web_LogMsg]]</var>
<li><var>[[$Web_LogMsg]]</var></li>
</ul>
</ul>


[[Category:Janus Web Server $functions|$Web_Num_LogMsg]]
[[Category:Janus Web Server $functions|$Web_Num_LogMsg]]

Latest revision as of 19:44, 14 July 2014

Number of saved logon messages

$Web_Num_LogMsg retrieves the number of saved logon messages.

Syntax

%count = $Web_Num_LogMsg

$Web_Num_LogMsg takes no arguments and returns a number.

If the port definition contains a LOGMSGI parameter, $Web_Num_LogMsg will always return a 0, otherwise it will return the number of messages issued to the Janus Web Server thread's "terminal" at logon time. $Web_Num_LogMsg and $Web_LogMsg are probably most useful in a JANUS WEB ON LOGONERR routine but can be used in any JANUS WEB ON routine.

For %i From 1 TO $Web_Num_LogMsg %msg = $Web_LogMsg(%i) If $substr(%msg, 1, 10) Eq 'M204.1500:' Then Jump To GOTACF2MSG End If End For

Example

This is an example of how $Web_Num_LogMsg can be used to scan logon messages looking for an ACF2 message that perhaps indicates the reason for a logon failure. Depending on the reason (incorrect password, expired password, suspended account), appropriate action can be taken.

See also