Problem updating last record written at sort break in QTP
Johnson, Harold A EDUC:EX
Harold.A.Johnson@gems1.gov.bc.ca
Thu, 9 Dec 2004 11:22:56 -0800
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_01C4DE24.641458DE
Content-Type: text/plain;
charset="iso-8859-1"
I'd be inclined to fix the rounding errors so you don't need the final
record, if at all possible.
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com]On Behalf Of Tim Cummings
Sent: 2004 December 9 11:11 AM
To: Cognos Powerhouse List (E-mail)
Subject: RE: Problem updating last record written at sort break in QTP
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_01C4DE24.641458DE
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.1476" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D329152219-09122004><FONT face=3DArial =
color=3D#0000ff size=3D2>I'd be=20
inclined to fix the rounding errors so you don't need the final record, =
if at=20
all possible.</FONT></SPAN></DIV>
<DIV><SPAN class=3D329152219-09122004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D329152219-09122004></SPAN> </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>=20
powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com]<B>On=20
Behalf Of </B>Tim Cummings<BR><B>Sent:</B> 2004 December 9 11:11=20
AM<BR><B>To:</B> Cognos Powerhouse List (E-mail)<BR><B>Subject:</B> =
RE:=20
Problem updating last record written at sort break in =
QTP<BR><BR></FONT></DIV>
<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"> =20
ACCESS ORDER-ITEMS &</FONT> <BR><FONT=20
face=3D"Courier New"> LINK XXX OF ORDER-ITEMS =
&</FONT> <BR><FONT face=3D"Courier =
New"> =20
TO PR-XXX OF XXX-RATIO</FONT> <BR><FONT face=3D"Courier =
New"> =20
</FONT><BR><FONT face=3D"Courier New"> </FONT><BR><FONT=20
face=3D"Courier New"> DEFINE SPOILED-CREDITS INTEGER =
SIGNED SIZE 4 =3D=20
BR-CREDITS of order-items &</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">&nb=
sp; 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>=20
</FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT=20
face=3D"Courier New"> OUTPUT TRANSACTIONS ADD =
NOITEMS ALIAS=20
Oo-TRX</FONT> <BR><FONT face=3D"Courier New"> ITEM=20
UNIT OF =
Oo-TRX=20
INITIAL "9999999999"</FONT> <BR><FONT face=3D"Courier =
New"> =20
ITEM TRAN-KEY OF Oo-TRX INITIAL =
"Oo" +=20
ITEM-NO + PR-PREFIX</FONT> <BR><FONT face=3D"Courier =
New"> =20
ITEM CREDITS OF Oo-TRX=20
FINAL SPOILED-CREDITS</FONT> </FONT></FONT></P>
<P><FONT color=3D#0000ff><FONT size=3D2><FONT=20
face=3D"Courier New"> OUTPUT TRANSACTIONS UPDATE =
ALIAS LASTOo=20
AT ITEM-NO &</FONT> <BR><FONT=20
face=3D"Courier New"> VIA =
TRAN-KEY USING=20
"Oo" + 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: =20
LASTOO</FONT><BR><FONT face=3Dr_ansi> =
Linkitem: =20
UNIT</FONT> <BR><FONT face=3Dr_ansi> =
Linkitem: =20
LINK-UNIT</FONT> <BR><FONT face=3Dr_ansi> =20
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 =20
Deleted</FONT> <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 =20
0</FONT> <BR><FONT 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>=20
<BR><FONT 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=20
09, 2004 1:39 PM<BR><B>To:</B> Tim Cummings; Cognos Powerhouse List =
(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=20
program (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></BLOCKQUOTE></BODY></HT=
ML>
------_=_NextPart_001_01C4DE24.641458DE--