EasySMF-JSON 1.4.3 API

EasySMF-JSON provides functions to generate JSON from z/OS SMF data using EasySMF.

Maven Dependency

Define the Black Hill Software repository and add the dependency to your POM:
        <name>Black Hill Software Repository</name>

General Usage

EasySmfGsonBuilder configures a Gson instance to convert EasySMF SMF records to JSON. Use the Gson.toJson(java.lang.Object) method to create the JSON output.


Specialized classes are provided in package com.blackhillsoftware.json.cics to process CICS transaction data.

CICS transactions produce a lot of SMF data, and need to be accessed using a dictionary. To simplify processing, classes are provided to build a summary of CICS transaction records.

CicsTransactionGroup summarizes data from a group of transactions. CicsTransactionGroupFactory creates CicsTransactionGroups with a shared configuration e.g. including and excluding specific fields.

SMF to JSON Command Line Interface

Smf2JsonCLI provides a command line interface for creating programs to convert SMF data to JSON.

Smf2JsonCLI can read data from files or z/OS datasets, generate the JSON and write it to a z/OS dataset, a file or stdout. It handles creating and parsing the command line options to select the input source and output destination.

Other command line options allow you to select pretty printed JSON and multi-threaded processing.

Limiting record length on z/OS

JSON is usually generated as one long stream of data unless pretty printing is selected. This can be a problem if the output is directed to a dataset (not a file) on z/OS because datasets have a limited record length.

To help avoid this limitation, the MultiLineArray class can write a JSON array with newlines between each element, which can then be written as separate records to a z/OS dataset using e.g. TextRecordWriter. This means that the LRECL only needs to be long enough for a single entry in the top level array.

This module provides functions to generate JSON from z/OS SMF data using EasySMF.