We are planning to clean up the View database for particular Sysout ID's.
Is there a way to delete all entries of a particular Sysout ID from View?
Release : 14.0
Component :
If you want to mass delete reports in a View database, you can use the following SARGRW program to create SARBCH /DELETE transactions:
//XXXXXXXX JOB ...
//SARGRW01 EXEC PGM=SARGRW
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== Modify, if used
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(5),,CONTIG)
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//PRTFILE DD SYSOUT=*
//OUTFILE DD DISP=(,CATLG,DELETE),
// DSN=xxxxxx.xxxxxx.SARGRWOP,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000),
// SPACE=(CYL,(10,1),RLSE),
// UNIT=3390,VOL=SER=xxxxxx
//SYSIN DD *
/CONTROL SEQ=RID DATABASE=view_hlq <=== Modify DB name
/IF SUBSTR(ID,1,nn) = 'xxxxxxxxxxxxx '
/ OUTPUT '/DELETE ID=' COL(1)
/ OUTPUT ID COL(12)
/ OUTPUT ' GEN=' COL(44)
/ OUTPUT EDIT(GEN,'99999') COL(49)
/ OUTPUT ' SEQ=' COL(54)
/ OUTPUT EDIT(SEQ,'99999') COL(59)
/END
/*
//
Note: In the above, determine the full ID of the report in question, add a space at the end, then determine the RID length including the space, and put that in "nn".
After running the above, then you can run the resulting file through the SARBCH program:
//XXXXXXXX JOB ...
//SARBCH EXEC PGM=SARBCH,PARM='VIEW_HLQ' <=== MODIFY DB NAME
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== MODIFY, IF USED
//SYSPRINT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSIN DD DISP=SHR,DSN=xxxxxx.xxxxxx.SARGRWOP
//
Note: It is recommended that you try the above procedure first on a few test reports, in a test environment, before attempting to delete any reports from production.