Running SARPAC

This topic explains how to execute SARPAC and provides examples for setting initialization parameters, consolidating the tape storage group, and consolidating one tape for a tape storage group.
view
This topic explains how to execute SARPAC and provides examples for setting initialization parameters, consolidating the tape storage group, and consolidating one tape for a tape storage group.
Job Control Statements
Locate the sample execution JCL in member HAEXPAC in your CVDEJCL data set.
The following job control statements are required to execute SARPAC:
  • JOB
    Initiates the job.
  • EXEC
    Specifies the following:
    • Program name (PGM=SARPAC) and the high-level name of the
      View
      database.
    • Optionally REPORT, to create a report that lists the status of all the tapes in the database, or NEW to force new consolidation (SARPAC) tapes.
  • STEPLIB DD
    Defines the load library containing SARPAC.
    Note
    : If the program resides in a link list library, omit this statement.
  • SARDRLST DD
    Defines the sequential output data set (normally SYSOUT) used for listing the reports consolidated onto DR tapes.
    If this is not a SYSOUT data set, DCB=BLKSIZE=nnn must be coded, where nnn is a multiple of 133.
  • SYSPRINT DD
    Defines the sequential output data set (normally SYSOUT) used for listing the consolidation report.
    If there is no SYSOUT data set, DCB=BLKSIZE=nnn must be coded where nnn is a multiple of 133.
  • SYSIN DD
    Optional, specifies input.
  • SORTLIB DD
    Defines the load library that contains the SORT program library.
    This DD statement may not be needed if the sort program library is moved to LPA.
  • SYSOUT DD
    Defines a sequential output data set (normally SYSOUT) to which SORT messages are written.
  • SORTWKnn DD
    Defines temporary sort work disk space where nn represents a numeric number. Normally a minimum of three sort work DD statements are specified.
Input to SARPAC
You can specify the following as input to SARPAC:
  • A single tape by its
    View
    tape sequence number where
    nnnnn
    is a number from 1 to 65,535
    TAPESEQ=
    nnnnn
  • A range of tapes by their
    View
    tape sequence numbers
    TAPESEQ=
    nnnnn-nnnnn
  • Multiple tapes or ranges of tapes by their
    View
    tape sequence numbers where
    nnnnn
    is a number from 1 to 65,535.
    TAPESEQ=
    nnnnn
    TAPESEQ=
    nnnnn
    or
    TAPESEQ=
    nnnnn[-nnnnn]
    ,...
  • A tape storage group by its name
    STORGRP=storage-group-name
    The keyword DEFAULT is the name of the default storage group.
SARPAC considerations:
  • When only one storage group is specified, the initialization parameters PTHRESH, PMXTAPES, and PMXYEARS are used.
  • When only one tape sequence number (or range) is specified, the tape is processed whether it meets PTHRESH or PMXTAPES requirements.
  • When multiple tape sequence numbers (or ranges) are specified, the tape is processed whether it meets PTHRESH or PMXTAPES requirements. Tapes are processed in ascending order by tape sequence number from lowest to highest.
  • When both a storage group and tape sequence number (or range) are specified, only reports that belong to the tape storage group, and are within the tape sequence range, are processed.
  • Only one STORGRP specification can be supplied on the SYSIN statement.
Concurrent With Archival
It is not necessary to stop the SARSTC archival task to run the SARPAC utility. Consolidation can occur concurrently with report archival and the
View
backup cycle.
Stopping SARPAC
If you need to terminate SARPAC before it has completed processing, you can use an MVS STOP command to cause SARPAC to terminate normally. SARPAC will acknowledge the STOP command with the following message:
SARPAC99 Operator issued STOP command - PROCESSING TERMINATED
Canceling SARPAC
If you have a tape management system and you cancel SARPAC, it is possible for your tape management system to override the
View
tape retention criteria. We recommend that you always let SARPAC to run to completion.
If you must cancel SARPAC, any output tapes it created must be excluded from a scratch and clean run because
View
still controls those tapes. This exclusion applies to primary, duplex, and DR tapes. You can run the SARTCHK utility to determine if any tapes were un-cataloged that are required by
View
.
Consolidating Tape Storage Groups
If you use tape storage groups, we recommend that you consolidate one tape storage group at a time. Include the following SYSIN control statement to decrease the number of tape mounts:
STORGRP=
storage-group-name
Notes:
  • You must run a standard or interim backup cycle to assign reports to tape storage groups. Storage groups are only in effect for reports residing on the
    View
    database since the last backup cycle.
  • For information about tape storage groups, see
    Initialization Parameters
    .
Example 1 Using Initialization Parameter Settings
All eligible tapes (given the values for PTHRESH, PMXTAPES, and PMXYEARS) are consolidated for database VIEW.SYSTEM1:
//EXAMPLE JOB ACCOUNT,PROGRAMMER //SARPAC EXEC PGM=SARPAC,PARM='VIEW.SYSTEM1',REGION=0M //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SARDRLST DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(50)) //*SYSIN DD *
Example 2 Consolidating a Tape Storage Group
The SYSIN DD consolidates only the tape storage group PAYROLL for database VIEW.SYSTEM1:
//EXAMPLE JOB ACCOUNT,PROGRAMMER //SARPAC EXEC PGM=SARPAC,PARM='VIEW.SYSTEM1',REGION=0M //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR //SYSUDUMP DD SYSOUT=* //SARDRLST DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SYSPRINT DD SYSOUT=* //SYSIN DD * STORGRP=PAYROLL //*
Example 3 Consolidating One Tape of a Tape Storage Group
The SYSIN DD consolidates only tape number 1156 for the tape storage group PAYROLL for database VIEW.SYSTEM1:
//EXAMPLE JOB ACCOUNT,PROGRAMMER //SARPAC EXEC PGM=SARPAC,PARM='VIEW.SYSTEM1',REGION=0M //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SARDRLST DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SYSIN DD * STORGRP=PAYROLL TAPESEQ=1156 //*
Example 4 Consolidating Two Tapes of a Tape Storage Group
The SYSIN DD consolidates tape numbers 1156 and 1157 for the tape storage group PAYROLL for database VIEW.SYSTEM1:
//EXAMPLE JOB ACCOUNT,PROGRAMMER //SARPAC EXEC PGM=SARPAC,PARM='VIEW.SYSTEM1',REGION=0M //STEPLIB DD DSN=CAI.CVDELOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SARDRLST DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(50)) //SYSIN DD * STORGRP=PAYROLL TAPESEQ=1156 TAPESEQ=1157 //*
Recovering from Not Cataloged Tape Errors
The *NOCAT error message appears in the SARPAC report for any tapes that are no longer in the MVS Catalog. If the catalog entry is missing and tape is still available, the tape can be cataloged using the IBM utilities. If the tape is truly not available, the only recovery procedure is to remove all database references to that tape.
You must delete the Group Control Record (GCR) for SYSOUT reports that exist only on the tapes that are no longer available. You can use:
  • The DELETE function from the SYSOUT Selection panel
  • The
    View
    utilities is the most convenient method
The Tape List utility SARTSLST can be executed against the tape sequence number for a tape in error.
This utility creates a control statement stream that can be used with the
View
batch utility, SARBCH, to delete all references to that specific tape sequence.
The *NOCAT error message appears in the VOLSER column alongside the tape sequence that is in error as follows:
TSEQ DATA SET NAME VOLSER ----- ---------------------------------- ------ 9 VIEW.SYSTEM1.SARTAPE.T0000009 *NOCAT
To remove all references to this tape, execute the SARTSLST utility with the tape sequence number as a parameter along with the high-level database name. Add a DD statement for the creation of the control statement stream as follows:
//STEP1 EXEC PGM=SARTSLST,PARM='VIEW.SYSTEM1,9' //STEPLIB DD DISP=SHR,DSN=CAI.CVDELOAD //CTLCARDS DD DSN=SAR.CTLCARDS,DISP=(,CATLG), // UNIT=SYSDA,SPACE=(TRK,(1,1)), // DCB=(,DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=3120) //SYSPRINT DD SYSOUT=*
The execution parameter contains the
View
database high-level name followed by a comma and the tape sequence number of the tape in error.
The file indicated by the CTLCARDS DD statement contains one control statement for each SYSOUT report referencing the bad tape. The control statement will be either a /CHANGE or /DELETE statement.
If the SYSOUT report is still on the disk database, a /CHANGE control statement is created. This statement resets the backup indication so the file can be written to a new tape during the next backup cycle.
If the SYSOUT is no longer on the database, a /DELETE control statement is created. This statement removes the reference of this SYSOUT report for the tape.
If a report reference is still under REGDAYS control, it cannot be removed for the tape with a /DELETE control statement. In this case use the SARPACUX exit to exclude the tape from SARPAC processing.
The following statements are samples of the control statements created by SARTSLST:
/DELETE ID=REPORT1 GEN=27 SEQ=00005 /CHANGE ID=REPORT2 GEN=27 SEQ=00007 BACKUP=OFF
These statements can be used as input to the
View
batch utility SARBCH as follows:
//STEP1 EXEC PGM=SARBCH,PARM='VIEW.SYSTEM1' //STEPLIB DD DISP=SHR,DSN=CAI.CVDELOAD //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=SAR.CTLCARDS,DISP=OLD
This action removes all references to the bad tape, allowing SARPAC to execute correctly.
Return Codes set by SARPAC messages
Return Code
Message
16
SARPAC02 Expanded retention was never initialized
16
SARPAC03 Master index is already in use
8
SARPAC05 Error on input tape
16
SARPAC06 Error on output tape
4
SARPAC10 No SYSOUT groups require consolidation
0
SARPAC11 xxxxx SYSOUT groups copied
16
SARPAC15 Data base at incorrect level for this release
16
SARPAC16 SORT failed with RC=XXXX
0
SARPAC20 SYSIN control cards governing this SARPAC
16
SARPAC21 No TAPESEQ= or STORGRP= found
16
SARPAC22 Invalid or extraneous control card found
16
SARPAC23 Storage group not defined in database
16
SARPAC24 Invalid tape sequence number specification or tape sequence number(s) not found in database
16
SARPAC52 ***WARNING*** Run SARPAC to copy tapes following merge of databases
16
SARPAC86 Syntax error in REPORT keyword parameter
None
SARPAC97 Invalid command "xxxx"
None
SARPAC98 SARPAC will terminate after the current report is processed
16
SARDBIxx Database I/O Error 16