Variables

A variable is a location in memory where a value can be stored. It is a named entity that refers to data to which you can assign values. The data type and value of a variable can be different at different times and can have a primitive or compound data type as its value. Service Manager contains three types of variables:

  • Local
  • Global
  • Thread

Local variables begin with $L. and persist only within the currently executing RAD application. The server automatically cleans up local variables when it exits a RAD application.

Global variables begin with $G. or $lo. and persist throughout a user session ($lo. is an abbreviation for logged on. These variables are set when the operator logs on). The server automatically cleans up global variables when a user logs off the system.

Thread variables do not have a consistent naming scheme other than beginning with a dollar sign ($). Thread variables are only valid for the current RAD thread. If the RAD thread terminates, then the server automatically cleans up all thread variables.

Creating variables

The rules for creating variables are as follows:

  • A variable name must begin with a dollar sign ($) and an alphabetic character followed by zero or more alphanumeric characters that may include periods, but may not include blanks.
  • A variable name can be any length.
  • A variable's value is initialized to a null string.
  • Data assigned to a variable has a data type. This data type becomes the variable's data type.
  • Any variable can be set to a null value by assigning the value NULL to it. For example, $variable=NULL.
  • Global variables are treated as global among all applications executed within the process or task with two exceptions:

    • When the variable is designated local (or something other than global) by an initial identifier. For example, when the variable is created within a function.
    • When the variable is a parameter variable.

Global variables

The following global variables are available when defining registration events.

Variable Description Comment
$axces Represents the eventin record.  
$axces.fields Represents the evlist field in the eventin record.  
$axces.register Represents the event registration record.  
$axces.lock.interval An interval of time before a retry occurs if Service Manager denies the attempt to update an incident because the record is locked. For example: '00:02:00' for two minutes.  
$axces.debug If true, the evlist array in the eventin record is not removed before attempting to update the record. If the size of the record exceeds 32KB, Event Services generates an error, the eventin record is not updated, and the event reprocesses because the evtime field is not removed. Use this feature with discretion.
$axces.bypass.failed.validation Used in events calling the application axces.apm. The default value is NOT true. If true, the application ignores any failed formatctrl validations. If false, the event status is error-fc.  

List: Default variables

It is likely that the list of default variables varies from release to release. The out-of-box system includes the following global and local variables.

Variable Definition
$G.profiles List of personal profiles.
$G.pm.global.environment Incident Management’s global environment record .
$G.assignment List of assignment groups for Service Desk, Incident Management, Problem Management and Change Management.
$G.categories List of categories.
$G.problem.inboxes List of Incident Management views available to all the users as well as the views available to the logged on operator.
$G.open.lists List of all global lists built at login.
$G.icm.status List of Configuration Management statuses.
$G.assignment.groups List of assignment groups for Service Desk, Incident Management, Problem Management and Change Management.
$G.prompt.for.save Global flag (Boolean) that determines whether or not to prompt you to save when you press OK or Cancel after you update a record.
$G.availability.maps List of availability maps.
$G.pm.environment The current user’s Incident Management personal profile record.
$G.pm.status List of Incident Management statuses.
$G.technicians List of technicians (operator table).
$G.incident.inboxes List of Service Desk views available to all the users as well as the views available to the logged on operator.
$L.filed This is the current file opened by the display application.
$L.new The current file being updated when evaluating macro conditions.
$L.old The pre-updated state of a file undergoing an update while evaluating macro conditions.
$lo.appl.name The name of the application responsible for managing the user’s menu (menu.manager)
$lo.appl.names Application parameter names passed.
$lo.appl.values Application parameter values passed.
$lo.cm.limit Partial-key time threshold for Change Management.
$lo.company.name The company name as defined in the System Information Record as Menu Title under the Menu Information tab.
$lo.copyright Micro Focus copyright (copyright())
$lo.date.order The number representing date order (mdy, dmy, ymd) in the operator record.
$lo.db.limit Partial-key time threshold for Database Manager.
$lo.device Device ID (current.device())
$lo.groups List of query group names in operator record.
$lo.home Name of Home menu for GUI.
$lo.i Temporary variable that functions as a loop counter (variable is cleaned up in the login application).
$lo.main Name of main menu for text.
$lo.month.abv List of abbreviated months (“Jan”, “Feb”, “Mar”).
$lo.month.ext List of months (“January”, “February”, “March”).
$lo.msglog.lvl Level of messages to store in the message queue for the operator Level of messages to store in the message queue for the operator logged on. Message levels affect on-screen messages only.
$lo.pm.limit Partial-key time threshold for Incident Management .
$lo.system.startup Set at login to value of the field called system.startup.time in Company Information record.
$lo.time.zone User’s time zone.
$lo.uallow.syslog Determines whether syslog table is updated when processes start and end in the system.
$lo.uallow.timezone Allows user to modify time zone based on capability.
$lo.uapprovals List of change approval groups.
$lo.ucapex List of user’s capability words.
$lo.uchgrps List of change groups.
$lo.ufname User’s full name.
$lo.ulogin.time User login time stamp.
$lo.user.name operator()