Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.6.5 IMEventMessage (issue events to JP1/IM or JP1/Base)

Purpose

Issues events to JP1/IM or JP1/Base.

Syntax
IMEventMessage (Text, [Severity], [UserName], [RootObjName], [Occurrence], [StartDate], [StartTime], [EndDate], [EndTime], [ResultCode])
Arguments
Text

Specify the message to be displayed as an event at the JP1/IM Event Console. Write a character string or a variable that stores this value.

Severity

Specify the severity of the event as one of the following values:

Value

Meaning

Emergency or Emergence

Emergency: Panic state

Note: If you specify Emergence instead of Emergency, the automatic actions of JP1/IM do not operate because they are not considered JP1 events.

Alertness

Warning: Prompt action required

Critical

Critical: Major error

Error or Err

Error in the application

Warning

Warning message

Notice

Notice: Not an error, but special processing required

Information or Info

Information message

Debug

Debug: Information used for debugging a program

This value is optional. If you omit this value, Information is assumed in the Severity field at the Event Console.

UserName

Specify the user name of the event as a character string or as a variable that stores this value.

This value is optional. If you omit this value, a blank is set in the User Name field at the Event Console.

RootObjName

Specify the registered object name of the event as a character string or as a variable that stores this value.

This value is optional. If you omit this value, a blank is set in the Object Name field at the Event Console.

Occurrence

Specify the event type as one of the following values:

Value

Meaning

Start

Execution started.

End

Execution ended.

Create

Definition created.

Destroy

Definition deleted.

Modify

Definition modified.

Submit

Submitted for execution

UnSubmit

Removed from executable status.

Pause

Execution temporarily suspended.

Release

Execution resumed.

Restart

Execution restarted.

This value is optional. If you omit this value, a blank is set in the Event Type field at the Event Console.

StartDate

Specify the event start date in yyyy/mm/dd format.

This value is optional. If you omit this value, a blank is set in the Start Date field at the Event Console.

StartTime

Specify the event start time in hh:mm:ss format.

This value is optional. If you omit this value, a blank is set in the Start Time field at the Event Console.

EndDate

Specify the event end date in yyyy/mm/dd format.

This value is optional. If you omit this value, a blank is set in the End Date field at the Event Console.

EndTime

Specify the event end time in hh:mm:ss format.

This value is optional. If you omit this value, a blank is set in the End Time field at the Event Console.

ResultCode

Specify the event exit code as a number or as a variable that stores this value.

This value is optional. If you omit this value, a blank is set in the Result Code field at the Event Console.

Description

The IMEventMessage command issues an event to JP1/IM or JP1/Base according to the specified parameters. The command returns True on successful execution, or False if an error occurs.

Events issued using this command have 00003B03 as their event ID. The Product Name is set to /HITACHI/JP1/SCRIPT, and the Object Type is set to PROCESS.

Supplement

In JP1/IM, the extended attribute description file for the event console is stored in the DATA folder under the installation folder. Its file name is SCRIPT_BASE.en.

Important note

JP1/Script can issue events only to the physical host on which JP1/Base is running, not to a logical host. Therefore, if you are using JP1/IM in a logical host environment, you will not be able to view JP1 events issued by JP1/Script unless you enable transfer such events by entering the appropriate setting in the forwarding setting file at the JP1/Base physical host.

Example
Dim se_Date, s_Time, e_Time, rtn1
se_Date = Date()
s_Time = Time()
rtn1 = Exec (_SCF_+"ABC.EXE", True)
e_Time = Time()
 
If rtn1 Then
  IMEventMessage ("ABC.EXE ended normally.", ,_USER_, _
          _SCF_FIL_, End, se_Date, s_Time, se_Date, _
          e_Time, _EXEC_RTN_)
Else
  IMEventMessage ("ABC.EXE terminated with an error.", , _
          _USER_, _SCF_FIL_, End, se_Date, s_Time, _
          se_Date, e_Time, _RTN_)
End
JP1/Script version

Supported from JP1/Script 05-20.