<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Rounded MT Bold";
        panose-1:2 15 7 4 3 5 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:932009319;
        mso-list-type:hybrid;
        mso-list-template-ids:247395710 269025295 269025305 269025307 269025295 269025305 269025307 269025295 269025305 269025307;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:54.0pt;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:90.0pt;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:126.0pt;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:162.0pt;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:198.0pt;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:234.0pt;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:270.0pt;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:306.0pt;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hey Listers!<o:p></o:p></p>
<p class="MsoNormal">I have a PH Web screen (8.40G) using a union view of several tables/views that somehow trips up the PH Web server. Here is the generalised view definition:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">create view LINKAGE_UNION_VIEW<o:p></o:p></p>
<p class="MsoNormal"> (FLD1,<o:p></o:p></p>
<p class="MsoNormal"> FLD2,<o:p></o:p></p>
<p class="MsoNormal"> EFFECTIVE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> DB_PERCENT,<o:p></o:p></p>
<p class="MsoNormal"> CURRENT_FLAG) as<o:p></o:p></p>
<p class="MsoNormal"> select C2.FLD1, C2.FLD2, C2.EFFECTIVE_YYMM, C2.TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> C2.DB_PERCENT, C2.CURRENT_FLAG<o:p></o:p></p>
<p class="MsoNormal"> from CURRENT_VIEW C2<o:p></o:p></p>
<p class="MsoNormal"> union distinct<o:p></o:p></p>
<p class="MsoNormal"> select C3.FLD1, C3.FLD2, C3.EFFECTIVE_YYMM, C3.TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> C3.DB_PERCENT, C3.CURRENT_FLAG<o:p></o:p></p>
<p class="MsoNormal"> from TERMINATED_VIEW C3<o:p></o:p></p>
<p class="MsoNormal"> union distinct<o:p></o:p></p>
<p class="MsoNormal"> select C4.FLD1, C4.FLD2, C4.EFFECTIVE_YYMM, C4.TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> C4.DB_PERCENT, 'C'<o:p></o:p></p>
<p class="MsoNormal"> from LINKAGE_1_TABLE C4<o:p></o:p></p>
<p class="MsoNormal"> where (C4.TERMINATE_YYMM <= '000000')<o:p></o:p></p>
<p class="MsoNormal"> union distinct<o:p></o:p></p>
<p class="MsoNormal"> select C5.FLD1, C5.FLD2, C5.EFFECTIVE_YYMM, C5.TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> C5.DB_PERCENT, 'T'<o:p></o:p></p>
<p class="MsoNormal"> from LINKAGE_1_TABLE C5<o:p></o:p></p>
<p class="MsoNormal"> where (C5.TERMINATE_YYMM > '000000')<o:p></o:p></p>
<p class="MsoNormal"> union distinct<o:p></o:p></p>
<p class="MsoNormal"> select C6.FLD1, C6.FLD2, C6.EFFECTIVE_YYMM, C6.TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> C6.DB_PERCENT, 'C'<o:p></o:p></p>
<p class="MsoNormal"> from LINKAGE_2_TABLE C6<o:p></o:p></p>
<p class="MsoNormal"> where (C6.TERMINATE_YYMM <= '000000')<o:p></o:p></p>
<p class="MsoNormal"> union distinct<o:p></o:p></p>
<p class="MsoNormal"> select C7.FLD1, C7.FLD2, C7.EFFECTIVE_YYMM, C7.TERMINATE_YYMM,<o:p></o:p></p>
<p class="MsoNormal"> C7.DB_REPORTING_PERCENT, 'T'<o:p></o:p></p>
<p class="MsoNormal"> from LINKAGE_2_TABLE C7<o:p></o:p></p>
<p class="MsoNormal"> where (C7.TERMINATE_YYMM > '000000')<o:p></o:p></p>
<p class="MsoNormal"> order by 2 asc, 6 asc, 1 asc;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Data is retrieved by providing a value for FLD2.<o:p></o:p></p>
<p class="MsoNormal">CURRENT_VIEW and TERMINATED_VIEW are both views of a third table, differentiated on TERMINATE_YYMM.
<o:p></o:p></p>
<p class="MsoNormal">The corresponding attributes of each table/view are the same and use the same domain definitions.
<o:p></o:p></p>
<p class="MsoNormal">Whenever there’s data originating from table LINKAGE_1_TABLE it always gives the connection timeout error.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Things I’ve tried: <o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>The error has nothing to do with amount of data returned. So long as there’s none from LINKAGE_1_TABLE the view works for one or hundreds of rows;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>changed order of tables in view definition. No effect;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>For a FLD2 value with no LINKAGE_2_TABLE data, moved data from table LINKAGE_1_TABLE to LINKAGE_2_TABLE. Still get error;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>For a FLD2 value with no LINKAGE_1_TABLE data, moved data from table LINKAGE_2_TABLE to LINKAGE_1_TABLE. No error;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">5.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>3 and 4 imply data is corrupted. Used DUMP/REC to look at LINKAGE_1_TABLE in Hex. Nothing unusual about it;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">6.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>This is the only PH Web screen we have using data from LINKAGE_1_TABLE;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">7.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>The protection on LINKAGE_1_TABLE is no different than the other tables;<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">8.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Same view used in QUICK, QUIZ or SQL has no problem retrieving data. Only PowerHouse Web server coughs.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Anyone seen this before? Is it because each of 3 tables is defined twice in the view?
<o:p></o:p></p>
<p class="MsoNormal">Losing hair here! Any suggestions much appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-top:6.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">Using PH 8.4G, OpenVMS 8.3, Oracle Rdb SQL V7.2<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:6.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">Regards,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial Rounded MT Bold","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">Martyn Thomson<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">Senior Technical Analyst, Development Services</span><span style="font-family:"Arial Rounded MT Bold","sans-serif";color:#1F497D;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">Information Technology Services<o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="font-size:14.0pt;color:#003D83;mso-fareast-language:EN-CA">HP Advanced Solutions Inc.</span></i></b><b><i><span lang="EN-US" style="font-size:14.0pt;color:#003D83;mso-fareast-language:EN-CA"><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">phone: 250.405.4555 | fax: 250.405.4422</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">email:<a href="mailto:martyn.thomson@hpadvancedsolutions.com"><span style="color:blue">martyn.thomson@hpadvancedsolutions.com</span></a>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:EN-CA">web:
<a href="http://www.hpadvancedsolutions.com/"><span style="color:blue">www.hpadvancedsolutions.com</span></a>
<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>