The below method can be used to assign cross-report indexing to reports in View that have already been collected and indexed.The particulars with the method assume that all reports came to View via Deliver.
Facts and formulas used to determine how much DASD space a report will occupy:
1) Run SARBCH /LISTVIEW, for a full list of logical views for the database:
//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=*
//CTLCARDS DD DUMMY
//SYSIN DD *
/LISTVIEW VIEW=*
/*
//
2) Run the RMOGRW program, to create View /DEFVIEW transactions for ALL reports in the Deliver database:
//XXXXXXXX JOB ...
//RMOGRW EXEC PGM=RMOGRW
//STEPLIB DD DISP=SHR,DSN=DLVR.CVDELOAD <=== Modify, if used
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//PRTFILE DD SYSOUT=*
//OUTFILE DD DISP=(,CATLG,DELETE),
// DSN=xxxxxx.xxxxxx.CTLDEFVW,
// UNIT=xxxx,VOL=SER=xxxxxx,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000),
// SPACE=(TRK,(15,15),RLSE)
//*
//SYSIN DD *
/CONTROL DATABASE=dlvr_hlq SEQ=RID <=== Modify DB name
/OUTPUT '/DEFVIEW CRINDEX=Y NUM=1 VIEW=' COL(1)
/OUTPUT RID COL(31)
/*
//
Note: The "CRINDEX=Y" indicates the report is to participate in cross-report indexing.
2a) This is the same RMOGRW program, but to create /DEFVIEW entries for Deliver reports specifically prefixed with "ABCDEF":
/CONTROL DATABASE=dlvr_hlq SEQ=RID
/DEFINE J BIN
/DEFINE VNUM CHAR(1)
/IF SUBSTR(RID,1,6) = 'ABCDEF'
/ OUTPUT '/DEFVIEW CRINDEX=Y NUM=1 VIEW=' COL(1)
/ OUTPUT RID COL(31)
/END
Note: The "CRINDEX=Y" indicates the report is to participate in cross-report indexing.
3) Compare the LISTVIEW entries to the RMOGRW OUTFILE entries, to see how the generated entries match up to what is in the View database. If there are multiple logical views (NUM=2, NUM=3, etc.), add an entry for those views.
The /DEFVIEW entries should be structured as follows:
/DEFVIEW CRINDEX=Y NUM=1 VIEW=ABCDEF...
4) Run the file of /DEFVIEW entries (//SYSIN DD DISP=SHR,DSN=....CTLDEFVW) through SARBCH.
5) Set View ERO parameter (SARSTC //SARPATAB DD) IRETPD=nnnnn for the reports that are processed.
Where "nnnnn" is the length of time (in days) that the corresponding report indexes are to reside on the database disk layer.
6) Run ADLIST (SARSAM8), to generate SARBCH /LOAD, /INDEX, and /CHANGE transactions:
//XXXXXXXX JOB ...
//ADLIST1 EXEC PGM=ADLIST,PARM='view_hlq' <=== Modify DB name
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== Modify, if used
//SYSPRINT DD SYSOUT=*
//CTLCARD DD DSN=xxxxxx.xxxxxx.CTLCARDL, <=== Modify DSN
// DISP=(,CATLG,DELETE),
// UNIT=xxxx,VOL=SER=xxxxxx,
// SPACE=(TRK,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//SYSIN DD *
/LIST ARCHDATE=[mm/dd/yy[-mm/dd/yy]|*|TODAY]
REPORTID=xxxxxxxxxxxx
CCREATE(LOAD)
/*
//ADLIST2 EXEC PGM=ADLIST,PARM='view_hlq' <=== Modify DB name
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== Modify, if used
//SYSPRINT DD SYSOUT=*
//CTLCARD DD DSN=xxxxxx.xxxxxx.CTLCARDI, <=== Modify DSN
// DISP=(,CATLG,DELETE),
// UNIT=xxxx,VOL=SER=xxxxxx,
// SPACE=(TRK,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//SYSIN DD *
/LIST ARCHDATE=[mm/dd/yy[-mm/dd/yy]|*|TODAY]
REPORTID=xxxxxxxxxxxx
CCREATE(INDEX)
/*
//ADLIST3 EXEC PGM=ADLIST,PARM='view_hlq' <=== Modify DB name
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== Modify, if used
//SYSPRINT DD SYSOUT=*
//CTLCARD DD DSN=xxxxxx.xxxxxx.CTLCARDC, <=== Modify DSN
// DISP=(,CATLG,DELETE),
// UNIT=xxxx,VOL=SER=xxxxxx,
// SPACE=(TRK,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//SYSIN DD *
/LIST ARCHDATE=[mm/dd/yy[-mm/dd/yy]|*|TODAY]
REPORTID=xxxxxxxxxxxx
CCREATE(CHANGE BACKUP=OFF)
/*
//
The transactions will load reports to the database DASD layer, reindex them so as to include them in cross-report indexing, and will reset their backup switch so that they are backed up again to tape, with their indexes.
9) Run the file of "/LOAD" transactions through SARBCH.
10) Run the file of "/INDEX" transactions through SARBCH.
11) Run the file of "/CHANGE BACKUP=OFF" transactions through SARBCH.
12) Have a View backup run. If not an automatic backup, force the backup using "/F sarstc,NEW".
In the backup, the reports will reside on tape, but will expire from the disk layer. The indexes, though, will still reside on the disk layer.