- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
open (iu_dat,FILE=name,STATUS='unknown',access='direct',
* form='formatted',recl=210)
The problem is that when reading the file with
read (iu_dat,6,rec=irec)art,abarb,dm1,dm2,ipas,blaenge,thg,is,iz,
* tng,ischalt,thf,tnf,tneb,bez_neben,tr,ir,rauhwert,iragenr,
* i_1,i_2,i_3,i_4,i_5,i_6,i_7,i_8,i_9,i_10,
* i_11,i_12,i_13,i_14,i_15,
* x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8,x_9,x_10
6 format(a5,a2,f7.2,f7.2,i2,f7.2,f7.2,i3,i3,f7.2,i3,f7.2,f7.2,f7.2,* a4,f7.2,i3,f4.1,i2,15(i2),10(f7.2))
etc. I get problems with the carriage returns. In my art (a5) I get the escape sequence for carriage return+linefeed (= 0D 0A) plus the values which really interest me. Instead of 'BIS ' I get something like '__BIS'.Because of this carriage return all further reading gets corrupted - there are 2 characters too much. As I use formatted access and direct formatted with a record length of 210, the current behaviour is far from what I want. I tried to change the record length to 212 to capture the 0D 0A but as the file contents gets modified and rewritten, then the CR is missing.
I assume that file reading in such a way is nothing unusual so I hope someone here has an idea for a solution.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The defined record length is 210. That is how it is written into the file. Then 211+212 are 0D+0A=CR+LF. The problem is, when I set the record length to read to 212, the CR/LF gets lost when I write the data back into this file. Instead of several lines I get one long line withhundreds of columns. The dataset is not seperated by CR/LF then.
craig.mitchell@mottmac.com wrote:
You're not reading the whole record in - have you missed some variables off of your read statement?You could try changing your record length to 194 or add 16x to the end of the format statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is the option "Use Other PowerStation Run-time Behavior" which has to be set to YES. (Under Fortran - Compatibility)
Thanks a bunch, Steve!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I'm not shure whether my registration did work correct. Do I have the same ID and password as at the intel registration?
My question:
Is there no other way to write (formatted) direct access files which can beviewed also in an normal editor?
Thanks
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You want the records to end in a CR-LF terminator. You can do that for direct access files either by enabling the PowerStation option as shown earlier or by writing the CR-LF yourself at the end of each record (CHAR(13)//CHAR(10))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to remove my e-mail address from you common area? See the article before.I did use the address as login name as I remember. That was not ok I think. In the last time I get more and more spam mails.
thanks
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://softwareforums.intel.com/ISN/Community/en-US/Forums/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page