ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

View - Populate Static Database with Reports of Another Database

book

Article ID: 237862

calendar_today

Updated On:

Products

View

Issue/Introduction

We have a View database from which we want to extract a certain set of reports, to populate another static database.

The reports in question would be: ABCDEFGH, IJKLMNOP, and QRSTUVWX from 2009 to today.

How would we go about this?

Environment

Release : 14.0

Component :

Resolution

As there is only one View database that has reports extracted from it, here are the utilities that would be used:

 . Run SARGRW, to create SARDBASE Selective UNLOAD transactions for the reports:

//XXXXXXXX JOB ...
//SARGRW01 EXEC PGM=SARGRW                                        
//STEPLIB  DD   DISP=SHR,DSN=VIEW.CVDELOAD        
//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=*                                            
//OUTFILE  DD  DISP=(,CATLG,DELETE),                            
//             DSN=xxxxxx.xxxxxx.SELCARDS,
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),              
//             SPACE=(TRK,(5,1),RLSE),                          
//             UNIT=uuuu,VOL=SER=vvvvvv
//SYSIN    DD *                                        
/CONTROL SEQ=RID DATABASE=view_HLQ
/TITLE 'LISTING OF SELECTED SYSOUTS'
/IF (SUBSTR(RID,1,9) = 'ABCDEFGH ' OR SUBSTR(RID,1,9) = 'IJKLMNOP ' OR
    (SUBSTR(RID,1,9) = 'QRSTUVWX ') AND
    (ARCHDATE GE '01/01/2009')  
/OUTPUT 'S=' COL(1)                                    
/OUTPUT ID COL(3)                                      
/OUTPUT ' ADATE=' COL(35)                              
/OUTPUT EDIT(ARCHDATE,'MM/DD/YYYY') COL(42)            
/END                                                  
/*                                                    
//  

 . JCL to run View SARDBASE Selective UNLOAD, to extract report entries:

//XXXXXXXX JOB ...
//SARDBASE EXEC PGM=SARDBASE,PARM='VIEW_HLQ'  <=== MODIFY DB NAME
//STEPLIB  DD  DISP=SHR,DSN=VIEW.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*
//*********************************************
//*  USE THE FOLLOWING SARUNLTB STATEMENT IF  *
//*  YOU ARE DOING A "SELECTIVE" UNLOAD       *
//*********************************************
//SARUNLTB DD  DISP=SHR,DSN=xxxxxx.xxxxxx.SELCARDS
//SARUNLD  DD  DISP=(,CATLG,DELETE),
//             DSN=xxxxxx.xxxxxx.SARSLUND,
//             DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760),
//             SPACE=(CYL,(NNN,NN),RLSE),
//             UNIT=uuuu,VOL=SER=vvvvvv
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
UNLOAD
/*
//

 . Create receiving database, using SARDBASE ADDDS DATA and ADDDS INDEX:

//XXXXXXXX JOB ...
//SARDBASE EXEC PGM=SARDBASE,PARM='VIEW_HLQ2'  <=== MODIFY DB NAME
//STEPLIB  DD  DISP=SHR,DSN=VIEW.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD   *
ADDDS INDEX CYLINDER=nnnn BLKSIZE=8906 UNIT=uuuu VOLSER=vvvvvv
ADDDS DATA  CYLINDER=nnnn BLKSIZE=13682 UNIT=uuuu VOLSER=vvvvvv
/*
//

 . Run RMODBASE MERGE to populate the receiving database:

//XXXXXXXX JOB ...
//SARDBASE EXEC PGM=SARDBASE,PARM='VIEW_HLQ2'  <=== MODIFY DB NAME
//STEPLIB  DD  DISP=SHR,DSN=VIEW.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*
//SARMERG1 DD  DISP=SHR,DSN=xxxxxx.xxxxxx.SARSLUND
//SYSIN    DD  *
MERGE
/*
//

 . Run SARINIT on receiving database:

//XXXXXXXX JOB ...
//SARINIT EXEC PGM=SARINIT
//STEPLIB  DD  DISP=SHR,DSN=VIEW.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
NAME=VIEW_HLQ2
/*
//

 . Run SARPAC REPORT on the receiving database, to identify its tapes:

//XXXXXXXX JOB ...
//SARPAC   EXEC PGM=SARPAC,PARM='VIEW_HLQ2,REPORT' <=== MODIFY DB NAME
//STEPLIB  DD  DISP=SHR,DSN=VIEW.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSIN    DD  DUMMY
//

 . Run SARPAC on the receiving database, to create its own tapes:

//XXXXXXXX JOB ...
//SARPAC   EXEC PGM=SARPAC,PARM='VIEW_HLQ2' <=== MODIFY DB NAME
//STEPLIB  DD  DISP=SHR,DSN=VIEW.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSIN    DD  *
TAPESEQ=nnnnn-nnnnn
/*
//