<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi <SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Jeroen:</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN> <BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> I assume you meant ORDERS not ORDER in your GET.</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> Your GET and my technique assume that whatever is on file</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> is what we want to start the UPDATE. i.e. if someone else has changed</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> the ORDERS record after we had executed the FIND procedure then</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> that is ok we just use their data.</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN> <BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> I would set up a designer alias of the primary. say DES_ORDERS</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN> <BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> In the UPDATE</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> LOCK ORDERS </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> GET DES_ORDERS via ORDER etc</SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> ; Copy the data from the DES_ORDERS buffer to the </SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> ; ORDERS buffer</SPAN> </SPAN><BR>
<SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> PUT ORDERS</SPAN><BR>
UNLOCK ORDERS<BR>
If you still get the message <BR>
<FONT face=Arial>'Record has been changed since you found it'.</FONT><BR>
<FONT face=Arial>Then you are changing something in the UPDATE. SUM INTOs and COUNT INTOs</FONT><BR>
<FONT face=Arial>are sometimes the culprit. </FONT><BR>
Regards,<BR>
Peter Bateman<BR><BR><BR>
<BLOCKQUOTE>
<HR>
Subject: RE: QUICK using unexpected index<BR>Date: Fri, 29 Feb 2008 15:11:23 -0500<BR>From: Bob.Deskin@cognos.com<BR>To: powerh-l@lists.sowder.com<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass EC_font-face
{font-family:Tahoma;}
.ExternalClass EC_font-face
{font-family:'Trebuchet MS';}
.ExternalClass EC_P.MsoNormal
{font-size:12pt;font-family:'Times New Roman';}
.ExternalClass EC_LI.MsoNormal
{font-size:12pt;font-family:'Times New Roman';}
.ExternalClass EC_DIV.MsoNormal
{font-size:12pt;font-family:'Times New Roman';}
.ExternalClass A:link
{color:blue;text-decoration:underline;}
.ExternalClass EC_SPAN.MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass A:visited
{color:purple;text-decoration:underline;}
.ExternalClass EC_SPAN.MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass EC_SPAN.E-mailStijl17
{color:navy;font-family:Arial;}
.ExternalClass EC_DIV.Section1
{page:Section1;}
</STYLE>
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008>To get a definitive answer, we'd have to look in the code. But based on my understanding of the PowerHouse architecture and "philosophy" is that the GET on the PRIMARY is basically continuing the read down the chain.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008>PRIMARY files (and DETAIL files) are special. Remember that we have to continue the read chain across multiple FIND procedures. So any GET will normally continue that chained read and do a GET NEXT.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008>In order to force a re-evaluation of the retrieval mechanism, try adding UNIQUE to your GET as in </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN class=EC_562300320-29022008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">GET ORDER VIA ORD-NR USING ORD-NR OF ORDER UNIQUE</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have not tried this so I won't guarantee that it will work.</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">And the reason why a failed GET doesn't receive an error and your ACCESSOK is false is again the special nature of PRIMARY file retrieval. I like to call it semi-optional. The retrieval on a PRIMARY or DETAIL itself is optional but if the GET fails, at least on the PRIMARY, you don't have a QUICK transaction (not to be confused with a relational transaction). If a failed GET on the PRIMARY was like other files, you'd get an immediate error and we'd have trouble retrieving inside a FOR loop in a cluster among other issues.</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_562300320-29022008><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Bob</SPAN></SPAN></FONT></DIV><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> powerh-l-bounces+bob.deskin=cognos.com@lists.sowder.com [mailto:powerh-l-bounces+bob.deskin=cognos.com@lists.sowder.com] <B>On Behalf Of </B>Bert Onderdijk<BR><B>Sent:</B> February 29, 2008 11:16 am<BR><B>To:</B> powerh-l@lists.sowder.com<BR><B>Subject:</B> QUICK using unexpected index<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=EC_idOWAReplyText3172 dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">Dear Jeroen,</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">You may ask Cognos support to work on this but I expect they will point you to Cognos Consultancy.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">The way you describe it, is to </SPAN></FONT><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">my opinion standard expected PowerHouse behavior.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">- As you mention, a Select is not a Find;</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">- The select on TRANS-REF will build a set of rows that matches the value you entered;</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">- It looks as if your screen is -when retrieving- automatically going to pre-, update and postupdate;<BR>- This updates forces an update next, and that means you will jump tot the next row that matches your selection criterea;</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">- And, the select forces that the get in the preupdate is not done. The accessok will always be false.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">The re-retrieve to get rid of <FONT face=Arial size=2>'Record has been changed since you found it' is a bit risky. <BR>I would try to use different paths and write your own find procedure to get the data you wish and to make a different get in preupdate work.</FONT></SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2><SPAN style="FONT-SIZE: 12pt">But, this all said, there are a few others in this mailing list who are at least able to clarify the why of PowerHouse more then me.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2><SPAN style="FONT-SIZE: 12pt">Yes, write your own find in a complex screen with different type of files takes time.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2><SPAN style="FONT-SIZE: 12pt">Regards,</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2><SPAN style="FONT-SIZE: 12pt"><BR>Bert</SPAN></FONT></DIV>
<FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> <BR>
<DIV dir=ltr>
<HR align=center width="100%" SIZE=2>
</DIV></SPAN></FONT>
<DIV>
<DIV class=EC_Section1>
<DIV>
<P class=EC_MsoNormal><B><FONT face=Tahoma size=2><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Van:</SPAN></FONT></B><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> powerh-l-bounces+f.tang=piramide.nl@lists.sowder.com [mailto:powerh-l-bounces+f.tang=piramide.nl@lists.sowder.com] <B><SPAN style="FONT-WEIGHT: bold">Namens </SPAN></B>Jeroen van der Linde<BR><B><SPAN style="FONT-WEIGHT: bold">Verzonden:</SPAN></B> vrijdag 29 februari 2008 10:36<BR><B><SPAN style="FONT-WEIGHT: bold">Aan:</SPAN></B> powerh-l@lists.sowder.com<BR><B><SPAN style="FONT-WEIGHT: bold">Onderwerp:</SPAN></B> QUICK using unexpected index</SPAN></FONT></P></DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Dear all,</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I've got a rather strange problem in QUICK. When I do a select in a quick screen and afterwards a get via a key, quick doesn't use the key I tell it to use, but seems to use the key in which I entered a value during my select. I'll try to explain the situation:</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I'm using a primary record with multiple (segmented) indexes:</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Record: ORDERS</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">1. Primary (unique) index segment: ORD-NR</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">2. Alternate (unique) index segments: CLIENT-NR, ORD-NR</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">3. Repeating index, segment: TRANS-REF</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The file is accessed as follows:</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">FILE ORDERS PRIMARY CLOSE</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> ACCESS VIA ORD-NR</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> ACCESS VIA CLIENT-NR</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> ACCESS VIA TRANS-REF</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Nothing strange there. Now for the problem:</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Using a Select (not a FIND!) I'll step over the first two indexes (ORD-NR & CLIENT-NR) and fill in a value in the field TRANS-REF.</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Since this is a very complex screen, in the PREUPDATE procedure the primary file is retrieved again to avoid 'Record has been changed since you found it'.</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The retrieval command is simple:</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">GET ORDER VIA ORD-NR USING ORD-NR OF ORDER</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Since this record should always be there, no optional has to be used. But... when I check out the 'accessok' after the GET statement, it is false! The record absolutely still exists (no delete has been done) and when looking at the content of the file ORDERS, after the GET statement, some other (random?) record is displayed. It seems that Quick doesn't use my programmed index, but instead uses the index of the field in which I put my select value.</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Does anybody recognizes this problem and, more important, does anybody has a solution for this problem, without:</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">- adding new indexes</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">- putting 'NOSELECT' on the TRANS-REF field</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks in advance for your time and help,</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Jeroen van der Linde</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-------------------------------------------------</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Powerhouse version: 7.10G1</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">OpenVMS version: 7.3-1</SPAN></FONT></P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">All files are RMS files</SPAN></FONT></P></DIV>
<DIV>
<DIV>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-------------------------------------------------</SPAN></FONT></P></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV>
<DIV> This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. </DIV></BLOCKQUOTE><br /><hr /> <a href='' target='_new'></a></body>
</html>