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, automation engineers can develop OPS/MVS Automated Operations Facility (AOF) rules more efficiently by editing OPS/REXX in a local VS Code environment.
OPS/REXX Language Support brings the following advantages to AOF rule development:
- Syntax highlighting in OPS/REXX to help you distinguish the elements of AOF rules
- Autocompletion of OPS/REXX built-in functions, host environment names, and AOF event variable names
- Hover help for OPS/REXX built-in functions, host environment names, and AOF event variable names
- Basic error checking for AOF rule syntax
- Access to a library of useful OPS/REXX rule snippets
The OPS/REXX Language Support extension does not provide the ability for you to download from, upload to, or submit jobs on the mainframe. To access mainframe code while using OPS/REXX Language Support, we recommend Zowe Explorer (see Recommended Software) or Zowe CLI.
The OPS/REXX Language Support extension has no prerequisite software. However, for your best experience with OPS/REXX Language Support, we recommend the following software.
For correct display of syntax highlighting, we recommend using OPS/REXX Language Support with a REXX language support extension. OPS/REXX Language Support has been tested for compatibility with the Broadcom REXX Language Support extension.
We recommend using Zowe Explorer to access mainframe code while using OPS/REXX Language Support. For more information about the Zowe Explorer extension, see Zowe Explorer on the VS Code marketplace.
Although it is possible to use the OPS/REXX Language Support extension without access to OPS/MVS, most users will want to use the extension while interacting with an OPS/MVS instance. To use the OPS/REXX Language Support extension with OPS/MVS, you will need:
-
An instance of OPS/MVS with the Web Services component installed.
-
When you have multiple instances of OPS/MVS running on a single system, only one Web Services component is required. A single OPS/MVS Web Services component can access all OPS/MVS instances on a single system.
-
If you are using multiple OPS/MVS instances running on different systems, install and configure the Web Services component to an OPS/MVS instance on each system. One Web Services component is required for each system.
-
-
For OPS/MVS release 13.5 only, PTFs SO06379 and SO06380 must be applied.
-
When working on OPS/REXX files, always make sure the file type is .opsrexx to ensure extension features are automatically enabled. For more information, see Configuring for Zowe Explorer.
-
To issue commands from the OPS/REXX Language Support extension to OPS/MVS instances, you must be granted access to OPS/MVS resources AOF, SQL, OPSSMTBL, and OPSGLOBAL through OPS/MVS Security.
-
Use Zowe Explorer to create a team configuration file containing the connection information for the OPS/MVS instance you would like to connect to. Provide the following information:
- The host name of the LPAR on which OPS/MVS Web Services is running.
- The OPS/MVS Web Services port number.
- A user name that has authority to access OPS/MVS Web Services.
- The password to the account tied to the user name.
-
Alternatively, you can follow these steps to manually create your team configuration file.
To ensure that data sets accessed through Zowe Explorer are recognized by the extension as .opsrexx files, you must create a file association in your VS Code settings.
To create a file association, use one of the two following options.
Option 1: Create a file association in Workspace Settings
- Use the command palette in VS Code (
Ctrl/Cmd + Shift + P
) to locate the Workspace Settings. - Scroll down to the Files: Associations setting and click Add Item.
- Add
*.REXX(*
to theKey
field, andopsrexx
to theValue
field. - Add
*.RULES(*
to theKey
field, andopsrexx
to theValue
field.
Option 2: Create a file association in User Settings
-
Use the command palette in VS Code (
Ctrl/Cmd + Shift + P
) to locate the file settings.json (User Settings). -
In settings.json, add the lines
"*.REXX(*": "opsrexx"
and"*.RULES(*": "opsrexx"
under"files.associations"
as shown in the following example:"files.associations": { "*.REXX(*": "opsrexx", "*.RULES(*": "opsrexx", },
After completing the steps for either of the two options, you can use Zowe Explorer to access .opsrexx files.
Use OPS/REXX syntax highlighting and symbol resolution to help you avoid syntax errors when developing rules.
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.
To trigger autocompletion of AOF variables, type the .
character after an AOF rule type stem, such as msg.
.
AOF variable completions are supported for all rule types.
Variable autocompletion is triggered automatically when you type an OPS/REXX built-in function or host environment name.
The OPS/REXX Language Support extension automatically performs some basic error checks on AOF rule syntax, such as the line length warning shown in the following image.
This feature requires an OPS/MVS connection and Zowe Explorer.
To use the OPS/MVS: Show Rule Status
command:
- Open the command palette by pressing
Ctrl/Cmd + Shift + P
. - Type in and select
OPS/MVS: Show Rule Status
.
A request will be sent to your configured OPS subsystem
and ruleset
using the name of the currently open file as the rule whose status is being checked. The VS Code window will pop up with a status of ENABLED
, DISABLED
, or NOT FOUND
, or an error message.
Before you write AOF rules from scratch, check the snippet library for any applicable rule snippets. To use the snippet library:
- Open the VS Code command palette by pressing
Ctrl/Cmd + Shift + P
. - Type
Insert Snippet
. - Click 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.
For a quicker way to access the snippets:
-
Begin typing the name of a snippet (such as
)MSG
) in the editor.VS Code autocomplete suggests the full name of the snippet.
-
Select the suggested snippet and press Enter.
Using snippets promotes consistent and correct syntax in the rules you design.
Copyright © 2024 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.