A 16 bit restriction (!) in 64 bit Fortran - VMS

This is a discussion on A 16 bit restriction (!) in 64 bit Fortran - VMS ; Hi, I stumbled over a really stupid restrichtion: The actual HP Fortran Language Reference Manual says: "Table 122 Maximum Record Lengths (RECL) Record I/O Statement Format File Organization Formatted (bytes) Unformatted (longwords) Sequential 32767 8191 Relative 32255 8063 Indexed 32224 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: A 16 bit restriction (!) in 64 bit Fortran

  1. A 16 bit restriction (!) in 64 bit Fortran

    Hi,

    I stumbled over a really stupid restrichtion:

    The actual HP Fortran Language Reference Manual says:

    "Table 122 Maximum Record Lengths (RECL) Record I/O Statement Format
    File Organization Formatted (bytes) Unformatted
    (longwords)
    Sequential 32767 8191
    Relative 32255 8063
    Indexed 32224 8056

    Many compilers under other OSes allow much higher values of this
    "Maximum Record Length".
    I had to rewrite this direct access part by doing sequential I/O into
    seperate files. Alot of open/close
    calls slows down the program, too.

    Are any compiler developers reading C.O:V.postings in order to look at
    this problem?

    regards
    Eberhard

  2. Re: A 16 bit restriction (!) in 64 bit Fortran

    (comp.lang.fortran added)

    vaxinf@chemie.uni-konstanz.de wrote:

    > I stumbled over a really stupid restrichtion:


    > The actual HP Fortran Language Reference Manual says:


    > "Table 122 Maximum Record Lengths (RECL) Record I/O Statement Format
    > File Organization Formatted (bytes) Unformatted (longwords)
    > Sequential 32767 8191
    > Relative 32255 8063
    > Indexed 32224 8056


    > Many compilers under other OSes allow much higher values of this
    > "Maximum Record Length".


    I believe it is a restriction in RMS, not in Fortran. IBM's z/OS,
    using the file system left over from OS/360, I believe also has a
    similar restriction.

    I do wonder about the 32255 and 32224, but 2**15-1 is common
    when using 16 bit (signed) length fields in record descriptors.

    In most cases, it isn't hard to work around these restrictions,
    if they are considered when first writing such programs.

    -- glen


  3. Re: A 16 bit restriction (!) in 64 bit Fortran

    Glen Herrmannsfeldt wrote:
    > (comp.lang.fortran added)
    >
    > vaxinf@chemie.uni-konstanz.de wrote:
    >
    >> I stumbled over a really stupid restrichtion:

    >
    >> The actual HP Fortran Language Reference Manual says:

    >
    >> "Table 122 Maximum Record Lengths (RECL) Record I/O Statement Format
    >> File Organization Formatted (bytes) Unformatted (longwords)
    >> Sequential 32767 8191
    >> Relative 32255 8063
    >> Indexed 32224 8056

    >
    >> Many compilers under other OSes allow much higher values of this
    >> "Maximum Record Length".

    >
    > I believe it is a restriction in RMS, not in Fortran.


    I would also thought so. But then, how come it
    was a problem in the first case ? Wasn't it an RMS
    file that should have been read ?

    > IBM's z/OS, using the file system left over from OS/360,


    Left over ? I thought that they are the same, just renamed.

    Jan-Erik.

  4. Re: A 16 bit restriction (!) in 64 bit Fortran

    vaxinf@chemie.uni-konstanz.de wrote:
    > I stumbled over a really stupid restrichtion:
    >
    > The actual HP Fortran Language Reference Manual says:
    >
    > "Table 122 Maximum Record Lengths (RECL) Record I/O Statement Format
    > File Organization Formatted (bytes) Unformatted
    > (longwords)
    > Sequential 32767 8191
    > Relative 32255 8063
    > Indexed 32224 8056
    >
    > Many compilers under other OSes allow much higher values of this
    > "Maximum Record Length".
    > I had to rewrite this direct access part by doing sequential I/O into
    > seperate files. Alot of open/close
    > calls slows down the program, too.
    >
    > Are any compiler developers reading C.O:V.postings in order to look at
    > this problem?


    It is a limitation of the file system / record system. Records
    are limited to 32 KB. And the Fortran compiler can not do anything
    about it.

    I would say that we should have an ODS-6 with:
    * stream files with 4 GB limit
    * a new variable length record format with
    4 byte + data + pad + 4 byte (also 4 GB limit)
    * fixed length with 4 GB limit

    (I don't care about VFC !)

    But I seriously doubt that HP will invest in that.

    Arne

  5. Re: A 16 bit restriction (!) in 64 bit Fortran

    On Oct 28, 3:56*pm, Glen Herrmannsfeldt wrote:
    > (comp.lang.fortran added)
    >
    > vax...@chemie.uni-konstanz.de wrote:
    > > I stumbled over a really stupid restrichtion:
    > > The actual HP Fortran Language Reference Manual says:
    > > "Table 122 Maximum Record Lengths (RECL) Record I/O Statement Format


    > I believe it is a restriction in RMS, not in Fortran. *


    Right.

    > I do wonder about the 32255 and 32224, but 2**15-1 is common
    > when using 16 bit (signed) length fields in record descriptors.


    It is almost a 5 bit restriction. BUCKETSIZES are limited to 63 BLOCK
    or 512 bytes. Relative file buckets have 1 byte per-record overhead.
    Indexed file buckets have 15 bytes bucklet overhead plus up to 12
    bytes per record.

    > In most cases, it isn't hard to work around these restrictions,
    > if they are considered when first writing such programs.


    Too late now :-)

    Eberhard,

    You may want to just MAP the file, or use the 64 bits variants of SYS
    $READ/SYS$WRITE passing a RAB64. But both would be very VMS dependent
    techniques.

    Hein.







+ Reply to Thread