Computing.Net > Forums > OpenVMS > OpenVMS: Error reading NAMELIST fil

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

OpenVMS: Error reading NAMELIST fil

Reply to Message Icon

Name: tspham
Date: August 15, 2008 at 13:23:15 Pacific
OS: OpenVMS
CPU/Ram: 2
Product: HP
Comment:

Subject -> OpenVMS: Error reading NAMELIST files created by AXP... on I64


Hi All,

When dumping a namelist into a file, if one element of the namelist is a long string of 81 characters or more, the WRITE statement will dump this element into multiple lines of 80 characters each. But the WRITE statement of Fortran77 adds an extra blank character at position 1 of each line & the one of Fortran90 does not, as follows:

Create by AXP:
-> 'A29', 'A30', 'A31', 'A32', 'A33', 'A34', 'A35', 'A36', 'A37', 'A38', 'A39', 'A4
-> 0', 'A41', 'A42', 'A43', 'A44', 'A45', 'A05', 'A10', 'A46', 'A47', 'A48', 'A49',


Create by I64:
-> 'A29', 'A30', 'A31', 'A32', 'A33', 'A34', 'A35', 'A36', 'A37', 'A38', 'A39', 'A4
->', 'A41', 'A42', 'A43', 'A44', 'A45', 'A05', 'A10', 'A46', 'A47', 'A48', 'A49', 'A


And that is a big problem resulted by the extra blank when a F90 application tries to read a namlist file created by a F77 application. As you noticed in the previous example, the string "A40" is read as "A4" by the READ statement of Fortran90, because of the extra blank character added by the WRITE statement of Fortran77.

Do you have any solution to fix that problem ???

Thank you..



Sponsored Link
Ads by Google

Response Number 1
Name: SKStewart
Date: August 18, 2008 at 08:36:01 Pacific
Reply:

Hello,

Some thoughts...

Assuming that the Fortran 77 program is creating the file, and that you can modify that program, you could specify a longer record length in the OPEN statement so that the WRITE will not insert the new line. If the record type is variable length, the RECL (or RECORDSIZE) keyword sets the maximum record length but allows shorter records.

If there are a limited number of these files to correct, you could fix them with a text editor. With EVE (TPU) this could be largely automated.

If the output is mangled consistently enough, you could modify the Fortran 90 problem to expect and discard the leading blank character.

Kelly

Kelly


0

Response Number 2
Name: tspham
Date: August 18, 2008 at 08:58:28 Pacific
Reply:

Thank Kelly... We have to do the way you said, I don't see other option !!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: OpenVMS: Error reading NAMELIST fil

Oracle 10g DBMS_Scheduler www.computing.net/answers/openvms/oracle-10g-dbmsscheduler/460.html

I Hate Polling www.computing.net/answers/openvms/i-hate-polling/440.html

VTfm - OpenVMS file manager www.computing.net/answers/openvms/vtfm-openvms-file-manager/326.html