HP3000-L Archives

June 1998, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Wed, 10 Jun 1998 16:43:47 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (86 lines)
Chris Bartram writes:
>
>  In <[log in to unmask]> [log in to unmask] writes:
>
> > 1 - Upload a file from the PC using Reflection v5.10 into a POSIX
> > directory
>
> In the file-transfer setup screen, wrq/reflection tab, you can select the
> attributes and advanced buttons to specifically send the file as a byte-
> stream file. Not doing this causes the problem you encountered; I hit it
> quite a bit myself. Easy solution after-the-fact is to just "cp" the file
> in the shell to a new name and edit the copied file - it will be built
> correctly.

You meant to say 'just "tobyte" the file in the shell' in order to convert
an MPE file to a bytestream file.

The cp command is smart enough to preserve MPE file attributes, so that when
you do things like copy NMPRGs they will still be good old MPE NMPRGs instead
of unrunable bytestream files.

Quoting from the cp man page:

     MPE/iX NOTES
     When copying byte stream files, cp performs in the POSIX-compliant
     manner described in this man page. When copying non-byte stream files,
     cp calls the MPE/iX CI COPY command to perform the task.  See the
     MPE/iX Reference Supplement (32650-90353) for details on how the COPY
     command works.

Quoting from the tobyte man page:

     tobyte(1)             MPE/iX Shell and Utilities             tobyte(1)
     ______________________________________________________________________

     NAME
     tobyte -- convert MPE record files to byte stream files

     SYNOPSIS
     tobyte -at mpe_file [hfs_filename]

     DESCRIPTION
     The tobyte utility reads the file specified as mpe_file and writes it
     to the file specified as hfs_filename in byte stream form.  mpe_file
     must be either an MPE file.group.acct style name or an HFS
     (Hierarchical File System) name with a leading slash (that is, /name)
     or dot-slash (that is ./name) hfs_filename must be an HFS name.  If
     hfs_filename is omitted, the standard output is used.  If no options
     are specified, tobyte treats mpe_file as a binary file.

     Options

     -a   opens mpe_file as an ASCII file.

     -t   strips trailing blanks from each line in an ASCII file.  You can
          only use this option when you have also specified the -a option.

> > 2 - Edit the file using vi (adding something I forgot on the PC side, or
> > someone else is adding to it)
> > 3 - Save the file using the vi command :wq
> > 4 - The following error message is returned:
> >         "Write error (out of space)" File too large
> > 5 - Issue the vi command :q!
> > 6 - If I added 10 bytes somewhere in the file, 10 bytes have been
> > removed from the end of the file.
> >
> > I'm wondering if anyone else has run into this problem and what
> > workaround they have developed (if any).
>
> I believe the problem stems from the fundamental problem in the posix
> implementation where when posix apps read MPE files, they count on getting
> actual "byte counts" of the contents of the file, where MPE with it's byte-
> filled fixed records (padding - which don't count as file contents) throw
> the byte counts off, causing the posix app to think there's more room in the
> file than there really is.
>
> Or I could be wrong. ;-)

You were right on that one.  :-)
--
Mark Bixby                      E-mail: [log in to unmask]
Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support               Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)

ATOM RSS1 RSS2