Incrementing a counter.
Joe Boyle
atla38@dsl.pipex.com
Tue, 24 May 2005 14:55:15 +0100
in that case, and if you are unhappy using a subfile, add a second line to
set the variable and it should work,
req gtnxt
acc getnxt
choose reckey n
define dkey int = 1 &
if setsystemval ("NXTKEYVAR" , ascii (nxtkey of gtnxt, n ) )
output gtnxt update
item nxtkey = nxtkey + k
subfile newkey keep include dkey
I always found the subfile creation was necessary to action the setsystemval
in any case.
I would always prefer to use ghost screens for this kind of thing, but I
think it's a little trickier on mpe.
Regards, Joe.
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Robert Mills
Sent: 24 May 2005 14:37
To: Joe Boyle; powerh-l@lists.sowder.com
Subject: RE: Incrementing a counter.
I have an MPE batch job that need to calculate the next number in a
sequence that will be used later on. The previous number is held in an
Image dataset. This number has to be incremented by the batch job prior
to being used. Inline QTP seamed the best/easiest way to do it.
regards,
Robert W.Mills
Systems Development Manager
Windsong Services
(020) 8309 3604
-----Original Message-----
From: Joe Boyle [mailto:atla38@dsl.pipex.com]
Sent: 24 May 2005 14:32
To: Robert Mills; powerh-l@lists.sowder.com
Subject: RE: Incrementing a counter.
most systems loose the variable after the process is returned from, so
how about add a request to get the next number as below, and then access
a subfile ( which will default to the users local area )
req gtnxt
acc getnxt
choose reckey n
define dkey int = nxtkey of gtnxt
output gtnxt update
item nxtkey = nxtkey + k
subfile newkey keep include dkey
but you can do all of that in quick anyway, and without a subfile, so
why
call a qtp ?
Regards, Joe.
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Robert Mills
Sent: 24 May 2005 13:47
To: powerh-l@lists.sowder.com
Subject: QTP: Incrementing a counter.
Greetings to the -L,
Using QTP I need to increment a counter in a dataset (MPE/Image) and
return a copy of the incremented value in a system variable via
SETSYSTEMVAL.
Suggestions/examples on how to do it would be welcome.
regards,
Robert W.Mills
Systems Development Manager
Windsong Services
(020) 8309 3604
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to
powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@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.
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@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.