Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: READING CICS or JES2 logs using REXX and writing the output to a datas...

354 views
Skip to first unread message

Robert Zenuk

unread,
Jul 2, 2004, 3:17:07 PM7/2/04
to
You can use SDSF in batch to "snap" a copy of the JOBLOG or a SYSOUT to a
dataset and process the dataset with EXECIO. See the batch section in the SDSF
Manual.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISF4CS20/11.0?SHELF
=ISF4BK20&DT=20020116154452

Here is some sample JCL to do that.

//JOBCARD...
//***************************************************************
//* BATCH SDSF JOB *
//***************************************************************
//*DELETE EXEC PGM=IEFBR14
//*DELDSN DD DSN=SDSF.PRINT,DISP=(OLD,DELETE)
//SDSF1 EXEC PGM=SDSF,PARM='++400,132'
//ISFOUT DD SYSOUT=*
//PRINT DD DSN=SDSF.PRINT,DISP=(,CATLG),
// SPACE=(TRK,(15,5),RLSE),
// DCB=(RECFM=VBA,LRECL=133,BLKSIZE=137)
//ISFIN DD *
ST
SELECT jobname
FIND jobname
++S
PRINT FILE PRINT
PRINT 1 99999999
PRINT CLOSE

Here is an EXEC that does the same thing (I think I posted this last year).
If you include your own
ISFEXT DD, you can control the DSN that holds the JOBLOG or SYSOUT. This can
be a starting
point if you want to select only a specific SYSOUT from within a job (like
CICS MSGUSR).

/*********************************************************************/
/* REXX */
/*********************************************************************/
/* Purpose: Extract and output from the SPOOL using SDSF */
/*-------------------------------------------------------------------*/
/* Syntax: SDSFEXT jobname jobnum */
/*-------------------------------------------------------------------*/
/* Parms: jobname - The jobname */
/* jobnum - The job Number (optional - must be JOBnnnnn) */
/* */
/* Notes: Return Codes */
/* 00 Everything worked output should be in ISFEXT DSN */
/* 08 Jobname is missing */
/* 10 Allocation error on ISFIN */
/* 11 Allocation error on ISFEXT */
/* 12 Allocation error on ISFOUT */
/* 16 EXECIO error loading ISFIN */
/* ?? Anything else is probably from SDSF */
/* */
/* Extract DSN will depend on whether the option jobnum was provided */
/* If no jobnum DSN is userid.SDSF.OUTPUT.jobname */
/* With jobnum DSN is userid.SDSF.OUTPUT.jobname.jobnum */
/* */
/* Sample JCL */
/* */
/* //SDSFEXT EXEC PGM=IKJEFT01,PARM='SDSFEXT jobname JOBnnnnn' */
/* //SYSEXEC DD DSN=your.exec.pds,DISP=SHR */
/* //SYSTSPRT DD SYSOUT=* */
/* //SYSTSIN DD DUMMY */
/* */
/*********************************************************************/
/* Change Log */
/* */
/* Author Date Reason */
/* -------- --------- ----------------------------------------- */
/* R. Zenuk Dec 2003 Initial Creation */
/* */
/*********************************************************************/
/* Accept input parameters */
/*********************************************************************/
parse upper arg jobname jobnum .
parse source execenv . execname . execdsn .
/*********************************************************************/
/* Verify jobname is present */
/*********************************************************************/
if jobname = '' then exit(8)
/*********************************************************************/
/* ISFIN is the DDNAME to hold the formatted SDSF commands */
/*********************************************************************/
EXITRC = listdsi("ISFIN" "FILE")
if EXITRC <> 0 then
do
"ALLOC F(ISFIN) UNIT(VIO) SPACE(1) TRACKS NEW LRECL(80)"
if RC <> 0 then exit(10)
end
/*********************************************************************/
/* ISFEXT is the DDNAME to hold the extract SYSOUT dataset */
/*********************************************************************/
EXITRC = listdsi("ISFEXT" "FILE")
if EXITRC <> 0 then
do
if jobnum = '' then
sdsfdsn = "'"userid()".SDSF.OUTPUT."jobname"'"
else
sdsfdsn = "'"userid()".SDSF.OUTPUT."jobname"."jobnum"'"
if sysdsn(sdsfdsn) = 'OK' then "DELETE" sdsfdsn
"ALLOC F(ISFEXT) DA("sdsfdsn") NEW CATALOG SPACE(10 1) CYLINDERS",
"LRECL(133) BLKSIZE(137) RECFM(V B A) UNIT(SYSDA)"
if RC <> 0 then exit(11)
end
/*********************************************************************/
/* ISFOUT is the DDNAME to hold the SDSF Output */
/*********************************************************************/
EXITRC = listdsi("ISFOUT" "FILE")
if EXITRC <> 0 then
do
"ALLOC F(ISFOUT) SYSOUT"
if RC <> 0 then exit(12)
end
/*********************************************************************/
/* Build ISFIN input */
/*********************************************************************/
isfin.1 = 'PREFIX' jobname
isfin.2 = 'ST'
if jobnum = '' then
do
isfin.3 = 'SET DISPLAY'
isfin.4 = 'FIND' jobname
end
else
do
isfin.3 = 'SELECT' jobname jobnum
isfin.4 = 'FIND' jobname
end
isfin.5 = '++S'
isfin.6 = 'PRINT FILE ISFEXT'
isfin.7 = 'PRINT 1 99999999'
isfin.8 = 'PRINT CLOSE'
"EXECIO * DISKW ISFIN (STEM ISFIN. FINIS"
if RC <> 0 then exit(16)
/*********************************************************************/
/* Invoke SDSF (set default depth and width values) */
/*********************************************************************/
depth = 200
width = 132
address ATTCHMVS "SDSF depth width"
EXITRC = RC
"FREE F(ISFEXT ISFIN ISFOUT)"
/*********************************************************************/
/* Exit */
/*********************************************************************/
shutdown: exit(EXITRC)


Hope This Helps,

Rob

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

0 new messages