Appeal to a HIER Authority: Graphing CA

advertisement
Appeal to a HIER Authority: Graphing CA-7 Scheduling
Dependencies
Brent Turner, The Chase Manhattan Bank, N.A.
Abstract
The Problem
The Computer Associates' (CA) scheduling product,
CA-7, provides a narrative report of antecedentl
consequent job dependencies, but in a somewhat
congested presentation. The CA-7 output report is
used as the input rue to a SAS®program which
produces two SAS data sets from the report text. The
observations in the ftrst data set each contain the job
name, its antecedent job name, and, if there are
dependencies, a generated reference number. Those
in the second set contain the job name, with its
dependencies (and the same respective reference
number) if any.
The Computer Associates' (CA) scheduling product,
CA-7, provides a narrative report of antecedentl
consequent job dependencies, but in a somewhat
congested presentation. An excerpt of the report for
a specific job scheduling hierarchy is depicted in
Figure I.
Although this report provides detailed information of
the requirements for job processing, it does not
illustrate the temporal sequence of the schedule in an
structural format. In addition, the report contains
superfluous information (beyond what is essential for
illustrating the schedule structure).
By using multiple SET statements in a data step, each
observation in the ftrst data set is compared with
every other observation in the same data set to
determine job sequencing. The SAS supplemental
procedure HIER produces a hierarchical diagram
showing the jobs' schedule, where dependent job
names are concatenated with their respective reference
numbers.
A cross-referenced requirements/
dependencies table is produced from the second data
set, using the PRINT procedure.
The Solution
SAS can process any readable me as an input source,
and is especially well-suited to string manipulation.
Therefore, the CA-7 output report is used as the input
rue to a SAS program which extracts the necessary
information for graphical and print reporting. As
such, the report is directed to a disk me, instead of a
printer.
The pertinent data are located by searching for
specific character strings on each line of a CA-7
scheduling report.
All of the report lines are
processed as mixed record types, which in fact they
are. The record "type" is indicated by the presence
of speciftc character strings at designated locations on
the respective report line.
Introduction
The Corporate Data Center of Chase Manhattan
Bank, N.A. operates 24 hours per day, seven days per
week to provide executive management with data that
are vital for directing corporate policy. With the
exception of preventive maintenance (PM), the center
is continuously processing production workloads.
Methodology
These workloads include online transactions during
business hours and production batch jobs at other
times. Consequently, batch work must be completed
prior to the business day for the system to be able to
accommodate the online workloads.
The program methodology consists of two data steps
followed by three procedure steps: SO R T, HIER, and
PRINT. The ftrst data step reads the CA-7 output
report to produce two output SAS data sets. The ftrst
data set is denoted as the Sequence data set. Each
observation in this data set contains variables for:
The batch workloads have job dependencies which
dictate both when and the order in which they can
be processed. Certain jobs produce mes used by
subsequent jobs; others must await the arrival of
tapes from other data centers.
The timeframe
window for these jobs, which is narrow due to the
volume of work, severely restricts any reprocessing if
there are scheduling errors.
821
•
the name of one of the jobs listed in the schedule
report;
•
the name of the antecedent job (if any) which
must complete successfully to "trigger" the
currently listed job; and
JOB=CLMS027A
COMPLETED
SCHEDULE:
LATEST STRT=9l266j1700
DUE OUT TIME=9l266j170B
SUBMIT TIME=OOOOOjOOOO
SCHD MBR=SJOOOOOO
SCHED ID=014
GENERAL:
JCLMBR=CLMS027A
SYSTEM=
NBRRUN=023
JCLID=OOO
LTERM=
LSTRUN=9l260j0322
RESOURCE:
MAINID=ALL
ELAPTM=OOOB
PRTY=OOO
TPl =02
TP2 =00
EXECUTION:
RELOAD=NO
RETJCL=NO
EXEC=YES
HOLD=NO
TRIGD BY:
JOB=CLMSTBLE
MAINT=YES
JOB EXECUTION REQUIREMENTS
*******
*******
EXTERNAL USR=AWAITING TAPE FROM LFB
EXTERNAL USR=RUN NO MORE THAN 2 A JOBS AT A TIME
Figure 1.
Excerpt from CA-7 Job Scheduling Report
from: SET Statement Outside
DO UNTIL Loop
from: SET Statement Inside
DO UNTIL Loop
Job(l)
Ref(l)
Trig( 1)
Job(l)
Ref(l)
Trig(l)
Job(2)
Ref( 2)
Trig(2)
Job(2)
Ref(2)
Trig(2)
Job(3)
Ref(3)
Trig(3)
Job(3)
Ref(3)
Trig(3)
Job(n)
Ref(n)
Trig(n)
Job(n)
Ref(n)
Trig(n)
I
Outside
Loop
V
Attached
Data Set
?
V
Trig(x)
=
Job(y)
Inside
~LOOP
V
Job(x) + Ref(x)
SUBORDINATE
Figure 2.
I
V
I
V
V
Trig(x) + Ref(y)
SUPERIOR
Schematic Diagram of Comparison i\,lethodology
822
Observation
for Input
to the HIER
Procedure
•
the Inside SET observation. The two possible results
for this comparison are:
if needed, a sequentially generated reference
number corresponding to an identically
numbered list item which will appear on a
subsequent PRINT report. This contains the
specific requirements for the listed job. For jobs
which do not have specific requiremeIlts, this
value will be blank.
I.
occur.
The other data set consists of observations for jobs
that have specific requirements. This data set is
denoted as the Requirements data se\.
Each
observation in this data set contains variables for:
•
•
•
The Outside SET Trigger matches the Inside
SET job name. In this situation three events
the name of the listed job from the production
schedule;
a sequentially generated reference number which
corresponds to an identically numbered
hierarchical node in the subsequent graphical
report; and
2.
the job requirements (text data) themselves.
The second data step utilizes the Sequence data set,
containing the job names in a particular CA-7
schedule and their respective antecedent jobs, created
in the first data step. The data set is used as its own
reference me to establish job sequencing for
subsequent hierarchical graphing.
The lookup
comparison and output technique are illustrated in
Figure 2.
a.
The DO UNTIL truth condition is attaincd
and the loop test variable is set to the
nwnerical value I.
b.
The Inside SET job name is assigned to a
storage variable for the Trigger (of the
Outside SET job name).
c.
Execution of the data step continues outside
the DO UNTIL loop and an output
observation is written. The data step then
begins its next execution.
The Outside SET Trigger does not match the
Inside SET job name. The DO UNTIL loop is
executed again and the next Inside SET
observation is read.
If there is no antecedent job (no Trigger), one of two
situations are indicated:
This technique is accomplished by using two SET
statements to read the data set, each of which keeps
a separate observation pointer. One SET statement
is placed inside a DO UNTIL loop and utilizes the
POINT= and NOBS= SET statement options to
enable multiple executions of this statement, within
the loop, for each data step execution. References to
this SET statement (and its associated observations)
will hereafter be denoted by the Inside SET.
I.
There is no Trigger for the Outside SET job
name, such that it represents the top node in the
scheduling hierarchy.
2.
There is no Trigger for the Outside SET job
name but it is not the top node in the scheduling
hierarchy, and the all observations in the data set
have been read by the Inside SET statement but
have yielded no match. The Outside SET job
name:
•
is not first in the schedule;
•
is not triggered by a prior job completion;
but
•
The other SET statement (again, reading the same
data set) precedes (is outside of) the DO UNTIL loop
and executes once for each data step execution.
References to this SET statement (and its associated
observations) will hereafter be denoted by the Outside
SET.
serve& as trigger for one
Qf
-more subsequent
jobs in the schedule.
From the matched Outside SET observation data and
the Inside SET observation data a new observation
is constructed for the output data set. From the
Outside SET observation, the job name and its
"reference number" (which may be blank) are
concatenated into a new variable. From the Inside
SET observation, the job name, which corresponds
to the Trigger name of the Outside SET observation,
and its "reference number" (which may be blank) are
concatenated into a new variable.
The Outside SET statement reads an observation
which becomes the reference record for subsequent
comparisons in this execution of the data step. It is
necessary to assign the variable values from this
observation to differently named variables. This is
because these values will be overwritten by the values
in the observational variables which will be read by
the Inside SET statement, since the variables are, of
course, the same.
These two new variables are combined into an
observation which attaches the job and Trigger name
(and their associated "reference numbers") to each
other. The observation is written to the output data
set (hereafter denoted as the Attached data set). The
Attached data set is subsequently used as input to the
HIER procedure.
If there is an antecedent job (hereafter denoted as the
Trigger) for the job name identified in the Outside
SET observation, it is compared to the job name for
823
SET
WORK. SEQUENCE ( KEEP
JOB_NAME
REFERENC
TRIGGER_
)
/*
1*
1*
1*
1*
JOB_TEMP = JOB_NAME
REF_TEMP
REFERENC
TRIGHOLD = TRIGGER_
SCHEDNUM
SCHEDULE
0 U T SID E
L 0 0 P
1* MATCH REFERENCE & TRIGGER
I" REFERENCE NUMBER
1* TRIGGERS JOB NAME(D)
DO UNTIL ( MATCH_UP )
ITERATES = ITERATES + 1 ,.
*1
*1
*1
*1
* * * * * * * * * * * * * * * * */
SUBORDINATE JOB NAME
SUBORDINATE REFERENCE
SUPERIOR
TRIGGER
SCHEDULE NUMBER ID
/* * * * * . ~ * -* * * * * * * * * *
1* MATCH FOR TRIGGER AND JOB NAME?
1* RECORDS IN DATA SET COMPARED
MATCH_UP = FALSE
ITERATES = ZERO
SET
= 1*
STORAGE:
STORAGE:
STORAGE:
STORAGE:
*1
*1
*1
*1
*/
*1
*1
* * * * * * * * * * * * * */
* * * * * * * * * * * * * */
1* TOTAL # OF RECORDS COMPARED
*1
/* * * * * * * * * * * * * * * * * */
/* * * *
/* * * *
WORK.SEQUENCE ( KEEP
JOB_NAME
REFERENC
TRIGGER_
POINT
NOBS
=1* INS IDE L 0 0 P
1* MATCH REFERENCE & TRIGGER
1* REFERENCE NUMBER
1* TRIGGERS JOB NAME(D)
1* * * * * * * * * * * * * *
= ITERATES
= TOTALOBS
*1
*1
*1
*1
*/
JOB_NAME = TRIM( LEFT( JOB_NAME ) ) ;
/* * *
* * * * * * * * * * * * * */
= INSIDE JOB? *1
* * * * * * * */
IF ( TRIG HOLD =: JOB_NAME) 1* OUTSIDE TRIGGER
THEN DO ;
/* * * * * * * * *
INSIDE
+ 1 ;
1*
TRIGTEMP
TRIM( TRIG HOLD ) II SEPARATE 11/*
REFERENC II SEPARATE 11/*
ID_IDENT II SCHEDULE
1*
MATCH_UP = TRUE
1*
END ; 1* IF ( TRIGTEMP =:
1*
IF ( ITERATES >= TOTALOBS)
THEN DO
OUTSIDE LOOP
INSIDE LOOP
OUTSIDE LOOP
MATCH FOUND
*******
** ***********
1* INSPECTED ENTIRE DATA SET
/* * * * * * * * * * * * * * *
/* *
*1
*1
*1
*1
*1
*/
*/
*1
*/
IF ( MATCH_UP = FALSE
) 1* NOT FIND TRIGGER = JOB NAME *1
THEN DO
/* * * * * * * * * * * * * * * */
IF ( TRIGHOLD =: TOP_NODE)
1* FIRST EFFICIENT CAUSE *1
THEN DO ;
/* *
* *********
TRIGGER
****
****
TRIGTEMP = TRIM( TRIGHOLD ) ; 1* USE OUTSIDE
END; f1' IF ( TRIGHOLD =: TOP_NODE) * * * *
ELSE DO ;
1*
TRIGTEMP = TRIM( TRIGHOLD ) I I SEPARATE 11/*
BLANK
II SEPARATE 11/*
ID_IDENT I I SCHEDULE ; 1*
END; 1* ELSE ,( TRIGHOLD =: TOP_NODE) *11*
END ; 1* IF ( MATCH_UP = FALSE
) *1 1* * * *
MATCH_UP = TRUE
I" MATCH
END; 1* IF ( ITERATES >= TOTALOBS ) *1
1* * * *
END ; 1* DO UNTIL ( MATCH_UP ) *1
Figure 3.
Code Segment Used In Comparison Methodology
824
OUTSIDE
NO REF
INSIDE
****
****
"FOUND"
**"*
*/
*1
*1
*1
*1
*1
*1
*1
*1
*1
*1
scheduled jobs can be graphically depicted using the
HIER procedure.
The job requirements, being
written to a separate report, provide the needed
scheduling instructions (using reference numbers)
without obscuring the processing sequence.
The actual code used in the comparison is presented
in Figure 3. Note that the values for the subordinate
job name and reference number, plus the superior
Trigger job name, are stored before entering the DO
UNTIL loop, as is the schedule number. These
values are overwritten by the SET statement reading
the data set inside the loop.
The HIER procedure is currently unsupported in
policy by the Institute and also unsupported in
practice by its author.
At the tinae of this
presentation, there are no announcements that it will
be functionally adopted under Version 60fSAS. The
principal intentions of this report are:
The Requirements data set is sorted using the SORT
procedure by reference number and job name. It is
then written to the print ftle using the PRINT
procedure with the reference number and job name
listed in both the BY and ID statements. This
eliminates the printing of duplicate data for jobs
which have more than one requirement, and hence,
more than one accompanying observation.
Results
•
to demonstrate the continuing usefulness of this
apparent software orphan; and
•
to argue for its preservation.
It is the hope of the author of this paper and project
that the HIER procedure will not perish through
benign neglect or indifference. This paper is intended
as an appeal to the HIER authority.
The SAS supplemental procedure HIER produces a
hierarchical diagram, showing the jobs' schedule,
from the concatenated job name-reference number
and Trigger-reference number variables in the
Attached data set. The Trigger-reference variable is
designated as the SUPERIOR variable in the
synonymous HIER control statement. The job
name-reference
variable
is
used
as
the
SUBORDINATE variable in its corresponding
control statement.
Acknowledgements
The author expresses his appreciation to Mr. Jeff
Hayowy for his valuable comments and review of the
project which facilitated its development and
implementation.
The constructed diagram depicts the temporal
ordering of the jobs in the particular schedule by their
respective placement in the node structure.
Dependent job names are lower in the hierarchy than
their antecedent jobs (Triggers). A sample scheduling
graph is depicted in Figure 4.
The author further expresses his gratitude to Messrs.
Manuel
DeGuzman,
Adam
Hatami,
and
Sung- Kwong So for their patience in dealing with the
vicissitudes of the author during the course of this
transcription.
Finally, the author especially thanks Messrs. Frank
Suriani and Joseph Williams for their tinaely help in
obtaining authorization to present this report. For
further information, contact:
A cross-referenced requirements/dependencies table
is produced from the data set containing the
numbered job requirements (Requirements data set),
using the PRINT procedure. Figure 5 provides an
excerpt of the Requirements report.
Brent Turner
The Chase Manhattan Bank, N.A.
One New York Plaza
Floor Eleven
New York, NY 10081
212/676-3596
Discussion
The CA-7 Job Scheduling report contains complete
information on job sequencing and dependency
requirements.
However, the information is not
presented in a format which easily indicates the
structure of the schedule.
CA-7 is a registered trademark of Computer
Associates, Inc., Garden City, NY, USA.
By using the CA-7 report as the input source for a
SAS reporting system, the temporal ordering of
SAS is a registered trademark of SAS Institute Inc.,
Cary, NC, USA.
825
UCC1 SYSTEM FlOHCHART:
SCHEDULE IOEHTlFICATION tu1Bf:R 014
ICLMSOUf
I
ICLMSO06f
I
\CLHSOZSf
I
I
ICLHSOZSH
I
I
ICLMS026f
I
ICLHSOt6H
I
I
IClHSIROH
Figure 4.
Sample Job Scheduling Hierarchical Graph
UCC7 SYSTEM JOB DEPENDENCIES REFERENCE TABLE
SCHEDULE IOENTIflCATI~ tu18ER 014
....."
REfERENCE
JOB NAMIO
REQUIREMENTS
REF=OOOl
CLHSOl1A
USER=AKlITING TAPE fROM LfB
USER=Rlk-i NO MORE THAN l A J06S AT A TIME
/CLHSOZSA
/CLHSOl6A
/DTASBKPl
REf=OOOl
CLHS006A
USfR=AHAITING TAPE fROM BLAS
USER=Rlk-i NO MORE THAN t A JOBS AT A TIME
/DTASBKPI
USER=C:HAl«>E TAPE .'S fOR ALL H/J/V/I1TA
.USER=AHD I1TB. J06S If SCHEDULED
REf=0003
CLHS050A
JDEP=ClHSP080
USER=AKlITlNG TAPE fROH Cl3
NO HOfIE THAN t A .JOBS AT A TIME
/oTASBltPI
USER=CHANGf TAPE .'S FOR ALL H/J/V/HTA
USER=AND I1TB. J06S I f SCHEDULED
USER=~
REf=OOO<t
CLHS02.5A
USER=AlUITING TAPE FROH NEARS
USER=R\.t-I NO HORE THAN t A J06S AT A TIME
/ClHS02r.A
/ClHSOZ1A
/OTASBKP1.
REf=OOOS
ClHSOl6A
USER=AlUITING TAPE FROM IBF
USER=~ NO MORE THAN l A JOBS AT A TIME
/CLHS025A
/"ClHS017A
/DTASBKPl
REf=0006
CLHSOOlA
JD!::P=CLHSP080
USER~AKlITING TAPE FROM ell
USER=IU-I NO HOfIE THAN Z A J06S AT A TIHE
/DTASBltP1
USER=tHAHGE TAPE .'S FOR ALL K/J/V/HTA
USER=AND IfT& JOBS iF SCHEDULED
REF=0007
CLHSOOr.A
JDEP=ClHSP080
USER=AI'IAlTING TAPE fROH Cll
NO I101I:E THAN 2. A JOBS AT A TIME
/DTASBKPI
USER=CHANGI: TAPE .'S FOR ALL H/J/V/HTA
USER:AND HTB J06S IF SCHEDULED
USER=~
Figure S.
Sample Job Scheduling Requirements Report
826
I
I
I
Download