DB2 catalog statistics update REXX EXEC – part 2 This ... - CBT Tape
DB2 catalog statistics update REXX EXEC – part 2 This ... - CBT Tape
DB2 catalog statistics update REXX EXEC – part 2 This ... - CBT Tape
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
18<br />
ZCMD = ''<br />
call EA_UPDATE<br />
leave<br />
end<br />
end<br />
return<br />
/*————————————————————*/<br />
/* Update column data */<br />
/*————————————————————*/<br />
EA_UPDATE:<br />
address ispexec "TBTOP T£CLM"<br />
do forever<br />
CFLAG = Ø<br />
address ispexec "TBSKIP T£CLM"<br />
if rc > Ø then leave<br />
if CNAME = ' ' then error<br />
UCNAME = CNAME<br />
/*———————————————————————————————————————— */<br />
/* Ensure first table entry is for colcard.*/<br />
/* Three table entries for each <strong>update</strong>. */<br />
/*———————————————————————————————————————— */<br />
if CFLD 'Colcard' then do<br />
MESS = 'Error first table entry not colcard'<br />
return<br />
end<br />
if CCDATAE NCDATAE then CFLAG = 1<br />
NCCARD = NCDATAD<br />
address ispexec "TBSKIP T£CLM"<br />
if CCDATAD NCDATAD then CFLAG = 1<br />
NL2KEY = x2c(NCDATAE)<br />
address ispexec "TBSKIP T£CLM"<br />
if CCDATAD NCDATAD then CFLAG = 1<br />
NH2KEY = x2c(NCDATAE)<br />
/*———————————————————————————————————————*/<br />
/* CFLAG set if any <strong>update</strong>s are required */<br />
/*———————————————————————————————————————*/<br />
if CFLAG = 1 then do<br />
CFLAG = Ø<br />
if <strong>DB2</strong>CON = Ø then do<br />
address db2 "SIGNON" <strong>DB2</strong>S<br />
if RC > Ø then do<br />
MESS = "Error - Unable to connect to " <strong>DB2</strong>S<br />
RETURN16<br />
end<br />
<strong>DB2</strong>CON = 1<br />
end<br />
UPDT = "UPDATE SYSIBM.SYSCOLUMNS ",<br />
"SET COLCARD="NCCARD",LOW2KEY='"NL2KEY"',",<br />
"HIGH2KEY='"NH2KEY"'"<br />
© 1999. Xephon UK telephone 01635 33848, fax 01635 38345. USA telephone (940) 455 7050, fax (940) 455 2492.