5. FILES › 5.2 Batch Information Area Files › 5.2.8 Batch User Spool Activity File (BATSPL) › 5.2.8.4 BATSPL Retrieval Examples
5.2.8.4 BATSPL Retrieval Examples
This section presents typical BATSPL retrieval examples.
1. Print all printing activity on remote 130.
DATA;
SET &pBATX..BATSPL01;
IF ROUTE=130;
PROC PRINT; VAR SYSID JOB RDRTS STARTTS ENDTS
SPLNLR SYSOUT;
2. Print all uses of form number '151'.
DATA;
SET &pBATX..BATSPL01;
IF FORMNUM='151';
PROC PRINT; VAR SYSID JOB RDRTS STARTTS ENDTS
SPLNLR SYSOUT;
3. Print all spool activity by department PAY, where the
department is the second account code number.
DATA;
SET &pBATX..BATSPL01;
IF ACCTNO2='PAY';
PROC PRINT; VAR SYSID JOB RDRTS STARTTS ENDTS
SPLNLR SYSOUT;
4. Print total print activity by account code, using ACCTNO1
for last month.
%LET BY = ACCTNO1 ;
%LET BREAK = ACCTNO1 ;
PROC SORT DATA=&pBATM..BATSPL01 OUT=FILE1;
BY &BY;
DATA FILE1;
SET FILE1;
%SPLSUM;
PROC PRINT; VAR SYSID ACCTNO1 SPLNLR;
5. Printer Activity Analysis
A great deal of information about printer activity can be
obtained from the BATSPL file. Three elements from this file
(SPLCHARx, SPLDSCI, and SPLWTRTM) are highlighted in this
section. The SAS code examples provide basic analytic tools
that can be modified easily to support your individual
analysis requirements.
CHARACTER ARRANGEMENT TABLE ANALYSIS
SPLCHARx contains the name of the character arrangement
tables used in producing the printed output for a data set on
a 3800-type printing subsystem. The SPLCHARx elements apply
to PSF, JES2, and JES3 systems.
Your installation may wish to track the usage of specific
tables for several reasons. A character arrangement table
that is seldom used can be eliminated from the system as a
cost-cutting measure. A table may contain proprietary logos
that should not be used without authorization. The following
SAS code can locate users of such tables:
DATA;
SET DETAIL.BATSPL01;
IF SPLCHAR1 = 'target table id'
OR SPLCHAR2 = 'target table id'
OR SPLCHAR3 = 'target table id'
OR SPLCHAR4 = 'target table id';
PUT JOB= +5 RDRTS= +5 JESJOBNO= +6 (SPLCHAR1-4) ($4. +1);
PRINT OUTPUT ANALYSIS
SPLDSCI describes the status of print output processing. The
eight bits in the SMF source record field (SMF6DCI) actually
represent 11 possible conditions, because bit 0 is "reserved"
and three bits have one meaning for JES2 and another for JES3
and PSF. The conditions are not mutually exclusive, so
CA MICS interprets them in priority order, reporting only the
highest condition encountered in the field. The
corresponding CA MICS strings, in order from high to low,
are:
SMF6DCI JES2 JES3 PSF String
'.1......'B X X X SPIN DATA SETS
'..1.....'B X X X OPERATOR TERMINATED
'....1...'B X X X OPERATOR RESTARTED
'.......1'B X X X 3525 PUNCH WAS INTERPRETED
'...1....'B X X RESTARTED WITH DESTINATION
'...1....'B X OPERATOR INTERRUPTED
'.....1..'B X X RECEIVED OPERATOR RESTART
'.....1..'B X CONTINUATION OF OUTPUT
'......1.'B X X STARTED WITH SINGLE SPACE
'......1.'B X OPERATOR OVERRODE CC
'00000000'B X X X <blank>
With JES2, a new type 6 record is generated each time there
is a change in the outgroup's status (the above events and a
few others such as buffer errors and operator overrides of
SYSOUT class, copy count, or FCB or UCS image). With JES3, a
new type 6 record is generated each time a data set completes
printing copies under a given form name. With PSF, a new
type 6 record is generated for each data set processed. The
above prioritization biases SPLDSCI to show the completion
status of the data set at record generation time. The
following code displays the status of each job whose SYSOUT
processing was started but stopped short of completion when
this day's SMF data collection cut off.
DATA;
SET DETAIL.BATSPL01;
KEEP JOB RDRTS JESJOBNO ROUTE ENDTS SPLDSCI;
IF SPLDSCI = 'SPIN DATA SETS'
OR SPLDSCI = 'OPERATOR TERMINATED'
OR SPLDSCI = 'OPERATOR RESTARTED'
OR SPLDSCI = '3525 PUNCH WAS INTERPRETED'
OR SPLDSCI = 'OPERATOR INTERRUPTED'
OR SPLDSCI = 'RECEIVED OPERATOR RESTART'
OR SPLDSCI = 'CONTINUATION OF OUTPUT';
PROC SORT; BY JOB RDRTS ROUTE ENDTS;
DATA; SET; BY JOB RDRTS ROUTE ENDTS;
IF LAST.ENDTS;
PUT @5 JOB +5 RDRTS +5 JESJOBNO +6 ROUTE +5 ENDTS +5 SPLDSCI;
PRINTER UTILIZATION ANALYSIS
SPLWTRTM contains the amount of time the writer was active
processing a print output data set. It is useful for
studying the components of job turnaround time and for
estimating printer utilization. This element can be biased
by configuration-dependent effects.
SPLWTRTM is most dependable when measuring activity on a
local or NJE printer fed directly from the JES spool. The
JES writer is active when the printer is active. However,
even here the value may be inflated if the printer stops for
a paper jam or forms reload after printing has started.
More significant bias appears when the printer in question is
actually a subsystem, such as a remote workstation with its
own spool or a 3800-type device. In the first case, SPLWTRTM
is only a measure of transmittal time and says nothing about
the true delay before hardcopy production has started or
completed.
For a 3800 printing device, the reported writer end time in
SMF6TME reflects the time that the last output was stacked,
which can be seconds or minutes after it finished printing.
The output is considered stacked when the trailer page is in
the continuous forms stacker or in the burster trimmer
stacker, depending on the burster option for that job output
element. There is no time stamp in the type 6 record to tell
when the output finished printing, and therefore no way to
measure print time or device utilization.
One possible approach to calculating printer utilization
would be to scan the appropriate BATSPL records and eliminate
those that seem to have taken "too long" to print. Starting
with a calculated lines per second (LPS) for the job at hand,
there are two criteria that could be used. If you use the
vendor's advertised printer speed, you could simply drop any
job that seemed to print more slowly than the rated LPS. The
following SAS code uses a measured LPS to find those jobs
that print unusually slowly:
* Select for the device(s) to be studied;
DATA A;
SET DETAIL.BATSPLnn;
IF 'route and printer selection';
PROC SORT;
BY ROUTE DEVNAME DESCENDING STARTTS;
DATA B;
SET A;
BY ROUTE DEVNAME;
* Assume that this job starts printing as soon as
* the previous one finished;
NEWENDTS = LAG1 (STARTTS);
* We don't know when the most recent job finished
* so drop it;
IF NOT FIRST.DEVNAME;
* Calculate an apparent lines per second;
CALC_LPS = SPLNLR / (NEWENDTS - STARTTS);
PROC UNIVARIATE NOPRINT; BY ROUTE DEVNAME; VAR CALC_LPS;
* Assume no more than 10% of jobs were interrupted
* by forms mount or paper jam situations;
* EST_LPS is the 50th percentile observed speed;
OUTPUT OUT = C P10 = LIMIT MEDIAN = EST_LPS;
DATA B; MERGE B C; BY ROUTE DEVNAME;
* Drop observations where printer was
* anomalously "slow";
IF CALC_LPS >= LIMIT;
* Calculate and display the "trimmed" average LPS;
PROC MEANS MEAN; BY ROUTE DEVNAME; ID EST_LPS;
VAR CALC_LPS; OUTPUT OUT = B MEAN = CALC_LPS;
* Determine device busy time, duration, and %U;
DATA _NULL_; MERGE A B; BY ROUTE DEVNAME;
RETAIN BUSYTIME FINISHTS;
IF FIRST.DEVNAME THEN DO;
BUSYTIME = 0;
FINISHTS = ENDTS;
END;
BUSYTIME = SUM (BUSYTIME, SPLNLR / CALC_LPS);
EST_LPM = 60 * EST_LPS;
IF LAST.DEVNAME THEN DO;
DEV_UTIL = 100 * BUSYTIME / (FINISHTS - STARTTS);
PUT ROUTE= DEVNAME= EST_LPM= COMMA7.
BUSYTIME= HHMM6.
DEV_UTIL= 3.;
END;
For more information on the individual data elements, refer
to the CA MICS data dictionary for the CA MICS Batch and
Operations Analyzer.