Record sequence numbers in QTP

Robert Mills robert.mills at pinnaclearvato.co.uk
Fri Jun 8 11:21:04 CDT 2007


David,
 
Needed to include an 'item t-seq initial -1' before the 'item t-seq =
t-seq + 2' else the sequence numbers started at 2.
 
Looks as if you get the trophy.
 

regards, 
  
Robert W.Mills 
Systems Development Manager 
Pinnacle Arvato 
(020) 8309 3604 

 

  _____  

From: David Morrison - Corporate [mailto:dmorrison at mcbrideelectric.com] 
Sent: 08 June 2007 16:31
To: Robert Mills; powerh-l at lists.sowder.com
Subject: RE: Record sequence numbers in QTP


Robert,
 
Try this:  Instead of using "t-seq count" to control your counter, you
could create your own counter that increments by 2 for each record.
 
item t-seq = t-seq + 2
 
Use d-seq for the customer output.  
 
Define d-seq1 = d-seq + 1
 
for the address output.
 
Define d-seq2 = d-seq + 2 for the final trailer output.
 
Thanks.
 
David Morrison

	-----Original Message-----
	From:
powerh-l-bounces+dmorrison=mcbrideelectric.com at lists.sowder.com
[mailto:powerh-l-bounces+dmorrison=mcbrideelectric.com at lists.sowder.com]
On Behalf Of Robert Mills
	Sent: Friday, June 08, 2007 8:20 AM
	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 

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20070608/09906a43/attachment.htm


More information about the powerh-l mailing list