Operating System - Microsoft
1748146 Members
3643 Online
108758 Solutions
New Discussion юеВ

Please help : WRITE command problem

 
valero
New Member

Please help : WRITE command problem

Hi

I run a Compaq Fortran (6.6) program, that write some data in a text file.
One of the data is a string. But, when editing the text file, it appears that every data with length > 60 characters is write on two or more lines.

Is there a max length for data when using
WRITE(5,*) (for example) ?

Thanks for Help.

Lionel
2 REPLIES 2
Darren Prior
Honored Contributor

Re: Please help : WRITE command problem

Hi,

If you use od -tax textfilename, can you see any CR/LF characters? If not, then the line wrapping may be caused by whatever you're using to display/edit the file.

regards,

Darren.
Calm down. It's only ones and zeros...
valero
New Member

Re: Please help : WRITE command problem

Thanks,

but I've opened the text file with 3 different editors (Word, NotPad and UltraEdit), the file appears the same. In Word, I can see CR/LF characters.

Here is a sample of my program :

PARAMETER (NMAX=500)
CHARACTER*15 UFEEDSo(NMAX)


DO 1005 J=1,NfeedsO
strFEEDSO=TRIM(strFEEDSO)//TRIM(UFEEDSo(J))//';'
1005 CONTINUE

WRITE(NFOUT,*) I,';','UNIT',';',TRIM(UID(I)),';',
+ 'ProductData',';',TRIM(strFEEDSO)

where NfeedsO >=1

So, it seems that strFEEDSO contains the entire value (150 length string), but Write command stores the value on 2 lines...

The problem is important for me, because I'm working on an excel macro that extract data from this text file. So, if the data are not correctly stored, my macro crash.

Thanks again for help.

Lionel