Environment Variable question. QTP doesn't recognize env-variables

Joe Boyle atla38 at dsl.pipex.com
Sat Dec 17 04:02:59 CST 2005


Another alternative approach is to use a command file as follows, this way
you can set the value locally before executing the qtp,

Doqtp.cmd
Set PSLOC2=%%1
qtp dict=D:\HERDSPRD\Dictionary\hms.pdc
auto=D:\HERDSPRD\RemoteBuild\test.qtc
exit

the powerhouse/axiant syntax would go like that below,

let t_path = “string”
let t_run_command = “cmd /c d:\loc_path\ Doqtp.cmd “ + t_path
run command t_run_command 

The value in t_path will be passed to the script as parameter i.e. %1 of
possible %1 to %8 parameters. If you run the script locally you have to use
%1 only, if in batch use %%1 i.e. two percent signs.


Regards, Joe. 
________________________________________
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Syed Shahul Hameed Mustaffa
Sent: 17 December 2005 05:26
To: Joe Boyle; Ken at langendock.com
Cc: PowerHouse List
Subject: Re: Environment Variable question. QTP doesn't recognize
env-variables

Thanks Joe, Ken.
 
Joe! I checked #set.. from QTP. It is picking up the correct value. However
when I attempt to run the qtp (cmd /c qtp.exe
dict=D:\HERDSPRD\Dictionary\hms.pdc auto=D:\HERDSPRD\RemoteBuild\test.qtc)
it fails with the following error message. But in development it is working
without any problem. 
 
============ ERROR MESSAGE ======================
Data access error.
   File:  $PSLOC2\alupdd
Action Taken: Run terminated.
-------------------------------------
No such file or directory (ERRNO 2)
   File:  $PSLOC2\alupdd
-------------------------------------
Finished.
=================================================
 
Ken! This system environment variable is a permanant one (Created from
Windows MyComputer). The same code was working well before.
 
 
Regards,
SYED.
 
On 12/16/05, Joe Boyle <atla38 at dsl.pipex.com> wrote: 
Do you have embedded spaces in the path specified in your variable settings
?
 
If you go into qtp, and type '$set spsloc2' do you see the correct path
displayed ?
 
do
 
Regards, Joe. 
________________________________________
From: Syed Shahul Hameed Mustaffa [mailto: sshahulgm at gmail.com] 
Sent: 16 December 2005 18:06
To: PowerHouse List
Cc: Joe Boyle
Subject: Environment Variable question. QTP doesn't recongize env-variables 
 
Dear Gurus,
 
Quick Intro: I've migrated a PH/MPEIX application to AXIANT4GL/PH4GL/WINDOWS
(Thin Client).
 
I have  qtps to load the MPEIX/PH data into the WINDOWS/PH.
I used environment variable to identify the location of the data files.
 
eg 
set process
nolimit                                                                  
request ONE
acc *$PSLOC2\alupdd  alias PS_ALPRO_UPDATE_D  
                                                              
BUILD SMALL_TABLES_1 
;-------------------------------------
It was working well before. Last time I used these qtps to load my data.
Suddenly these qtps are not working. Because PH doesn't recognize the
environment variable.
I checked the environment variable. It is there and ok.
I recreated it and restarted the server too.
Still PH doesn't recognize the environment variable.
I tried changing the environment variable to another env-variable I'm using
in other qtps. PH not recognizing this variable too.
I had to hardcode a path in all my data load qtps to make it work. (That
proves, there is nothing wrong with the data files).
 
What could have gone wrong?
I'm using environment variables widely in my application.
If PH stops recognizing variables like this, it will be disaster. 
 
Can anyone please help me in this? I'll appreciate.
 
Regards,
SYED
 
 





More information about the powerh-l mailing list