Alias and Buffering

Deskin, Bob Bob.Deskin at Cognos.COM
Wed Jan 4 20:56:40 CST 2006


I don't know how definitive this will be but let's nip this one in the bud before it gets out of hand. If we're talking about buffers, then ALIAS and/or OPEN have nothing to do with it. Every time you declare a FILE, you are declaring buffers for that file. The FILE statement says that you want to access (read/write/update/delete/whatever) a file and therefore need an area to do that accessing. What ALIAS does is allow you to declare the same file more than once because each declaration must have a unique name. Saying OPEN 1, assuming the original was not 1, deals with the physical file opens, not the buffers.
 
Here's an example:
 
In PDL you have:
 
FILE A ORG INDEXED
RECORD A1
...
RECORD A2
...
 
This gives you two logical layouts for the same physical file. Let's say that the layouts are the same for this example.
 
Now consider these QDESIGN statements:
 
SCREEN T1
FILE A1 PRIMARY
FILE A2 SECONDARY
 
and
 
SCREEN T2
FILE A1 PRIMARY
FILE A1 SECONDARY ALIAS A2
 
These two screens would give the same results and each has the same buffers.
 
Bob

-----Original Message-----
From: powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com [mailto:powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com]On Behalf Of Ken Langendock
Sent: January 4, 2006 5:51 PM
To: powerh-l at lists.sowder.com
Subject: RE: Alias and Buffering


John, I highly doubt that.
 
If I'm not mistaken, by saying "OPEN 1" on a file statement you cause quick to open a separate buffer for that instance of the file. If your boss was right, there would be no need for that OPEN statement. I believe you are correct in saying the ALIAS is merely a tool for addressing a file under a different name.
Of course the definitive answer has to come from the Man himself...
Bob??? Your comments please.
 
Oh and BTW, I was a consultant from Cognos....many many years ago too.
Ken
 
 
-----Original Message-----
From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com [mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com] On Behalf Of John Stires
Sent: January 4, 2006 5:18 PM
To: powerh-l at lists.sowder.com
Subject: Alias and Buffering


We had a lively discussion this morning concerning aliases in Quick, QTP and QUIZ.  At issue was the idea that if you use an ALIAS, as in a file statement in QDESIGN, you cause the program to buffer the file twice instead of once.  My boss was pretty adamant that a consultant from COGNOS was here some years ago and firmly told her about this extra buffering.  
 
Can that be true?  My thinking has always been that the ALIAS merely caused a minor cross reference or name translation within the program and nothing at all to do with file buffering or any other over head.
 
What is your say?
 
Thanks,
 
John Stires
Pencarver
 
     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20060104/536c3ac1/attachment.htm


More information about the powerh-l mailing list