Operating System - OpenVMS
1752579 Members
4527 Online
108788 Solutions
New Discussion юеВ

Re: FORTRAN file open recl

 
Kin C. Wong
New Member

FORTRAN file open recl

Is it possible to write a formatted file with lines containing more than 32767 bytes (characters)? I'm using FORTRAN on an ALPHA system running OpenVMS 7.1. Is there a way to get around the maximum record length (RECL) of 32767?

Thanks,
Kin Wong
2 REPLIES 2
Hein van den Heuvel
Honored Contributor

Re: FORTRAN file open recl

No. Formatted file records are implemented directyl as RMS records, which have this 32767 byte restriction.

Now for Unformatted files, the records can be 'segmentend'. Segmented records can be as lon as you need through a systems of segments flags. Two bytes to indicated whether an RMS 'physical' record is the first or last (or first and list = single) of a fortran logical record. Such unformatted logical records can be long on top of limited length physical RMS records.

http://h18009.www1.hp.com/fortran/docs/vms-um/dfumio.htm#index_x_1821

hth,
Hein.
John Gillings
Honored Contributor

Re: FORTRAN file open recl

Kin,

As Hein says, these are the limits of RMS reflected through FORTRAN I/O. However, from an application perspective, there's nothing to stop you from implementing your own I/O routines which accept records of arbitrary length and map them to RMS files. In simplest form, just use internal WRITEs to format your records, then write them to unformatted files.
A crucible of informative mistakes