Cloud Data Manager

Step-by-step Installation

This guide will instruct you how to set up and invoke the transform service of the Model 9 Cloud Data Gateway from the mainframe, using JCL. The service will transform a Model9 data set backup copy / archive into a readable file in the cloud. Once transformed, the readable file can be accessed directly or via data analytics tools.

If using the Model 9 Cloud Data Gateway as an on-premises service, refer to Step-by-step deploymentguide before continuing to the steps on this guide.Step-by-step deployment

Note

The transform service is invoked as SaaS by using the url:

https://us-east-1.model9api.io/

Step 1: Set up

Verify Model 9 Cloud Backup and Recovery for z/OS is installed

Model9 is responsible to deliver the data set from the mainframe to the cloud / on-premises storage. The data set is delivered as a backup copy or an archive, and provides the input to the transform service.

Download z/OS cURL

This free tool will allow you to invoke the transform service from z/OS. If cURL is not installed under /usr/bin, edit line 4 and add the path where the cURL module resides.

Step 2: Copy the script

Copy the following script to /usr/lpp/model9/transformService.sh:

#!/bin/sh
json=$1
url='https://us-east-1.model9api.io/transform'
export PATH=/usr/bin:/bin
export _EDC_ADD_ERRNO2=1
cnvto="$(locale codeset)"
headers="Content-Type:application/json"
echo "Running Model9 transform service"
output=$(curl -H "$headers" -s -k -X POST --data "$json" $url)
if ! [ -z "$output" ]; then echo "Transform ended with the following output:" # If the answer is in ASCII then convert to EBCDIC firstChar=$(echo $output | cut -c1) if [ "$firstChar" = "#" ]; then convOutput="$(echo $output | iconv -f ISO8859-1 -t $cnvto)" else convOutput=$output fi echo "$convOutput" fi
status=$(echo $convOutput | tr -s " " | cut -d, -f1 | cut -d" " -f3) echo "Transform ended with status: $status"
if [ "$status" = '"OK"' ];then exit 0
else if [ "$status" = '"WARNING"' ]; then exit 4
else exit 8
fi
fi
Step 3: Copy the JCL

Copy the following JCL to a local library, update the JOBCARD according to your site standards:

//M9TRNSFM JOB 'ACCT#',REGION=0M,CLASS=A,NOTIFY=&SYSUID
//EXTRACT EXEC PGM=BPXBATCH
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDPARM DD *
SH /usr/lpp/model9/transformService.sh
// DD *,SYMBOLS=EXECSYS
'{ "input": { "name" : "<DATA-SET>", "complex": "group-&SYSPLEX", "archive": "<false|true>" }, "output": { "prefix" : "/transform/&LYR4/&LMON/&LDAY", "compression" : "none", "format" : "text" }, "source": { "url" : "<URL>", "api" : "<API>", "bucket" : "<BUCKET>", "user" : "<USER>", "password": "<PASSWORD>" }
}'
/*
//
Step 4: Customize the JCL

Update the object storage details

Copy the following object storage variables from the Model9 agent configuration file:

  • <URL>

  • <API>

  • <BUCKET>

  • <USER>

  • <PASSWORD>

Update the complex name

The “complex” name represents the group of resources that the Model9 agent can access. By default, this group is named group-<SYSPLEX> and it is shared by all the agents in the same sysplex. The transform JCL specifies the default, using the z/OS system symbol “&SYSPLEX”.

Note

If the default was kept for “complex” in the Model9 agent configuration file, no change is needed

If the “complex” name was changed in the Model9 agent configuration file, change the “complex” in the JCL accordingly.

Update the transform prefix

By default, the JCL will create a transformed copy of your input data set, in the same bucket, with the prefix: /transform/&LYR4/&LMON/&LDAY. The prefix is using the following z/OS system symbols:

  • &LYR4 - The year in 4 digits, e.g. 2019

  • &LMON - The month in 2 digits, e.g. 08

  • &LDAY - The day in the month in 2 digits, e.g. 10

You can change the prefix according to your needs.

Step 5: Choose the data set to be transformed

The data set to be transformed should be a backup copy or an archive, delivered by the Model9 agent:

  • <DATA-SET> - the name of the data set

  • <false|true> - if the data set is an Model9 archive, set to “true”. If the data set is a Model9 backup copy, set to “false”.

To change the attributes of the input and the output, and for a full description of the service parameters, see Service parameters.

Step 6: Run the JCL

Submit the job and view the output. See Service response and log samples for sample output.

Step 7: Access the transformed data

Based on the returned response, the outputName will point to the path inside the bucket where the transformed data resides. See Service response and log .