<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Jamie:<br><br> You may want to put a Select after your Output Delete.<br><br> In the following code we will delete one record if the two conditions are true.<br> the 'on error report' allows QTP to continue even if it could not find a record to delete.<br><br> ii) output masterfile delete alias master2 viaindex partno
using partno of trans_file &<br>
if activitycode of masterfile = "D" on errors report<br><br>
select master2 if activitycode of master2 = "D"<br><br>Happy New Year,<br>Peter Bateman<br><br>
<br><br><br><hr id="stopSpelling">From: ken.langendock@rogers.com<br>To: jarqueza@gmail.com; powerh-l@lists.sowder.com<br>Subject: RE: [Bulk] Re: Update Master File<br>Date: Tue, 29 Dec 2009 14:25:47 -0500<br><br>
<style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass span.ecxEmailStyle18
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{;}
@page Section1
{size:612.0pt 792.0pt;}
.ExternalClass div.ecxSection1
{page:Section1;}
</style>
<div class="ecxSection1">
<p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">See below</span></p>
<p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="ecxMsoNormal"><b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';">From:</span></b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';">
powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com
[mailto:powerh-l-bounces+ken.langendock=rogers.com@lists.sowder.com] <b>On
Behalf Of </b>Jaime A<br>
<b>Sent:</b> December 29, 2009 2:07 PM<br>
<b>To:</b> powerh-l@lists.sowder.com<br>
<b>Subject:</b> [Bulk] Re: Update Master File</span></p>
</div>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal" style="margin-bottom: 12pt;">Hi Ken<br>
<br>
I've tried and still getting error during compilation. Here is my situation:<br>
1. My Master file has two index key, one is activity_key
(partno+activitycode+activitydate+activitytime), this is defined as unique. The
other index key is a repeating index on partno.<br>
2. In one request, I have two outputs:<br>
i) output masterfile add update alias master1 viaindex
activity_key using partno of trans_file+<br>
activitycode of trans_file + activitydate of trans_file + activitytime of
trans_file &<br>
if transcode of trans_file = "U" or transcode of trans_file =
"A"<br>
ii) output masterfile delete alias master2 viaindex partno
using partno of trans_file &<br>
;
if activitycode of master2 = "D"<br>
if activitycode of masterfile = "D"<br>
For the above code, I got the following error:<br>
1. *E* Cant find the file for item named activitycode of master2.<br>
2. *W* Linkage should be via a unique index if the file is output only.<br>
<br>
Please could you help me to correct my program code? For the delete, I want to
delete those with the same partno and activitycode of master file =
"D". <br>
<br>
Thanks,<br>
Jaime</p>
<div>
<p class="ecxMsoNormal">On Mon, Dec 28, 2009 at 10:00 AM, <<a href="mailto:powerh-l-request@lists.sowder.com">powerh-l-request@lists.sowder.com</a>>
wrote:</p>
<p class="ecxMsoNormal">Send powerh-l mailing list submissions to<br>
<a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.sowder.com/mailman/listinfo/powerh-l">http://lists.sowder.com/mailman/listinfo/powerh-l</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:powerh-l-request@lists.sowder.com">powerh-l-request@lists.sowder.com</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:powerh-l-owner@lists.sowder.com">powerh-l-owner@lists.sowder.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of powerh-l digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. How to update a Master table (Jaime A)<br>
2. RE:[Bulk] How to update a Master table (Ken Langendock)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 27 Dec 2009 22:54:52 -0800<br>
From: Jaime A <<a href="mailto:jarqueza@gmail.com">jarqueza@gmail.com</a>><br>
Subject: How to update a Master table<br>
To: <a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a><br>
Message-ID:<br>
<<a href="mailto:3429621e0912272254h46477405gb0f24933ca10d323@mail.gmail.com">3429621e0912272254h46477405gb0f24933ca10d323@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hello,<br>
<br>
I want to process a transaction file and update the master file. The<br>
transaction file comes in with several transaction types which could be<br>
add<br>
(if not in master), update (if in master) or delete. There might be<br>
multiple update transaction which could depend on previous updates. So the<br>
processing<br>
should be done in a certain sequence based on how the events happening.
I<br>
know that if I use "Access Trans file link to Master File then do
an<br>
output<br>
at the end will give me an error as it will complain that I am accessing<br>
a<br>
record that has been updated". Please could somebody out
there expert in<br>
Powerhouse's QTP suggests how to code this program so I could do an<br>
add/update/delete (not in that order) without the error message?<br>
Thanks in advance,<br>
jamie<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.sowder.com/pipermail/powerh-l/attachments/20091227/bba2c28a/attachment-0001.html">http://lists.sowder.com/pipermail/powerh-l/attachments/20091227/bba2c28a/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 28 Dec 2009 12:48:16 -0500<br>
From: "Ken Langendock" <<a href="mailto:ken.langendock@rogers.com">ken.langendock@rogers.com</a>><br>
Subject: RE: [Bulk] How to update a Master table<br>
To: "'Jaime A'" <<a href="mailto:jarqueza@gmail.com">jarqueza@gmail.com</a>>,
<<a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a>><br>
Message-ID: <000f01ca87e5$ef424a40$cdc6dec0$@<a href="mailto:langendock@rogers.com">langendock@rogers.com</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
You need to access the master file in the output phase.<br>
<br>
<br>
<br>
Access TransFile<br>
<br>
<br>
<br>
Sort (if necessary)<br>
<br>
<br>
<br>
OUTPUT MasterFile &<br>
<br>
Add Update &<br>
<br>
NOITEMS & (if necessary)<br>
<br>
Via xxx using xxx<br>
<br>
<br>
<br>
Item xxx of MasterFile initial xxx of TransFile<br>
<br>
Item xxx of MasterFile FINAL xxx of TransFile<br>
<br>
Etc.<br>
<br>
<br>
<br>
<br>
<br>
That way it will update the master file for each transaction record and<br>
never give you the "record has changed since you found it" message.<br>
<br>
<br>
<br>
<br>
<br>
Ken<br>
<br>
<br>
<br>
From: powerh-l-bounces+ken.langendock=<a href="http://rogers.com">rogers.com</a>@<a href="http://lists.sowder.com">lists.sowder.com</a><br>
[mailto:<a href="mailto:powerh-l-bounces%2Bken.langendock">powerh-l-bounces+ken.langendock</a>=<a href="http://rogers.com">rogers.com</a>@<a href="http://lists.sowder.com">lists.sowder.com</a>] On<br>
Behalf Of Jaime A<br>
Sent: December 28, 2009 1:55 AM<br>
To: <a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a><br>
Subject: [Bulk] How to update a Master table<br>
<br>
<br>
<br>
Hello,<br>
<br>
I want to process a transaction file and update the master file. The<br>
transaction file comes in with several transaction types which could be<br>
add<br>
(if not in master), update (if in master) or delete. There might be<br>
multiple update transaction which could depend on previous updates. So the<br>
processing<br>
should be done in a certain sequence based on how the events happening.
I<br>
know that if I use "Access Trans file link to Master File then do
an<br>
output<br>
at the end will give me an error as it will complain that I am accessing<br>
a<br>
record that has been updated". Please could somebody out
there expert in<br>
Powerhouse's QTP suggests how to code this program so I could do an<br>
add/update/delete (not in that order) without the error message?<br>
Thanks in advance,<br>
jamie<br>
<br>
No virus found in this incoming message.<br>
Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>
Version: 9.0.722 / Virus Database: 270.14.122/2590 - Release Date: 12/28/09<br>
02:16:00<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.sowder.com/pipermail/powerh-l/attachments/20091228/f3fafd72/attachment-0001.htm">http://lists.sowder.com/pipermail/powerh-l/attachments/20091228/f3fafd72/attachment-0001.htm</a><br>
<br>
------------------------------<br>
<br>
--<br>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
Mailing list: <a href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a><br>
Subscribe: &quot;subscribe&quot; in message body to <a href="mailto:powerh-l-request@lists.sowder.com">powerh-l-request@lists.sowder.com</a><br>
Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in
message body to <a href="mailto:powerh-l-request@lists.sowder.com">powerh-l-request@lists.sowder.com</a><br>
<a href="http://lists.sowder.com/mailman/listinfo/powerh-l">http://lists.sowder.com/mailman/listinfo/powerh-l</a><br>
This list is closed, thus to post to the list you must be a subscriber.<br>
Add 'site:<a href="http://lists.sowder.com">lists.sowder.com</a>
powerh-l' to your search terms to search the list archive at Google.<br>
<br>
End of powerh-l Digest, Vol 55, Issue 5<br>
***************************************</p>
</div>
<p class="ecxMsoNormal"> </p>
<span style="font-size: 10pt; font-family: 'Arial','sans-serif';">No virus
found in this incoming message.<br>
Checked by AVG - www.avg.com<br>
Version: 9.0.722 / Virus Database: 270.14.123/2592 - Release Date: 12/29/09
02:47:00</span><BR>
</div>                                            <br /><hr />Windows Live: Keep your friends up to date <a href='http://go.microsoft.com/?linkid=9691810' target='_new'>with what you do online.</a></body>
</html>