Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Problem reading file via DECNET
@ 1995-11-30  5:00 Ray Muzic
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Ray Muzic @ 1995-11-30  5:00 UTC (permalink / 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem reading file via DECNET (add'l info)
  1995-11-30  5:00 Problem reading file via DECNET Ray Muzic
@ 1995-12-01  5:00 ` Ray Muzic
  1995-12-16  5:00 ` Problem reading file via DECNET Steven Sparrow
  1 sibling, 0 replies; 3+ messages in thread
From: Ray Muzic @ 1995-12-01  5:00 UTC (permalink / raw)
  To: rfm2

From VMS I am able to dump files on the Sun via the full DECNET filename.
I cannot analyze them.  I get the message:

RMS-F-BUG_DAP, Data Access Protocol error detected; DAP code = 0001A006

I seem to be getting these DAP errors in my c program even though the 
open statement does not return -1 to signal failure. A call to perror() 
indicates a DAP error, dap code=!xl.

Since dump can access these files, there must be a way to access them!
The question is HOW?








^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem reading file via DECNET
  1995-11-30  5:00 Problem reading file via DECNET Ray Muzic
  1995-12-01  5:00 ` Problem reading file via DECNET (add'l info) Ray Muzic
@ 1995-12-16  5:00 ` Steven Sparrow
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Sparrow @ 1995-12-16  5:00 UTC (permalink / raw)



In article <49l77o$lsj@madeline.INS.CWRU.Edu> Ray Muzic wrote:
>Date:	30 Nov 1995 21:20:56 GMT
>From:	Ray Muzic <rfm2@po.cwru.edu>
>Newsgroups:	comp.sys.dec
>Subject:	Problem reading file via DECNET
>
>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.
<snip>
>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

If you get the following, I can show you how to fix it:
 $ Open/share/read       file remote::file.dat
 $ read/nolock/end=close file record
%RMS-F-BUFSIZ, 644 byte record is too big for users buffer.

Fix:
 $ SET RMS_DEFAULT/NETWORK=24 	!the default is 3, Max is 24.
 $                              !I got this info from DEC support.
 $ Open/share/read       file remote::file.dat
 $ read/nolock/end=close file record
 $ !success


========================================
Steve Sparrow @ Computer Sciences Corporation




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-12-16  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-30  5:00 Problem reading file via DECNET Ray Muzic
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox