<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2800.1589" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText43545 dir=ltr>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>I think&nbsp;the problem&nbsp;is; you are not doing export after you assign value to partno variable before QTP run.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>export partno="9117598"</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>qtp auto=./CHANGE_DTD.qtc<FONT face="Times New Roman" size=3> </FONT></FONT></DIV>
<DIV dir=ltr>
<DIV dir=ltr><FONT face=Arial size=2>should work fine. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<DIV dir=ltr>In your QTP... choose prn (nconv(getsystemval("partno")))&nbsp; &nbsp;would also work fine. </DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Sagar Goparaju</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> powerh-l-bounces+vidyasagar.goparaju=kewill.com@lists.sowder.com on behalf of Pandurang Rajpurohit<BR><B>Sent:</B> Thu 4/12/2007 1:28 AM<BR><B>To:</B> powerh-l@lists.sowder.com<BR><B>Subject:</B> Use variable of shell script in QTP<BR></FONT><BR></DIV>
<DIV><BR><FONT face=sans-serif size=2>Hello freinds,</FONT> <BR><BR><FONT face=sans-serif size=2>Can any one suggests me how to make use of variable decalred in shell script &nbsp;in QTP. Please find code below</FONT> <BR><BR><BR><FONT face=sans-serif size=2>&nbsp;vi change_dtd.ksh</FONT> <BR><FONT face=sans-serif size=2>. $PIC_UTIL/cop_env.ksh</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>export partno</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>echo &nbsp;"Enter part number (maximum 12 character) \n"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>read partno</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>echo "\nEnter suplier code (maximum 12 character)\n"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>read src</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>echo &nbsp;"\nEnter dtd flag value\n"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>read dtd</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>partno="9117598"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>echo $partno</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>rm dtdtest_s.sf</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>rm dtdtest_s.sfd</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>qtp auto=./CHANGE_DTD.qtc</FONT><FONT size=3> <BR></FONT><BR><FONT face=sans-serif size=2>vi change_dtd.qts</FONT> <BR><FONT face=sans-serif size=2>RUN changeDeliverFlag</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>set process nolimit</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>Request change_vprecord</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>;define w-part-no char*12=" &nbsp; &nbsp; 9117598"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>;define w-supplier char*10="E5013286"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>define w-part-no char*12=RJ(GETSYSTEMVAL("partno"))</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>;GLOBAL TEMPORARY w-part-no &nbsp; &nbsp;CHAR*122 &nbsp;INITIAL getsystemval("partno")</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>;define w-dtd char*1="Y"</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>acc vp-record</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>choose prn (w-part-no)</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>subfile dtdtest_s &nbsp;keep include prn, src, dtd of &nbsp;vp-record</FONT><FONT size=3> </FONT><FONT face=sans-serif size=2><BR>BUILD CHANGE_DTD</FONT><FONT size=3> </FONT><BR><BR><BR><FONT face=sans-serif size=2>Thanks &amp; Regards<BR>Pandurang Rajpurohit,<BR><BR>------------------------------------------------------------------------------------<BR>IBM India Private Limited,<BR>Seat No 268, 4th Floor, Tower B, Tech Park One, <BR>S.No 19/A/2A/1/2, Near DON BOSCO School,<BR>Off Airport Road, Yerwada, PUNE 411006<BR>Phone (Br) : &nbsp;+91 020 40115000 - 16322<BR>Phone (Dir) : +91 020 40116322<BR>Cell : +91-09922054662<BR>EMAIL : pandurang.rajpurohit@in.ibm.com </FONT></DIV></BODY></HTML>