Record sequence numbers in QTP
Joe Boyle
joeboyle_adt at hotmail.com
Fri Jun 8 11:53:40 CDT 2007
ok, better idea, ( I have been reminded that the final option is not allowed on temps ) and the 3rd temp is'nt required anyway,
subfile odscust alias cust keep include d-cust
item t-seq = t-seq + 1 init 1
subfile odscust alias addr keep include d-addr
item t-seq = t-seq + 1
subfile odscust alias tlr at final keep include d-tlr
----- Original Message -----
From: Joe Boyle
To: 'Robert Mills' ; powerh-l at lists.sowder.com
Sent: Friday, June 08, 2007 5:02 PM
Subject: RE: Record sequence numbers in QTP
In fact, I don't think that there is anything to stop you coding as below ( possibly with a little fine tuning )
item t-seq = t-seq + 1
subfile odscust alias cust keep include d-cust
item t-seq = t-seq + 1
subfile odscust alias addr keep include d-addr
item t-seq = t-seq + 1 at final
subfile odscust alias tlr at final keep include d-tlr
------------------------------------------------------------------------------
From: Joe Boyle [mailto:atla38 at dsl.pipex.com]
Sent: 08 June 2007 16:56
To: 'Robert Mills'; 'powerh-l at lists.sowder.com'
Subject: RE: Record sequence numbers in QTP
You could always run a second pass which updates the subfile along the lines below,
Acc * odscust
Temp t-num int*10
Item t-num = t-num + 1
Define d-final char*522 = d-cust[1:4] + ascii( t-num,10) + d-cust[5:507]
Output odscust update
Item cust final d-final
------------------------------------------------------------------------------
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 Robert Mills
Sent: 08 June 2007 16:20
To: powerh-l at lists.sowder.com
Subject: Record sequence numbers in QTP
Greetings to the -L,
Environment: QTP 8.49.D1 on MPE/iX 6.5
I have a program (see extract below) where for each record read I write two records (a customer and a customer address) to a subfile. When it has processed the last input record it writes a trailer record to the subfile. Each record written to the subfile needs a sequence number.
My problem is that each cust/addr record pair has the same sequence number. The tlr record has the same sequence number as the last cust/addr pair.
Any suggestions on how to correct this?
access custmstr
temporary t-seq
item t-seq count
define d-seq character *6 = ascii(t-seq,6)
define d-cust character *512 = "CUST" + d-seq + ...
define d-addr character *512 = "ADDR" + d-seq + ...
define d-tlr character *512 = "TLR" + d-seq + ...
subfile odscust alias cust keep include d-cust
subfile odscust alias addr keep include d-addr
subfile odscust alias tlr at final keep include d-tlr
regards,
Robert W.Mills
Systems Development Manager
Pinnacle Arvato
(020) 8309 3604
------------------------------------------------------------------------------
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" 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/20070608/90db2b63/attachment-0001.html
More information about the powerh-l
mailing list