>
> Hello,
> I am undergoing training in MPE/ix on HP-3000.
> While undergoing the BUILD command, I am finding diffiulty in
> variable length recsize.
>
> I gave the following command :
>
> BUILD testing ; rec=100,10,v,ascii
>
> I received the following output on doing LISTF ,2
>
>
> ACCOUNT= TRAINING GROUP= ROSHAN
>
> FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
> SIZE TYP EOF LIMIT R/B SECTORS #X MX
>
> TESTING 2018B VA 0 1023 1 0 0 *
>
> See the recsize of testing
>
> Ideally it should be 200B. and R/B should be 10.
>
> Why does Testing show 2018B here.
>
> I would appreciate any direct reply to me as I have set DIGEST option.
>
> Thanks in advance.
>
>
> --------------------------------------------------------------------------
> Roshan Priyavadan Shah
> Software Engineer ( MicroGiga ), II floor,
Assuming :build foo;rec=-r,b,v,ascii
The physical record (in bytes) is (b*(r+2))+2. There are two bytes per
record for length and two bytes per block for an end-of-block terminator.
For example: file foo;rec=-200,10,v,ascii should result in a physical
block of (10*(200+2))+2 = 2022. As this point, blocking factor is forgotten.
You can write as many records in the block as will fit. It's as if you said:
:build foo;rec=-2022,1,v,ascii.
Interestingly, if you actually perform the build (-200,10), the record size
is shown as 2018. Hmmm, where does that come from? Well, the file system says:
if we publish the number 2022 as the record size, someone might actually try to
write a record that big and it will fail! Why? Well, 2 bytes for length,
2022 bytes of data and 2 bytes for end-of-block terminator equals 2026, oops,
4 bytes two many. So the file system publishes the record size as four bytes
less than the block size just in case you want to write that mega record.
BUT!!! The file system only performs the subtract 4 business if the blocking
factor is greater than 1. If you perform the build (-2022,1), the record size
is shown as 2022 and the block size is 2026 so you really can write the mega
record.
--------------------------------------------------------------------
Ross Scroggs email: [log in to unmask]
Telamon, Inc. CIS: 76011,2234
492 Ninth Street, Suite 310 voice: 510-987-7700
Oakland, CA 94607-4098 fax: 510-987-7009
--------------------------------------------------------------------
|