ESASLR EXEC
/************************************************************/
/** (c) COPYRIGHT Velocity Software, Inc. 1993-1996 **/
/************************************************************/
/* */
/* ESAMAP/ESAMON SLR Interface */
/* */
/* Usage: ESASLR function operands "(" options )] */
/* */
/* Function: GENERATE | ASSEMBLE | UPDATE | COLLECT */
/* Operands: NODE | FTYPE */
/* Options: TEST */
/* */
/************************************************************/
Parse Upper Arg function operands '(' options ')' .
If function = ''
Then Call Exit 24 'No function specified'
If WORDPOS('TEST', options) > 0
Then netid = '*' /* So send stuff back to me*/
Else Do
'MAKEBUF'
buffer = RC
'IDENTIFY ( LIFO'
If RC = 0
Then Parse Pull . . . . netid .
'DROPBUF' buffer
End
opts = 'S C D U'
types = 'System CPU Devices User'
fns = 'SYS CPU DEV USER'
node = ''
If function = 'GENERATE'
Then Parse var operands ftype .
Else Parse var operands node ftype .
If ftype = '' Then ftype = 'HISTORY'
If node = '' Then node = 'MVS'
Do i = 1 to 1;
option = word(opts ,i)
type = word(types,i)
fn = word(fns ,i)
esafn = 'ESA' || fn
Select
When function = 'GENERATE'
Then Do
Address Command 'ESTATE' esafn ftype '*'
If Rc <> 0 Then Call Exit 8,
'No history file found with filetype' ftype
/* build assemble files for slr tables*/
Say 'Building tables for' esafn ftype
'pipe < ESA'fn ftype '| SEGGEN' esafn ftype
Say 'SLR' type 'log table definition created.'
End
When function = 'ASSEMBLE'
Then Do
'CP SPOOL PUNCH CONT TO' netid
'CP TAG DEV PUNCH' node 'JOB'
'PIPE ',
'< segment list ',
'| locate /*/ ', /* Only selected segments */
'| locate 10-12 /'type'/ ', /* from the named file */
'| spec \(stagesep !)',
' < ESASLRJ'Left(type,1) 'JCL ',
'! \ 1 \append < ESASLRPA JCL ',
'! \ nw \append literal //L EXEC GASM,M=',
'\ nw 1-6 next \L',
'! \ next \append < ESASLRSI JCL ',
'! \ nw \append <',
'\ nw 1-6 ',
' nw \l ASSEMBLE ',
'! \ next \append < ESASLREJ JCL ',
'! \ nw \append literal //S EXEC GASM,M=\',
'\ nw 1-6 next \S',
'! \ next \append < ESASLRSI JCL ',
'! \ nw \append <\ nw 1-6 nw \s ASSEMBLE ',
'! \ next \append < ESASLREJ JCL ',
'! \ nw \punch 00D ',
'! \ nw \take 0 ',
'! cp close 00D\ nw ',
'| runpipe ',
'| console'
'CP CLOSE 00D'
'CP SPOOL PUNCH NOCONT CLOSE'
Say 'SLR' type 'table assembly job submitted.'
End
When function = 'UPDATE'
Then Do
'CP SPOOL PUNCH CONT TO' netid
'CP TAG DEV PUNCH' node 'JOB'
'PIPE',
'< segment list ',
'| locate /*/ ', /* Only selected segments */
'| locate 10-12 /'fn'/ ', /* from the named file */
'| spec \(stagesep !)',
' < ESASLRJ'Left(type,1) 'JCL ',
'! \ 1 \append < ESASLRPS JCL ',
'! \ nw \append <\ nw 1-6 nw \ TBLUPDT ',
'! \ next \append < ESASLREJ JCL ',
'! \ nw \punch 00D ',
'! \ nw \take 0 ',
'! cms sp pun close\ nw',
'| runpipe ',
'| console'
'CP CLOSE 00D'
'CP SPOOL PUNCH NOCONT CLOSE'
Say 'SLR table update job submitted.'
End
When function = 'COLLECT'
Then Do
'CP SPOOL PUNCH CONT TO' netid
'CP TAG DEV PUNCH' node 'JOB'
'PIPE <' esafn type ,
'| segcoll' esafn type
'PIPE',
'< segment list ',
'| locate /*/ ', /* Only selected segments */
'| locate 10-12 /'type'/', /* from the named file */
'| runcoll' esafn type ,
'| CP close 00D'
'CP SPOOL PUNCH NOCONT CLOSE'
Say 'SLR' type 'log collection job submitted.'
End
Otherwise
Call Exit 24 'Function "'function'" not recorgnized'
End
Call Exit 0
Exit:
Parse Arg xRc xMsg
If xMsg <>'' Then Say xMsg
Exit xRc
Don't miss Velocity Software's Performance Seminars
Check our calendar for workshops and other events.