OPS/REXX Language Support

The OPS/REXX language is a crucial part of the Broadcom OPS/MVS® product that adds to standard REXX a set of extensions to automate and enhance the productivity of z/OS operations. With the OPS/REXX Language Support extension (OPS/REXX LS), automation engineers can develop OPS/MVS Automated Operations Facility (AOF) rules and OPS/REXX programs more efficiently by editing OPS/REXX in a local VS Code environment.
OPS/REXX LS includes the following features:
- OPS/REXX syntax highlighting
- Hover insights for OPS/REXX built-in functions, host environment names, and AOF event variable names
- Autocompletion for OPS/REXX built-in functions, host environment names, and AOF event variables
- Basic error checking for AOF rules and OPS/REXX syntax
- A library of frequently used OPS/REXX rule snippets
- If configured, specific OPS/MVS commands can be run to perform common rule actions, search OPSLOG records, and execute OPS/REXX programs
We encourage you to share ideas to help improve OPS/REXX Language Support. You can also report issues in the extension, using the following link.
Share an idea or open an issue in our Git repository
OPS/REXX LS is part of the Code4z experience from Broadcom, which offers a modern experience for mainframe application developers. To get started with Code4z, check out our foundational extension pack.
Address Software Requirements
OPS/REXX LS has no prerequisite software. Use the following recommended software with OPS/REXX LS for the best experience:
- REXX Language Support Extension
- OPS/MVS REST API
- Zowe Explorer
REXX Language Support Extension
For correct display of full REXX syntax highlighting, use a REXX language support extension. OPS/REXX LS has been tested for compatibility with the REXX Language Support extension.
OPS/MVS REST API
Establish a connection with your mainframe OPS/MVS instance using the OPS/MVS REST API as described in the OPS/MVS documentation. A connection to one or more OPS/MVS instances allows you to work with the AOF rules in your mainframe environment and to issue OPS/MVS commands from VS Code.
Zowe Explorer
Use Zowe Explorer to access mainframe code while using OPS/REXX LS. For more information about the Zowe Explorer extension, see Zowe Explorer on the VS Code marketplace.
OPS/REXX LS is Zowe Explorer V3 Conformant. The Zowe Conformance Program ensures a high level of common functionality, interoperability, and user experience while using an extension that leverages Zowe. For more information, see Zowe Conformance Program.
Security Requirements
The connection from OPS/REXX LS to OPS/MVS must be secured using one or both of the following methods.
OPS/MVS REST API
Connecting to OPS/MVS through the REST API enables you to access all the OPS/MVS features available through the OPS/REXX LS extension. This method requires a Zowe profile containing connection information for the REST API server. This connection type is recommended for enterprise-level use of OPS/REXX LS. For more information, see "Configure OPS/REXX LS to Access OPS/MVS Using the OPS/MVS REST API."
SSH
Connecting to OPS/MVS using the SSH Protocol is recommended for situations where quick setup is important, such as individual experimentation. It gives you access to a subset of the OPS/MVS features available through OPS/REXX LS. The SSH connection method has the following prerequisites:
A Zowe SSH profile containing the host name, username and password for an SSH connection.
A destination data set in which to store the REXX program OPSVSCE1.opsrexx, which enables the OPS/REXX LS connection to SSH. For more information, see "Configure OPS/REXX LS to Access OPS/MVS Using SSH."
The OX load module, which is provided by OPS/MVS in the load library CCLXLOAD, must be in one of the following locations:
In a PDS or PDSE included in LNKLST or LPALIB
In a STEPLIB. If OX is located in a STEPLIB, an .ops_profile data set for each user of OPS/REXX LS must specify the location of the STEPLIB.
For more information about the OX load module, see Provide APF Authorization for the Load Libraries in the OPS/MVS documentation.
For more information about these requirements, see "Configure OPS/REXX LS to Access OPS/MVS Using SSH."
Getting Started
Customize Extension Settings
Customize OPS/REXX LS settings in VS Code for the type of secure connection to OPS/MVS that you will use.
Note: Settings not related to connection security are not discussed here. Adjust them as needed to reflect your site's preferences.
From the File menu, select Preferences > Settings to display the Settings editor, then use the search bar to search for OPS/REXX.
Select the User or Workspace tab, depending on the level of settings you want to update.
For the Connection Mode setting, select one of the following options to determine which secure connection type OPS/REXX LS uses when it issues commands to OPS/MVS.
ADAPTIVE (default): OPS/REXX LS automatically uses the type of connection that is supported by each command. If the command supports both types of connection, the extension uses the Preferred Connection Order setting to determine which secure connection type to use.
ONLY_REST-API: OPS/REXX LS uses only the REST API connection to interact with OPS/MVS. Commands requiring SSH will fail.
ONLY_SSH: OPS/REXX LS uses only SSH to interact with OPS/MVS. Commands requiring a REST API connection will fail.
If you selected ADAPTIVE as the Connection Mode, specify the Preferred Connection Order.
REST-API then SSH
The extension tries to connect to OPS/MVS using a REST API connection first, then uses SSH if a REST API connection is not available.
SSH then REST-API
The extension tries to connect to OPS/MVS using an SSH connection first, then uses the REST API if SSH is not available.
If you are connecting to OPS/MVS using the REST API, go to the next section.
If you are connecting to OPS/MVS using SSH, refer to the section "Configure OPS/REXX LS for Access to OPS/MVS Using SSH."
Configure OPS/REXX LS for Access to OPS/MVS Using the REST API
Connecting to OPS/MVS through the OPS/MVS REST API gives you access to all of the OPS/MVS features offered by OPS/REXX LS.
To set up a connection through the REST API:
Ensure that OPS/MVS is configured with the OPS/MVS REST API (OPSREST) component.
If you are using OPS/REXX LS with multiple OPS/MVS instances running on different systems, the OPS/MVS REST API must be installed and configured on each system in your OPSplex. One instance of the REST API is required for each system. When you have multiple instances of OPS/MVS running on a single system, only one instance of the REST API is required.
Create a team configuration file that contains the connection information for the OPS/MVS instance. Use one of the following methods:
- Use Zowe Explorer to create a team configuration file using the following information:
- The host name of the LPAR on which the REST API is running.
- The port number for the REST API.
- A username that has authority to access the REST API.
- The password to the account that is associated with the username.
- Manually create a team configuration file as described in the OPS/MVS documentation. This method also requires a host name, port number, username, and password (see previous bullet for details).
Configure OPS/REXX LS for Use with Zowe Explorer
To ensure that all OPS/REXX programs and rules are recognized by OPS/REXX LS as .opsrexx files, create a file association in your VS Code settings to associate data sets that contain OPS/REXX rules with the .opsrexx file extension.
To create a file association for a data set:
From the File menu, select Preferences > Settings to display the Settings editor.
Select the User or Workspace tab, depending on which settings you want to update.
Scroll down to or search for the Files: Associations setting and select Add Item.
Add **/*QUALIFIER*{,/*} to the Key field and opsrexx to the Value field where QUALIFIER is the portion of the fully qualified data set path you want to be automatically set as an OPS/REXX file type.
Example: if you have a fully qualified data set named OPSS.CCLXSAMP.SAMPLE.RULES, you could put **/*RULES*{,/*} or **/*CCLXSAMP*{,/*} in the Key field to automatically associate all files in any data set with the matching qualifier.
After completing these steps, you can use Zowe Explorer to access OPS/REXX files in data set members and use all the features of OPS/REXX LS.
Configure OPS/REXX LS for Access to OPS/MVS Using SSH
As an alternative to connecting to OPS/MVS using the OPS/MVS REST API, you may access a subset of OPS/REXX LS features by connecting to OPS/MVS subsystems using the SSH Protocol.
To establish a connection to OPS/MVS using SSH:
Specify the location of the OX load module.
If the OPS/MVS OX load module (see "Address Security Requirements") is not deployed to a LNKLST or LPALIB library, update the .ops_profile for each user of OPS/REXX LS to specify the library that contains the load module as a STEPLIB export, as shown in the following example:
#!/_bin_/_sh_ _load module_
# this shell script allows the shell to invoke
# OX which resides in the OPS/MVS loadlib.
export STEPLIB="SYS1.OPS.CCLXLOAD"
Note: Ensure that .ops_profile contains no echo statements.
Create an OPSVSCE SSH connection profile.
Note: If you do not create an SSH profile during setup, and you attempt to issue a command using an SSH connection, you will be prompted to create a profile.
Use the VS Code Command Palette to issue the command OPS/MVS: Create or Modify OPS/REXX LS SSH Connection Profiles.
The command displays a list of settings to allow you to create a profile.
Specify values for the following settings using the VS Code UI:
Profile Name (Required)
Enter a name for the OPSVSCE SSH profile. The name must match an existing Zowe SSH profile, which allows your OPSVSCE SSH profile to use the host name, username and password included in the Zowe profile to make the connection to OPS/MVS. If the name you enter does not match a Zowe SSH profile, you will be prompted to change it.
Backend Data Set (Required)
Enter a name for a data set in which to store the REXX program OPSVSCE1.opsrexx, which enables OPS/REXX LS to carry out OPS/MVS commands over SSH.
Default Subsystem (Optional)
Specify the default OPS/MVS subsystem to be used for requests made with this profile. Defaults to OPSS.
Install z/OS Unix path (Optional)
Specify the z/OS Unix path where the SSH manager creates the directory .opsrexx-vsce.
If a path is not specified, your home directory is used. This directory is used to run the commands that are needed to prepare OPSVSCE1.opsrexx and deploy it to the specified Backend Data Set. The directory is only used to transfer files to the backend data set, after which it is automatically emptied.
Select Add this OPS/REXX LS SSH Profile to your settings.
The OPSVSCE SSH profile is saved to your OPS/REXX LS settings.
Use the VS Code Command Palette to issue the command OPS/MVS: Deploy Backend.
A menu appears that allows you to select the system where you will deploy the OPSVSCE1.opsrexx program. (Refer to the description of Backend Data Set in the previous step.)
When you select a system, OPS/REXX LS checks for an appropriate OPSVSCE SSH profile and deploys OPSVSCE1.opsrexx to the data set you specified.
The SSH connection to OPS/MVS is established.
Note: We recommend that you use the OPS/MVS: Create or Modify OPS/REXX LS SSH Connection Profiles command and the VS Code UI to create or edit OPSVSCE SSH profiles.
However, you may create a profile or edit it directly in settings.json. To do this, in your OPS/REXX LS settings under SSH Connection Profiles, click the link Edit in settings.json.
The SSH profile settings as they appear in the JSON file are listed here:
name (Required)
The name of the profile, which must match a Zowe SSH profile name.
deployDataset (Required)
The name of the data set in which to store OPSVSCE1.opsrexx.
defaultSubsystem (Optional)
The default OPS/MVS subsystem to be used for requests made with this profile. Defaults to OPSS.
installUssPath (Optional)
The z/OS Unix path where the SSH manager will create a directory called .opsrexx-vsce.
Use OPS/REXX LS
OPS/REXX programs and rules are automatically recognized when opened in VS Code in the following cases:
- When the file extension is
.opsrexx
- When the first line of the file contains either the comment
/* OPSREXX */ or a rule type identifier, such as )CMD or )MSG (case-insensitive)
- When data set members that contain OPS/REXX programs and rules are opened using Zowe Explorer and the containing data set is associated with
opsrexx files
When OPS/REXX programs and rules are recognized, syntax highlighting and basic error checking on AOF rules and OPS/REXX program syntax is enabled by default. Additional features of OPS/REXX LS are available depending on context and your configuration.
OPS/REXX Hover Insights
Place and hold your cursor over an OPS/REXX element to view more information about it. Hover insights are available for OPS/REXX built-in functions, host environments, or AOF event variable names.

Autocompletion
Autocompletion works for the following OPS/REXX language elements:
- AOF Variables
- Built-in Functions
- Host Environment Names
To trigger autocompletion of AOF variables, enter . after an AOF rule type stem, for example: msg. AOF variable completions are supported for all rule types.
Built-in function autocompletion is triggered automatically when you type an OPS/REXX built-in function or host environment name.

OPS/REXX Snippets
Before you write AOF rules from scratch, check the snippet library for any applicable rule snippets. Using snippets promotes consistent and correct syntax in the rules you design.
To use the snippet library:
- Press
Ctrl/Cmd+Shift+P to open the VS Code Command Palette.
- Type
Insert Snippet.
- Select the command or press Enter.
- Choose the type of rule snippet you want to insert.
- Fill in the templated values to complete the OPS/REXX rule.
If you know the name of the snippet you want to use, you can begin typing the name of the snippet in the editor and select from the list of suggestions.

OPS/MVS Commands
Issuing OPS/MVS commands from OPS/REXX LS requires connecting securely to an OPS/MVS subsystem using the OPS/MVS REST API or using SSH.
- Certain commands require an OPS/MVS REST API connection.
- The only commands that require an SSH connection are those related to setting up the SSH connection.
You can use OPS/REXX LS to issue the following OPS/MVS commands by connecting through the OPS/MVS REST API or by connecting with SSH:
Show Rule Status - Shows the status of a selected rule.
Enable Rule - Enables a selected rule.
Disable Rule - Disables a selected rule.
Set Auto Enable - Turns on the auto-enable feature for a selected rule.
Reset Auto Enable - Resets the auto-enable feature for a selected rule.
Rule Facility - Allows you to check and modify the following rule statuses: active or inactive, auto-enabled or not auto-enabled.
You can use OPS/REXX LS to issue the following OPS/MVS commands by connecting through the OPS/MVS REST API:
Execute Program - Executes an OPS/REXX program that you choose by typing parameters into an input form.
Search OPSLOG Records - Provides a table of OPSLOG records that match your specified search parameters.
With a data set that contains OPS/REXX rules open in the Zowe Explorer sidebar, to issue OPS/MVS commands:
- Right-click the data set member that contains the OPS/REXX rule or program in the Zowe Explorer sidebar.
- Select the command from the OPS/REXX menu.
You can also issue commands for an open OPS/REXX rule or program by using the VS Code Command Palette (Ctrl+Shift+P).
Tip
You can use the keyboard shortcut Ctrl+Shift+E to issue the OPS/MVS: Execute Program with Parameters command from the VS Code Command Palette regardless of which file is currently open.
After a command is issued, the VS Code window displays a status message. If a command fails, a detailed error message displays.
Issue Commands Using the Right-Click Menu
The right-click menu provides quick access to OPS/MVS commands from the Zowe Explorer sidebar.

Issue the Execute Program Command
Use the Command Palette to execute OPS/MVS programs that require parameter input.

Search OPSLOG Records
Use the OPS/MVS: Search OPSLOG Records command to search the live OPSLOG.
You can specify parameters to search for specific text in the OPSLOG.

If you select Submit Search without specifying parameters, you can browse the most recent records or the oldest records from the specified OPSLOG.

Tip
To select a different OPSLOG to search, select OPS/MVS: Search OPSLOG Records > Search Settings > Log Name.
OPS/MVS Automation Samples
OPS/MVS distributes sample AOF rules, OPS/REXX programs, and user exits that demonstrate various aspects of automating operations in a mainframe environment. You can use Zowe Explorer to copy these samples to your own library, and use the OPS/MVS Language Extension to develop, manage, and run your versions of these samples.

For a complete listing of the automation samples that are included with OPS/MVS, see Sample Automation in the OPS/MVS documentation.
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
OPS/REXX Language Support 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 OPS/MVS, 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.
| |