[comp.os.vms] shar for VMS

JOHN@UKANVAX.BITNET (06/12/87)

Michael,

Thank you for your VMS_SHAR.COM.

I got the checksum failed message upon unpacking, but the result seems to be
intact anyway, after some line unwrapping.

Is this shar compatible with UNIX shar?

I have a few observations that might help the robustness of shar. I think there
might be a problem with line wrapping.  If the sent file has a long line, the
line might be wrapped while being kicked around the net. In fact, even if the
sender has been careful to keep things short, the extra "X" in front of each
line might make the lines that used to barely fit become too long.  Also, what
about trailing spaces?  Some systems strip them, and some systems pad all lines
to 80 characters.

--John


  ___________________________________________________________________
 /             |                             |                       \
 | K  K U    U | John A. Thywissen           | "And remember,         \
 | K K  U    U | University of Kansas        | wherever you go --      \
 | KK   U    U | J. R. Pearson Hall, Rm. 213 | there you are."         |
 | K K  U    U | 1122 West Campus Road       |   Buckaroo Banzai in    |
 | K  K  UUUU  | Lawrence, KS  66045-8081    |   Across the            |
 |-------------+-------------------+---------+   8th dimension         |
 | BITNET:     JOHN@UKANVAX.BITNET |                                   |
 | Internet:   JOHN@KUHUB.UKAN.EDU | Yes, we felt the IL quake here.   |
 | KU DECnet:  KUHUB::JOHN         |                                   |
 | Ma Bell Net:  +1 913 864 2646   |                                   |
 \_________________________________|___________________________________/

u3369429@murdu.UUCP (06/15/87)

In article <8706131259.AA08840@ucbvax.Berkeley.EDU> JOHN@UKANVAX.BITNET writes:
>[ ... Modesty clearly dictates that the praise of the few should not be
>      quoted to the many]
>Is this shar compatible with UNIX shar?

No. But the idea is the same.
I know next to nothing about unix, but I think shar'ed files are created
with a script which packages the sources in way that they will survive
most mailing agents, and un-pack themselves for any recipient (under a
{any consonant]un{any vowel}x system, that is).

VMS_SHAR follows the same idea: it will package source files into a self-
unpacking VMS procedure.

By the way, I've also got a unix shar to run under VMS and AmigaDOS (which
coincidentally are the two systems I know more than nothing about).
>
>I have a few observations that might help the robustness of shar. I think there
>might be a problem with line wrapping.  If the sent file has a long line, the
>line might be wrapped while being kicked around the net. In fact, even if the
>sender has been careful to keep things short, the extra "X" in front of each
>line might make the lines that used to barely fit become too long.  Also, what
>about trailing spaces?  Some systems strip them, and some systems pad all lines
>to 80 characters.

As mentioned above, I just followed the idea of unix shar which doesn't
care much about lines being longer than 80 characters or trailing spaces.

I didn't experience any troubles in this respect with mail/news items.
Long lines were always intact, and source code should not be sensitive to
trailing spaces/tabs whatever.
However, leading spaces/tabs seemed to be eaten. That's why the leading X
is used.

Speaking of which, does anybody out there know a method to use EDIT from
a procedure to a) insert an X as the first character in each line and
b) to remove it?

Michael Bednarek (u3369429@{murdu.oz.au | xvax.dn.mu.oz.au})

"POST NO BILLS!"

MCGUIRE@GRIN2.BITNET.UUCP (06/19/87)

X> Date:         15 Jun 87 03:42:50 GMT
X> From:         Michael Bednarek <MUNNARI!MURDU!U3369429@SEISMO.CSS.GOV>
X> Subject:      Re: shar for VMS
X>
X> I didn't experience any troubles in this respect with mail/news items.
X> Long lines were always intact, and source code should not be sensitive to
X> trailing spaces/tabs whatever.
X> However, leading spaces/tabs seemed to be eaten. That's why the leading X
X> is used.
X
XItems sent using GMAIL via Jnet are a problem.  Lines longer than 80
Xcolumns are wrapped.  That means that most VMS sites on BITNET will wrap
Xlong lines.
X
XYou could wrap yourself at 80, and put the records back together at the
Xother end.  What you might want to do is put the byte-count at the
Xbeginning of the record instead of an `X'.  The byte-count would tell you
Xat the receiving end whether there is a wrapped line, and also would
Xeliminate any problems with space pads.
X
XThe difficulty with records that are padded is that the checksums fail.
X
X> Speaking of which, does anybody out there know a method to use EDIT from
X> a procedure to a) insert an X as the first character in each line and
X> b) to remove it?
X
XPresumably you're talking about EDT.  Try the following line mode command.
XYou put it into an INI file, or EDT/COMMAND=SYS$INPUT and put it in the
Xcommand procedure, or something on that order.
X
X   CHANGE; ER -L 32000(88ASC -2L)
X
XThis arcane statement does the following:
X
X  1.  Moves to end of buffer
X  2.  Moves to beginning of last record
X  3.  Repeats the following steps until failure:
X      3.1. Inserts an X (ASCII 88) as the first character of the record
X      3.2. Backs up to the beginning of the record, and again to the
X           beginning of the previous record.  If there is no previous
X           record, the statement will fail, ending the loop.
X
XI haven't tested it as part of a command procedure.  However, you can see
Xthat I tested it interactively on this message :-)
X
XEd <MCGUIRE@GRIN2.BITNET>