From: Ray Muzic <rfm2@po.cwru.edu>
Subject: Problem reading file via DECNET
Date: 1995/11/30 [thread overview]
Message-ID: <49l77o$lsj@madeline.INS.CWRU.Edu> (raw)
From a C program running on either a VAX/VMS or an ALPHA/VMS, I'd like
to read the first 16Kbytes of some files. Some of the files exist on
a Sun/Sparc and some exist on another VAX/VMS system. All accesses
are done via DECNET. The program is able to open the data files on
either system:
if (fd = open(fname, O_RDONLY, 0, "rfm=fix:,"mrs=512")) == -1)
fprintf(stderr,"Error: Could not open file: %s\n", fname);
Although I can read the data just fine when the files are on the VAX, I
cannot not read the data in files on the Sun:
while ( ((n= read(fd, head+m, HEADSZ-m)) > 0) && (m<HEADSZ) ) m += n;
if (M != HEADSZ) {
fprintf(stderr,"%s: ErrorL Only %d bytes of %d read from %s\m",
m, HEADSZ, fname);
}
I find I can DECNET copy (copy node"account password"...) the
Sun files to a local disk and read them there.
This is not a viable workaround given the number and size of files
to be accessed.
Am I doing something wrong? Could the problem be related to the
record attributes. dir/full shows the Sun files as being Stream_LF,
max 512 bytes whereas dir/dull shows the remote VMS files as being fixed
length 512 byte records. Should I be opening the files differently?
I tried a couple of different ways to open the files but could not
find a way to read the file.
I also tried to access the file from DCL. I was able to open it
(open/share/read), but was not able to read data from the file.
Suggestions?
Has anybody had success in reading SUN files across DECNET?
Ray Muzic
rfm2@po.cwru.edu
next reply other threads:[~1995-11-30 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-11-30 5:00 Ray Muzic [this message]
1995-12-01 5:00 ` Problem reading file via DECNET (add'l info) Ray Muzic
1995-12-16 5:00 ` Problem reading file via DECNET Steven Sparrow
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox