[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Whats up in opening files: Unix vs. Windows

Sean Heukels wrote:
> I use this code on a Unix System and it has been working fine for 4 years.
> file_header={file_header, nblocks: 0L, ntraces: 0L, np: 0L, ebytes: 0L,
> tbytes: 0L, bbytes: 0L, transf: 0, status: 0, spare1: 0L}
> data_header={data_header, scale: 0, status: 0, index: 0, spare3: 0, ctcount:
> 0L, lpval: 0.0, rpval: 0.0, lvl: 0.0, rvl: 0.0}
> ;----Open the data file
> openr, unit, infile, /get_lun    ; Open file
> point_lun, unit, 0
> readu, unit, file_header     ; Read the file header (only occurs once)

I got some experience about point_lun problems with unix and windows.

I believe it's not possible to read an unix ascii file correctly with
of point_lun if it's accessed over the network directly from a 
unix file server. The point_lun action will be different used by windows
because a line ends by two bytes for windows and one byte for unix. 
I always use a get_file and put_file method to transfer the file
into the windows %TEMP% directory and then I read from this file.
This works fine.


Reimar Bauer 

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
a IDL library at ForschungsZentrum Jülich