File Master™ Plus’ Modern Programming Interfaces in a Nutshell

By Petr Galik and Sudeep Chaurasia

Petr Galik
Modern Mainframe
6 min readNov 9, 2022

--

File management and data manipulation is an essential activity for anyone who works with IBM mainframes. Having a versatile tool installed on your system to perform these tasks is a necessity for most mainframe users. As the time goes forward, new testing and DevOps paradigms and tools emerge. They often originate from outside of the mainframe domain and require a certain standardized interface other than the ISPF (panel) and batch, which is prevalent on mainframe.

New interfaces available in File Master Plus

Over the past few years, File Master Plus for MVS has been enhanced so it provides several new interfaces that enable integrations with modern testing and DevOps tools. Apart from the traditional ISPF and batch interfaces File Master now offers REST API, Zowe CLI and Ansible collections.

Both the REST API and the CLI interfaces build on top of the Zowe Open Mainframe Project and are conformant with the latest Zowe V2 ecosystem criteria. This opens up additional integration possibilities with other certified products in the Zowe ecosystem. Significant benefit of the Zowe ecosystem is that it leverages the robust native mainframe security yet it simplifies the product integrations.

REST API Interface

A REST API is an application-programming interface that conforms to the constraints of REST architectural style and allows for interaction with RESTful services. REST stands for representational state transfer and was created by computer scientist Roy Fielding.

The prerequisites for usage of this interface include the installation and configuration of the File Master for MVS core product and Testing Tools Server. The Testing Tools server is installed into an Apache Tomcat server instance. This server can also be simultaneously utilized for the File Master Eclipse UI and the Data Editor for Mainframe Visual Studio Code extension.

The File Master REST API enables users to:

  • Create a physical sequential, large format sequential, partitioned, extended partitioned and VSAM (KSDS, ESDS, RRDS, VRRDS, LDS) data set types.
  • Populate a data set with records according to the layout in a COBOL or PL/I copybook.
  • Copy data from one data set to another, and optionally filter the copied data using selection criteria.
  • Rename a data set.
  • Delete a data set.

The summary of the available File Master REST API endpoints is in the Swagger format below.

These File Master REST API endpoints can be used in any programming language that supports HTTP calls, like JAVA, TypeScript, Python etc.

File Master’s REST API supports PassTickets instead of password, so that users can build an application with a single sign on.

FMP REST API can also be integrated with the API Mediation Layer. The interface holds the Zowe API Mediation Layer V2 conformance badge since it was updated to be compliant with the Zowe API Mediation Layer V2 conformance program.

Typical use case arises when a quality assurance engineer needs to perform specific testing which requires a concrete number of records in a VSAM KSDS dataset. The engineer can write a TypeScript program to build a JSON input data with the specified number of records. This can be achieved using loops. After this step, the FMP Populate REST API endpoint can be called with these JSON input data to populate the KSDS data set.

Zowe CLI Interface

Zowe Command Line-Interface (Zowe CLI) is a command-line interface that lets modern application developers interact with the mainframe in a familiar way. The Zowe CLI helps to increase overall productivity, reduce the learning curve required for developing mainframe applications, and to exploit the easy-to-use off-platform tools.

File Master Plus provides a CLI plugin which can be installed into the Zowe CLI ecosystem. It helps to manage data sets and also manipulate the records. It also supports symbolic data access using layouts and selection criteria. Under the hood it is powered by File Master’s REST API, so to use the FMP Zowe CLI plugin its REST API needs to be up and running, and corresponding details need to be provided in the FMP Zowe CLI profile or explicitly in the CLI.

This plug-in is compatible with Zowe CLI and is also awarded the Zowe Conformance V2 Program badge. The plug-in download and usage does not require you to purchase the Broadcom Brightside offering. File Master Plus users are entitled to support of this plug-in.

The command line interface can be used to perform one single task on file, such as creation, deletion or for building automation scripts to automate various complex tasks on the mainframe system.

A typical use case example is related to the QA environment lifecycle. To be more specific when in a QA environment tests need to be performed with a specific state of data sets and they get changed during the tests execution. In this case a QA engineer needs to make sure that before running the tests the data sets are in a specific state. This can be achieved by writing a small automation script using FMP Zowe CLI commands COPY and DELETE. First by making a backup of the data set using COPY command then before running the tests by deleting the data set using DELETE command and then by using the COPY command to restore from backup.

Ansible collection

Ansible is an automation tool that automates repetitive tasks that can be too complex to perform manually. Ansible can be used in configuration management, application development, orchestration, test environment provisioning and many other domains. For these reasons, the usage of this tool fits very well into any mainframe DevOps stack.

In Ansible various processes are done using the Ansible PlayBooks which provide instructions of what needs to be done to achieve the desired state. They are written in a YAML file format, which does not require any special coding skills.

Broadcom provides a variety of Ansible collections that can be used for mainframe automation in scope of the Ansible Galaxy. File Master’s Ansible collection is published within this scope.

Functionality wise the collection is derived from the File Master’s CLI plug-in and can be installed through the already mentioned Ansible Galaxy.

Using the File Master’s Ansible collection users can automate a wide variety of tasks on the mainframe platform. For example if a system administrator needs to empty a certain datasets after running a backup every month Ansible PlayBook can be created to perform this task. The PlayBook renames the datasets with a certain date time in the data set name and then creates datasets modeling the backup datasets. This PlayBook can be scheduled to be triggered automatically at specific times.

Closing remarks

File Master Plus for MVS has been enhanced to provide a comprehensive set of functionality through a variety of modern interfaces. Due to the nature of the newly supported interfaces (including REST API, CLI and Ansible collections) it is much easier for quality assurance engineers, DevOps engineers and system engineers to leverage the provided file management and data manipulation capabilities in their projects.

Useful links

File Master Plus REST API

https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/ca-filemaster-plus/12-0/using/using-the-rest-api.html

File Master Plus Plug-in for Zowe CLI

https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/ca-filemaster-plus/12-0/integrating/ca-file-master-plus-plug-in-for-zowe-cli.html

File Master Plus Ansible Collection

https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/ca-filemaster-plus/12-0/integrating/integrate-with-the-ansible-collection.html

Open Mainframe Project Zowe

https://www.zowe.org/

Broadcom Ansible Collection

https://broadcommfd.github.io/broadcom-ansible-collections/index.html

Special thanks to Petr Vacula, Dana Boudreau and David McNierney

--

--

Petr Galik
Modern Mainframe

Product Owner at the Broadcom Mainframe R&D Centre in Prague. Modernizing the way we work with z/OS.