How to use REXX stems variables for hierarchical information access and report generation

Source: Internet
Author: User
Tags arrays log

1. Background

In the z/OS Sysplex environment, there is often a batch of JCL jobs running on different lpars, each job generating the corresponding output in its own job log. There is a scenario where you need to run the same class of JCL jobs on different lpars, and at the end of these jobs, analyze the job logs that all jobs on this sysplex have produced and give summary reports. Figure 1 shows a way to output job logs summary information in a hierarchical fashion.

As shown in figure: 1-01

1-01-Level Information summary

2. The solution

For the scenes described in the background, it is natural to think of using multidimensional arrays, but for most languages, the length of the array is fixed and cannot be changed dynamically, and the number of entity in each level is unknown. There is no concept of multidimensional arrays in REXX, but there are definitions of compound Variables and stems that resemble the concept of an array.

By analyzing the usage of REXX stem variables, we decided to use multidimensional stems to access the summary information described in the background. Specifically as follows:

Stem.x: Used to store Lpar name (which system the job runs on)

Stem.x.y:job Log Name

Stem.x.y.z:status blocks

2.1 Building Hierarchical Information Lpar, JOB LOG, Status blocks

2.1.1 General steps for using REXX to analyze job log

Use Isfcalls to activate SDSF support for REXX

Set SDSF Special variables customize the information you want to get

For example: Isfprefix, Isfowner, Isffilter

Gets the specified job log list

Address SDSF "Isfexec ST"/* STatus Command/*

Open a job log

Address SDSF "Isfact ST TOKEN (' Systsprt.1 ') parm (NP SA)"

Read the contents of the job log

"Execio * diskr" isfddname.1 "(Stem spool.)"

2.1.2 Store Lpar name to Stem.x

Through the commands in section III, you can get the specified job log list and get Sysaff., Jname. and other stem variables. Which Sysaff. Save System/lpar name, Jname. Save the job log name information.

The storage of the Lpar name can be completed through the following code fragment (Loop execution):

Lpar_name = sysaff.i
X_idx = X_idx + 1;
Stem.x_idx = Lpar_name;
stem.0 = X_idx;
CURR_X_IDX = X_IDX//Record index of current to Lpar name Stem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.