Use variable of shell script in QTP
Joe Boyle
atla38 at dsl.pipex.com
Thu Apr 12 11:24:21 CDT 2007
It is very unusual to have leading spaces in an index segment, have you
confirmed that the data is set this way ?
I would run some tests in quiz to ensure that the key value env var is
actually being read in, there are other methods as below, but whenever I
have used your choose approach I always used defines rather than temp items,
if the key value is being retrieved then I suspect that the leading spaces
are the problem,
can cle
acc file_lock
choose Orderid systemvalue "Orderid"
rep all
go
acc file_lock
define d_Orderid = nconvert(getsystemval("Orderid"))
choose Orderid (d_Orderid)
rep all
go
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
Pandurang Rajpurohit
Sent: 12 April 2007 06:29
To: powerh-l at lists.sowder.com
Subject: Use variable of shell script in QTP
Hello freinds,
Can any one suggests me how to make use of variable decalred in shell script
in QTP. Please find code below
vi change_dtd.ksh
. $PIC_UTIL/cop_env.ksh
export partno
echo "Enter part number (maximum 12 character) \n"
read partno
echo "\nEnter suplier code (maximum 12 character)\n"
read src
echo "\nEnter dtd flag value\n"
read dtd
partno="9117598"
echo $partno
rm dtdtest_s.sf
rm dtdtest_s.sfd
qtp auto=./CHANGE_DTD.qtc
vi change_dtd.qts
RUN changeDeliverFlag
set process nolimit
Request change_vprecord
;define w-part-no char*12=" 9117598"
;define w-supplier char*10="E5013286"
define w-part-no char*12=RJ(GETSYSTEMVAL("partno"))
;GLOBAL TEMPORARY w-part-no CHAR*122 INITIAL getsystemval("partno")
;define w-dtd char*1="Y"
acc vp-record
choose prn (w-part-no)
subfile dtdtest_s keep include prn, src, dtd of vp-record
BUILD CHANGE_DTD
Thanks & Regards
Pandurang Rajpurohit,
----------------------------------------------------------------------------
--------
IBM India Private Limited,
Seat No 268, 4th Floor, Tower B, Tech Park One,
S.No 19/A/2A/1/2, Near DON BOSCO School,
Off Airport Road, Yerwada, PUNE 411006
Phone (Br) : +91 020 40115000 - 16322
Phone (Dir) : +91 020 40116322
Cell : +91-09922054662
EMAIL : pandurang.rajpurohit at in.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6750 bytes
Desc: not available
Url : http://lists.sowder.com/pipermail/powerh-l/attachments/20070412/e8b7dfae/winmail.bin
More information about the powerh-l
mailing list