Move Reports Between OM View Databases
search cancel

Move Reports Between OM View Databases

book

Article ID: 53825

calendar_today

Updated On:

Products

Deliver View

Issue/Introduction

This document describes procedures used to move reports between two View databases.

Environment

  • Deliver™
  • View®
  • OM View for z
  • Output Management View® for z/OS
  • Output Management Deliver™ for z/OS

Resolution

There are two procedures that can be used to move text (not AFP or Xerox) reports from one View database to another:

Procedure 1

NOTE: To use this procedure:

  • All reports, from the sending database, had to have been collected by the View started task (SARSTC). This can be verified by all reports concerned having an Origin of SAR.

  • Any logical views, to be used, must be in place.
  • Run SARBCH /LOAD on each report, putting the report to a sequential dataset:
      //SARBCHPR JOB ...   //STEP1      EXEC PGM=SARBCH,PARM='VIEW.DB2'           <=== Modify DB name   //STEPLIB    DD DISP=SHR,DSN=VIEW.CAILIB               <=== Modify, if needed   //SYSPRINT  DD SYSOUT=*   //REPORT     DD SYSOUT=*   //RPTPRINT   DD DSN=xxxxxx.xxxxxx.LOAD,DISP=(NEW,CATLG),   //            UNIT=SYSDA,SPACE=(CYL,(nn,nn),RLSE),   //            DCB=(RECFM=FBA,LRECL=nnnnn,BLKSIZE=nnnnn)   //SYSIN        DD  *   /LOAD DDNAME=RPTPRINT   ID=reportid  GEN=nnnnn  SEQ=nnnnn   /*   // 
  • To have your View started task (SARSTC) collect the reports, run IEBGENER, with //SYSUT2 using Class, Dest, and Form that match the SARINIT CLSL, DEST, and FORM parameters of the receiving View database:
      //reportnm JOB ...                                     <=== Report name for jobname   //STEP1    EXEC PGM=IEBGENER                                           //SYSPRINT DD  SYSOUT=*                                                //VIEWB0 OUTPUT DEST=dest,FORMS=form                   <=== Modify, if needed   //SYSUT1   DD  DSN=xxxxxx.xxxxxx.LOAD,DISP=SHR   //SYSUT2   DD  SYSOUT=x,OUTPUT=*.VIEWB0                <=== Modify class    //SYSIN DD DUMMY   //
  • Run SARBCH /CHANGE, with ARCHDATE=....  to change the archive date
    of the report to its original archive date:
      //SARBCHCH JOB ...   //STEP1    EXEC PGM=SARBCH,PARM='VIEW.DB1'             <=== Modify DB name   //STEPLIB    DD DISP=SHR,DSN=VIEW.CAILIB               <=== Modify, if needed   //SYSPRINT DD SYSOUT=*   //REPORT    DD SYSOUT=*   //SYSIN      DD  *   /CHANGE ARCHDATE=mm/dd/yyyy           GEN=nnnnn           ID=reportid           SEQ=nnnnn   /*   // 
  • Run SARBCH /DELETE, on the moved reports, if you do not want the reports to remain on the sending database.

Procedure 2:

NOTE: With this procedure, reports can either have been collected to the database by the View started task (SARSTC) or have come from Deliver.

Prior to starting, identify the number of reports on the database from which the reports are being moved and from the database to where the reports will be moved to. That total will be used for validation
following the MERGE.

  • If you are going to be moving ALL of the reports from the sending database:

    * Run a SARDBASE UNLOAD:
      //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB2'               <=== Modify DB name                                  //STEPLIB  DD  DISP=SHR,DSN=VIEW.CAILIB                    <=== Modify, if needed   //SARUNLD  DD  DISP=(,CATLG,),DSN=xxxxxx.xxxxxx.UNLOAD2,   <=== Modify DSN                  //             DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760),     //             SPACE=(CYL,(500,20),RLSE),   ...   //SYSPRINT DD SYSOUT=*                                       //SYSIN    DD *                                              UNLOAD                                                       /* 
  • If you are going to be moving SOME of the reports from the sending database:

    * Run a SARDBASE Selective UNLOAD, putting the reports to an unload file.

    A report (or set of reports) can be identified either by its Jobname or by its Sysout ID (or Report ID):
      J=... specifies an unload based on Jobname   S=... specifies an unload based on Sysout ID (Report ID) 

    //XXXXXXXX JOB ... //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB2' <=== Modify DB name //STEPLIB DD DISP=SHR,DSN=VIEW.CAILIB <=== Modify, if needed //SARUNLTB DD * J=JOBXXXXX [JID=JOBnnnnn ADATE=mm/dd/yyyy ATIME=hh:mm] S=RPTXXXXX [JID=JOBnnnnn ADATE=mm/dd/yyyy ATIME=hh:mm] /* //SARUNLD DD DISP=(,CATLG,),DSN=xxxxxx.xxxxxx.SELUNLD, <=== Modify DSN // DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760), // SPACE=(CYL,(500,20),RLSE), ... //SYSPRINT DD SYSOUT=* //SYSIN DD * UNLOAD /* //
    For example, you could have the above table as follows:
    //SARUNLTB DD  *                                J=JOBXY*                                S=RPTABC* /*  
    The above will unload all reports whose jobname is prefixed with JOBXY, and will also unload those reports whose Sysout ID (or Report ID) is prefixed with RPTABC.

    You can list just a few entries, if only a few reports will be unloaded. However, if the list will be extensive, then you need to pre-allocate a dataset (with LRECL=80) to store the many control cards. In this case, a DD statement (similar to the following) would be used:

    //SARUNLTB DD DISP=SHR,DSN=XXXXXX.XXXXXX.UNLDTBL

    A report selection can be further quantified using the fields:

    JID=JOBnnnnn - The job number of the Sysout.
    ADATE=mm/dd/yyyy - The archival date of the Sysout.
    ATIME=hh:mm - The archival time of the Sysout.


    Run a SARDBASE UNLOAD on your receiving database:
  •   //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB1'               <=== Modify DB name                                  //STEPLIB  DD  DISP=SHR,DSN=VIEW.CAILIB                    <=== Modify, if needed   //SARUNLD  DD  DISP=(,CATLG,),DSN=xxxxxx.xxxxxx.UNLOAD1,    <=== Modify DSN    //             DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760),     //             SPACE=(CYL,(500,20),RLSE),   ...   //SYSPRINT DD SYSOUT=*                                       //SYSIN    DD *                                              UNLOAD                                                       /*   // 
  • Run a SARDBASE ADDDS, to allocate a new database:
      //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB3'               <=== Modify DB name                                  //STEPLIB    DD  DISP=SHR,DSN=VIEW.CAILIB                  <=== Modify, if needed   //SYSPRINT DD SYSOUT=*                                       //SYSIN      DD *                           ADDDS DATA   ...    [for View 11.0 and higher]   ADDDS INDEX   ...    [for View 11.0 and higher]  /*   // 
  • Run a SARDBASE MERGE, with SARMERG1 and SARMERG2, using the outputs from the UNLOADs.

    A SARDBASE MERGE will populate the database with the unload datasets. The new database will carry the database characteristics (that is: parameters, panels, messages and skeletons) of the unload datasets.

    NOTE: A merged database will be ready for immediate SARPAC processing.
      //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB3'                <=== Modify DB name                                  //STEPLIB    DD  DISP=SHR,DSN=VIEW.CAILIB                   <=== Modify, if needed   //SARMERG1 DD  DISP=SHR,DSN=xxxxxx.xxxxxx.UNLOAD1           <=== Modify DSN   //SARMERG2 DD  DISP=SHR,DSN=xxxxxx.xxxxxx.SELUNLD           <=== Modify DSN                or  //SARMERG2 DD  DISP=SHR,DSN=xxxxxx.xxxxxx.UNLOAD2          <=== Modify DSN     //SYSPRINT DD SYSOUT=*                                       //SYSIN       DD *                                              MERGE                                                       /*   // 
    NOTE: On the new, merged database, please verify that your View initialization (SARINIT) parameters reflect the intended specifications and that the Expanded Retention Option (ERO) table includes all of the reports that the database now owns.


  • Run a SARDBASE RENAME, to rename the original database:
      //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB1'             <=== Modify DB name                                  //STEPLIB    DD  DISP=SHR,DSN=VIEW.CAILIB                      <=== Modify, if needed   //SYSPRINT DD SYSOUT=*                                       //SYSIN     DD *                                              RENAME VIEW.DB4   /*   // 
  • Run a SARDBASE RENAME, to rename the new database to the original name:
      //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB3'         <=== Modify DB name                                  //STEPLIB    DD  DISP=SHR,DSN=VIEW.CAILIB                  <=== Modify, if needed   //SYSPRINT DD SYSOUT=*                                       //SYSIN     DD *                                              RENAME VIEW.DB1   /*   // 
  • Run a SARDBASE DELETE on the old database:
      //XXXXXXXX JOB ...   //SARDBASE EXEC PGM=SARDBASE,PARM='VIEW.DB4'        <=== Modify DB name                                  //STEPLIB    DD  DISP=SHR,DSN=VIEW.CAILIB                 <=== Modify, if needed   //SYSPRINT DD SYSOUT=*                                       //SYSIN     DD *                                              DELETE   /*   // 
  • Validate the report counts, taken in the earlier steps of this procedure, against the new database.

  • If you moved SOME of the reports from the sending database:

    * Run SARBCH /DELETE, on the reports that were moved, if you do not want the reports to remain on the sending database.

  • Run SARPAC to move the reports from the original tapes to tapes owned by the new database.

    The SARPAC utility will consolidate all the backup tapes, producing a new set of backup tapes owned by the new database. The next backup cycle will release the original tapes that were
    used as input by the SAPARC utility.

    NOTE: The original backup tape will not be removed from the System Catalog, preventing data loss in the original database.