Skip to end of metadata
Go to start of metadata

Package debugging

This package provides access to the debugging methods provided in the hbutils repository supplied with every HostBridge product installation.

Package Summary

Package Name

Description

debuggingInterface to debugging methods.  The common object is created via the "require" syntax, ie: var debugging = require('debugging', 'hbutils');

Method Summary

Method NameDescription
checkDebugControl()Turns on debugging based on certain conditions
getQ(name)Returns the name of the debugging output queue
nameValuePairs(name1, value1, ...,, namen, valuen)Displays name value pairs from inbound URL
object(object,[description,[depth]])Serializes an object for display
screen(directives, hb)Logs screen image of transaction being executed in debug output
setDumpOffsetHex(flag)Turns dump offset display on or off
setDumpWidth(width)Sets the width of the dump output
setQ(name)Sets name of debugging output queue
toHexDump(string)Creates a hex dump of the supplied string
write(text)Write a line of text to the debug queue
writeln(text)Write a line of text followed by a new line command to the debug queue
writeObj(object, name)Serializes an object and writes it to the debug queue

Property Summary

Property NameDescription
ASSIGNReturns the value of a parameter returned by an EXEC CICS ASSIGN command. 
globalReturns boolean value representing if global debugging is turned on or not. 

Package Detail

debugging()

Description: Debugging interface

Method Detail

checkDebugControl()

Description:  Sets the debugGlobal property to true if debug=on exists in the inbound URL or the user responsible for the request is in the HB user list

Version Added: 6.91

Parameters: None

Returns: None

getQ(name)

Description: Returns the name of the debugging output queue.

Version Added: 6.91

Parameters: 

{string} name - the variable where the name of the debugging output queue is placed.

Returns: The name of the debugging output queue.

nameValuePairs(name1, value1, ..., namen, valuen)

Description: Formats name/value pairs from inbound URL in debug output.

Version Added: 6.91

Parameters:

{strings} name1, value1, ... namen, valuen - 1 to n name/value pairs which you want to display.  There should be an even number of parameters.

Returns: None

object(object,[description,[depth]])

Description: Serializes an object for display.

Version Added: 6.91

Parameters: 

{object} object - object to be serialized

{string} (optional) description - description of the object to be serialized

{number} (optional) depth -  depth (from 0 to 10) within the object to be serialized.  A value greater than 10 will be rejected as an error.

Returns:  Serialized object

screen(directives,hb)

Description: Logs screen image of transaction being executed in debug output.

Version Added: 6.91

Parameters:

{string} directives -  HostBridge directives passed to the request

{object} hb - The HostBridge session object

Returns: None

setDumpOffsetHex(flag)

Description: Turns dump offset display on or off.

Version Added: 6.91

Parameters:

{boolean} flag - true or false

Returns:  None

setDumpWidth(width)

Description: Sets the width of the dump output.

Version Added: 6.91

Parameters:

{number} width - the number of characters on one line of dump output.

Returns:  None

setQ(name)

Description: Sets name of debugging output queue.

Version Added: 6.91

Parameters:

{string} name - The name of the debugging output queue.

Returns:  None

toHexDump(string)

Description: Creates a hex dump of the supplied string.

Version Added: 6.91

Parameters:

{string} string -  The text that you want to display in hex.

Returns: None

write(text)

Description: Write a line of text to the debug queue. 

Version Added: 6.91

Parameters:

{string} text - The line of text you want to write to the debug queue. 

Returns:  None

writeln(text)

Description: Write a line of text followed by a new line command to the debug queue.

Version Added: 6.91

Parameters:

{string} text - The line of text you want to write to the debug queue.

Returns:  None

writeObject(object,name)

Description: Serializes an object and writes it to the debug queue. 

Version Added: 6.91

Parameters:

{object} object - The object to be serialized.

{string} name - The name that you want to see associated with the object in the debug output.

Returns:  None

Property Detail

ASSIGN

Description: Returns the value of a parameter returned by an EXEC CICS ASSIGN command.   

Version Added: 6.91

Syntax: debugging.ASSIGN.parameter, where parameter is the name of the parameter for which information is returned by EXEC CICS ASSIGN.  For a list of the valid parameters, click here to view the documentation for the Cics.exec assign method.

Returns: The value of the named parameter.

Example: 

var debugging = require('debugging', 'hbutils');
var x = debugging.ASSIGN.userid

global

Description: Returns boolean value representing if global debugging is turned on or not. 

Version Added: 6.91

Syntax: debugging.global

Returns: 0 or 1 (true or false) 

  • No labels
Write a comment…