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.
|