[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Size of flat file



Yes, that is correct ... in the open, it is the size of the largest record in a 
variable length record file. The size in the Read does not matter as long as it 
is equal to or greater than the size specified in the Open (if it is less, you 
will encounter some truncation of the record as it is moved from the I/O 
buffer). 

It is not the size of the header itself that I was referring to, but the 
specification of the maximum length of the records in a variable length file 
(or record size if a fixed record length file). Some operating systems will 
validate the record size specification contained in the file header against the 
record size specified in the Open statement.

>>> radhika_05@hotmail.com 2005/06/24 16:24:50 >>>

But when i read some documentation about Open, it says that when it is 
Vary(which is default), it is max size of the record allowed and used mainly 
if records are of different sizes(here it is 301).

I am assuming that Read should have been less than 301 as that is the max 
size allowed.

though i have header in my flat file i am assuming that we are not concerned 
about the size of the header.

Is my assumption correct?

Thanks.

>From: "PeterG Clark" <PeterG.Clark@vac-acc.gc.ca>
>Reply-To: "This list is for discussion about the SQR database 
>reportinglanguage from Hyperion Solutions." <sqr-users@sqrug.org>
>To: <sqr-users@sqrug.org>
>Subject: Re: [sqr-users] Size of flat file
>Date: Fri, 24 Jun 2005 13:40:37 -0300
>
>In this particular case, there will be no effect upon your program, however 
>it it had been the reverse (400 on the Open and 301 on the Read) you would 
>have encountered some truncation.
>
>I believe that the length specified on the open is used on some platforms 
>by the O/S to validate that the (maximum) length specified matches the 
>entry in the file header (on an open for read) or to establish the file 
>header on the media for an open for write.
>
>The length specifies how much of the record in the buffer will be moved to 
>the specified variable. So, if the open had specified 400 but your read 
>only 301, up to 99 bytes at the end of your record would be truncated as it 
>was moved into $record. In some instances this may be exactly what you want 
>to do if you had a huge record but were only interesting in looking at the 
>first few fields.
>
>
> >>> radhika_05@hotmail.com 2005/06/24 11:30:13 >>>
>Hi,
>
>    I never thought that there would be difference in specifying the flat
>file size in first statement and second statement. But I see that the size
>in first statement is 301 and in second it is 400. what is the difference?
>
>
>Statement 1:      OPEN $filename1  AS 10
>                         FOR-READING
>                         RECORD=301:VARY
>                         STATUS = #OPEN1
>
>Statement 1:     while 1 = 1
>                         read 10 into $record:400
>
>Thanks
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today - it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ 
>
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org 
>http://www.sqrug.org/mailman/listinfo/sqr-users 
>
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org 
>http://www.sqrug.org/mailman/listinfo/sqr-users 

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ 


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users