Use variable of shell script in QTP

Daniel Rodríguez reasegurator at gmail.com
Fri May 11 05:29:01 CDT 2007


Hi Pandurang,

What you need is Right justify, and force the 12 positions:

define w-part-no char*12=RJ(GETSYSTEMVAL("partno")[1:12])

Kind Regards,

Daniel Rodriguez

2007/5/11, Pandurang Rajpurohit <pandurang.rajpurohit at in.ibm.com>:
>
>
> Hi Robert / Freinds,
>
> Actualy I am trying to pass 7 character data to QTP. Where i am assigning
> it 12 character  variable. I want addjust this left justified how it can be
> inmplemented. For example:
> In script;
>
> partno="9117598"
> export partno
>
> In QTP
> define w-part-no char*12=(GETSYSTEMVAL("partno"))
>
> I require w-part-no as "     9117598"
>
>
> if I use
>
> define w-part-no char*12=(LJ(GETSYSTEMVAL("partno")))
> is not working
>
> How can it be inplemented. Please suggest me.
>
>
>
> 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
>
>
>  *"Robert Mills" <robert.mills at pinnaclearvato.co.uk>*
>
> 05/11/2007 03:12 PM
>   To
> Pandurang Rajpurohit/India/IBM at IBMIN, <powerh-l at lists.sowder.com>  cc
>
>  Subject
> RE: Use variable of shell script in QTP
>
>
>
>
>
>
> Define my-variable Character *12 = UpShift(GetSystemVal("your unix
> variable"))
>
> ------------------------------
> *From:* powerh-l-bounces+robert.mills=
> pinnaclearvato.co.uk at lists.sowder.com [mailto:
> powerh-l-bounces+robert.mills=pinnaclearvato.co.uk at lists.sowder.com] *On
> Behalf Of *Pandurang Rajpurohit*
> Sent:* 11 May 2007 10:28*
> To:* powerh-l at lists.sowder.com*
> Subject:* Fw: Use variable of shell script in QTP
>
>
> Hi Freinds,
>
> A vairiable is defined in QTP of character 12. And i  am passing a
> vairiable of 8 character passing from Unix script to QTP. How this  7
> character data paased to QTP can be made 12 with left justified. And also
> the variable can be upper case. Please suggests.
>
>
> 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
> ----- Forwarded by Pandurang Rajpurohit/India/IBM on 05/11/2007 02:53 PM
> -----  *Pandurang Rajpurohit/India/IBM*
>
> 04/12/2007 10:58 AM
>
>   To
> powerh-l at lists.sowder.com  cc
>
>  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
>
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: &quot;subscribe&quot; in message body to
> powerh-l-request at lists.sowder.com
> Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in message body to
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to search the
> list archive at Google.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20070511/0cf995dc/attachment.html


More information about the powerh-l mailing list