MVS Catalog statistics are only written to SYSLOG. I use SDSF to capture
the statistics daily with this batch job.
The TSO Command format is
BDSSCMD <PDS to save results into> <member prefix> <remainder is
command>
Saved in PDS as a member with the name of prefix || date
For example F Catatlog,report output is saved as A3yymmdd or today as
A3110608
//STEP010 EXEC PGM=IKJEFT01,
// DYNAMNBR=30
//SYSEXEC DD DSN=<MYTSOPREFIX>.CLIST,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
BDSSCMD <MYTSOPREFIX>.CATDATA A3 F CATALOG,REPORT
BDSSCMD <MYTSOPREFIX>.CATDATA B3 F CATALOG,REPORT,CACHE
BDSSCMD <MYTSOPREFIX>.CATDATA C3 F CATALOG,REPORT,CATSTATS
BDSSCMD <MYTSOPREFIX>.CATDATA D3 F CATALOG,REPORT,PERFORMANCE
Command BDSSCMD follows and is stored as a member in <mytsoprefix>.CLIST
/* REXX */
Parse Upper Arg DataSet memPrefix command
/***********************************************************/
lastupd = '04/20/2011' /* date of last update */
/***********************************************************/
Parse Upper Arg
/*********************************************************/
Say "Command is being processed. " command
Say "Output is being written to " DataSet "."
time = time();
Say Time
rc=isfcalls("on")
mycmd.0=1
mycmd.1=command
Address SDSF ISFSLASH "("mycmd.") (WAIT)"
/* List any error messages */
Say "isfmsg is:" isfmsg
Say "isfmsg2.0 is:" isfmsg2.0
if datatype(isfmsg2.0) = "NUM" then
do ix=1 to isfmsg2.0
Say "isfmsg2."ix "is:" isfmsg2.ix
end
cmd.0 = isfulog.0
time = time();
Queue Time
if datatype(isfulog.0) = "NUM" then
do ix=1 to isfulog.0
Say isfulog.ix
ll = length(isfulog.ix)
if (ll > 43) Then Do
qdata = substr(isfulog.ix,44,ll-43)
End
Queue qdata
end
rc=isfcalls("OFF")
If cmd.0 = 0 Then Do
Queue 'No command reponse available'
End
Queue '' /* null queue to end stack *
Address tso
prefix = SYSVAR('SYSPREF') /* tso profile prefix *
uid = SYSVAR('SYSUID') /* tso userid *
If prefix = '' Then prefix = uid /* use uid if null prefix *
If prefix <> '' & prefix <> uid Then /* different prefix than uid *
prefix = prefix || '.' || uid /* use prefix.uid *
ddnm1 = 'DD'||'RANDOM'(1,99999) /* choose random ddname *
junk = MSG(Off)
member = substr(date(s),3)
Exists = sysdsn("'"DataSet"'")
If ('OK' <> Exists) Then Do
"ALLOC FILE("||ddnm1||") UNIT(TSOONLY) NEW TRACKS SPACE(2,1)",
" CATALOG REUSE LRECL(80) RECFM(F B) BLKSIZE(3120)",
" DA('"DataSet"("memPrefix""member")')"
End
Else Do
"ALLOC FILE("||ddnm1||") ",
" SHR LRECL(80) RECFM(F B)",
" DA('"DataSet"("memPrefix""member")')"
End
"EXECIO * DISKW" ddnm1 "(FINIS"
"FREE FI("ddnm1")"
junk = MSG(On)
Exit
Chip Grantham | Ameritas | Sr. IT Consultant | [email protected]
5900 O Street, Lincoln NE 68510 | p: 402-467-7382 | c: 402-429-3579 | f:
402-325-4030
Juan Mautalen <[email protected]>
Sent by: IBM Mainframe Discussion List <[email protected]>
06/08/2011 11:41 AM
Please respond to
IBM Mainframe Discussion List <[email protected]>
To
[email protected]
cc
Subject
MVS command - output directed to a dataset
Hi:
I need to execute an MVS DISPLAY command with its output written to a
dataset. Using IEFBR14 i managed to execute the command in batch, but the
output is only written to SYSLOG. Is there a way to have the output also
written to a dataset?
Thanks in advance for your help,
JUAN MAUTALEN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
*******
This message may contain confidential information intended only
for the use of the addressee(s) named above and may contain
information that is legally privileged. If you are not the
addressee, or the person responsible for delivering it to the
addressee, you are hereby notified that reading, disseminating,
distributing or copying this message is strictly prohibited. If you
have received this message by mistake, please immediately notify
us by replying to the message and delete the original message
immediately thereafter. Thank you.
*******
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html