Global Temps in QTP

Harvey Orom harvey@oromconsulting.com
Wed, 08 Dec 2004 09:52:40 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0004_01C4DD0B.A8011B00
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit

Hi,

I am using Powerhouse 7.10.G1 and I am having a problem with global temps
being set in one request, but the values in the temps being dropped for the
request immediately following:

i.e

$ START_DATE :== "20010101"
$QTP
run runname
global temp g_start_date char*8

request ONE

access *xyz
item g_start_date = GETSYSTEMVAL("START_DATE",symbol)

select if starting_date of xyz > g_start_date

request TWO

access *abc

select if starting_date of abc > g_start_date


The first select in Request one works but the second one does not. The
mystery is that this code has been working in Production for years, but
fails in the test environment.

I can fix the problem as follows in the test environment, but why does it
work in prod?

global temp g_start_date char*8 initial GETSYSTEMVAL("START_DATE",symbol)

Has anyone else had a problem like this?

Thanks in advance... Harvey
Harvey Orom



------=_NextPart_000_0004_01C4DD0B.A8011B00
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D107193517-08122004>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D107193517-08122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>I am =
using=20
Powerhouse 7.10.G1 and I am having a problem with global temps being set =
in one=20
request, but the values in the temps being dropped for the request =
immediately=20
following:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D107193517-08122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>i.e=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D107193517-08122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>$ =
START_DATE :=3D=3D=20
"20010101"</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D107193517-08122004>$QTP</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>run=20
runname</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>global =
temp=20
g_start_date char*8 </SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D107193517-08122004></SPAN></FONT><FONT=20
face=3DArial size=3D2><SPAN =
class=3D107193517-08122004></SPAN></FONT><FONT face=3DArial=20
size=3D2><SPAN class=3D107193517-08122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D107193517-08122004>request=20
ONE</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D107193517-08122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>access =

*xyz</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004>item =
g_start_date =3D=20
<SPAN=20
class=3D107193517-08122004>GETSYSTEMVAL("START_DATE",symbol)</SPAN></SPAN=
></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004>select if =
starting_date=20
of xyz &gt; g_start_date</SPAN></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>request TWO</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>access *abc</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>select if starting_date of&nbsp;abc &gt;=20
g_start_date</SPAN></SPAN></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></SPAN></FONT>&nbsp;</DIV=
>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></SPAN></FONT>&nbsp;</DIV=
>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>The first select in Request one works but the =
second=20
one does not. <SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>The mystery is that this code has been =
working in=20
Production for years, but fails in the test=20
environment.</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPA=
N></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></SPAN></FONT>&nbsp;</DIV=
>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>I can fix the problem as follows in the test=20
environment, but why does it work in=20
prod?</SPAN></SPAN></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></SPAN></FONT>&nbsp;</DIV=
>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004>global temp =
g_start_date=20
char*8 initial <SPAN=20
class=3D107193517-08122004>GETSYSTEMVAL("START_DATE",symbol)</SPAN></SPAN=
></SPAN></SPAN></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FO=
NT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>Has anyone else had a problem like=20
this?</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FO=
NT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004><SPAN class=3D107193517-08122004><SPAN=20
class=3D107193517-08122004>Thanks in advance...=20
Harvey</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV>
<P><FONT face=3D"Arial Black" color=3D#000080>Harvey Orom</FONT> =
<BR></P>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0004_01C4DD0B.A8011B00--