Ideas on how to pass parms to QTP from QUICK
Joe Boyle
atla38 at dsl.pipex.com
Tue Sep 20 19:43:32 CDT 2005
You could do setsystemval in the screen before you run the qtp which in turn
would use getsystemval; the variable could either be a single string which
you unstring within the qtp, or have a setsystemval/getsystemval pair for
each parameter.
Or reference $1 to $8 as below again with getsytemvals in the qtp,
Let run_command = ". filespec.com " + field/para1 + " " + field/para2 + " "
+... + field/paran
run command = run_command
If you are AT'ing a file, you could simply use quiz to write the whole
contents to a file and then follow with a run command to AT the quiz output
file as below,
QTP << EOF
SET DICTIONARY MYDICT
ACCESS FILEA
CHOOSE FIELDA PARM
SUBFILE FILEB KEEP INCLUDE FILEA
GO
10
EXIT
EOF
.
And finally, you could write the details to a subfile from the screen, and
access the subfile record as you would a data file record e.g.
access * path/mysubfile link item to item of filea ...
if using this method the subfile has to exist before the screen is called if
it is a primary file, but probably not if its a designer file.
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
fernando.olmos at hpa.com.au
Sent: 21 September 2005 01:13
To: Glenn at Baxterit.com.au
Cc: powerh-l at lists.sowder.com
Subject: RE: Ideas on how to pass parms to QTP from QUICK
Thanks for the suggestion Glenn, but that is what I would have preferred to
do. We don't have such a record, otherwise I would have gone that way
already.
I need a solution that does NOT involve using record passing via an actual
record/data file. However, you did give me an idea, and that is to create
environment variables from QUICK (using RUN COMMAND "define var = 'value'")
and then interrogating the variable using GLOBAL TEMP in the QTP. Messy, but
may suffice.
Thanks
-----Original Message-----
From: Glenn at Baxterit.com.au [mailto:Glenn at Baxterit.com.au]
Sent: Wednesday, September 21, 2005 9:56 AM
To: Fernando Olmos
Cc: powerh-l at lists.sowder.com
Subject: RE: Ideas on how to pass parms to QTP from QUICK
Hi Fernando,
Its an old problem isnt it?
What about placing the screen temps etc in a USER_VARIABLES record written
to from the screen if you have one, and linking to that/those record/s
from the Qtp run.
Sincerely
Glenn Baxter
=======================
Baxter IT Solutions Pty Ltd
456 Victoria Parade, East Melbourne
Victoria, Australia 3002
p: 03-9415-8733
m: 0412-826-503
f: 03-9415-8911
e: glenn at baxterit.com.au
=======================
________________________________________
From: fernando.olmos at hpa.com.au [mailto:fernando.olmos at hpa.com.au]
Sent: Wednesday, 21 September 2005 9:25 AM
To: powerh-l at lists.sowder.com
Subject: Ideas on how to pass parms to QTP from QUICK
Anyone have a good programming model on how to call a QTP program from
within QUICK, but passing to it parameters (temporaries) from the calling
QUICK program?
The preferred method I used to get around this, was by using a "special" PH
dictionary record that would write text to a DAT file. I would then rename
the DAT file to BAT or COM (in VMS land) to run the batch script.
Effectively the program was building a batch script on-line and submitting
it into the queue to run.
ie:
Record: PASSTHRUREC
Schema: TEXTLINE x(255)
In quick I would have a program that would simply let TEXTLINE = "do script
command" and then I would use the RUN COMMAND to call the appropriate batch
submit command (in UNIX it's "at", in VMS it's SUBMIT).
Unfortunately, in my new role, management won't allow me to go this way (we
don't have the PH Architect license !!) so I need to look for alternatives.
I was hoping I could use the run command with some sort of parm passing via
the QTP command, but there is no parms that allow you to pass a value into
the called QTP program.
I hope this is not too confusing.
Thanks in advance.
Fernando Olmos
M.I.S.
HPA
Direct: 03 9217 5411
Mobile: 0410 382 857
Fax: 03 9217 5716
www.hpa.com.au
More information about the powerh-l
mailing list