View - Want to extract Deliver PRSET members
search cancel

View - Want to extract Deliver PRSET members

book

Article ID: 271630

calendar_today

Updated On:

Products

View

Issue/Introduction

We checked on View install datasets for XEROX DJDE members (PRSET), but none can be found. 

How can we extract the PRSET members from Deliver?

Environment

Release : 14.0

Resolution

To extract the PRSET entries from a Deliver database, please do the following:

 . Run RMODBASE UNLOAD, to a flat file:

//XXXXXXXX JOB ...                                                
//RMODBASE EXEC PGM=RMODBASE,PARM='DLVR_HLQ'  <=== MODIFY DB NAME 
//STEPLIB  DD  DISP=SHR,DSN=DLVR.CVDELOAD     <=== MODIFY, IF USED
//SYSPRINT DD  SYSOUT=*                                           
//RMOUNLD  DD  DSN=XXXXXX.XXXXXX.RMOUNLD,                         
//             DISP=(,CATLG,DELETE),                              
//             UNIT=XXXX,VOL=SER=YYYYYY,                          
//             SPACE=(CYL,(NNN,NN),RLSE)                          
//SYSIN    DD   *                                                 
UNLOAD                                                            
/*                                                                
// 

 . Here is a REXX program, to be used in the below JCL:

/* 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

 . Extract BANNER and PRSET entries by using the following JCL:

//XXXXXXXX JOB ...
//COPY     EXEC PGM=IDCAMS                                 
//SYSPRINT DD SYSOUT=*                                     
//INDD     DD DISP=SHR,DSN=XXXXXX.XXXXXX.RMOUNLD
//OUTDD    DD DSN=XXXXXX.RMOUNLD.FILEVB,DISP=(,CATLG),
//            UNIT=xxxx,VOL=SER=xxxxxx,
//            SPACE=(CYL,(100,10),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=DLVR.CVDELOAD  <=== Modify, if used
//*
//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=XXXXXX.RMOUNLD.FILEVB
//SYSTSIN  DD  *                                                       
RMOUNPB RMOUNLD YOUR.UNLOAD.PANEL.PDS * P                    
RMOUNPB RMOUNLD YOUR.UNLOAD.BANNER.PDS * B
/*
//