Mainframe operations
Z Understand Container interacts with z/OS mainframe systems through configured agents. cli.sh script provides three new operations to test connectivity, scan PDS libraries, and download mainframe members directly from the command line.
Before you begin
- Ensure to have a configured z/OS connection in the Dashboard.
- Network connectivity to the mainframe agent.
- Appropriate mainframe credentials and permissions.
- An existing analysis project (for
scan-PDSandget-members).
agent-tc - Test Connection
Tests the connectivity with a z/OS agent defined in the
Dashboard.
./cli.sh -zos --agent-tc <connection_name>The
agent-tc functionality verifies the following: - Accessibility of the z/OS agent.
- Network connectivity established.
- The agent is responding to requests.
You must run this diagnostic tool prior to scanning libraries or download members.
scan-PDS - Scan PDS Library
Scans the contents of one or more PDS (Partitioned Data Set) libraries on the mainframe and
catalogs the member information.
cli.sh -zos --scan-PDS <connection_name> <library1> [library2] [library3]... <project_name><project_name>indicates the name of the analysis project.<connection_name>indicates the name of the z/OS connection as configured in the dashboard.<library1> [library2] ...indicates one or more PDS.
The
scan-PDS performs the following: - Connects to the specified z/OS agent.
- Retrieves the list of members in each specified PDS library.
- Catalogs member metadata (names, types, attributes).
- Configures the project for subsequent member downloads.Note: You must run
scan-PDSbefore usingget-membersto download the actual member content.
# Scan a single library
cli.sh MyProject --scan-PDS EZLCONN1 USER.COBOL.SOURCE
# Scan multiple libraries
cli.sh MyProject --scan-PDS EZLCONN1 USER.COBOL.SOURCE USER.COPYBOOK USER.JCL
```
#### Output
The scan operation creates metadata about the PDS libraries and their members, which is stored in the project's database for use by the `get-members` action.
---
get-members - Download Members
Downloads the actual source code members from previously scanned PDS libraries to the local disk.
cli.sh -zos --get-members <connection_name> <library1> [library2] [library3]... <project_name><project_name>indicates the name of the analysis project.<connection_name>indicates the name of the z/OS connection as configured in the dashboard.<library1> [library2] ...indicates one or more PDS library names to download (must align with the libraries fromscan-PDS).
The
get-members functionality performs the following: - Connects to the specified z/OS agent.
- Downloads all members from the specified libraries.
- Saves the members to the project directory on disk.Note: You must run
scan-PDSwith the same parameters before runningget-members.
# Download members from a single library
cli.sh MyProject --get-members EZLCONN1 USER.COBOL.SOURCE
# Download members from multiple libraries
cli.sh MyProject --get-members EZLCONN1 USER.COBOL.SOURCE USER.COPYBOOK USER.JCL
#### Output Location
Downloaded members are stored in '/wca4z-understand/projects/sources' and have the following structure:
```
/wca4z-understand/projects/sources
└── <connection_name>
├── PDS_MVS
├── <library1>
└── <member1>
└── <member2>
```