QTP Update question.....

Pickering, John (NORBORD) PICKERIJ@norbord.com
Tue, 23 Jan 2001 10:30:25 -0500


Mike

You will need to update POLICY-MASTER at POLICY-NO. Otherwise you will
update it for the first VIN and then Qtp will find that the database record
has been changed when you come to update it for the second and subsequent
subfile records for the same POLICY-NO.

You'll need to add a sort on policy-no to the request or sorted if the
subfile is already guaranteed to be in policy number sequence. Then you can
update policy-master at policy number. You'll also need to change those
items statements -- I think if you simply change 'final' to '=' it should
work as you want.

Regards,
JWP

> -----Original Message-----
> From:	Lafferty, Mike [SMTP:Mike.Lafferty@AIG.COM]
> Sent:	Tuesday, January 23, 2001 9:46 AM
> To:	'powerh-l@sphere.swau.edu'
> Subject:	QTP Update question.....
> 
> Good morning all, 
>      I had posted a QUICK SELECTBOX question about 3 weeks ago, on which I
> am still working and making great strides, thanks to everyone's wonderful
> assistance....I'll let you know how that one turns out, when I get back to
> it (you all know about 'shifting gears' in the software world)....meaning
> I've been taken off that to work on something else more pressing.....
> 
> In the meantime, I have turned my attention to some QTP updates....The
> situation is this....It's an automobile insurance application....I link
> the POLICY-NO from the subfile to the POLICY-NO of the POLICY-MASTER
> dataset and update the appropriate VIN numbers (up to OCCURS 6) for that
> policy....while doing this, I encountered the error message "Record has
> been changed since you last found it"....This occurs when I have more than
> one vehicle per policy....Each subfile record contains a POLICY-NO, a VIN
> and a VINTO to do a compare....I listed some example data from the subfile
> below....I have tried several alternatives including OUTPUT AT FINAL and
> OUTPUT AT POLICY-NO and also some DEFINES for the array values thinking
> QTP was not evaluating them properly, all to no avail.....Maybe my
> approach to the problem is a little lopsided....
> 
> We're running PH version 6.09D on a HP3000 979-100..... 
> 
> I think I need some help ! (tongue-in-cheek)...... 
> 
> 
> SET DICT FROMDDC                                                   
> REQ VINUPDT INPUT LIMIT 100000
> & 
>             ON CALCULATION ERRORS REPORT
> & 
>             ON EDIT ERRORS REPORT 
> SET LOCK FILE UPDATE 
> ACC *FROMPOLF LINK TO POLICY-MASTER LINK TO RENEW-POL-MASTER OPT 
> 
> OUT POLICY-MASTER UPD ON ERRORS REPORT & 
>   ITEM P-VEH-VIN-NUMBER(1) FINAL VIN     IF P-VEH-VIN-NUMBER(1) = VINTO
> ELSE & 
>        P-VEH-VIN-NUMBER(1) 
>   ITEM P-VEH-VIN-NUMBER(2) FINAL VIN     IF P-VEH-VIN-NUMBER(2) = VINTO
> ELSE & 
>        P-VEH-VIN-NUMBER(2) 
>   ITEM P-VEH-VIN-NUMBER(3) FINAL VIN     IF P-VEH-VIN-NUMBER(3) = VINTO
> ELSE & 
>        P-VEH-VIN-NUMBER(3) 
>   ITEM P-VEH-VIN-NUMBER(4) FINAL VIN     IF P-VEH-VIN-NUMBER(4) = VINTO
> ELSE & 
>        P-VEH-VIN-NUMBER(4) 
>   ITEM P-VEH-VIN-NUMBER(5) FINAL VIN     IF P-VEH-VIN-NUMBER(5) = VINTO
> ELSE & 
>        P-VEH-VIN-NUMBER(5) 
>   ITEM P-VEH-VIN-NUMBER(6) FINAL VIN     IF P-VEH-VIN-NUMBER(6) = VINTO
> ELSE & 
>        P-VEH-VIN-NUMBER(6) 
> 
<data snipped>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.