🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Andy, Systems Manager Mon, 25 Jan 1993 21:34
VMS_SHARE V8.2, part 04/09
#148
Author: Andy, Systems Manager
Date: Mon, 25 Jan 1993 21:34
1184 lines
49978 bytes
Submitted-by: "Andy, Systems Manager" <UDAA055@ELM.CC.KCL.AC.UK>
Posting-number: Volume 4, Issue 48
Archive-name: vms_share/part04
Supersedes: vms_share: Volume 3, Issue 87-89

-+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+
X
X!`20Compute`20final`20size`20stats`20and`20compression`20ratio
X`20`20l2:=GET_INFO(Xbuffer,"RECORD_COUNT");
X`20`20b2:=SizeBuffer(Xbuffer);
X`20`20IF`20b1`20=`200
X`20`20`20`20THEN`20c`20:=`200
X`20`20`20`20ELSE`20c`20:=`20(1000*(b2-b1)+5)/(10*b1);`09!`20Compute`20%`20chan
Vge`20in`20size
X`20`20ENDIF;
X
X
X!`20Concise`20summary`20of`20encoding/compression`20if`20logging`20requested
X`20`20IF`20Logging`20>=`20LOG_ShowStats
X`20`20`20`20THEN
X`20`20`20`20`20`20f:="!8%T,`20Records:`20!UL,`20Bytes:`20!UL,`20Change`20!SL%"
V;
X`20`20`20`20`20`20Inform("I","ENCDSIZE",FAO(f,0,l2,b2,c));
X`20`20ENDIF;
X
XENDPROCEDURE;
X`0C
X!`20+--------------------------------------------------------------------+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20S`20H`20A`20R`20E`20`20`20F`20I`20L`20E`20`20`20H`20E`20A
V`20D`20E`20R`20S`20`20`20A`20N`20D`20`20`20T`20R`20A`20I`20L`20E`20R`20S`20
V`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20The`20share`20file`20which`20is`20created`20consists`20of`20a
V`20mixture`20of`20DCL,`20TPU+
X!`20+`20`20`20and`20user`20data.`20`20The`20DCL`20and`20TPU`20code`20surroundi
Vng`20each`20file`20of`20`20`20`20+
X!`20+`20`20`20user`20data`20create`20a`20sequence`20which,`20when`20executed,
V`20unpacks`20the`20`20`20`20+
X!`20+`20`20`20encoded`20user`20data`20to`20its`20original`20format.`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`208.0`20`20`20`20`20`20`20`20`20`20`20`20`20`20Andy`20Harper`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20September`201992`20`20
V`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20R`20O`20U`20T`20I`20N`20E
V`20`20`20S`20U`20M`20M`20A`20R`20Y`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_Prologue_Head`20`20`20`20`20`20`20Create`20the`20share
V`20file`20header`20plus`20the`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20start`20of`20the`20UNPACK`20subroutine`20`20`20`20`20`20`20
V`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_Prologue_Unpacker`20`20`20Create`20the`20TPU`20unpack`20c
Vode`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_Prologue_Trail`20`20`20`20`20`20Create`20the`20remainder
V`20of`20the`20unpack`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20subroutine`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_Epilogue`20`20`20`20`20`20`20`20`20`20`20`20Create`20the
V`20share`20file`20completion`20code`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+--------------------------------------------------------------------+
X`0C
X!`20----------------------------------------------------------------------
X!`20`20The`20share`20file`20contains`20a`20prolog`20consisting`20of`20a`20chun
Vk`20of`20DCL`20code
X!`20`20and`20some`20TPU`20code`20which,`20together,`20form`20the`20unpacking
V`20and`20decoding
X!`20`20routine`20for`20a`20given`20file.
X!
X!`20`20This`20routine`20writes`20in`20the`20share`20file`20identification,`20v
Version`20checks
X!`20`20and`20various`20initialization`20tasks,`20followed`20by`20the`20DCL`20c
Vode`20forming
X!`20`20the`20start`20of`20unpacking`20routine.
X!`20----------------------------------------------------------------------
X
XPROCEDURE`20Create_Prologue_Head(Xbuffer,`20Creator,`20Blocks,`20FilenameBuffe
Vr)
XLOCAL`20filecount,file;
X
X`20`20ReuseBuffer(Xbuffer);
X
X`20`20CopyLine(`20"$!`20------------------`20CUT`20HERE`20--------------------
V---");
X`20`20CopyLine(`20"$`20v='f$verify(f$trnlnm(""SHARE_UNPACK_VERIFY""))'");
X`20`20CopyLine(`20"$!"`20);
X`20`20CopyLine(`20"$!`20This`20archive`20created`20by`20"`20+`20Facility`20+
V`20"`20Version`20"`20+`20Version_Number);
X`20`20CopyLine(`20FAO("$!!`20`20`20On`20!%D`20`20`20By`20user`20!AS",`200,`20C
Vreator)`20);
X`20`20CopyLine(`20"$!"`20);
X`20`20CopyLine(`20"$!`20The`20"`20+`20Facility`20+`20"`20software`20that`20cre
Vated`20this`20archive");
X`20`20CopyLine(`20"$!`20`20`20`20was`20written`20by`20`20Andy`20Harper,`20King
Vs`20College`20London`20UK");
X`20`20CopyLine(`20"$!`20`20`20`20--`20December`201992");
X`20`20CopyLine(`20"$!"`20);
X`20`20CopyLine(`20"$!`20Credit`20is`20due`20to`20these`20people`20for`20their
V`20original`20ideas:");
X`20`20CopyLine(`20"$!`20`20`20`20James`20Gray,`20Michael`20Bednarek`20");
X`20`20CopyLine(`20"$!");
X`20`20CopyLine(`20"$!+`20THIS`20PACKAGE`20DISTRIBUTED`20IN`20999`20PARTS,`20TO
V`20KEEP`20EACH`20PART");
X`20`20CopyLine(`20"$!`20`20BELOW`20"`20+`20STR(Blocks)`20+`20"`20BLOCKS");
X`20`20CopyLine(`20"$!");
X`20`20CopyLine(`20"$!`20TO`20UNPACK`20THIS`20SHARE`20FILE,`20CONCATENATE`20ALL
V`20PARTS`20IN`20ORDER");
X`20`20CopyLine(`20"$!`20AND`20EXECUTE`20AS`20A`20COMMAND`20PROCEDURE`20`20(
V`20`20@name`20`20)");
X`20`20CopyLine(`20"$!");
X`20`20CopyLine(`20"$!`20THE`20FOLLOWING`20FILE(S)`20WILL`20BE`20CREATED`20AFTE
VR`20UNPACKING:");
X
X`20`20filecount`20:=`200;
X`20`20LOOP
X`20`20`20`20`20POSITION(FilenameBuffer);
X`20`20`20`20`20EXITIF`20MARK(NONE)`20=`20END_OF(CURRENT_BUFFER);
X
X`20`20`20!`20extract`20next`20filename`20from`20list
X`20`20`20`20`20file`20`20:=`20StripFile(`20SUBSTR(CURRENT_LINE,1,INDEX(CURRENT
V_LINE,"`20")-1)`20);
X
X`20`20`20`20`20filecount`20:=`20filecount`20+`201;
X`20`20`20`20`20MOVE_VERTICAL(1);
X
X`20`20`20!`20Copy`20filename`20into`20the`20share`20file`20prologue
X`20`20`20`20`20POSITION(Xbuffer);
X`20`20`20`20`20CopyLine(`20FAO("$!!!8UL.`20!AS",`20filecount,`20file));
X
X`20`20`20`20`20IF`20Debugging`20>=`20DEBUG_AddToPrologue
X`20`20`20`20`20`20`20`20THEN
X`20`20`20`20`20`20`20`20`20`20Inform("I","DBGPROADFIL","Adding`20name`20"""
V`20+`20file`20+`20"""`20to`20prologue");
X`20`20`20`20`20ENDIF;
X
X`20`20ENDLOOP;
X
X`20`20POSITION(Xbuffer);
X`20`20CopyLine(`20"$!");
X`20`20CopyLine(`20"$set=""set""");
X`20`20CopyLine(`20"$set`20symbol/scope=(nolocal,noglobal)");
X`20`20CopyLine(`20"$f=f$parse(""SHARE_UNPACK_TEMP"",""SYS$SCRATCH:.""+f$getjpi
V("""",""PID""))");
X`20`20CopyLine(`20"$e=""write`20sys$error`20`20""""%"+FAC_unpack+""""",`20""")
V;
X`20`20CopyLine(`20"$w=""write`20sys$output`20""""%"+FAC_unpack+""""",`20""");
X`20`20CopyLine(`20"$`20if`20.not.`20f$trnlnm(""SHARE_UNPACK_LOG"")`20then`20$
V`20w`20=`20""!""");
X`20`20CopyLine(`20"$`20ve=f$getsyi(""version"")");
X`20`20CopyLine(`20"$`20if`20ve-f$extract(0,1,ve)`20.ges.`20"""+Min_VMS+"""`20t
Vhen`20$`20goto`20start");
X`20`20CopyLine(`20"$`20e`20""-E-OLDVER,`20Must`20run`20at`20least`20VMS`20"+Mi
Vn_VMS+"""");
X`20`20CopyLine(`20"$`20v=f$verify(v)");
X`20`20CopyLine(`20"$`20exit`2044");
X
X!`20Insert`20the`20DCL`20procedure`20which`20unpacks`20a`20specific`20file,
V`20restores`20the
X!`20record`20attributes,`20and`20validates`20the`20checksum
X`20`20CopyLine(`20"$unpack:`20subroutine`20!`20P1=filename,`20P2=checksum,`20P
V3=attributes");
X
X!`20Insert`20code`20to`20check`20directory`20exists`20and`20create`20if`20not
X`20`20CopyLine(`20"$`20if`20f$parse(P1)`20.nes.`20""""`20then`20$`20goto`20dir
Vok");
X`20`20CopyLine(`20"$`20dn=f$parse(P1,,,""DIRECTORY"")");
X`20`20CopyLine(`20"$`20w`20""-I-CREDIR,`20Creating`20directory`20''dn'""");
X`20`20CopyLine(`20"$`20create/dir`20'dn'");
X`20`20CopyLine(`20"$`20if`20$status`20then`20$`20goto`20dirok");
X`20`20CopyLine(`20"$`20e`20""-E-CREDIRFAIL,`20Unable`20to`20create`20''dn'`20F
Vile`20skipped""");
X`20`20CopyLine(`20"$`20delete`20'f'*");
X`20`20CopyLine(`20"$`20exit");
X
X!`20Directory`20now`20in`20place
X`20`20CopyLine(`20"$dirok:");
X
X!`20Check`20file`20existence
X`20`20CopyLine(`20"$`20x=f$search(P1)");
X`20`20CopyLine(`20"$`20if`20x`20.eqs.`20""""`20then`20$`20goto`20file_absent")
V;
X
X!`20If`20we're`20not`20preserving`20versions,`20then`20we`20can't`20bomb`20out
V`20if`20an`20old`20version
X!`20already`20exists`20when`20we`20unpack;`20so`20alter`20the`20check`20depend
Vent`20on`20the`20setting
X!`20of`20the`20`60preserve`20versions'`20flag.
X`20`20IF`20VersKeep
X`20`20`20`20THEN
X`20`20`20`20`20`20CopyLine(`20"$`20e`20""-W-EXISTS,`20File`20''P1'`20exists.
V`20Skipped""");
X`20`20`20`20`20`20CopyLine(`20"$`20delete`20'f'*");
X`20`20`20`20`20`20CopyLine(`20"$`20exit");
X`20`20`20`20ELSE
X`20`20`20`20`20`20CopyLine("$`20e`20""-W-HIGHVERS,`20Creating`20higher`20versi
Von`20of`20"",`20P1");
X`20`20ENDIF;
X
X`20`20CopyLine(`20"$file_absent:");
X`20`20CopyLine(`20"$`20w`20""-I-UNPACK,`20Unpacking`20file`20"",`20P1");
X`20`20CopyLine(`20"$`20n=P1");
X`20`20CopyLine(`20"$`20if`20P3`20.nes.`20""""`20then`20$`20n=f");
X`20`20COPY_TEXT(`20"$`20if`20.not.`20f$verify()`20then`20$`20define/user`20sys
V$output`20nl:");
X
XENDPROCEDURE;
X`0C
X!`20----------------------------------------------------------------------
X!`20This`20routine`20creates`20the`20packed`20TPU`20code`20which`20makes`20up
V`20the`20heart`20of
X!`20the`20decoding`20subroutine`20in`20the`20share`20file.`20`20To`20save`20sp
Vace,`20the`20TPU
X!`20code`20is`20tightly`20packed`20in`20the`20share`20file`20-`20see`20packTPU
V`20for`20details
X!`20----------------------------------------------------------------------
X
XPROCEDURE`20Create_Prologue_Unpacker(Xbuffer)
X
X`20`20ReuseBuffer(Xbuffer);
X
X`20`20CopyLine("$`20EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT`20'f'/OUT='n'");
X
X!`20Insert`20procedure`20to`20extract`20the`20next`20two`20digits`20as`20a`20h
Vex`20character
X`20`20PackTPU(`20"PROCEDURE`20GetHex(s,p)");
X`20`20PackTPU(`20"LOCAL`20x1,x2;");
X`20`20PackTPU(`20"`20`20x1:=INDEX(t,SUBSTR(s,p,1))-1;");
X`20`20PackTPU(`20"`20`20x2:=INDEX(t,SUBSTR(s,p+1,1))-1;");
X`20`20PackTPU(`20"`20`20RETURN`2016*x1+x2;");
X`20`20PackTPU(`20"ENDPROCEDURE;");
X
X!`20Insert`20procedure`20to`20skip`20part`20separators
X`20`20PackTPU(`20"PROCEDURE`20SkipPartsep");
X`20`20PackTPU(`20"`20`20LOOP");
X`20`20PackTPU(`20"`20`20`20`20EXITIF`20MARK(NONE)=END_OF(b);"`20);
X`20`20PackTPU(`20"`20`20`20`20EXITIF`20INDEX(ERASE_LINE,"""+Part_Begin+""")=1;
V");
X`20`20PackTPU(`20"`20`20ENDLOOP;");
X`20`20PackTPU(`20"ENDPROCEDURE;");
X
X!`20Insert`20procedure`20to`20expand`20LZW`20encoded`20substrings
X`20`20IF`20Compression`20=`20COMPRESS_LZW`20THEN
X`20`20PackTPU(`20"PROCEDURE`20COPY_PREVIOUS(b,n)");
X`20`20PackTPU(`20"LOCAL`20m,s,e;");
X`20`20PackTPU(`20"`20`20m:=MARK(NONE);MOVE_HORIZONTAL(-b);");
X`20`20PackTPU(`20"`20`20s:=MARK(NONE);MOVE_HORIZONTAL(n-1);");
X`20`20PackTPU(`20"`20`20e:=MARK(NONE);POSITION(m);COPY_TEXT(CREATE_RANGE(s,e))
V;");
X`20`20PackTPU(`20"ENDPROCEDURE;");
X`20`20ENDIF;
X
X!`20Insert`20procedure`20to`20decode`20the`20current`20line`20back`20to`20usef
Vul`20data
X`20`20PackTPU(`20"PROCEDURE`20ProcessLine");
X`20`20PackTPU(`20"LOCAL`20c,s,l,b,n,p;");
X`20`20PackTPU(`20"`20`20c`20:=`20ERASE_CHARACTER(1);");
X`20`20PackTPU(`20"`20`20s`20:=`20ERASE_LINE;");
X`20`20PackTPU(`20"`20`20IF`20c`20=`20"""+Initial_Flag+"""`20THEN`20SPLIT_LINE;
V`20ENDIF;");
X`20`20PackTPU(`20"`20`20MOVE_HORIZONTAL(-1);");
X`20`20PackTPU(`20"`20`20l`20:=`20LENGTH(s);");
X`20`20PackTPU(`20"`20`20p`20:=`201;");
X`20`20PackTPU(`20"`20`20LOOP");
X`20`20PackTPU(`20"`20`20`20`20EXITIF`20p`20>`20l;");
X`20`20PackTPU(`20"`20`20`20`20c`20:=`20SUBSTR(s,p,1);");
X`20`20PackTPU(`20"`20`20`20`20p`20:=`20p+1;");
X`20`20PackTPU(`20"`20`20`20`20CASE`20c`20FROM`20'`20'`20TO`20'`60'");
X`20`20IF`20Compression`20=`20COMPRESS_RunLength`20THEN
X`20`20PackTPU(`20"`20`20`20`20`20`20`5B'"+Run_Flag+"'`5D:`20b:=GetHex(s,p);
V`20n:=GetHex(s,p+2);`20p:=p+4;`20COPY_TEXT(ASCII(n)*b);");
X`20`20ENDIF;
X`20`20IF`20Compression`20=`20COMPRESS_LZW`20THEN
X`20`20PackTPU(`20"`20`20`20`20`20`20`5B'"+LZW_Flag+"'`5D:`20b:=GetHex(s,p);
V`20n:=GetHex(s,p+2);`20p:=p+4;`20COPY_PREVIOUS(b,n);");
X`20`20ENDIF;
X`20`20PackTPU(`20"`20`20`20`20`20`20`5B'"+Quote_Flag+"'`5D:`20COPY_TEXT(ASCII(
VGetHex(s,p)));`20p:=p+2;");
X`20`20PackTPU(`20"`20`20`20`20`20`20`5B'`20'`5D:`20p:=p+1;");
X`20`20PackTPU(`20"`20`20`20`20`20`20`5BINRANGE,OUTRANGE`5D:`20COPY_TEXT(c);");
V
X`20`20PackTPU(`20"`20`20`20`20ENDCASE;");
X`20`20PackTPU(`20"`20`20ENDLOOP;");
X`20`20PackTPU(`20"ENDPROCEDURE;");
X
X!`20Insert`20procedure`20to`20scan`20and`20decode`20the`20whole`20buffer
X`20`20PackTPU(`20"PROCEDURE`20Decode"`20);
X`20`20PackTPU(`20"`20`20POSITION(BEGINNING_OF(b));"`20);
X`20`20PackTPU(`20"`20`20LOOP"`20);
X`20`20PackTPU(`20"`20`20`20`20EXITIF`20MARK(NONE)=END_OF(b);"`20);
X`20`20PackTPU(`20"`20`20`20`20IF`20INDEX(CURRENT_LINE,"""+Part_End+""")=1`20TH
VEN");
X`20`20PackTPU(`20"`20`20`20`20`20`20SkipPartSep;");
X`20`20PackTPU(`20"`20`20`20`20ELSE");
X`20`20PackTPU(`20"`20`20`20`20`20`20ProcessLine;");
X`20`20PackTPU(`20"`20`20`20`20`20`20MOVE_HORIZONTAL(1);");
X`20`20PackTPU(`20"`20`20`20`20ENDIF;");
X`20`20PackTPU(`20"`20`20ENDLOOP;"`20);
X`20`20PackTPU(`20"ENDPROCEDURE;"`20);
X
X!`20Start`20of`20main`20program`20code`20here
X`20`20PackTPU(`20"SET(FACILITY_NAME,"""+FAC_unpack+""");"`20);
X`20`20PackTPU(`20"SET(SUCCESS,OFF);"`20);
X`20`20PackTPU(`20"SET(INFORMATIONAL,OFF);"`20);
X`20`20PackTPU(`20"t:=""0123456789ABCDEF"";"`20);`09!`20For`20decoding`20hex
V`20(see`20gethex)
X`20`20PackTPU(`20"f:=GET_INFO(COMMAND_LINE,""file_name"");"`20);
X`20`20PackTPU(`20"b:=CREATE_BUFFER(f,f);"`20);
X`20`20
X!`20Call`20the`20decoding`20routine
X`20`20PackTPU(`20"Decode;");`09`09`09`09!`20Procedure`20call
X`20`20PackTPU(`20"WRITE_FILE(b,GET_INFO(COMMAND_LINE,""output_file""));"`20);
X`20`20PackTPU(`20"QUIT;"`20);
X
XENDPROCEDURE;
X`0C
XPROCEDURE`20Create_Prologue_Trail(Xbuffer)
X
X`20`20ReuseBuffer(Xbuffer);
X
X!`20Insert`20code`20to`20Restore`20the`20file's`20record`20attributes
X`20`20CopyLine(`20"$`20if`20p3`20.eqs.`20""""`20then`20$`20goto`20dl");
X`20`20CopyLine(`20"$`20open/write`20fdl`20`26f");
X`20`20CopyLine(`20"$`20write`20fdl`20""RECORD""");
X`20`20CopyLine(`20"$`20write`20fdl`20P3");
X`20`20CopyLine(`20"$`20close`20fdl");
X`20`20CopyLine(`20"$`20w`20""-I-CONVRFM,`20Converting`20record`20format`20to
V`20"",`20P3");
X`20`20CopyLine(`20"$`20convert/fdl=`26f`20`26f-1`20`26P1");
X`20`20CopyLine(`20"$dl:`20delete`20'f'*");
X
X!`20Insert`20code`20to`20do`20a`20checksum`20and`20validate`20the`20created
V`20file;`20then`20tidy`20up
X`20`20CopyLine(`20"$`20checksum`20'P1'");
X`20`20CopyLine(`20"$`20if`20checksum$checksum`20.nes.`20P2`20then`20$`20-");
X`20`20CopyLine(`20"`20`20e`20""-E-CHKSMFAIL,`20Checksum`20of`20''P1'`20failed.
V""");
X`20`20CopyLine(`20"$`20exit");
X`20`20CopyLine(`20"$`20endsubroutine");
X`20`20COPY_TEXT(`20"$start:");
X
XENDPROCEDURE;
X
X
X
X
XPROCEDURE`20Create_Epilogue(Xbuffer);
X
X`20`20ReuseBuffer(Xbuffer);
X`20`20CopyLine("$`20v=f$verify(v)");
X`20`20COPY_TEXT("$`20exit");
X
XENDPROCEDURE;
X
X`0C
X!`20+--------------------------------------------------------------------+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20F`20I`20L`20E`20`20`20P`20A`20C`20K
V`20A`20G`20I`20N`20G`20`20`20R`20O`20U`20T`20I`20N`20E`20S`20`20`20`20`20`20
V`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Each`20file`20taken`20from`20the`20parameter`20list`20is`20read
V`20into`20a`20buffer`20and+
X!`20+`20`20`20encoded.`20The`20encoded`20buffer,`20together`20with`20a`20file
V`20header`20and`20`20`20`20`20+
X!`20+`20`20`20trailer,`20is`20then`20added`20to`20the`20existing`20part`20buff
Ver.`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`208.0`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20Andy`20Harper
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20September`201992
V`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20R`20O`20U`20T`20I`20N
V`20E`20`20`20S`20U`20M`20M`20A`20R`20Y`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_File_Header`20`20`20`20`20Generate`20the`20DCL`20prolog
V`20for`20the`20file`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20which`20copies`20the`20data`20to`20a`20scratch`20file`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_File_Trailer`20`20`20`20Generates`20the`20DCL`20epilog
V`20for`20the`20file`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20which`20generates`20the`20call`20to`20the`20unpacker`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20Create_File`20`20`20`20`20`20`20`20`20`20`20`20Gets`20the`20file
V`20into`20a`20buffer`20and`20encodes`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20the`20data.`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20PackageFile`20`20`20`20`20`20`20`20`20`20`20`20Master`20routine
V`20called`20to`20deal`20with`20a`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20single`20file`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+--------------------------------------------------------------------+
X`0C
X!`20----------------------------------------------------------------------
X!`20Create`20the`20initial`20DCL`20code`20that`20copies`20the`20encoded`20data
V`20from`20the`20share
X!`20file`20into`20a`20temporary`20file.
X!`20----------------------------------------------------------------------
X
XPROCEDURE`20Create_File_Header(Xbuffer)
X
X`20`20ReuseBuffer(Xbuffer);
X`20`20CopyLine("$!");
X`20`20COPY_TEXT("$`20create`20'f'");
X
XENDPROCEDURE;
X
X
X
X
X!`20----------------------------------------------------------------------
X!`20Get`20the`20named`20file`20into`20the`20named`20buffer;`20give`20up`20on
V`20any`20failure`20to
X!`20get`20the`20file.
X!`20----------------------------------------------------------------------
X
XPROCEDURE`20Create_File(Xbuffer,`20Filename)
XLOCAL`20r;
X
X`20`20ON_ERROR
X`20`20`20`20Inform("E","FILRDERR",`20"Error`20reading`20from`20file`20"`20+
V`20FileName);
X`20`20`20`20ABORT;
X`20`20ENDON_ERROR;
X
X`20`20IF`20Logging`20>=`20LOG_ShowFile
X`20`20`20`20THEN
X`20`20`20`20`20`20Inform("I","PACKFILE",FAO("!8%T,`20Packaging`20file`20!AS",0
V,FileName));
X`20`20ENDIF;
X
X`20`20ReuseBuffer(Xbuffer);
X`20`20READ_FILE(FileName);
X
XENDPROCEDURE;
X
X
X
X
X!`20----------------------------------------------------------------------
X!`20Add`20the`20DCL`20trailer`20line`20to`20the`20file.`20If`20the`20resultant
V`20parameters`20would
X!`20make`20the`20line`20longer`20than`20the`20maximum`20share`20file`20line
V`20length,`20then`20use
X!`20normal`20DCL`20continuation`20flags`20to`20indicate`20this`20and`20continu
Ve`20onto`20several
X!`20lines
X!`20----------------------------------------------------------------------
X
XPROCEDURE`20Create_File_Trailer(Xbuffer,`20File,`20FileAttr)
X
X`20!`20Strip`20parts`20of`20the`20file`20name`20if`20this`20has`20been`20reque
Vsted
X`20`20File`20:=`20StripFile(File);
X
X`20`20ReuseBuffer(Xbuffer);
X`20`20COPY_TEXT("$`20call`20unpack`20");`20`20`20AddDCL(File+"`20");`20`20`20A
VddDCL(FileAttr);
X
XENDPROCEDURE;
X`0C
X!`20----------------------------------------------------------------------
X!`20Package`20one`20file`20passed`20as`20a`20parameter`20into`20the`20share
V`20file`20by
X!`20writing`20the`20file`20header,`20the`20encoded`20file`20and`20the`20file
V`20trailer
X!`20----------------------------------------------------------------------
X
XPROCEDURE`20PackageFile(FileDetails)
XLOCAL`20Separator,FileAttr,FileName;
X
X`20`20`20Separator`20:=`20INDEX(FileDetails,'`20');
X`20`20`20FileName`20`20:=`20SUBSTR(FileDetails,1,separator-1);
X`20`20`20FileAttr`20`20:=`20SUBSTR(FileDetails,separator+1,LENGTH(FileDetails)
V-separator);
X
X`20`20`20Create_File_Header(WorkBuffer);
X`20`20`20Add_To_Part(WorkBuffer);
X
X`20`20`20Create_File(WorkBuffer,FileName);
X`20`20`20Encode_Buffer(WorkBuffer);
X`20`20`20Add_To_Part(WorkBuffer);
X
X`20`20`20Create_File_Trailer(WorkBuffer,FileName,FileAttr);
X`20`20`20Add_To_Part_Nosplit(WorkBuffer);
X
XENDPROCEDURE;
X`0C
X!`20+--------------------------------------------------------------------+
X!`20+`20`20`20MAIN`20PROGRAM`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20This`20is`20the`20main`20control`20loop`20of`20the`20program,
V`20responsible`20for`20`20`20`20+
X!`20+`20`20`20picking`20up`20the`20parameters,`20creating`20the`20prologue`20a
Vnd`20epilogue`20of`20+
X!`20+`20`20`20the`20share`20file,`20setting`20up`20global`20constants`20and
V`20variables`20etc.`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20It`20also`20contains`20the`20main`20loop`20which`20goes`20around
V`20each`20of`20the`20`20`20`20`20+
X!`20+`20`20`20specified`20files`20to`20be`20packed`20into`20the`20share`20file
V.`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+
X!`20+--------------------------------------------------------------------+
X
XInitialize;
X
XSET(SUCCESS,OFF);`09`09!`20Suppress`20non-error`20messages
XSET(INFORMATIONAL,OFF);
X
XParamFile`20`20`20:=`20GET_INFO(COMMAND_LINE,"FILE_NAME");
XParamBuff`20`20`20:=`20CREATE_BUFFER("`7Binfo`7D",`20ParamFile);
XPartBuffer`20`20:=`20CREATE_BUFFER("`7Bpart`7D");
XPart1Buffer`20:=`20CREATE_BUFFER("`7Bpart_1`7D");
XWorkBuffer`20`20:=`20CREATE_BUFFER("`7Bwork`7D");
X
X
X!`20Pick`20up`20parameters`20from`20the`20outside`20world
XPOSITION(ParamBuff);
XFacility`20`20`20`20`20`20`20`20`20`20`20`20:=`20ERASE_LINE;
XVersion_Number`20`20`20`20`20`20:=`20ERASE_LINE;
XMin_VMS`20`20`20`20`20`20`20`20`20`20`20`20`20:=`20ERASE_LINE;
XMax_TPU_Line_Length`20:=`20INT(ERASE_LINE);
XMax_Share_Length`20`20`20`20:=`20INT(ERASE_LINE);
XDebugging`20`20`20`20`20`20`20`20`20`20`20:=`20INT(ERASE_LINE);
XLogging`20`20`20`20`20`20`20`20`20`20`20`20`20:=`20INT(ERASE_LINE);
XPart_Size`20`20`20`20`20`20`20`20`20`20`20:=`20INT(ERASE_LINE);
XCompression`20`20`20`20`20`20`20`20`20:=`20INT(ERASE_LINE);
XDirKeep`20`20`20`20`20`20`20`20`20`20`20`20`20:=`20INT(ERASE_LINE);
XVersKeep`20`20`20`20`20`20`20`20`20`20`20`20:=`20INT(ERASE_LINE);
XUsername`20`20`20`20`20`20`20`20`20`20`20`20:=`20ERASE_LINE;
XShare_File`20`20`20`20`20`20`20`20`20`20:=`20ERASE_LINE;
X
XSET(FACILITY_NAME,`20Facility);`09!`20identify`20ourself`20in`20errors
XIF`20Debugging`20>=`20DEBUG_SIMess`20THEN`20SET(SUCCESS,ON);`20SET(INFORMATION
VAL,ON);`20ENDIF;
X
X!`20Initialize`20stuff`20to`20go`20through`20files
XPartNo`20:=`200;
XMax_Bytes`20:=`20(512`20*`20Part_Size)`20-`20LENGTH(FAO(FAO_start_part,Max_Par
Vts))`20-`20EOL;
X
X!`20Create`20the`20initial`20share`20file`20header
XCreate_Prologue_Head(WorkBuffer,`20Username,`20Part_Size,`20ParamBuff);
XAdd_To_Part(WorkBuffer);
XCreate_Prologue_Unpacker(WorkBuffer);
XAdd_To_Part_Nosplit(WorkBuffer);
XCreate_Prologue_Trail(WorkBuffer);
XAdd_To_Part(WorkBuffer);
X
X
X!`20Loop`20around,`20filling`20the`20part`20buffer`20with`20data`20from`20file
Vs
XLOOP
X`20`20`20EXITIF`20GET_INFO(ParamBuff,"RECORD_COUNT")`20=`200;
X`20`20`20POSITION(BEGINNING_OF(ParamBuff));
X`20`20`20PackageFile(ERASE_LINE);
XENDLOOP;
X
X
X!`20Add`20the`20share`20file`20epilogue`20to`20exit`20cleanly
XCreate_Epilogue(WorkBuffer);
XAdd_To_Part(WorkBuffer);
X
X
X!`20Flush`20out`20the`20last`20part`20if`20its`20contents`20are`20not`20empty
XFlushPart;
X
X
X!`20Massage`20the`20contents`20of`20the`20initial`20part`20to`20accurately`20r
Veflect`20the`20number`20of
X!`20Parts`20generated`20and`20to`20give`20the`20appropriate`20instructions`20i
Vf`20more`20than`201`20part
XPOSITION(`20BEGINNING_OF(Part1Buffer)`20);
XPOSITION(`20SEARCH(`20"$!+",`20FORWARD)`20);
XIF`20PartNo`20>`201
X`20`20THEN`09!`20Modify`20the`20inital`20message`20to`20state`20exact`20number
V`20of`20parts
X`20`20`20`20`20POSITION(`20SEARCH(`20STR(Max_Parts),`20FORWARD)`20);
X`20`20`20`20`20ERASE_CHARACTER(3);
X`20`20`20`20`20COPY_TEXT(`20STR(PartNo)`20);
X`20`20ELSE`09!`20Erase`20initial`20attention`20message`20as`20there's`20only
V`201`20part!
X`20`20`20`20`20ERASE_LINE;`20ERASE_LINE;`20ERASE_LINE;
XENDIF;
X
X
X!`20Finally`20flush`20out`20the`20first`20part
XWritePart(Part1Buffer,1);
X
X
X!`20In`20this`20version,`20we`20write`20a`20value`20back`20to`20the`20paramete
Vr`20file`20to`20indicate`20how
X!`20many`20parts`20were`20generated.
XReuseBuffer(WorkBuffer);
XCOPY_TEXT(STR(PartNo));
XWRITE_FILE(WorkBuffer,`20ParamFile);
X
XQUIT;
X$`20if`20.not.`20$status`20then`20$`20goto`20abort
X$`20return
$ call unpack VMS_SHARE.COM;191 2020019812 ""
$!
$ create 'f'
X!`20Version`208.2`20Of`20VMS_SHARE
X!`20`20`20`20`20`20-`208`20Jan`201993,`20`20Andy`20Harper,`20`20Kings`20Colleg
Ve`20London`20UK
X1`20VMS_SHARE
X
XPackage`20a`20series`20of`20files`20into`20a`20form`20suitable`20for`20mailing
V`20out
Xacross`20the`20network.`20
X
XFormat:
X`20`20`20`20`20$`20VMS_SHARE`20filespec`20sharefile`20`5B/qualifiers`5D
X
X2`20Author
X
XThe`20VMS_SHARE`20software`20is`20written`20by:
X
XAndy`20Harper,
XSystems`20Manager,
XComputing`20Centre,
XKings`20College`20London,
XThe`20Strand,
XLondon`20WC2R`202LS
XEngland
X
XThe`20software`20and`20all`20associated`20files`20remains`20the`20copyright
V`20of
Xthe`20author`20but`20may`20be`20freely`20distributed`20without`20charge`20to
V`20any
Xother`20user,`20provided`20that`20all`20copyright`20notices`20are`20retained
Xintact.
X
XNo`20guarantees`20are`20offered`20as`20to`20the`20suitability`20of`20this`20so
Vftware
Xfor`20any`20given`20purpose.`20Any`20errors`20arising`20from`20its`20use`20are
V`20the
Xresponsibility`20of`20the`20user.
X
XBug`20reports`20and`20suggestions`20for`20new`20features`20are`20always`20welc
Vomed
Xbut`20no`20committment`20is`20made`20to`20acting`20on`20them.
X
X2`20Bugs
X
XAt`20this`20time,`20the`20following`20problems`20are`20known`20to`20exist`20wi
Vth`20the
XVMS_SHARE`20package
X
XRecord`20size`20determination.
X
XVMS`20provides`20no`20facility`20for`20the`20utility`20to`20determine`20the
V`20longest
Xrecord`20actually`20stored`20in`20a`20file.`20Where`20the`20record`20length
V`20cannot
Xbe`20determined,`20record`20buffers`20of`20inadequate`20size`20may`20be`20used
V`20and
Xthe`20file`20will`20fail`20to`20be`20packaged.`20All`20cases`20should`20result
V`20in`20an
Xerror`20message,`20although`20these`20may`20not`20appear`20until`20processing
V`20of
Xthe`20file`20begins.
X
XIt`20will`20be`20necessary`20to`20use`20the`20CONVERT`20utility`20on`20such
V`20a`20file`20to
Xensure`20that`20the`20MRS`20field`20of`20the`20file`20header`20is`20set`20to
V`20a`20value`20at
Xleast`20equal`20to`20the`20longest`20record.
X
X2`20Examples
X
X`20`20`20`20`20$`20VMS_SHARE`20*.for`20SOURCE
X`20`20`20`20`20`20`20`20`20`20Package`20all`20the`20files`20ending`20in`20.FOR
V`20into`20the`20sharefile
X`20`20`20`20`20`20`20`20`20`20'SOURCE'.`20Parts`20will`20be`20created`20called
V`20SOURCE.1-OF-n,
X`20`20`20`20`20`20`20`20`20`20SOURCE.2-OF-n`20...`20etc.
X
X`20`20`20`20`20$`20VMS_SHARE`20`5B...`5D*.*`20SBDIR
X`20`20`20`20`20`20`20`20`20`20Package`20all`20the`20files`20in`20all`20subdire
Vctories`20below`20the
X`20`20`20`20`20`20`20`20`20`20current`20one.`20The`20directory`20structure,
V`20relative`20to`20the
X`20`20`20`20`20`20`20`20`20`20current`20directory,`20will`20be`20preserved`20a
Vnd`20recreated`20at
X`20`20`20`20`20`20`20`20`20`20the`20unpacking`20stage.
X
X`20`20`20`20`20$`20VMS_SHARE`20`5B...`5D*.*`20SAVE`20/LOG`20/LONGLINES`20/COMP
VRESS
X`20`20`20`20`20`20`20`20`20`20Package`20all`20the`20files`20in`20all`20subdire
Vctories`20below`20the
X`20`20`20`20`20`20`20`20`20`20current`20one.`20Select`20logging,`20long`20line
V`20support`20and`20run
X`20`20`20`20`20`20`20`20`20`20length`20compression.
X
X2`20Compression_Overview
XThe`20files`20being`20packaged`20may`20optionally`20be`20compressed`20using
V`20one
Xof`20two`20supported`20methods.`20`20The`20first`20method`20is`20run-length
Xencoding,`20where`20sequences`20of`20the`20same`20character`20are`20encoded
V`20into
Xa`20byte`20count,`20the`20second`20method`20is`20a`20modified`20version`20of
V`20the
XLempel-Ziv`20encoding`20that`20looks`20for`20common`20substrings`20and`20encod
Ves
Xthem.
X
XBoth`20forms`20of`20compression`20cause`20significantly`20longer`20packaging
Xtimes,`20with`20lempel-Ziv`20compression`20taking`20the`20longest,`20but
Xgenerally`20producing`20the`20best`20compression.
X
XCompression`20should`20not`20automatically`20be`20selected.`20The`20additional
V
XCPU`20time`20is`20significant`20and`20only`20worth`20using`20if`20there`20is
V`20some
Xadded`20benefit,`20such`20as`20reducing`20disk`20storage`20used`20on`20a`20fil
Ve
Xserver,`20or`20reducing`20the`20network`20bandwidth`20inherent`20in`20sending
V`20a
Xpackage`20to`20several`20users.`20Each`20case`20should`20be`20looked`20at
Xseparately.`20Also,`20some`20kinds`20of`20file`20may`20not`20benefit`20from
Xcompression.
X
XSee`20the`20/COMPRESS`20qualifier`20for`20details`20of`20selecting`20compressi
Von.
X
X2`20Filespec
X
X`20`20`20`20`20`20`20`20`20`20A`20comma-separated`20list`20of`20wildcarded`20f
Vilename
X`20`20`20`20`20`20`20`20`20`20specifications.`20All`20files`20which`20match
V`20the`20pattern(s)
X`20`20`20`20`20`20`20`20`20`20are`20packaged.`20
X
XThere`20are`20some`20restrictions:-
X`20`20`20`20`20-`20The`20output`20share`20file`20name`20may`20not`20be`20inclu
Vded`20in`20the`20list.
X`20`20`20`20`20-`20files`20ending`20in`20.DIR`20(normally`20directory`20files)
V`20are`20ignored.
X`20`20`20`20`20-`20Files`20must`20exist`20in`20or`20below`20the`20current`20di
Vrectory`20(this
X`20`20`20`20`20`20`20restriction`20is`20relaxed`20if`20the`20/NODIRECTORY`20qu
Valifier`20is`20used).
X
XA`20prompt`20is`20issued`20if`20no`20files`20are`20specified.
X
X2`20Logical_Names
X
XSeveral`20logical`20names`20can`20be`20configured`20to`20modify`20the`20defaul
Vts
Xbuilt-in`20to`20the`20VMS_SHARE`20package.`20Where`20a`20corresponding`20comma
Vnd
Xline`20qualifier`20exists,`20this`20will`20override`20the`20setting`20of`20the
V
Xlogical`20name.
X
X3`20SHARE_COMPRESS
X
XThis`20logical`20name`20may`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20or
Xwith`20a`20numeric`20integer`20value`200`20to`202,`20to`20set`20the`20default
V`20for`20the
Xcompression`20option.`20For`20full`20details`20of`20the`20compression`20option
Vs,
Xsee`20the`20/COMPRESS`20qualifier.
X
XIf`20not`20defined,`20no`20additional`20compression`20is`20the`20default.
X
X3`20SHARE_CONFIRM
X
XThis`20logical`20name`20may`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20to
Xset`20the`20default`20value`20for`20the`20file`20selection`20confirmation`20op
Vtion,
Xwhere`20the`20user`20is`20asked`20to`20confirm`20each`20file`20selected.`20For
V`20full
Xdetails`20of`20the`20confirmation`20option,`20see`20the`20/CONFIRM`20qualifier
V.
X
XIf`20not`20defined,`20no`20confirmation`20is`20the`20default.
X3`20SHARE_DEBUG
X
XThis`20logical`20name`20may`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20or`20a
Xnumeric`20integer`20value`200-4,`20to`20set`20the`20default`20value`20for`20th
Ve
Xdebugging`20option.`20For`20full`20details`20of`20the`20debugging`20option,
V`20see
Xthe`20/DEBUG`20qualifier.
X
XIf`20not`20defined,`20no`20debugging`20output`20is`20the`20default.
X
X3`20SHARE_DIRECTORY
X
XThis`20logical`20name`20may`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20to
Xset`20the`20default`20value`20for`20the`20directory`20preservation`20option.
V`20For
Xfull`20details,`20see`20the`20/DIRECTORY`20qualifier.
X
XIf`20not`20defined,`20preserving`20subdirectory`20names`20is`20the`20default.
X
X3`20SHARE_EXCLUDE
X
XThis`20logical`20name`20may`20be`20defined`20witha`20comma`20separated`20list
V`20of
Xdirectory,`20name,`20type`20and`20version`20specifications,`20to`20set`20the
Xdefault`20value`20for`20excluded`20files.`20For`20full`20details,`20see`20the
X/EXCLUDE`20qualifier.
X
XIf`20not`20defined,`20the`20default`20is`20to`20exclude`20no`20files.
X
X3`20SHARE_LOG
X
XThis`20logical`20name`20can`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20or`20a
Xnumeric`20integer`20value`20in`20the`20range`200-2.`20to`20set`20the`20default
V`20value
Xfor`20the`20logging`20option.`20For`20full`20details,`20see`20the`20/LOG`20qua
Vlifier.
X
XIf`20not`20defined,`20then`20no`20logging`20messages`20are`20displayed.
X3`20SHARE_LONGLINES
X
XThis`20logical`20name`20can`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20to
Xset`20the`20default`20value`20for`20the`20long`20lines`20option.`20For`20full
Xdetails,`20see`20the`20/LONGLINES`20qualifier.
X
XThe`20option`20can`20be`20enabled`20only`20if`20running`20VMS`205.4`20or`20gre
Vater.
X
XIf`20not`20defined,`20then`20the`20default`20is`20not`20to`20select`20long`20l
Vine
Xsupport.
X
X3`20SHARE_PACKAGE_INDEX
X
XThis`20logical`20name`20can`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20or`20a
Xfile`20type`20identifier,`20to`20set`20the`20default`20for`20the`20creation
V`20of`20a
Xpackage`20index`20file`20containing`20a`20list`20of`20all`20generated`20part
V`20names.
XThis`20is`20for`20use`20by`20mail`20based`20file`20servers.`20For`20full`20det
Vails,`20see
Xthe`20/PACKAGE_INDEX`20qualifier.
X
XIf`20not`20defined,`20the`20default`20is`20not`20to`20create`20a`20package`20i
Vndex.
X
X3`20SHARE_PART_SIZE
X
XThis`20logical`20name`20can`20be`20defined`20with`20a`20positive`20integer`20v
Value,
Xto`20set`20the`20maximum`20part`20size.`20The`20value`20is`20specified`20in
V`20blocks.
XFor`20full`20details,`20see`20the`20/PART_SIZE`20qualifier.
X
XIf`20not`20defined,`20the`20default`20size`20is`2030`20blocks.
X
X3`20SHARE_REAL_NAME
X
XDefines`20a`20string`20which`20is`20included`20at`20the`20head`20of`20the`20cr
Veated`20share`20file
Xfollowing`20the`20username`20of`20the`20user`20who`20created`20it.`20`20It`20i
Vs`20intended`20that
Xit`20will`20contain`20the`20real`20name`20of`20the`20user`20(For`20example,
V`20"FRED`20SMITH").`20
X
X3`20SHARE_VERSION
X
XThis`20logical`20name`20can`20be`20defined`20with`20a`20TRUE`20or`20FALSE`20va
Vlue,`20to
Xset`20the`20default`20for`20the`20version`20number`20preservation`20option.
V`20For
Xfull`20details,`20see`20the`20/VERSION`20qualifier.
X
XIf`20not`20defined,`20the`20default`20is`20to`20preserve`20version`20numbers.
X
X3`20SHARE_TEMP
X
XDefines`20the`20name`20of`20a`20file`20to`20be`20used`20as`20a`20scratch`20fil
Ve`20during`20the
Xpackaging`20operation.`20
X
XDefaults`20are`20taken`20from`20the`20name`20`20SYS$SCRATCH:SHARE_TEMP.'pid'
V`20where
X'pid'`20is`20the`20current`20Process`20Identification`20number.`20
X
X3`20SHARE_UNPACK_LOG
X
XIf`20defined`20with`20the`20value`20"TRUE",`20then`20logging`20of`20the`20shar
Vefile
Xunpacking`20operation`20is`20turned`20on,`20giving`20a`20display`20of`20each
V`20file`20as`20it`20is
Xunpacked.`20If`20defined`20with`20the`20value`20"FALSE",`20no`20display`20is
Xissued.`20It`20is`20off`20by`20default.
X
X3`20SHARE_UNPACK_TEMP
X
XDefines`20the`20name`20of`20a`20file`20to`20be`20used`20as`20a`20scratch`20fil
Ve`20during`20the
Xunpacking`20operation.`20
X
XDefaults`20are`20taken`20from`20the`20name`20`20SYS$SCRATCH:SHARE_UNPACK_TEMP.
V'pid'
Xwhere`20'pid'`20is`20the`20current`20Process`20Identification`20number.
X
X3`20SHARE_UNPACK_VERIFY
X
XIf`20defined`20with`20the`20value`20"TRUE",`20then`20verification`20of`20the
V`20sharefile
Xunpacking`20operation`20is`20turned`20on.`20If`20defined`20with`20the`20value
X"FALSE",`20verification`20is`20turned`20off.`20It`20is`20off`20by`20default.
X
XNote`20that`20verification`20here`20refers`20to`20DCL`20verfiication`20of`20th
Ve
Xshare`20file`20as`20the`20commands`20within`20it`20are`20executed.`20As`20such
V,`20the
Xuser`20must`20have`20read`20access`20to`20the`20file`20for`20this`20logical
V`20name`20to
Xbe`20effective.
X
X3`20SHARE_VERIFY
X
XIf`20defined`20with`20the`20value`20"TRUE"`20then`20verification`20of`20the
V`20VMS_SHARE
Xprocedure`20is`20turned`20on.`20If`20defined`20with`20"FALSE",`20verification
V`20is`20turned
Xoff.`20It`20is`20off`20by`20default.
X
XNote`20that`20verification`20here`20refers`20to`20DCL`20verfiication`20of`20th
Ve
XVMS_SHARE`20procedure`20as`20the`20commands`20within`20it`20are`20executed.
V`20As
Xsuch,`20the`20user`20must`20have`20read`20access`20to`20the`20file`20for`20thi
Vs`20logical
Xname`20to`20be`20effective.
X
X2`20Old_Logical_Names
X
XThese`20logical`20names`20are`20still`20recognized`20but`20have`20been`20super
Vceded.
XThey`20may`20be`20withdrawn`20in`20a`20future`20release`20of`20the`20software.
V
X
X3`20SHARE_EXCLUDE_DIRS
X
XIf`20defined`20with`20a`20comma`20separated`20list`20of`20directory`20specific
Vations,
Xenclosed`20in`20quotes,`20any`20file`20matching`20any`20of`20the`20listed`20di
Vrectories`20will
Xbe`20excluded`20from`20the`20packaging`20operation.
X
XWildcards`20are`20not`20permitted;`20all`20directories`20must`20be`20listed
V`20in`20full.`20
X
XNote`20that`20this`20qualifier,`20while`20still`20valid,`20is`20redundant`20an
Vd`20has`20been
Xfunctionally`20replaced`20by`20the`20SHARE_EXCLUDE`20logical`20name.`20Unlike
XSHARE_EXCLUDE`20however,`20use`20of`20the`20/EXCLUDE`20qualifier`20adds`20to,
Xrather`20than`20overriding,`20the`20effect`20of`20this`20logical`20name.
X
X3`20SHARE_EXCLUDE_FILES
X
XIf`20defined`20with`20a`20comma`20separated`20list`20of`20file`20names`20(NAME
V`20and`20TYPE
Xonly)`20then`20any`20file`20whose`20combined`20name`20and`20type`20matches`20a
Vny`20of`20those
Xlisted`20will`20be`20excluded`20from`20the`20packaging`20operation.
X
XWildcards`20are`20not`20permitted.
X
XNote`20that`20this`20qualifier,`20while`20still`20valid,`20is`20redundant`20an
Vd`20has`20been
Xfunctionally`20replaced`20by`20the`20SHARE_EXCLUDE`20logical`20name.`20Unlike
XSHARE_EXCLUDE`20however,`20use`20of`20the`20/EXCLUDE`20qualifier`20adds`20to,
Xrather`20than`20overriding,`20the`20effect`20of`20this`20logical`20name.
X
X3`20SHARE_EXCLUDE_NAMES
X
XIf`20defined`20with`20a`20comma`20separated`20list`20of`20names,`20enclosed
V`20in`20quotes,`20any
Xfile`20whose`20NAME`20part`20matches`20any`20of`20the`20listed`20names`20will
V`20be`20excluded
Xfrom`20the`20packaging`20operation.`20
X
XWildcards`20are`20not`20permitted.
X
XNote`20that`20this`20qualifier,`20while`20still`20valid,`20is`20redundant`20an
Vd`20has`20been
Xfunctionally`20replaced`20by`20the`20SHARE_EXCLUDE`20logical`20name.`20Unlike
XSHARE_EXCLUDE`20however,`20use`20of`20the`20/EXCLUDE`20qualifier`20adds`20to,
Xrather`20than`20overriding,`20the`20effect`20of`20this`20logical`20name.
X
X3`20SHARE_EXCLUDE_TYPES
X
XIf`20defined`20with`20a`20comma`20separated`20list`20of`20file`20types,`20encl
Vosed`20in
Xquotes,`20any`20file`20whose`20TYPE`20part`20matches`20any`20of`20the`20listed
V`20types`20will`20be
Xexcluded`20from`20the`20packaging`20operation.`20
X
XWildcards`20are`20not`20permitted.
X
XNote`20that`20this`20qualifier,`20while`20still`20valid,`20is`20redundant`20an
Vd`20has`20been
Xfunctionally`20replaced`20by`20the`20SHARE_EXCLUDE`20logical`20name.`20Unlike
XSHARE_EXCLUDE`20however,`20use`20of`20the`20/EXCLUDE`20qualifier`20adds`20to,
Xrather`20than`20overriding,`20the`20effect`20of`20this`20logical`20name.
X
X2`20Operational_Notes
X
XVMS_SHARE`20packages`20all`20the`20specified`20files`20into`20one`20or`20more
V`20parts`20having
Xa`20common`20filename`20prefix`20and`20a`20suffix`20of`20the`20form
X
X`20`20`20nnn-OF-mmm
X
Xwhere`20nnn`20is`20the`20part`20number`20and`20mmm`20is`20the`20total`20number
V`20of`20parts.
XMultiple`20parts`20will`20be`20created`20if`20the`20total`20size`20of`20a`20pa
Vrt`20exceeds`20the
Xspecified`20maximum`20size`20(taken`20from`20the`20logical`20SHARE_PART_SIZE
V`20or
Xfrom`20the`20qualifier`20/PART_SIZE).`20
X
XEach`20part`20is`20encoded`20so`20that`20it`20can`20survive`20destruction`20wh
Ven`20mailed
Xacross`20the`20network`20through`20unfriendly`20mailers`20which`20wrap`20lines
V,
Xtranspose`20characters`20etc.`20A`20checksum`20is`20included`20which`20can`20d
Vetect`20damage
Xat`20the`20receiving`20end.`20
X
XTo`20unpack,`20all`20parts`20must`20be`20concatenated`20in`20order`20and`20the
V`20whole
Xexecuted`20as`20a`20command`20procedure.`20It`20is`20preferable`20to`20be`20in
V`20an`20empty
Xscratch`20directory`20when`20doing`20this.`20If`20the`20parts`20have`20been
V`20received`20via
Xmail`20then`20it`20is`20NOT`20necessary`20to`20remove`20the`20mail`20headers
V`20between`20parts
Xbefore`20concatenating`20them.`20`20The`20unpack`20code`20will`20ignore`20them
V`20if`20present.
XHowever,`20mail`20headers`20should`20be`20removed`20from`20the`20initial`20par
Vt.`20
X
X2`20Qualifiers
X
XA`20number`20of`20qualifiers`20may`20be`20specified`20to`20override`20the`20de
Vfault`20settings
Xand`20specify`20some`20options.
X
X/BACKUP
X
X`20`20/BACKUP
X
X`20`20Specifies`20that`20files`20selected`20on`20the`20basis`20of`20date`20(vi
Va`20the
X`20`20/BEFORE`20and/or`20/SINCE`20qualifiers)`20should`20use`20the`20`60last
V`20backup
X`20`20date'`20as`20the`20basis`20of`20selection.
X
X`20`20If`20any`20combination`20of`20/BACKUP,`20/CREATED,`20EXPIRED`20and`20/MO
VDIFIED
X`20`20are`20specified`20together,`20then`20only`20the`20last`20one`20specified
V`20takes
X`20`20effect.
X
X`20`20The`20default`20is`20to`20use`20the`20`60last`20modified`20date'.
X
X/BEFORE
X
X`20`20/BEFORE`5B=date`5D
X
X`20`20Selects`20only`20files`20with`20access`20dates`20before`20the`20date`20s
Vpecified.
X`20`20By`20default,`20the`20date`20does`20not`20have`20to`20be`20before`20any
V`20specific
X`20`20date`20to`20be`20selected.
X
X`20`20The`20date`20specification`20can`20be`20any`20absolute`20or`20delta`20ti
Vme
X`20`20combination`20normally`20acceptable`20to`20VMS`20with`20ONE`20exception
V`20-`20it
X`20`20may`20not`20contain`20any`20spaces.`20`20To`20enter`20a`20combined`20dat
Ve`20and`20time,
X`20`20use`20a`20colon`20to`20separate`20to`20two`20E.G.`20`2010-AUG-1992:15:00
V:00.00.
X`20`20Any`20missing`20field`20is`20taken`20to`20be`20that`20of`20the`20CURRENT
V`20time.
+-+-+-+-+-+-+-+-  END  OF PART 4 +-+-+-+-+-+-+-+-
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads