HLASM Language SupportHLASM Language Support is an extension that supports the High Level Assembler language. It provides code completion, highlighting and navigation features, shows mistakes in the source, and lets you trace how the conditional assembly is evaluated with a modern debugging experience. HLASM Language Support is also part of Code4z, an all-round package that offers a modern experience for mainframe application developers, including extensions for language support, data editing, testing, and source code management. Prerequisites
CompatibilityHLASM Language Support is supported on Visual Studio Code and Github Codespaces. Integration with Zowe ExplorerWe recommend that you use HLASM Language Support with Zowe Explorer. Zowe Explorer enables you to open your High Level Assembler programs stored on mainframe data sets directly in VS Code. For more information about the Zowe Explorer extension, see Zowe Explorer on the VS Code Marketplace. Getting StartedEnabling the ExtensionFollow these steps to open a HLASM project:
Setting Up a Multi-File Project EnvironmentThe HLASM COPY instruction copies the source code from various external files, as driven by HLASM evaluation. The source code interpreter in the HLASM Extension needs to be set up correctly to be able to find the same files as the HLASM assembler program. To do this, set up two configuration files —
Follow the section External Macro Libraries and COPY Members below for more detailed instructions on configuring the environment. Language FeaturesThe HLASM Language Support extension parses and analyzes all parts of a HLASM program. It resolves all ordinary symbols, variable symbols and checks the validity of most instructions. The extension supports conditional and unconditional branching and can define global and local variable symbols. It can also expand macros and COPY instructions. LSP FeaturesHighlightingThe HLASM Language Support extension highlights statements with different colors for labels, instructions, operands, remarks and variables. Statements containing instructions that can have operands are highlighted differently to statements that do not expect operands. Code that is skipped by branching AIF, AGO or conditional assembly is not colored. AutocompleteAutocomplete is enabled for the instruction field. While typing, a list of instructions starting with the typed characters displays. Selecting an instruction from the list completes it and inserts the default operands. Variables and sequence symbols are also filled with a value from their scope. Go To Definition and Find All ReferencesThe extension adds the 'go to definition' and 'find all references' functionalities. Use the 'go to definition' functionality to show definitions of variable symbols, ordinary symbols and macros, or open COPY files directly. Use the 'find all references' functionality to show all places where a symbol is used. Macro TracerThe macro tracer functionality allows you to track the process of assembling HLASM code. It lets you see step-by-step how macros are expanded and displays values of variable symbols at different points during the assembly process. You can also set breakpoints in problematic sections of your conditional assembly code. The macro tracer is not a debugger. It cannot debug running executables, only track the compilation process. Configuring the Macro Tracer
Using the Macro TracerTo run the macro tracer, open the file that you want to trace. Then press F5 to open the debugging panel and start the debugging session. When the tracer stops at a macro or COPY instruction, you can select step into to open the macro or COPY file, or step over to skip to the next line. Breakpoints can be set before or during the debugging session. ConfigurationExternal Macro Libraries and COPY MembersThe HLASM Language Support extension looks for locally stored members when a macro or COPY instruction is evaluated. The paths of these members are specified in two configuration files in the
To use a predefined set of macro and copy members, follow these steps:
The structure of the configuration is based on Endevor®. Ensure that you configure these files before using macros from separate files or the COPY instruction. When you open a HLASM file or manually set the HLASM language for a file, you can choose to automatically create these files for the current program. Visual Studio Code workspace variables can be referenced in both configuration files using the standard syntax (${config:variable_name}). Example The following example defines two processor groups, GROUP1 and GROUP2, and a list of directories to search for macros and COPY files, it also defines the SYSPARM assembler parameter for GROUP1. Additionally, if the library The path
Example The following example specifies that GROUP1 is used when working with
If you have the two configuration files configured as above and invoke the MAC1 macro from The program name in
In this example, GROUP1 is used for all open code programs. Assembler options defined by the processor group can be overriden in the
File ExtensionsThe
For example, with the extension The following example of
Suppression of DiagnosticsFor files that use macros extensively but do not have the definitions available, diagnostics reported by HLASM Language support might not be helpful. For those cases, there is the setting
In the PreprocessorsProcessor groups can be configured so that the HLASM source will be processed with a preprocessor. Currently, there are two preprocessor options available - It can by configured using the
Questions, issues, feature requests, and contributions
Technical Assistance and Support for HLASM Language SupportIf you are on active support for Brightside, 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:
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. Privacy NoticeThe 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. This data collection uses built-in Microsoft VS Code Telemetry, which can be disabled, at your sole discretion, if you do not want to send Usage Data. See the The current release of HLASM Language Support collects anonymous data for the following events:
Each such event is logged with the following information:
Additionally, when a file is opened, the following information are logged:
|