From:	CSBVAX::MRGATE!info-vax-relay@kl.sri.com@SMTP  7-JUN-1988 00:39
To:	ARISIA::EVERHART
Subj:	RE: VMS_SHAR updates


Received: from CORNELLC.CCS.CORNELL.EDU by KL.SRI.COM with TCP; Mon 30 May 88 08:40:34-PDT
Received: from DGOGWDG5.BITNET by CORNELLC.CCS.CORNELL.EDU ; Mon, 30 May 88 08:57:50 EDT
Date:    Mon, 30-MAY-1988 14:22  +0200
From:    "GWDGV1::MOELLER"  <U0012%DGOGWDG5.BITNET@CORNELLC.CCS.CORNELL.EDU>
To:      info-vax@kl.sri.COM
Subject: RE: VMS_SHAR updates

To all those who now produce updates of Bednarek's VMS_SHAR:

PLEASE include some code which help us out here on BITNET, since on BITNET
trailing whitespace typically is NOT preserved in transmission.
I'm annyoed each time I get a file that does not checksum properly ...

Below I include the DIFF between my own version and VMS_SHAR V5.04,
which has the following additions:
        - while sending
                preserve trailing whitespace by escpaping ascii SPACE,
                if it occurs as the last character of an input record.
        - while receiving
          (a)   remove trailing whitespace which may have crept into
                the file during transmission.
          (b    make sure "V" lines have the correct length before
                concatenating them.

Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ...
Bitnet/Earn: U0012@DGOGWDG5         Phone: +49 551 201516 | No claim intended

$!...................... Cut on the dotted line and save ......................
$! VAX/VMS archive file created by VMS_SHAR V-5.04-WJM 25-may-1988
$! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au)
$! and modified by W.J.Moeller <moeller@dgogwdg5.BITNET>
$! To unpack, simply save and execute (@) this file.
$!
$! This archive was created by MOELLER
$! on Monday 30-MAY-1988 14:08:43.95
$!
$! It contains the following 1 file:
$! WJM_SHAR.DIF
$!=============================================================================
$Set Symbol/Scope=(NoLocal,NoGlobal)
$Version=F$GetSYI("VERSION")
$If Version.ges."V4.4" then goto Version_OK
$Write SYS$Output "Sorry, you are running VMS ",Version, -
", but this procedure requires V4.4 or higher."
$Exit 44
$Version_OK:CR[0,8]=13
$Pass_or_Failed="failed!,passed."
$Goto Start
$Convert_File:
$Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd
$No_Error1:Define/User_Mode SYS$Output NL:
$Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' -
VMS_SHAR_DUMMY.DUMMY
f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f);
o:=Get_Info(Command_Line,"Output_File");Set(Output_File,b,o);
Position(Beginning_of(b));a:=0;Loop ExitIf Mark(None)=End_of(b);
x:=Erase_Character(1);if x="V" then i:=LENGTH(CURRENT_LINE);
if i<>78 then MOVE_HORIZONTAL(i);if i>78 then ERASE_CHARACTER(78-i);endif;
if i<78 then COPY_TEXT(FAO("!#* ",78-i));endif;
Move_Horizontal(-Current_Offset);endif;endif;if a then Append_Line;
Move_Horizontal(-Current_Offset);endif;a:=(x="V");Move_Vertical(1);EndLoop;
POSITION(BEGINNING_OF(b));p:=" "&LINE_END;loop x:=SEARCH(p,Forward,Exact);
exitif x=0;POSITION(END_OF(x));s:=CURRENT_LINE;EDIT(s,Trim_trailing,Off);
ERASE_CHARACTER(LENGTH(s)-CURRENT_OFFSET);endloop;Position(Beginning_of(b));
Loop x:=Search("`",Forward,Exact);ExitIf x=0;Position(x);Erase_Character(1);
If Current_Character='`' then Move_Horizontal(1);else
Copy_Text(ASCII(INT(Erase_Character(3))));EndIf;EndLoop;Exit;
$Delete VMS_SHAR_DUMMY.DUMMY;*
$Checksum 'File_is
$Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR
$Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd
$No_Error2:Return
$Start:
$File_is="WJM_SHAR.DIF"
$Check_Sum_is=1297772666
$Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X************
XFile DRA0:[MOELLER.TEST]WJM_SHAR.COM;1
X    3   $!-wjm ***
X    4   $ Facility_Version=`009"V-5.04 04-Feb-1988"
X    5   $!+wjm ***
X    6   $ Facility_Version=`009"V-5.04-WJM 25-may-1988"
X    7   $!.wjm ***
X    8   $!
X******
XFile DRA0:[MOELLER.TEST]VMS_SHAR.COM;1
X    3   $ Facility_Version=`009"V-5.04 04-Feb-1988"
X    4   $!
X************
X************
XFile DRA0:[MOELLER.TEST]WJM_SHAR.COM;1
X  105   $ Write Out "$! and modified by W.J.Moeller ",-
X  106   `009"<moeller@dgogwdg5.BITNET>"
X  107   $ Write Out "$! To unpack, simply save and execute (@) this file.
X******
XFile DRA0:[MOELLER.TEST]VMS_SHAR.COM;1
X  101   $ Write Out "$! To unpack, simply save and execute (@) this file.
X************
X************
XFile DRA0:[MOELLER.TEST]WJM_SHAR.COM;1
X  150   Position(Beginning_of(b));a:=0;Loop ExitIf Mark(None)=End_of(b);
X  151   x:=Erase_Character(1);if x="V" then i:=LENGTH(CURRENT_LINE);
V  152   if i<>78 then MOVE_HORIZONTAL(i);if i>78 then ERASE_CHARACTER(78-i);en
Xdif;
X  153   if i<78 then COPY_TEXT(FAO("!#* ",78-i));endif;
X  154   Move_Horizontal(-Current_Offset);endif;endif;if a then Append_Line;
V  155   Move_Horizontal(-Current_Offset);endif;a:=(x="V");Move_Vertical(1);End
XLoop;
V  156   POSITION(BEGINNING_OF(b));p:=" "&LINE_END;loop x:=SEARCH(p,Forward,Exa
Xct);
V  157   exitif x=0;POSITION(END_OF(x));s:=CURRENT_LINE;EDIT(s,Trim_trailing,Of
Xf);
V  158   ERASE_CHARACTER(LENGTH(s)-CURRENT_OFFSET);endloop;Position(Beginning_o
Xf(b));
V  159   Loop x:=Search("``",Forward,Exact);ExitIf x=0;Position(x);Erase_Charac
Xter(1);
X  160   If Current_Character='``' then Move_Horizontal(1);else
X******
XFile DRA0:[MOELLER.TEST]VMS_SHAR.COM;1
V  144   Position(Beginning_of(b));Loop x:=Erase_Character(1);Loop ExitIf x<>"V
X";
X  145   Move_Vertical(1);x:=Erase_Character(1);Append_Line;
X  146   Move_Horizontal(-Current_Offset);EndLoop;Move_Vertical(1);
X  147   ExitIf Mark(None)=End_of(b) EndLoop;Position(Beginning_of(b));Loop
V  148   x:=Search("``",Forward,Exact);ExitIf x=0;Position(x);Erase_Character(1
X);
X  149   If Current_Character='``' then Move_Horizontal(1);else
X************
X************
XFile DRA0:[MOELLER.TEST]WJM_SHAR.COM;1
X  244   !+wjm`009*** preserve trailing blanks ***
X  245   Position(Beginning_of(b));
X  246   q:=" " & Line_End;`009`009! Pattern for the trailing blank
X  247   Loop
X  248   x:=Search(q,Forward,Exact);
X  249   Exitif x=0;
X  250   Position(x);
X  251   Erase_Character(1);`009`009! delete it,
V  252   Copy_Text("``032");`009`009! "standard" escape instead (SP = 32 decima
Xl)
X  253   EndLoop;
X  254   !.wjm`009***
X  255  `032
X  256   Position(Beginning_of(b));
X******
XFile DRA0:[MOELLER.TEST]VMS_SHAR.COM;1
X  233   Position(Beginning_of(b));
X************
X
XNumber of difference sections found: 4
XNumber of difference records found: 29
X
XDIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DRA0:[MOELLER.TEST]WJM_SHAR.DIF;2-
X    DRA0:[MOELLER.TEST]WJM_SHAR.COM;1-
X    DRA0:[MOELLER.TEST]VMS_SHAR.COM;1
$GoSub Convert_File
$Exit
