View/Deliver - Upgrading to 14.0 and want to identify any possible modified panels or banners

book

Article ID: 224212

calendar_today

Updated On:

Products

CA View

Issue/Introduction

Is there any way to know which View/Deliver banners and panels (customized + standard) were loaded to the View and Deliver databases during previous v12.2 upgrade?

And get those panels and banners in separate datasets?

Environment

Release : 14.0

Component : CA View

Resolution

There were REXX programs developed to extract banners and panels from View and Deliver databases. 

These extracted banners and panels can be compared (using =3.14) to the banners and panels in the next release, to see if there were any that were modified. 

This REXX program is used against a View database, to extract panels and banners:

/* REXX PROGRAM TO unload panels or banners to PDS                   */
/* Command:                                                          */
/*   sarunpb dbname pds mem type                                     */
/* where dbname = View database mem name                             */
/*       pds    = name of PDS to unload to                           */
/*       mem    = member(s) to be unloaded                           */
/*                * - select all members                             */
/*                x*, xy*, xyz* - select members starting with       */
/*                                certain characters                 */
/*                x - specific member name                           */
/*       type   = P for panels or                                    */
/*              = B for banner pages                                 */

  Arg dbname pds mem type
  if dbname = '' then do
     say 'Database name not specified'
     exit
  end
  if pds = '' then do
     say 'PDS name not specified'
     exit
  end
  x = SYSDSN("'"pds"'")
  if x <> 'OK' then do
     say pds x
     exit
  end
  if mem = '' then do
     say 'Member not specified'
     exit
  end
  if type <> '' & type <> 'P' & type <> 'B' then do
     say 'Type invalid'
     exit
  end

  mem = left(mem,8)
  parse var mem fmem '*' .
  fmem = left(fmem,8,'00'x)
  parse var mem tmem '*' .
  tmem = left(tmem,8,'ff'x)
  key='02'x
  if type = 'B' then key='09'x

  Call 'SARSAMRX' 'OPEN', dbname
  Parse Var result rc .
  if rc <> 0 then do
     Call 'SARSAMRX' 'MSG'
     Parse Var result rc +2 msg
     Say msg
     exit
  end

/* GET records */
  irec = LEFT(key||fmem,16,'00'X)
  call 'SARSAMRX' 'GET', irec, 'GE'
  Parse Var result rc +2 irec

  do while (rc = 0 & substr(irec,1,1) = key)
    if substr(irec,2,8) > tmem then leave
    call Unload_Member
    call 'SARSAMRX' 'GET', irec, 'GT'
    Parse Var result rc +2 irec
  end

  Call 'SARSAMRX' 'CLOSE'
  Exit

Unload_Member:
  name = strip(substr(irec,2,8))

  call 'SARSAMRX' 'SOPN', irec
  Parse Var result rc +2 .
  if rc <> 0 then do
     say 'SAMSOPN failed RC='rc
     return
  end

  i = 0
  data. = ''
  call 'SARSAMRX' 'SGET', rec
  Parse Var result rc +2 rec
  do while (rc = 0)
    i = i + 1
    data.i = rec
    call 'SARSAMRX' 'SGET', rec
    Parse Var result rc +2 rec
  end
  call 'SARSAMRX' 'SCLS'
  Parse Var result rc +2 .

  if i = 0 then return
  data.0 = i

  ADDRESS TSO "ALLOC FILE(PDS) SHR DA('"pds"("name")') SHR"
  ADDRESS TSO "EXECIO * DISKW pds (STEM data. FINIS"
  ADDRESS TSO 'FREE F(PDS)'

  if type = 'B' then
    say 'BANNER 'name' UNLOADED to 'pds
  else
    say 'PANEL 'name' UNLOADED to 'pds
return

---------------------------------------------------------------------------------------------------------------------------------------

This JCL is used to run the REXX program for View panels and banners:

//SARUNPB  JOB ...
//UNLOAD   EXEC PGM=IKJEFT01,DYNAMNBR=50
//* 
//STEPLIB  DD  DISP=SHR,DSN=**CAI**.CVDELOAD
//*
//SYSPROC  DD  DISP=SHR,DSN=YOUR.REXX.LIBRARY
//SYSHELP  DD  DUMMY
//SYSTSPRT DD  TERM=TS,SYSOUT=*
//SYSTERM  DD  TERM=TS,SYSOUT=*
//SYSOUT   DD  TERM=TS,SYSOUT=*
//SYSTSIN  DD  *                                                       
SARUNPB VIEW.SYSTEM1 YOUR.UNLOAD.PANEL.PDS * P                    
SARUNPB VIEW.SYSTEM1 YOUR.UNLOAD.BANNER.PDS * B
//

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This REXX program is used against the unload of a Deliver database:

/* REXX PROGRAM TO unload panels or banners to PDS                   */
/* Command:                                                          */
/*   rmounpb file pds mem type                                       */
/* where file   = DD name of UNLOAD file (cannot be named PDS)       */
/*       pds    = name of PDS to unload to                           */
/*       mem    = member(s) to be unloaded                           */
/*                * - select all members                             */
/*                x*, xy*, xyz* - select members starting with       */
/*                                certain characters                 */
/*                x - specific member name                           */
/*       type   = P for panels or                                    */
/*              = B for banner pages                                 */

  Arg file pds mem type
  if file = '' then do
     say 'DD name of unload file not specified'
     exit
  end
  if pds = '' then do
     say 'PDS name not specified'
     exit
  end
  x = SYSDSN("'"pds"'")
  if x <> 'OK' then do
     say pds x
     exit
  end
  if mem = '' then do
     say 'Member not specified'
     exit
  end
  if type <> '' & type <> 'P' & type <> 'B' then do
     say 'Type invalid'
     exit
  end

  mem = left(mem,8)
  parse var mem fmem '*' .
  fmem = left(fmem,8,'00'x)
  parse var mem tmem '*' .
  tmem = left(tmem,8,'ff'x)
  key='02'x
  if type = 'B' then key='04'x

/* Skip unload header record */
  call Read_Unload

/* GET records */
  call Read_Unload
  do while (rc = 0)
    if substr(irec,1,1) > key & substr(irec,1,1) <> '05'x then leave
    if substr(irec,1,1) = key & substr(irec,53,8) > tmem then leave
    if substr(irec,1,1) = key & substr(irec,53,8) >= fmem then
      call Unload_Member
    else if substr(irec,1,1) = '02'x | substr(irec,1,1) = '04'x then
      call Skip_Member
    call Read_Unload
  end
  Exit

Unload_Member:
  name = strip(substr(irec,2,8))

  i = 0
  data. = ''
  call Read_Unload
  do while (rc = 0 & substr(irec,1,1) <> 'ff'x)
    i = i + 1
    data.i = substr(irec,2)
    call Read_Unload
  end

  if i = 0 then return
  data.0 = i

  ADDRESS TSO "ALLOC FILE(PDS) SHR DA('"pds"("name")') SHR"
  ADDRESS TSO "EXECIO * DISKW PDS (STEM data. FINIS"
  ADDRESS TSO 'FREE F(PDS)'

  if type = 'B' then
    say 'BANNER 'name' UNLOADED to 'pds
  else
    say 'PANEL 'name' UNLOADED to 'pds
return

Skip_Member:
  call Read_Unload
  do while (rc = 0 & substr(irec,1,1) <> 'ff'x)
    call Read_Unload
  end
  return

Read_Unload:
  "EXECIO 1 DISKR "file
  if rc = 0 then do
    Parse Pull irec
  end
  return

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This JCL is used to run the REXX program for Deliver panels and banners:

//RMOUNPB  JOB ...
//DBUNLD   EXEC PGM=RMODBASE                                
//STEPLIB  DD  DISP=SHR,DSN=**CAI**.CVDELOAD                         
//RMOUNLD  DD  DSN=YOUR.UNLOAD.FILE,DISP=(,CATLG),UNIT=SYSDA,
//             SPACE=(CYL,(100,10),RLSE)                   
//             DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760)    
//SYSPRINT DD SYSOUT=*                                     
//SYSIN    DD *                                            
NAME DELIVER.SYSTEM1                                         
UNLOAD                                                     
/*                                                         
//COPY     EXEC PGM=IDCAMS                                 
//SYSPRINT DD SYSOUT=*                                     
//INDD     DD DSN=YOUR.UNLOAD.FILE,DISP=SHR                  
//OUTDD    DD DSN=YOUR.UNLOAD FILEVB,DISP=(,CATLG),UNIT=SYSDA,
//         SPACE=(CYL,(10,5),RLSE),                        
//         DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760)        
//SYSIN    DD *                                            
 REPRO INFILE(INDD) OUTFILE(OUTDD)                         
/*                                                         
//UNLOAD   EXEC PGM=IKJEFT01,DYNAMNBR=50
//* 
//STEPLIB  DD  DISP=SHR,DSN=**CAI**.CVDELOAD
//*
//SYSPROC  DD  DISP=SHR,DSN=YOUR.REXX.LIBRARY
//SYSHELP  DD  DUMMY
//SYSTSPRT DD  TERM=TS,SYSOUT=*
//SYSTERM  DD  TERM=TS,SYSOUT=*
//SYSOUT   DD  TERM=TS,SYSOUT=*
//RMOUNLD  DD  DISP=SHR,DSN=YOUR.UNLOAD.FILEVB
//SYSTSIN  DD  *                                                       
RMOUNPB RMOUNLD YOUR.UNLOAD.PANEL.PDS * P                    
RMOUNPB RMOUNLD YOUR.UNLOAD.BANNER.PDS * B
//