Selecting archive data


As described in Archiving-data-CMRPURG, CMRDETL, CTGDETL, and CMRSTATS records can be archived to tape. The SELECT statement does not have to be changed to distinguish a tape data set from VSAM; the PRL does this automatically. Therefore, change the CMRDETL, CTGDETL, or CMRSTATS DD statement to point to a tape data set, as shown in the following figure.

DD statement change to point to a tape data set

//jobname JOB user parameters                     <-- CHANGE AS NEEDED
/*JOBPARM user parameters                         <-- CHANGE AS NEEDED
//CMRL PROC
//PRL       EXEC PGM=CMRPRLN
//STEPLIB  DD  DISP=SHR,DSN=CMR.CMRV3.BBLINK      <-- CHANGE AS NEEDED
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//ISYPROG  DD  SYSOUT=*,DCB=(LRECL=80,BLKSIZE=160,RECFM=FBA)
//ISYSOUT  DD  SYSOUT=*,DCB=(LRECL=80,BLKSIZE=160,RECFM=FBA)
//PNLLIB   DD  DISP=SHR,DSN=CMR.CMRV3.BBPLIB      <-- CHANGE AS NEEDED
//CMRDETL  DD  DSN=CMR.MERGED.ARCHIVE,DISP=OLD,UNIT=TAPE,VOL=SER=TP0001
//SORTWK01 DD  UNIT=SYSDA,SPACE=(CYL,5)
//SORTWK02 DD  UNIT=SYSDA,SPACE=(CYL,5)
//SORTWK03 DD  UNIT=SYSDA,SPACE=(CYL,5)
//SYSIN    DD  *
SET TITLE = 'TRANSACTION ANALYSIS FOR ALL TRANSACTIONS'
SET CLASS = 'R'
SELECT TYPE 6E RECORDS FROM CMRDETL
WHERE CMRDATE = '09/17/1999'
SET COUNT = COUNT + 1

USING T6ETRID -
      CMRDATE -
      CMRTIME -
      T6ERESP -
      T6ECPUR -
      T6ETMID -
      T6EOPID
   ORDER BY T6ETRID
   DETAIL
   REPORT
      PRINT COUNT
END

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*