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> </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. =
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> </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> </DIV>
<DIV><FONT face=3D"Courier New" color=3D#0000ff size=3D2><SPAN=20
class=3D625244418-09122004></SPAN></FONT> </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"> ACCESS=20
ORDER-ITEMS &</FONT> <BR><FONT face=3D"Courier =
New"> =20
LINK XXX OF ORDER-ITEMS &</FONT> <BR><FONT=20
face=3D"Courier New"> TO PR-XXX OF=20
XXX-RATIO</FONT> <BR><FONT face=3D"Courier New"> =
</FONT><BR><FONT=20
face=3D"Courier New"> </FONT><BR><FONT face=3D"Courier =
New"> =20
DEFINE SPOILED-CREDITS INTEGER SIGNED SIZE 4 =3D BR-CREDITS of =
order-items=20
&</FONT> <BR><FONT=20
face=3D"Courier =
New"> &=
nbsp; &=
nbsp; &=
nbsp; =
* QUANTITY-ON-HAND of order-items &</FONT> <BR><FONT=20
face=3D"Courier =
New"> &=
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"> =20
TEMPORARY CREDIT-TOTAL NUM*8</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New"> SORT=20
ON ITEM-NO</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier =
New"> 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"> =20
OUTPUT TRANSACTIONS ADD NOITEMS ALIAS Oo-TRX</FONT> <BR><FONT=20
face=3D"Courier New"> ITEM=20
UNIT OF =
Oo-TRX=20
INITIAL "9999999999"</FONT> <BR><FONT face=3D"Courier =
New"> ITEM=20
TRAN-KEY OF Oo-TRX INITIAL "Oo" + =
ITEM-NO +=20
PR-PREFIX</FONT> <BR><FONT face=3D"Courier New"> ITEM =
CREDITS OF Oo-TRX =
FINAL =20
SPOILED-CREDITS</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3D"Courier New"> =
; =20
OUTPUT TRANSACTIONS UPDATE ALIAS LASTOo AT ITEM-NO &</FONT> =
<BR><FONT=20
face=3D"Courier New"> VIA TRAN-KEY =
USING "Oo"=20
+ ITEM-NO + PR-PREFIX &</FONT> <BR><FONT=20
face=3D"Courier New"> IF 0 =
<>=20
(BR-CREDITS * QUANTITY-ON-HAND - CREDIT-TOTAL)</FONT> <BR><FONT=20
face=3D"Courier New"> 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. =
=
=20
[3] </FONT><BR><FONT face=3Dr_ansi> File: =
LASTOO</FONT><BR><FONT=20
face=3Dr_ansi> Linkitem: UNIT</FONT> =
<BR><FONT=20
face=3Dr_ansi> Linkitem: LINK-UNIT</FONT> =
<BR><FONT=20
face=3Dr_ansi> Linkitem: =20
TRAN-KEY &nbs=
p; &nbs=
p; =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> =20
ORDER-ITEMS &=
nbsp; &=
nbsp; =20
5,790</FONT> <BR><FONT face=3Dr_ansi> =20
XXX-RATIO &nb=
sp; &nb=
sp; =20
3</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT =
face=3Dr_ansi>Transactions=20
processed: &n=
bsp; =20
3</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT face=3Dr_ansi>Records=20
processed: &n=
bsp; =20
Added Updated Unchanged =
Deleted</FONT>=20
<BR><FONT face=3Dr_ansi> =20
ORDER-ITEMS &=
nbsp; &=
nbsp; =20
0 =20
0 =20
0 0</FONT> =
<BR><FONT=20
face=3Dr_ansi> =20
OO-TRX =
=
=20
3 =20
0 =20
0 =
0</FONT> <BR><FONT=20
face=3Dr_ansi> =20
LASTOO =
=
=20
0 =20
0 =20
0 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>>=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> </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> </DIV>
<DIV><SPAN class=3D608573018-09122004><FONT color=3D#0000ff =
size=3D2>Side=20
issues: Using " * .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> </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> </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> </BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C4DE22.D7AED4B0--