Hi
I am new to DB2. I have written a script to check whether the DB2 has standard fix pack or not. The script which i have written is working fine, but i want to store the variable in an Array and it should point through pointer and display then message whether the Fix pack is standard fix pack or non-standard fix-pack but i don't know how to use in array. Need some help.
CASE WHEN
OS_NAME = 'Linux'
Then (
CASE WHEN
SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN('MI00274','MI00265','MI00244','MI00235','MI0021 6',
'MI00204','MI00185','MI00172','MI00273','MI00264', 'MI00243','MI00234','MI00229','MI00215','MI00220', 'MI00203','MI00184','MI00171','MI00275',
'MI00266','MI00245','MI00236','MI00236','MI00205', 'MI00186','MI00173','MI00276','MI00246','MI00237', 'MI00218','MI00206','MI00187','MI00174'))
THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
Else
'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
end )
WHEN
OS_NAME = 'AIX'
Then (
CASE WHEN
SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN('U823509','U823469','U817474','U815922','U81576 8',
'U811792','U813650','U811590','U810940','U809676') )
THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
Else
'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
end )
WHEN
OS_NAME = 'SOLARIS'
Then (
CASE WHEN
SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN
('U823510','U823470','U817475','U815923','U815769' ,'U811793','U813651','U810941','U809677',
'U823511','U823471','U817476','U815924','U811794', 'U811594'))
THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
Else
'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
end )
WHEN
OS_NAME = 'UNIX'
Then (
CASE WHEN
SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN('U823513','U823473','U817478','U815926','U81179 6','U811593','U810943','U809679','U823512',
'U823472','U817477','U815925','U815771','U811795', 'U813653','U810942','U809678'))
THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
Else
'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
end )
end as msg
, ptf as token
from (Select OS_NAME,SERVICE_LEVEL,PTF from SYSIBMADM.ENV_SYS_INFO,SYSIBMADM.ENV_INST_INFO) as standard_release;