$Web LogMsg: Difference between revisions
(Automatically generated page update) |
(Automatically generated page update) |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">%msg = $Web_LogMsg( num ) | <p class="syntax"><span class="term">%msg</span> = <span class="literal">$Web_LogMsg</span>( num ) | ||
</p> | </p> | ||
Revision as of 23:40, 12 April 2013
Get saved logon message
$Web_LogMsg retrieves a saved logon messages.
Syntax
%msg = $Web_LogMsg( num )
Syntax terms
%msg | A string variable to contain the returned value, which is null if there is an error condition. |
---|---|
num | The saved message number. This is a required argument. |
Usage notes
- If the port definition contains a LOGMSGI parameter, $Web_LogMsg will always return a null.
- If an invalid message number is specified (less than or equal to 0 or greater than the number of saved messages) $Web_LogMsg will return a null.
- $Web_Num_LogMsg and $Web_LogMsg are probably most useful in a JANUS WEB ON LOGONERR routine, but they can be used in any JANUS WEB ON routine.
Example
This is an example of how $Web_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.
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
This type of loop is highly recommended rather than depending on a particular message number containing the required message. By requesting a hard-coded message number, an application might expose itself to Model 204 or external authorizer release dependencies. In the same way, analysis or parsing of the message should be made as flexible as reasonable to avoid release dependencies.