SYSVIEW: How to get CAPO command in a .txt file
search cancel

SYSVIEW: How to get CAPO command in a .txt file

book

Article ID: 201067

calendar_today

Updated On:

Products

SYSVIEW Performance Management

Issue/Introduction

Making some capo, status, capi, aslost, capi, capc commands that write to dataset. How to get that information written to text or converted to a text file?

Wanting to create a spreadsheet of all the STCs that marks ASIDs as unusable. This is mostly CICS transaction, wanting to distribute a list to CICS team so they can fine other ways to solve these issues then to restart it every day.

Environment

SYSVIEW 15.0 & 16.0 - 

Resolution

The CAPTURE file is not meant to be printed, instead it is to be viewed online.  This is to allow for full panel display of each command since many displays are very wide.  With that said, there are other ways to obtain this information: 

One method is to use GSVXBAT.  GSVXBAT is used to execute SYSVIEW commands in batch and produce output to either SYSOUT or a Data Set.  For example: 

//jobnameA JOB #########,'Batch CMD',CLASS=A,MSGCLASS=X,             
//   USER=userid,                                                    
//   MSGLEVEL=(1,1),NOTIFY=userid                                    
/*JOBPARM SYSAFF=CA31                                                
//*-------------------------------------------------------------------------------------* 
//* Allocate new file to put command results to                                * 
//* Results will be placed in a PDS member called ASLOST           * 
//*-------------------------------------------------------------------------------------* 
//STEP2 EXEC PGM=IEFBR14                                             
//DD1   DD DSN=SYSVW.I2265963.ASLOST,                                
//         DISP=(MOD,DELETE,DELETE),                                 
//         UNIT=SYSDA,                                               
//         SPACE=(TRK,(1,1))                                         
//*-------------------------------------------------------------------------------------* 
//STEP3  EXEC PGM=IEFBR14                                            
//DD2      DD DSN=SYSVW.I2265963.ASLOST,                             
//         DISP=(,CATLG,DELETE),                                     
//         STORCLAS=TSO,SPACE=(CYL,(10,10,10)),                      
//         DCB=(RECFM=FB,LRECL=255,BLKSIZE=0,DSORG=PO)               
//*-------------------------------------------------------------------------------------* 
//STEP0001 EXEC PGM=GSVXBAT,PARM='LINECNT=60,SHOWINP=YES,            
//              MENUOFF,PRINTON,SSID=SYSV'                           
//STEPLIB  DD  DISP=SHR,DSN=sysview.loadlib                          
//SYSPRINT DD SYSOUT=Q                                               
//SYSTCPT  DD SYSOUT=Q                                               
//SYSTSIN  DD SYSOUT=Q                                               
//SYSIN DD *                                                         
COMMAND=(SET PROFILESAVE COMMAND)                                    
COMMAND=(SET PRINTDS SYSVW.I2265963.ASLOST)                          
COMMAND=(PRINT OPEN ASLOST)                                          
COMMAND=(ASLOST)                                                     
COMMAND=(SELECT ASID UN)                                             
COMMAND=(PRINT ALL)                                                  
COMMAND=(PRINT CLOSE)                                          
COMMAND=END  
/*           
//*          
 
So the above will produce a PDS member called ASLOST with the contents of the ASLOST command.


Similar results can be obtained using REXX in batch.  For example: 
 
//jobnameR JOB (#########),'Rexx batch',MSGCLASS=Q,CLASS=A,       
//     NOTIFY=userid,USER=userid                                  
//*--------------------------------------------------------------*
//*                                                                          *
//*--------------------------------------------------------------*
//STEP0001 EXEC PGM=IEFBR14                                       
//DD012    DD DSN=SYSVW.I2265963.ASLOST,DISP=(MOD,DELETE,DELETE), 
//         SPACE=(TRK,(1,1)),UNIT=SYSDA                           
//*                                                               
//STEP0010 EXEC PGM=IKJEFT01                                      
//STEPLIB  DD  DISP=SHR,DSN=sysview.loadlib                       
//SYSEXEC  DD DISP=SHR,DSN=user.rexx.lib                          
//OUTATTR  DD DISP=(,CATLG,CATLG),                                
//         DSN=SYSVW.I2265963.ASLOST,SPACE=(CYL,(10,10),RLSE),    
//         DCB=(LRECL=255,BLKSIZE=0,RECFM=FB),                    
//         UNIT=SYSDA                                             
//SYSTSPRT DD   SYSOUT=*,DCB=LRECL=255,HOLD=YES                   
//SYSTSIN  DD   *                                                 
  %ASLOST OUTATTR                                                 
/*                                                                
//*                                                               
 
and the contents of ASLOST would look like the following.
   
/* REXX                                                                               */
/*---------------------------------------------------------------------------*/
/* Used for running SYSVIEW via REXX execute in batch.*/
/*---------------------------------------------------------------------------*/
ARG Oddn .                                                                     
Address 'LINK' 'GSVXRXAA'                                                      
Address 'SYSVIEWE' "C(ASLOST;SEL ASID UN)"                                     
DO while queued() > 0                                                          
   pull line                                                                   
    'EXECIO * DISKW' Oddn '(FINIS'                                             
END                                                                            
Address 'SYSVIEWE' "C(END)"                                                    
Return                                                                         
 
Suggesting also to use SYSVIEW THRESHOLD ASIFREE which triggers based on the Address Space Free value.  When the Threshold triggers, they can notify someone of the problem or execute a capture that can execute a REXX execute to run and obtain the needed information.