Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>HB.js for VSCodeNew to Visual Studio Code? Get it now.
HB.js for VSCode

HB.js for VSCode

Broadcom

broadcom.com
|
182 installs
| (0) | Free
HB.js Extension for VSCode (Official)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

HB.js

The HostBridge JavaScript Engine (HB.js) VS Code extension modernizes the way you interact with HB.js and offers a friendly and convenient way to work with HB.js Primitives, with the COBOL CopyBook to JavaScript object generation tool, and with the Application Explorer.

How can we improve the HB.js VS Code Extension? Let us know on our Git repository

The VS Code extension includes the following features:

  • Execution of HB.js Primitives (Make/Put/Run)
  • Native generation of a JavaScript object from a COBOL copybook
  • Access to the Integrated Application Explorer (AE) and the AE Playback

Table of Contents

  • HB.js
    • Table of Contents
    • Prerequisites
    • Getting Started
      • Specify a VS Code Workspace
      • Add New Host Connection
      • Select a Default Repository
      • Execute Primitives
      • Access the Integrated Application Explorer
      • Access the Integrated Application Explorer Settings
      • Generate a JavaScript object from a COBOL copybook
      • Save an Application Explorer session to JSON file
      • Open an Application Explorer Playback session from JSON file
    • List of Limitations
    • Privacy Notice
    • Technical Assistance and Support for HB.js

Prerequisites

Ensure that you meet the following prerequisites before you use the HB.js VS Code extension:

  • Access to HB.js on the mainframe

Getting Started

Specify a VS Code Workspace

The HB.js extension requires a VS Code Workspace for full functionality. To associate a folder with a workspace, open a folder in the Explorer view.

Specify a Workspace

Add New Host Connection

To add a new host connection, click the + (plus) icon in the HB.JS: HOSTS window. A host connection requires the following information:

  • HB.js Host URL, including the port number. For example: http://example.com:9000
  • A Host Name and a Region Name to help you identify the connection in the Hosts window.
  • A Default User ID, which is a user ID already defined in CICS on the host. When you connect to the host, you'll be prompted to enter the password for this user ID.

Add New Host Connection

Select a Default Repository

Host > Region > [Right - click] Chosen Repository > Set Default Repository

Set Default Repository

Execute Primitives

  • Navigate to the HBJS Terminal, which shows HB.js command output and messages.
  • Open a file in the explorer window ("right-click > Get" or double-click a Host file).
  • Right-click in explorer window and select HB.js Commands > (Make|Put|Run) (there are also listed keyboard shortcuts for each).

Execute Primitive

Access the Integrated Application Explorer

To access the Application Explorer, perform the following steps:

  • Click the Application Explorer icon next to the region where you want to run the Application Explorer.
  • In the Application Explorer tab, enter the transaction ID for the initial transaction that you want to analyze.

For information about using the Application Explorer, see Analyzing Applications in the HB.js documentation.

Application Explorer

Access the Integrated Application Explorer Settings

To access the settings for the Application Explorer, perform the following steps:

  • Click the gear icon to the right of the Application Explorer Icon at the region level.
  • Enter your values and then click submit to save your desired settings.

Application Explorer Settings

Generate a JavaScript object from a COBOL copybook

  • Right-click on a COBOL file in the editor or in the Explorer window and select HB.js Commands > Generate JS Object.
    Note: You can select either COBOL field names to use COBOL-style field names or JavaScript field names to use JavaScript-style field names in the generated file.

The generated HB.js JavaScript function is opened in the editor and saved to the workspace folder using a filename similar to filename_(COBOL|JavaScript)_JSOBJ.hbx

  • filename is the filename of the original COBOL file

  • (COBOL | JavaScript) indicates whether the HB.js function is created using COBOL-style or JavaScript-style field names for the object.

  • Make (HB.js Primitive) the file to your utility repository and use the following code to access the file from within your scripts

//COBOL Copybook Utilities
var copybookFactory = require('[filename_(COBOL|JavaScript)_JSOBJ]', '[utility repository]');

var demoCopybook = new copybookFactory.commareaBuffer();
var pgm = new CommareaProgram();

//Initialize
demoCopybook.initialize();
pgm.program = 'TRADERBL';

//Commands 
demoCopybook.get()
demoCopybook.set()
pgm.run(demoCopybook.buffer);

JS Object Generation

Save an Application Explorer session to JSON file

  • In the Application Explorer, navigate to an active terminal session.
  • Close the Application Explorer tab and choose 'save' in the pop-up to save.
  • Note the saved session in the Folders tab under 'App Explorer Playback > today's date'.

Execute Primitive

Open an Application Explorer Playback session from JSON file

  • In the VS Code Folders tab, navigate to the saved JSON file.
  • Right-click on the file and choose 'HB.js Commands > Application Explorer Playback'. An Application Explorer Playback tab should open.
  • You can directly access screens in the playback by clicking the screen icons.
  • To progress through the screens sequentially, use Page Up and Page Down.

Execute Primitive

List of Limitations

The following features exist in the HB.js Eclipse plugin that have not yet been added to this extension.

  • Hex dump view
  • Worklog view

Privacy Notice

The extensions for Visual Studio Code developed by Broadcom Inc., including its corporate affiliates and subsidiaries, ("Broadcom") are provided free of charge, but in order to better understand and meet its users’ needs, Broadcom may collect, use, analyze and retain anonymous users’ metadata and interaction data, (collectively, “Usage Data”) and aggregate such Usage Data with similar Usage Data of other Broadcom customers. Please find more detailed information in License and Service Terms & Repository.

Technical Assistance and Support for HB.js

The HB.js is made available to customers on the Visual Studio Code Marketplace in accordance with the terms and conditions contained in the provided End-User License Agreement (EULA).

If you are on active support for HostBridge JavaScript Engine, you get technical assistance and support in accordance with the terms, guidelines, details, and parameters that are located within the Broadcom Working with Support guide.

This support generally includes:

  • Telephone and online access to technical support
  • Ability to submit new incidents 24x7x365
  • 24x7x365 continuous support for Severity 1 incidents
  • 24x7x365 access to Broadcom Support
  • Interactive remote diagnostic support

Technical support cases must be submitted to Broadcom in accordance with guidance provided in “Working with Support”.

Note: To receive technical assistance and support, you must remain compliant with “Working with Support”, be current on all applicable licensing and maintenance requirements, and maintain an environment in which all computer hardware, operating systems, and third party software associated with the affected Broadcom software are on the releases and version levels from the manufacturer that Broadcom designates as compatible with the software. Changes you elect to make to your operating environment could detrimentally affect the performance of Broadcom software and Broadcom shall not be responsible for these effects or any resulting degradation in performance of the Broadcom software. Severity 1 cases must be opened via telephone and elevations of lower severity incidents to Severity 1 status must be requested via telephone.


Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft