Skip to end of metadata
Go to start of metadata

Class HB.engine


Script Engine Interface

This class provides access to the scripting engine.

Properties Summary

Property nameDescription
HB.engine.convertSquareBracketsDetermines whether or not the [ and ] characters (square brackets) are converted from their original translation (such as Arabic Kaaf)
HB.engine.convertCaretDetermines whether or not the ^ (caret) is converted from its original translation
HB.engine.currentRepositoryName of the repository the currently executing script was loaded from.
HB.engine.currentScriptName of the currently executing script.
HB.engine.elapsedRunTime

The length of time (in microseconds) that a script has run.

HB.engine.elapsedRunTimeLimit

The maximum amount of time (in microseconds) that a script has run before abnormally terminating as a runaway script.

HB.engine.elapsedRunTimeLimitSecondsThe maximum amount of time (in seconds) that a script has run before abnormally terminating as a runaway script.
HB.engine.elapsedRunTimeSecondsThe length of time (in seconds) that a script has run.
HB.engine.installInstalls a program for future use within a script
HB.engine.logWrites a message to the CEEOUT/CESO queue.
HB.engine.logLevelControls level of engine's debug logging
HB.engine.maxIncludeDepthControls the maximum include depth, where the maximum include depth is the maximum amount of includes that can be nested.
HB.engine.outputThe Engine Output Object provides access to the generated output.
HB.engine.parentRepositoryName of the parent repository that contains the parent script.
HB.engine.parentScriptName of the parent script that led to the current executing script.
HB.engine.repositoryThe repository name where the top level script was loaded from.
HB.engine.scriptThe top level script name based on the passed in parameters or service invocation.
HB.engine.transportMethod or transport that caused the script to be invoked.
HB.engine.useElapsedRunTimeLimitDetermines whether or not the elapsed run time limit check should be performed

Property Detail

{boolean} convertSquareBrackets 

Allows you to control whether or not square brackets are converted (0xAD and 0xBD).

Values:

true | false

Default Value: true

{boolean} convertCaret

Allows you to control whether or not the caret is converted (0x5F).

Values:

true | false

Default Value: true

{String} currentRepository

The name of the repository where the currently executing script was loaded from.

See:  currentScript

{String} currentScript

The name of the currently executing script.

See:  currentRepository

Example:

// service.hbx
// This script is 'service' based on service.hbx
// It was executed as a service via /hbscript/service
include( "middle" );
//-------------------------------------------------------------
// middle.hbx
include( "bottom" );
//-------------------------------------------------------------
// bottom.hbx
writeln( "script: " + HB.engine.script );
writeln( "parentScript: " + HB.engine.parentScript );
writeln( "currentScript: " + HB.engine.currentScript );

In the above scenario, the output is:

script: service
parentScript: middle
currentScript: bottom

{Integer} elapsedRunTime

Returns the length of time (in microseconds) that a script has run.

{Integer} elapsedRunTimeLimit

Returns or sets the maximum amount of time (in microseconds) that a script has/can run before abnormally terminating as a runaway script.   The default value of HB.elapsedRunTimeLimit is 95% of the runaway system timer, which is a CICS parameter (ICVR in the SIT).  You could change the limit for the entire region by increasing the CICS runaway timer.


You should not set the elapsedRunTimeLimit to a value that is greater than the CICS runaway timer value.

{floatingPoint} elapsedRunTimeLimitSeconds

Returns or sets the maximum amount of time (in seconds) that a script has/can run before abnormally terminating as a runaway script.   The default value of HB.elapsedRunTimeLimit is 95% of the runaway system timer, which is a CICS parameter (ICVR in the SIT).  You could change the limit for the entire region by increasing the CICS runaway timer.

You should not set the elapsedRunTimeLimit to a value that is greater than the CICS runaway timer value.

Floating point values are accepted e.g. elapsedRunTimeLimitSeconds = 2.5;

{floatingPoint} elapsedRunTimeSeconds

Returns the length of time (in seconds) that a script has run.

Floating point values are accepted e.g. elapsedRunTimeSeconds = 2.5;

install( module1 )

Makes a load module available for calling within a script.

log( text1 [, text2 [, text3 [, ... ] ] ] )

Writes the passed text message to the CEEOUT/CESO queue.

{Integer} logLevel

Controls the engine's debug logging level.  

Values: 

  • 0 - Disabled
  • 1 - Enabled

Default Value:  0

{Integer} maxIncludeDepth

Controls the maximum include depth The maximum include depth is the maximum amount of include that can be nested. This protects against cases where there is a cyclical include path. For example, Script A includes Script B. Script B includes Script A. This would result in infinite includes. This provides a protection mechanism against infinite includes. Once this value is exceeded, the script is stopped and an error message is output.

This property can be read or set.

Default Value:  "50"

See:  include(ScriptName, Repository)

{__EngineOutput} output

The Engine Output Object provides access to the generated output. This output is sent by the engine when the script finishes executing.

{String} parentRepository

The name of the repository where the parent script was loaded from. If the current script has no parent ( it is the top level script ), this will be undefined.

See:  parentScript

{String} parentScript

The name of the script that caused the execution of the current script. If the current script has no parent ( it is the top level script ), this will be undefined. This allows
an included script to know its parent script.

See:  parentRepository

{String} repository

The name of the repository where the top level script was loaded from.

See:  script

{String} script

The name of the top level script. This is the script name specified by the transport to execute. For simple scripts that do not do any include()'s, script and currentScript will be the same.

See:  repository

{String} transport

The transport or method by which the script was invoked.

Values:

"http" HTTP

{boolean} useElapsedRunTimeLimit

Allows you to control whether or not a check to see if the elapsed run time limit has been exceeded is performed.

Values:

true | false

Default Value: true

  • No labels
Write a comment…