Bizarre QTP problem

Richard Witkopp witkopp@idt.com
Mon, 1 Feb 1999 13:31:36 -0800


Probably the item AI-VENDOR-NBR initial AI-VEN-NBR statement
in the second request, the item is probably getting blanked
out. Try FINAL instead.

> Hello Everyone,
> 
> I'm having a problem where QTP isn't working as I expect. Consider the
> two requests below:
> ;--------------------------------------------------------------
> request GET-UNIQUE-VENDORS
> ;
> ;  Get unique vendor numbers from subfile. Make sure they
> ;  don't already exist in the Vendor Master Dataset.
> ;
> acc *BIINVFL link AI-VEN-NBR to AI-VENDOR-NBR of  &
>           AI-VENDOR-M optional
> select if not record AI-VENDOR-M exists
> sort on AI-VEN-NBR
> subfile BIINVFL2 keep at AI-VEN-NBR include BIINVFL
> ;---------------------
> ;   Put the vendors identified above into the master dataset
> ;
> request ADD-VENDOR-M
> ;
> access *BIINVFL2
> sorted on AI-VEN-NBR
> ;
> output AI-VENDOR-M add at start of AI-VEN-NBR
>      item AI-VENDOR-NBR initial AI-VEN-NBR
>      item AI-VENDOR-IND final   "    "
> ;---------------------------------------------------------
> 
> Fairly straightforward, Right? But, when I run the above 
> code, I get the
> following messages
> 
> Executing request GET-UNIQUE-VENDORS ...
> Records read:
>   BIINVFL                                223
>   AI-VENDOR-M                       46
> Transactions processed:                36
> Records processed:                     Added    Updated  Unchanged
> Deleted
>   BIINVFL2                                 9          0
> 0          0
> ((( 9 vendors in the subfile that don't exist in the master 
> file. Ok, so
> far.)))
> 
> Executing request ADD-VENDOR-M ...
> ------------------------------------------------------------
> Data access
> error.                                                         [1]
>    File:  AI-VENDOR-M
>      Linkitem:  AI-VENDOR-NBR
> Action Taken: Run terminated.
> ------------------------------------------------------------
> Attempt to add a duplicate value when UNIQUE KEY/INDEX was specified.
>    File:  AI-VENDOR-M
>      Linkitem:  AI-VENDOR-NBR
> ------------------------------------------------------------
> 
> Why am I getting this? How can the value be a duplicate when the first
> run did a 'select if not record exists' construct?  I've checked the
> subfile, and the 9 records it finds are indeed not in the 
> database, and,
> using the same login as the qtp that runs this process, I can add the
> records manually, using a quick screen, to the same dataset, so I know
> that PDL and Image security are ok.
> 
> I've tried several permutations of the above requests, 
> including: using
> only 1 request with optional linkages and select if not record exists
> constructs: using output add update constructs: moving the sort
> statement around. I've even tried PH819C2 and the Qtp Tracer, with no
> difference in output. QTP Tracer didn't show anything except the same
> error messages.
> 
> What am I doing wrong?
> 
> (Platform: HP3000, TurboImage, PH729C5 & PH819C2)
> ----------------------------------------------------------------------
>   John MacLerran
>   IT Systems Analyst                       email:   macljohn@isu.edu
>   Idaho State University                             V(208) 236-2872
>   http://www.isu.edu/~macljohn                       F(208) 236-3673
> ----------------------------------------------------------------------
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
> = = = = = = =
> Subscribe: "subscribe powerh-l" in message body to 
> majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to 
> majordomo@lists.swau.edu
> powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
> This list is closed, thus to post to the list, you must be a 
> subscriber.
> 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.