Performance Questions and a little need for some education. - Output Phase reading
Ken Langendock
ken.langendock at rogers.com
Wed Aug 19 09:44:25 CDT 2009
In this case, yes, this was only an example of how to code an OUTPUT PHASE
READ. But if you are also need to pull another dozen descriptions it can all
be done in one request.
Rather than complicate the code I kept it simple.
You all know your systems and your reports, look at them and see if there is
an opportunity
Ken
From: David Morrison [mailto:DMorrison at mcbrideinc.com]
Sent: August 18, 2009 4:51 PM
To: Ken at Langendock.com; powerh-l at lists.sowder.com
Subject: [Bulk] RE: Performance Questions and a little need for some
education. - Output Phase reading
Ken,
Wow, I don't think I've seen that trick before!
Wouldn't it be more straightforward (and execute faster?) to break this
snippet into 2 requests:
REQUEST ONE
ACCESS Orders &
LINK OrderNumber OF Orders &
TO OrderNumber &
OF OrderDetails
SORT ON ProductNumber OF OrderDetails &
ON DateLastOrder OF OrderDetails
SUBFILE subfile1 &
TEMPORARY &
INCLUDE whatever
SET FILE Orders OPEN READ
SET FILE OrderDetails OPEN READ
REQUEST TWO
ACCESS subfile1 &
LINK ProductNumber
OF Subfile1
TO ProductNumber
OF Products
SUBFILE subfile2 KEEP INCLUDE
Subfile1, ProductName
SET FILE subfile1 OPEN READ
SET FILE Products OPEN READ
David Morrison
IT Department
858-450-1414 ext. 4211
_____
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 Ken Langendock
Sent: Tuesday, August 18, 2009 1:20 PM
To: powerh-l at lists.sowder.com
Subject: RE: Performance Questions and a little need for some education. -
Output Phase reading
Yep that is what I meant.
The advantages:
If you relate this to a QUICK screen; you have a Primary file and some
detail/secondary files and reference files.
In QTP the only thing you need to access (via the ACCESS statement are the
Primary and/or Secondary/detail files.
All other files can be read in the OUTPUT PHASE (obviously that rule is
subjective depending on the desired record complex).
For example:
In a screen you could have:
FILE Orders PRIMARY
FILE OrderDetails DETAIL
FILE Products REFERENCE
Show the order info, detail info and the product description.etc.
In QTP you can set the same thing up like this:
ACCESS Orders &
LINK OrderNumber OF Orders &
TO OrderNumber &
IN OrderDetails
SORT ON ProductNumber OF OrderDetails &
ON DateLastOrder OF OrderDetails
OUTPUT Products &
AT ProductNumber &
ADD &
UPDATE &
NOITEMS &
IF 1 EQ 2 &
VIA ProductNumber &
USING ProductNumber OF OrderDetails
SUBFILE subfile1 &
KEEP &
AT ProductNumber &
INCLUDE whatever
Ken
From: Dan Lambshead [mailto:dlambshe at milk.org]
Sent: August 18, 2009 3:25 PM
To: Ken at Langendock.com; powerh-l at lists.sowder.com
Subject: [Bulk] RE: Performance Questions and a little need for some
education.
Hi Ken,
Just wondering what you mean by "Output Phase Read". Is that when you do
an Output ... if 1 = 2 ... or something like that, so you are only doing a
read? I have seen that before, but now am trying to remember what the
advantages are (if that's what you're talking about).
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20090819/a3b94fb3/attachment-0001.htm
More information about the powerh-l
mailing list