Problem updating last record written at sort break in QTP

Tim Cummings tim.cummings@frequencymarketing.com
Thu, 9 Dec 2004 14:11:10 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C4DE22.D7AED4B0
Content-Type: text/plain;
	charset="iso-8859-1"

 
I'm not allowed to send out actual code, so I have to cut out some stuff
and change the names of other stuff.  The code below is all I can share.
 
The problem I believe the problem is in the phases of QTP processing (I'm
guessing).
 
 
Tim

CAN CLE 

   ACCESS ORDER-ITEMS & 
     LINK XXX OF ORDER-ITEMS & 
       TO PR-XXX OF XXX-RATIO 
   
  
   DEFINE SPOILED-CREDITS INTEGER SIGNED SIZE 4 = BR-CREDITS of order-items
& 
                                                * QUANTITY-ON-HAND of
order-items & 
                                                * (PR-PERCENT of XXX-ratio /
100) 

   TEMPORARY CREDIT-TOTAL NUM*8 

   SORT ON ITEM-NO 

   ITEM CREDIT-TOTAL SUBTOTAL SPOILED-CREDITS RESET AT ITEM-NO 

    OUTPUT TRANSACTIONS ADD NOITEMS ALIAS Oo-TRX 
    ITEM UNIT           OF Oo-TRX INITIAL "9999999999" 
    ITEM TRAN-KEY       OF Oo-TRX INITIAL "Oo" + ITEM-NO + PR-PREFIX 
    ITEM CREDITS        OF Oo-TRX FINAL   SPOILED-CREDITS 

    OUTPUT TRANSACTIONS UPDATE ALIAS LASTOo AT ITEM-NO & 
       VIA TRAN-KEY USING "Oo" + ITEM-NO + PR-PREFIX & 
        IF 0 <> (BR-CREDITS * QUANTITY-ON-HAND - CREDIT-TOTAL) 
    ITEM CREDITS OF LASTOo = CREDITS OF LASTOo+ ((BR-CREDITS *
QUANTITY-ON-HAND - CREDIT-TOTAL * -1)) 
GO 


Executing request 1 ... 
----------------------------------------------------------------------------
--- 
Cannot find record with this key/index value.
[3] 
   File:  LASTOO
     Linkitem:  UNIT 
     Linkitem:  LINK-UNIT 
     Linkitem:  TRAN-KEY                         Oo1000105920 

Action Taken: Run terminated. 
----------------------------------------------------------------------------
--- 

Records read: 
  ORDER-ITEMS                          5,790 
  XXX-RATIO                                3 

Transactions processed:                    3 

Records processed:                     Added    Updated  Unchanged
Deleted 
  ORDER-ITEMS                              0          0          0
0 
  OO-TRX                                   3          0          0
0 
  LASTOO                                   0          0          0
0 

Finished. 
> 






-----Original Message-----
From: David Morrison - Corporate [mailto:dmorrison@mcbrideelectric.com]
Sent: Thursday, December 09, 2004 1:39 PM
To: Tim Cummings; Cognos Powerhouse List (E-mail)
Subject: RE: Problem updating last record written at sort break in QTP


Tim,
 
I'm not sure what's causing the QTP error; I think you need to include more
of the program (e.g., the reference to LastOq).
 
Side issues:  Using  " * .01 " may be faster and/or more accurate than " /
100", and there's no need to ever multiply by -1.
 
Thanks.
 
David Morrison

 


------_=_NextPart_001_01C4DE22.D7AED4B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>Problem updating last record written at sort break in =
QTP</TITLE>

<META content=3D"MSHTML 6.00.2800.1479" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial><SPAN class=3D625244418-09122004>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004>I'm not allowed to send out actual code, so =
I have to=20
cut out some stuff</SPAN></FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004>and change the names of other stuff.&nbsp; =
The code=20
below is all I can share.</SPAN></FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004>The problem I believe the problem is in the =
phases of=20
QTP processing (I'm guessing).</SPAN></FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004>Tim</SPAN></FONT></DIV>
<DIV>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier New">CAN =
CLE</FONT>=20
</FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp; ACCESS=20
ORDER-ITEMS &amp;</FONT> <BR><FONT face=3D"Courier =
New">&nbsp;&nbsp;&nbsp;&nbsp;=20
LINK XXX OF ORDER-ITEMS &amp;</FONT> <BR><FONT=20
face=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TO PR-XXX OF=20
XXX-RATIO</FONT> <BR><FONT face=3D"Courier New">&nbsp;&nbsp; =
</FONT><BR><FONT=20
face=3D"Courier New">&nbsp; </FONT><BR><FONT face=3D"Courier =
New">&nbsp;&nbsp;=20
DEFINE SPOILED-CREDITS INTEGER SIGNED SIZE 4 =3D BR-CREDITS of =
order-items=20
&amp;</FONT> <BR><FONT=20
face=3D"Courier =
New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

* QUANTITY-ON-HAND of order-items &amp;</FONT> <BR><FONT=20
face=3D"Courier =
New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

* (PR-PERCENT of XXX-ratio / 100) </FONT></FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp;=20
TEMPORARY CREDIT-TOTAL NUM*8</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp; SORT=20
ON ITEM-NO</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp; ITEM=20
CREDIT-TOTAL SUBTOTAL SPOILED-CREDITS RESET AT ITEM-NO</FONT> =
</FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New">&nbsp;&nbsp;&nbsp;=20
OUTPUT TRANSACTIONS ADD NOITEMS ALIAS Oo-TRX</FONT> <BR><FONT=20
face=3D"Courier New">&nbsp;&nbsp;&nbsp; ITEM=20
UNIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OF =
Oo-TRX=20
INITIAL "9999999999"</FONT> <BR><FONT face=3D"Courier =
New">&nbsp;&nbsp;&nbsp; ITEM=20
TRAN-KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OF Oo-TRX INITIAL "Oo" + =
ITEM-NO +=20
PR-PREFIX</FONT> <BR><FONT face=3D"Courier New">&nbsp;&nbsp;&nbsp; ITEM =

CREDITS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OF Oo-TRX =
FINAL&nbsp;&nbsp;=20
SPOILED-CREDITS</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier New">&nbsp=
;&nbsp;&nbsp;=20
OUTPUT TRANSACTIONS UPDATE ALIAS LASTOo AT ITEM-NO &amp;</FONT> =
<BR><FONT=20
face=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VIA TRAN-KEY =
USING "Oo"=20
+ ITEM-NO + PR-PREFIX &amp;</FONT> <BR><FONT=20
face=3D"Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF 0 =
&lt;&gt;=20
(BR-CREDITS * QUANTITY-ON-HAND - CREDIT-TOTAL)</FONT> <BR><FONT=20
face=3D"Courier New">&nbsp;&nbsp;&nbsp; ITEM CREDITS OF LASTOo =3D =
CREDITS OF=20
LASTOo+ ((BR-CREDITS * QUANTITY-ON-HAND - CREDIT-TOTAL * -1))</FONT> =
<BR><FONT=20
face=3D"Courier New">GO</FONT> </FONT></FONT></P><BR>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3Dr_ansi>Executing =
request 1=20
...</FONT> <BR><FONT=20
face=3Dr_ansi>----------------------------------------------------------=
---------------------</FONT>=20
<BR><FONT face=3Dr_ansi>Cannot find record with this key/index=20
value.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[3] </FONT><BR><FONT face=3Dr_ansi>&nbsp;&nbsp; File:&nbsp; =
LASTOO</FONT><BR><FONT=20
face=3Dr_ansi>&nbsp;&nbsp;&nbsp;&nbsp; Linkitem:&nbsp; UNIT</FONT> =
<BR><FONT=20
face=3Dr_ansi>&nbsp;&nbsp;&nbsp;&nbsp; Linkitem:&nbsp; LINK-UNIT</FONT> =
<BR><FONT=20
face=3Dr_ansi>&nbsp;&nbsp;&nbsp;&nbsp; Linkitem:&nbsp;=20
TRAN-KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
O<SPAN class=3D625244418-09122004>o</SPAN>1000105920</FONT> =
</FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3Dr_ansi>Action =
Taken: Run=20
terminated.</FONT> <BR><FONT=20
face=3Dr_ansi>----------------------------------------------------------=
---------------------</FONT>=20
</FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3Dr_ansi>Records =
read:</FONT>=20
<BR><FONT face=3Dr_ansi>&nbsp;=20
ORDER-ITEMS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;=20
5,790</FONT> <BR><FONT face=3Dr_ansi>&nbsp;=20
XXX-RATIO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
3</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT =
face=3Dr_ansi>Transactions=20
processed:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
3</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3Dr_ansi>Records=20
processed:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Added&nbsp;&nbsp;&nbsp; Updated&nbsp; Unchanged&nbsp;&nbsp;&nbsp; =
Deleted</FONT>=20
<BR><FONT face=3Dr_ansi>&nbsp;=20
ORDER-ITEMS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT> =
<BR><FONT=20
face=3Dr_ansi>&nbsp;=20
OO-TRX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
0</FONT>&nbsp;<BR><FONT=20
face=3Dr_ansi>&nbsp;=20
LASTOO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT>=20
</FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT =
face=3Dr_ansi>Finished.</FONT> <BR><FONT=20
face=3Dr_ansi>&gt;=20
</FONT></FONT></FONT></P><BR><BR><BR><BR><BR></SPAN></FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> David Morrison - =
Corporate=20
  [mailto:dmorrison@mcbrideelectric.com]<BR><B>Sent:</B> Thursday, =
December 09,=20
  2004 1:39 PM<BR><B>To:</B> Tim Cummings; Cognos Powerhouse List=20
  (E-mail)<BR><B>Subject:</B> RE: Problem updating last record written =
at sort=20
  break in QTP<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff=20
  size=3D2>Tim,</FONT></SPAN></DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff =
size=3D2>I'm not sure=20
  what's causing the QTP error; I think you need to include more of the =
program=20
  (e.g., the reference to LastOq).</FONT></SPAN></DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff =
size=3D2>Side=20
  issues:&nbsp; Using&nbsp; " * .01 " may be faster and/or more =
accurate than "=20
  / 100", and there's no need to ever multiply by =
-1.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff=20
  size=3D2>Thanks.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff =
size=3D2>David=20
  Morrison</FONT></SPAN></DIV>
  <BLOCKQUOTE><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT>&nbsp;</BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C4DE22.D7AED4B0--