zOs/WK/PLANINS

$#@             $*** load old plan_tables to new
$>.fEdit() $@[
$=subsys=DBOF
$=db=DB2PLAN
$=cr=CMNBATCH
$=ts=- strip(left($cr, 7))
$=tstTst= '2011-11-21-09.00.00'
$=suOld= _OLD
$=crTo = A540769
call sqlConnect $subsys
$@=[
//Y4PLAINS JOB (CP00,KE50),'DB2 REO',
//         MSGCLASS=T,TIME=1440,
//         NOTIFY=&SYSUID,REGION=0M
//************ insert into *********
//INSERT   EXEC PGM=IKJEFT01,DYNAMNBR=200,TIME=99
//SYSTSIN  DD *
    DSN SYSTEM($subsys)
   RUN PROGRAM(DSNTEP2) PARMS('ALIGN(LHS)') PLAN(DSNTEP2)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTERM  DD DUMMY
//SYSIN    DD *
$]
$;
$<=[            $*** Achtung richtige TS einfüllen| ohne LOBs|
${ts}X
${ts}G
${ts}Q
${ts}I
${ts}J
$]
$@for ts1 $@/ts/
    $=ts1=- strip($ts1)
$;
$<=[ select creator, name, type
         from sysibm.sysTables
         where dbName='$db' and tsName = '$ts1'
$] call sqlSel
$| $@forWith tb $@/tb/
  if $TYPE \== T then do
      say 'skipping' $CREATOR'.'$NAME 'because type' $TYPE
      iterate
      end
$@=[
  insert into $CREATOR.$NAME
      select * from $crTo.$NAME;
  commit;
$]
$/tb/
$/ts/
$]
$#out                                              20111122 14:02:57