🚀 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:33
VMS_SHARE V8.2, part 01/09
#142
Author: Andy, Systems Manager
Date: Mon, 25 Jan 1993 21:33
1355 lines
50370 bytes
Submitted-by: "Andy, Systems Manager" <UDAA055@ELM.CC.KCL.AC.UK>
Posting-number: Volume 4, Issue 45
Archive-name: vms_share/part01
Supersedes: vms_share: Volume 3, Issue 87-89

  VMS_SHARE is designed to package a series of files into a multi-part
  share file suitable for mailing across a network. Files are encoded to
  be resistant to the corruption that many mailers and networks
  generate.  When all parts of the share file are combined and run as a
  command procedure, the packaged directory tree is recreated in its
  original format.

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 8.2
$!   On 25-JAN-1993 13:14:48.47   By user BERRYMAN
$!
$! The VMS_SHARE software that created this archive
$!    was written by  Andy Harper, Kings College London UK
$!    -- December 1992
$!
$! Credit is due to these people for their original ideas:
$!    James Gray, Michael Bednarek 
$!
$!+ THIS PACKAGE DISTRIBUTED IN 9 PARTS, TO KEEP EACH PART
$!  BELOW 100 BLOCKS
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. PAKMAIL.COM;23
$!       2. PAKMAIL.HLP;10
$!       3. TEST.TXT;2
$!       4. VMS_SHARE.COM;191
$!       5. VMS_SHARE.HLP;34
$!       6. VMS_SHARE.RELEASE_NOTES;46
$!       7. VMS_SHARE.TECHNICAL_INFO;22
$!       8. VMS_SHARE.USER_GUIDE;33
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack: subroutine ! P1=filename, P2=checksum, P3=attributes
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking file ", P1
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;
PROCEDURE SkipPartsep LOOP EXITIF MARK(NONE)=END_OF(b);EXITIF INDEX(ERASE_LINE,
"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;PROCEDURE ProcessLine LOCAL c,s,l,b,
n,p;c := ERASE_CHARACTER(1);s := ERASE_LINE;IF c = "X" THEN SPLIT_LINE; ENDIF;
MOVE_HORIZONTAL(-1);l := LENGTH(s);p := 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);
p := p+1;CASE c FROM ' ' TO '`' ['`']: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[
' ']: p:=p+1;[INRANGE,OUTRANGE]: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;
PROCEDURE Decode POSITION(BEGINNING_OF(b));LOOP EXITIF MARK(NONE)=END_OF(b);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");b:=CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,GET_INFO(
COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl=&f &f-1 &P1
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
  e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X$!`20Purpose:
X$!`09To`20mail`20out`20a`20series`20of`20files`20produced`20by`20VMS_SHARE`20t
Vo`20a`20series
X$!`09of`20recipients.
X$!
X$!`20Parameters:
X$!
X$!`09P1`20=`20name`20(or`20list`20)`20of`20recipient(s).`20Can`20be`20logical
V`20or`20distribution
X$!`20`20`20`20`20`20`20`20`20`20`20list.
X$!
X$!`09`09If`20sending`20to`20a`20distribution`20list,`20it`20is`20necessary`20t
Vo`20define
X$!`09`09a`20logical`20pointing`20to`20the`20file`20and`20then`20give`20that
V`20logical`20as
X$!`09`09the`20recipient`20name.`20`20This`20avoids`20problems`20with`20DCL's
V`20handling
X$!`09`09of`20quotes`20and`20'@'`20symbols.
X$!
X$!
X$!`09P2`20=`20file`20spec`20of`20package`20-`20"`5Bdirectory`5Dfile"`20without
V`20VMS_SHARE`20suffix!
X$!
X$!
X$!`09P3`20=`20no`20of`20parts`20of`20the`20package
X$!
X$!`20`09`09This`20procedure`20adds`20the`20VMS_SHARE`20suffix`20and`20sends
V`20files
X$!`09`09called`20`20"`5Bdirectory`5Dfile''nn'-OF-''P3'"`20`20`20nn`20from`201-
V>`20'P3'
X$!
X$!`09P4`20=`20Optional`20list`20of`20parts`20to`20be`20sent`20(default:`20all
V`20parts)
X$!
X$!`09P5`20=`20Comment`20to`20add`20to`20mail`20subject`20line
X$!
X$!
X$!`20Privileges:
X$!`09Whatever`20is`20necessary`20to`20access`20e-mail`20and`20the`20relevant
V`20network.
X$!
X$!
X$!`20Environment:
X$!`09Nothing`20special.`20`20VMS_SHARE`20must`20exist`20of`20course`20in`20ord
Ver`20to
X$!`09produce`20the`20software`20package.
X$!
X$!`20Revision`20History:
X$!`091.0`09Andy`20Harper`096-DEC-1988`09Original`20version
X$!`091.1`09Andy`20Harper`0919-DEC-1988`09Allow`20P4`20to`20be`20mail`20subject
V
X$!`091.2`09Andy`20Harper`095-JAN-1989`09Return`20exit`20status
X$!`091.3`09Andy`20Harper`0916-JUN-1989`09Remove`20"OF_''mm'"`20extension
X$!`091.4`09Andy`20Harper`093-AUG-1989`09use`20READ,`20check`20EOF`20status
X$!`091.5`09Andy`20Harper`093-SEP-1992`09Update`20part`20format
X$!`092.0`09Andy`20Harper`098-JAN-1993`09Recode`20for`20V5;`20add`20part`20list
V
X$!
X$!
X$
X$
X$!`20SET`20UP`20STANDARD`20EXIT`20CODES
X$`20ss$_normal=`201
X$`20ss$_abort`20=`2044
X$
X$!`20SET`20UP`20USEFUL`20SYMBOLS
X$`20em="write`20sys$error`20""%"`20+f$parse(f$environment("PROCEDURE"),,,"NAME
V")+""","
X$
X$
X$!`20MAKE`20SURE`20WE`20HAVE`20ALL`20THE`20REQUIRED`20PARAMETERS
X$
X$!`20P1:`20E-mail`20address`20of`20recipient(s)
X$get_recipient:
X$`20P1`20=`20f$edit(P1,"TRIM,UPCASE")
X$`20if`20P1`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20`20read/prompt="_mail`20address`20of`20recipient`20"/end=exit
V`20sys$command`20P1
X$`20`20`20`20`20`20goto`20get_recipient
X$`20endif
X$
X$
X$!`20P2:`20Name`20of`20package`20to`20be`20sent
X$package_location:
X$`20P2`20=`20f$edit(P2,"TRIM,UPCASE")
X$`20if`20P2`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20read/prompt="_Enter`20package`20directory`20and`20base`20filen
Vame`20"/end=exit`20sys$command`20P2
X$`20`20`20`20`20goto`20package_location
X$`20endif
X$`20P2`20=`20f$parse(P2,,,,"SYNTAX_ONLY")`20-`20f$parse(P2,,,"VERSION")
X$`20if`20f$parse(P2,,,"TYPE")`20.nes.`20"."`20then`20$`20P2`20=`20P2`20+`20"_"
V
X$
X$
X$!`20P3:`20`20Total`20number`20of`20parts`20in`20the`20package
X$get_parts:
X$`20P3`20=`20f$edit(P3,"TRIM")
X$`20if`20P3`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20read/prompt="_Enter`20number`20of`20parts`20"/end=exit`20sys$c
Vommand`20P3
X$`20`20`20`20`20goto`20get_parts
X$`20endif
X$
X$`20if`20f$type(P3)`20.nes.`20"INTEGER"
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-NONNUMTOT,`20Non-numeric`20total`20part`20count`20-
V`20",`20P3
X$`20`20`20`20`20exit`20ss$_abort
X$`20endif
X$
X$
X$!`20P4:`20(Optional)`20list`20of`20parts`20to`20be`20sent,`20defaults`20to
V`20all`20parts
X$!`20P5:`20(Optional)`20comment`20to`20add`20to`20mail`20subject`20line
X$
X$
X$!`20SET`20UP`20USEFUL`20SYMBOLS
X$`20package`20=`20f$parse(P2,,,"NAME")
X$`20l`20=`20f$length(P3)
X$
X$
X$!`20IS`20THERE`20A`20SET`20OF`20FILES`20THAT`20MATCHES`20THE`20SPECIFICATION?
V?
X$`20x`20=`20f$fao("!AS*-OF-!ZL",P2,f$integer(P3))
X$`20if`20f$search("''x'")`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-PACKAGE,`20Cannot`20find`20any`20parts`20for`20",`20P
Vackage
X$`20`20`20`20`20exit`20ss$_abort
X$`20endif
X$
X$
X$!`20DO`20A`20DUMMY`20RUN`20TO`20MAKE`20SURE`20ALL`20REQUIRED`20FILES`20ARE
V`20THERE!!!!!
X$`20Really_Post_It`20=`20"FALSE"
X$`20gosub`20PostParts
X$
X$!`20WERE`20ALL`20THE`20PARTS`20FOUND?`20IF`20NOT,`20NOW'S`20THE`20TIME`20TO
V`20FIND`20OUT!
X$`20if`20.not.`20OK
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-PARTERRS,`20Error`20with`20one`20or`20more`20parts.
V`20Abandoning`20send"
X$`20`20`20`20`20exit`20ss$_abort
X$`20endif
X$
X$!`20NOW`20DOE`20A`20REAL`20RUN`20AND`20POST`20THE`20PARTS
X$`20Really_Post_It`20=`20"TRUE"
X$`20gosub`20PostParts
X$`20exit
X$
X$
X$!`20-------------------------------------------------------------------------
V
X$!`20Routine`20to`20post`20all`20the`20required`20parts;`20Really_Post_It`20mu
Vst`20be`20"TRUE"
X$!`20-------------------------------------------------------------------------
V
X$PostParts:
X$`20n`20=`200
X$`20OK`20=`20"TRUE"
X$NextPart:
X$`20n`20=`20n+1
X$`20part`20=n
X$
X$!`20If`20a`20part`20list`20was`20specified,`20use`20these;`20otherwise`20do
V`20all`20parts
X$`20if`20P4`20.nes.`20""
X$`20`20`20then
X$
X$`20!`20Extract`20the`20next`20required`20part`20number
X$`20`20`20`20`20part`20=`20f$element(n-1,",",P4)
X$`20`20`20`20`20if`20part`20.eqs.`20","`20then`20$`20return`09!`20no`20more
V`20parts,`20give`20up`20here
X$
X$`20!`20Make`20sure`20they've`20not`20given`20us`20a`20dodo`20....
X$`20`20`20`20`20if`20f$type(part)`20.nes.`20"INTEGER"
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-NONNUMPRT,`20Non-numeric`20part`20specifi
Ved`20-`20",`20part
X$`20`20`20`20`20`20`20`20`20OK`20=`20"FALSE"
X$`20`20`20`20`20endif
X$
X$`20!`20Make`20sure`20this`20part`20is`20within`20the`20range`20for`20this`20p
Vackage
X$`20`20`20`20`20if`20part`20.gt.`20P3
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-BIGPRTNUM,`20Part`20number`20greater`20th
Van`20maximum`20-`20",`20part
X$`20`20`20`20`20`20`20`20`20OK`20=`20"FALSE"
X$`20`20`20`20`20endif
X$`20`20`20`20`20part`20=`20f$integer(part)
X$`20endif
X$
X$!`20OK,`20go`20action`20this`20part
X$`20if`20part`20.le.`20P3
X$`20`20`20then
X$`20`20`20`20`20part`20=`20f$fao("!#ZL",l,part)
X$`20`20`20`20`20file`20=`20P2`20+`20part`20+`20"-OF-"`20+`20P3
X$`20`20`20`20`20if`20Really_Post_It
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-I-SENDPART,`20Sending`20part`20",`20part,
V`20"`20of`20",`20package
X$`20`20`20`20`20`20`20`20`20subj`20=`20f$parse(file,,,"NAME")`20+`20f$parse(fi
Vle,,,"TYPE")`20+`20"`20`20"`20+`20P5
X$`20`20`20`20`20`20`20`20`20mail/noedit/noself/subject=`26subj`20'file'`20'P1'
V
X$`20`20`20`20`20`20`20`20`20if`20.not.`20$status`20then`20$`20return`20!`20Ret
Vurn`20status`20from`20mail`20if`20it`20failed
X$`20`20`20`20`20`20`20else
X$`20`20`20`20`20`20`20`20`20if`20f$search(file)`20.eqs.`20""
X$`20`20`20`20`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20`20`20`20`20em`20"-E-NOPART,`20Part`20''part'`20of
V`20''package'`20is`20missing!"
X$`20`20`20`20`20`20`20`20`20`20`20`20`20OK`20=`20"FALSE"
X$`20`20`20`20`20`20`20`20`20endif
X$`20`20`20`20`20endif
X$`20`20`20`20`20goto`20NextPart
X$`20endif
X$`20return
$ call unpack PAKMAIL.COM;23 1682522482 ""
$!
$ create 'f'
X!`20Version`202.0
X!`20`20`20`20`20--`20Andy`20Harper,`20Kings`20College`20London,`20UK
X!`20`20`20`20`20--`20January`201993
X1`20PAKMAIL
X
XSends`20a`20series`20of`20files`20produced`20by`20VMS_SHARE`20across`20the`20E
V-mail
Xsystem`20to`20a`20specified`20set`20of`20recipients.`20
X
XFormat:
X`20`20`20`20`20$`20PAKMAIL`20recipient`20filespec`20parts`20`5Bpart-list`5D
V`20`5Bcomment`5D
X
X2`20Author
X
XThis`20software`20was`20written`20by,`20and`20is`20the`20copyright`20(C)`20of:
V
X
XAndy`20Harper
XKings`20College`20London
XEngland
X
X2`20Examples
X
X`20`20`20`20`20$`20PAKMAIL`20FRED`20`5B.TEST`5DPACKAGE`2025
X`20`20`20`20`20`20`20`20`20`20Send`20all`2025`20parts`20of`20a`20VMS_SHARE`20c
Vreated`20series`20of`20files
X`20`20`20`20`20`20`20`20`20`20that`20comprise`20the`20package`20"PACKAGE".`20F
Viles`20have`20a`20generic
X`20`20`20`20`20`20`20`20`20`20prefix`20of`20"`5B.TEST`5DPACKAGE"`20and`20`20ea
Vch`20will`20have`20its`20TYPE
X`20`20`20`20`20`20`20`20`20`20suffixed`20by`20the`20VMS_SHARE`20convention`20o
Vf`20'nn'-OF-25
X
X`20`20`20`20`20$`20PAKMAIL`20FRED`20`5B.TEST`5DPACKAGE`2025`205,9
X`20`20`20`20`20`20`20`20`20`20As`20above,`20but`20just`20send`20parts`205`20an
Vd`209.
X
X
X`20`20`20`20`20$`20PAKMAIL`20FRED`20`5B.TEST`5DPACKAGE`2025`205,9`20"Demonstra
Vtion`20only"
X`20`20`20`20`20`20`20`20`20`20As`20above,`20but`20just`20send`20parts`205`20an
Vd`209,`20and`20add`20the
X`20`20`20`20`20`20`20`20`20`20comment`20"Demonstration`20only"`20into`20the
V`20subject`20field
X`20`20`20`20`20`20`20`20`20`20of`20each`20message.
X
X
X2`20Filespec
X
XThe`20directory`20and`20fixed`20constant`20part`20of`20the`20files`20containin
Vg`20the
XVMS_SHARE'd`20package.`20The`20part`20number`20is`20appended`20to`20the`20TYPE
V`20part
Xof`20the`20name.`20
X
XFor`20instance,`20the`20name`20"`5B.TEST`5DBURBLE.SHAR"`20refers`20to`20the
V`20files:
X
X`20`20`20`20`20`5B.TEST`5DBURBLE.SHAR_nn-OF-mm
X
X'nn'`20being`20the`20part`20number`20and`20'mm'`20being`20the`20total`20number
V`20of`20parts
X
X2`20Comment
X
XThis`20paramter`20is`20optional.`20If`20specified,`20it`20defines`20a`20commen
Vt
Xstring`20to`20be`20inserted`20into`20the`20subject`20header`20of`20the`20gener
Vated
Xmail`20message.
X
XFor`20example,`20without`20this`20parameter,`20the`20subject:`20header`20looks
V
Xlike`20this:`20
X`20`20`20Subject:`20`20`20VMS_SHARE.1-OF-4
X
XWith`20it`20set`20to`20the`20string`20"(Version`208.2)",`20the`20subject:
Xheader`20line`20looks`20like`20this:`20
X`20`20`20Subject:`20`20`20VMS_SHARE.1-OF-4`20(Version`208.2)
X
X2`20Partlist
X
XThis`20parameter`20is`20optional.`20If`20specified,`20it`20should`20be`20a`20c
Vomma
Xseparated`20list`20of`20parts.`20Only`20the`20parts`20listed`20will`20be`20sen
Vt.
X
XIf`20not`20specified,`20all`20parts`20will`20be`20sent.
X
X2`20Parts
X
XThis`20parameter`20is`20required.`20It`20defines`20the`20total`20number`20of
V`20parts
Xmaking`20up`20the`20share`20file`20to`20be`20sent.
X
X2`20Recipient
X
XThe`20mail`20address`20of`20the`20recipient.`20This`20may`20be`20anything`20wh
Vich`20can
Xbe`20used`20on`20the`20MAIL`20command`20line.`20Because`20of`20the`20way`20MAI
VL`20parses
Xaddresses`20and`20the`20way`20DCL`20treats`20@`20symbols,`20care`20is`20needed
V`20when
Xspecifying`20addresses`20which`20are`20distribution`20lists`20(usually
Xprefixed`20by`20@)`20or`20which`20contain`20double`20quotes.`20
X
X3`20Distribution_Lists
X
XUse`20of`20distribution`20lists`20directly`20on`20the`20MAIl`20command`20line
V`20does
Xnot`20work`20as`20DCL`20gets`20at`20the`20'@'`20symbol`20before`20MAIL`20does!
V`20`20It`20must
Xbe`20done`20by`20pointing`20a`20logical`20name`20at`20the`20distribution`20lis
Vt,
Xincluding`20the`20'@'`20and`20then`20using`20the`20logical`20name`20as`20the
Xrecipient.`20
X
XFor`20instance,`20to`20simulate:
X
X`20`20`20$`20PAKMAIL`20@FRIENDS`20`20`20....
X
XDo:
X
X`20`20`20$`20DEFINE`20FRIENDS`20"@FRIENDS.DIS"
X`20`20`20$`20CREATE`20FRIENDS.DIS
X`20`20`20.....`20insert`20friends`20here
X`20`20`20`5EZ
X`20`20`20$`20PAKMAIL`20FRIENDS`20.....
X
X3`20Quoted_usernames
X
XUsernames`20must`20be`20specified`20in`20exactly`20the`20same`20form`20as`20th
Vey
Xwould`20be`20used`20on`20the`20MAIL`20command`20line,`20as`20in:`20
X
X`20`20`20$`20MAIL`20MESSAGE.TXT`20NET%"""FRED@MIT"""
X
XThis`20is`20important`20only`20when`20addresses`20containing`20double`20quotes
V
Xare`20used;`20essentially,`20individual`20quotes`20are`20doubled`20and`20a`20n
Vew
Xset`20placed`20around`20the`20lot.`20
X
XFor`20instance,`20to`20simulate:
X
X`20`20`20$`20PAKMAIL`20`20EARN%"FRED@CARNEGIE"
X
XDo:
X`20`20`20$`20PAKMAIL`20`20EARN%"""FRED@CARNEGIE"""
X
XAlternatively,`20define`20a`20logical`20name`20that`20contains`20the`20origina
Vl
Xform`20of`20address:`20
X
X`20`20`20$`20DEFINE`20BROTHER`20EARN%"""FRED@CARNEGIE"""
X`20`20`20$`20PAKMAIL`20BROTHER`20`20`20...
X
X2`20VMS_SHARE
X
XVMS_SHARE`20packages`20a`20series`20of`20files`20into`20the`20special`20format
V.`20See
Xthe`20help`20on`20that`20utility`20for`20specific`20information.`20
$ call unpack PAKMAIL.HLP;10 2035317049 ""
$!
$ create 'f'
X`20`20`20`20`09`09`09V`20M`20S`20_`20S`20H`20A`20R`20E`20`20`20`20`20TEST`20FI
VLE
X
X----------------------------------------`20Test`20printable`20characters
Xabcdefghijklmnopqrstuvwxyz`09!`20All`20lower`20case`20letter,`20in`20order
XABCDEFGHIJKLMNOPQRSTUVWXYZ`09!`20All`20upper`20case`20letters,`20in`20order
X0123456789`09`09`09!`20All`20digits`20in`20order
X`60`20`20!`20Backwords`20quote
X`7E`20`20!`20Tilde
X!`20`20!`20Exclamation`20mark
X@`20`20!`20at`20sign
X#`20`20!`20Hash`20or`20pound`20sign
X$`20`20!`20Dollar`20sign
X%`20`20!`20Percent`20sign
X`5E`20`20!`20Caret
X`26`20`20!`20Ampersand
X*`20`20!`20asterisk
X(`20`20!`20Left`20round`20bracket
X)`20`20!`20Right`20round`20bracket
X-`20`20!`20minus
X+`20`20!`20plus
X=`20`20!`20equals
X`7B`20`20!`20left`20brace
X`7D`20`20!`20right`20brace
X`5B`20`20!`20left`20square`20bracket
X`5D`20`20!`20right`20square`20bracket
X:`20`20!`20colon
X"`20`20!`20Double`20quote
X`7C`20`20!`20vertical`20bar
X;`20`20!`20semicolon
X'`20`20!`20single`20quote
X`5C`20`20!`20backslash
X>`20`20!`20greater`20than
X<`20`20!`20less`20than
X,`20`20!`20comma
X.`20`20!`20period
X?`20`20!`20question`20mark
X/`20`20!`20slash
X----------------------------------------`20Test`20single`20blank`20line
X
X----------------------------------------`20Test`20trailing`20blanks,`20non`20s
Vplit`20lines
XHere`20are`20some`20lines`20with`20trailing`20blanks`20`20`20`20`20`20`20
Xand`20another`20`20`20`20`20
X----------------------------------------`20Test`20trailing`20blanks,`20split
V`20lines
X123456789012345678901234567890123456789012345678901234567890123456789012345678
V901234567890123456789012345678901234567890123456789012345678901234567890
X1234567890`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20
V`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20
V`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20
X1234567890`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20
V`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20
V`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20
X1234567890`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20
V`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20
V`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20`20`20
X1234567890`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x
V`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20
V`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20`20
X1234567890x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x
V`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20
V`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20x`20`20`20`20`20`20
X
X
X`20`20`20`20`09`09END`20OF`20`20V`20M`20S`20_`20S`20H`20A`20R`20E`20`20TEST
V`20FILE
$ call unpack TEST.TXT;2 942494529 ""
$!
$ create 'f'
X$`20v='f$verify(f$trnlnm("SHARE_VERIFY"))'
X$!`20Purpose:
X$!`09Package`20a`20series`20of`20files`20into`20a`20multi-part`20archive,`20es
Vpecially`20encoded
X$!`09so`20that`20it`20can`20be`20mailed`20across`20multiple`20networks`20witho
Vut`20undue`20damage
X$!
X$!`20Parameters:
X$!`09P1`20=`20List`20of`20files`20to`20scan
X$!`09P2`20=`20name`20of`20share`20file`20to`20generate`20(will`20be`20suffixed
V`20by`20part`20no.)
X$!
X$!`20Qualifiers:
X$!`20`20`20`20`20`20/BACKUP`09`09`09Specify`20BACKUP`20as`20the`20selection
V`20date`20criteria
X$!`09/BEFORE`5B=date`5D`09`09Specify`20latest`20date`20for`20file`20considerat
Vion
X$!`09/`5BNO`5DCOMPRESS`5B=n`5D`09Try`20to`20do`20compression`20on`20files
X$!`09/`5BNO`5DCONFIRM`09`09Require`20confirmation`20of`20selected`20files
X$!`09/CREATED`09`09Specify`20CREATED`20as`20the`20selection`20date`20criteria
X$!`09/`5BNO`5DDEBUG`5B=n`5D`09`09Turn`20on`20debugging`20code`20`5Bat`20level
V`20n`5D
X$!`09/`5BNO`5DDIRECTORY`09`09Preserve`20directory`20structure`20in`20archives
X$!`09/`5BNO`5DEXCLUDE=list`09Exclude`20list`20of`20files
X$!`09/EXPIRED`09`09Specify`20EXPIRED`20as`20the`20selection`20date`20criteria
X$!`09/`5BNO`5DLOG`5B=n`5D`09`09Specify`20logging
X$!`09/`5BNO`5DLONGLINES`09`09Allow`20long`20lines`20if`20using`20later`20TPU's
V
X$!`09/MODIFIED`09`09Specify`20MODIFIED`20as`20the`20selection`20date`20criteri
Va
X$!`09/`5BNO`5DPACKAGE_INDEX`5B=type`5D`20Write`20part`20list`20for`20file`20se
Vrver`20package`20files
X$!`09/PART_SIZE=NNN`09`09Specify`20maximum`20size`20of`20parts
X$!`09/SINCE`5B=date`5D`09`09Specify`20earliest`20date`20for`20file`20considera
Vtion
X$!`09/`5BNO`5DVERSION`09`09Preserve`20version`20numbers`20in`20archive
X$!
X$!`20Environment:
X$!`09Needs`20at`20least`20VMS`205.0
X$!
X$!`20Revision`20History:
X$!`098.0`09Andy`20Harper`09September`201992`09Extensive`20rewrite
X$!`098.1`09Andy`20Harper`09September`201992`09Bug`20fixes`20following`20releas
Ve
X$!`09`09`09`09`09`09`26`20`20a`20few`20new`20features
X$!`098.2`09Andy`20Harper`09December`20`201992`09New`20features`20and`20bugfixe
Vs
X$!
X$!`20This`20software`20is`20copyright`20(C)`20Andy`20Harper,`20Kings`20College
V`20London`20and`20is
X$!`20supplied`20free`20of`20charge`20with`20no`20warranties`20expressed`20or
V`20implied.`20Any
X$!`20problems`20arising`20from`20its`20use`20are`20entirely`20the`20responsibi
Vlity`20of`20the`20user
X$!`20You`20are`20free`20to`20distribute`20this`20software`20to`20anyone,`20pro
Vvided`20that`20all
X$!`20copyright`20notices`20remain`20in`20place.
X$
X$!`20Protection
X$`20set="set"
X$`20set`20noon
X$`20set`20symbol/scope=(nolocal,noglobal)
X$
X$`20Facility`20`20`20`20`20`20`20`20`20`20`20`20`20`20=`20f$parse(f$environmen
Vt("PROCEDURE"),,,"NAME")
X$`20em="write`20sys$error`20""%''Facility'"","
X$`20SS$_NORMAL`20`20`20`20`20`20`20`20`20`20`20`20=`20%X00000001
X$`20SS$_ABORT`20`20`20`20`20`20`20`20`20`20`20`20`20=`20%X1000002C
X$`20status`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20=`20SS$_ABORT
X$`20Current_Directory`20`20`20`20`20=`20f$parse(f$environment("DEFAULT"),"`5B
V`5D")`20-`20".;"
X$`20Cur_Device`20`20`20`20`20`20`20`20`20`20`20`20=`20f$parse(Current_Director
Vy,,,"DEVICE")
X$`20Cur_Directory`20`20`20`20`20`20`20`20`20=`20f$parse(Current_Directory,,,"D
VIRECTORY")
X$
X$`20VMS`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20=`20f$getsyi("
Vversion")
X$`20VMSx`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20=`20f$extract(1,
Vf$length(VMS)-1,VMS)
X$`20Version`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20=`20"8.2"
X$
X$`20Max_Share_Length`20`20`20`20`20`20=`2079
X$`20Def_Part_Size`20`20`20`20`20`20`20`20`20=`2030
X$
X$`20Min_VMS`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20=`20"5.0"`09!`20To`20a
Vllow`20block-IF`20stuff
X$`20Min_VMS_For_TPU`20`20`20`20`20`20`20=`20"4.4"`09!`20To`20recognize`20TPU
X$`20Min_VMS_For_LongLines`20=`20"5.4"`09!`20To`20allow`20long`20records`20in
V`20TPU
X$`20Max_Line_OldTPU`20`20`20`20`20`20`20=`20960`09!`20Max`20line`20lengths`20f
Vor`20older`20TPUs
X$`20Max_Line_NewTPU`20`20`20`20`20`20`20=`2065535`20!`20Max`20line`20lengths
V`20for`20newer`20TPUs
X$
X$!`20Define`20the`20format`20for`20the`20name`20of`20sharefile`20parts
X$`20format1`20=`20"!AS!#*n-OF-!#ZL"
X$`20format2`20=`20"!AS!#ZL-OF-!#ZL"
X$
X$!`20Set`20debugging`20levels
X$`20Debug_Rejected`20`20`20`20`20`20`20`20=`202
X$`20Debug_ShowParams`20`20`20`20`20`20=`202
X$
X$!`20Set`20logging`20levels
X$`20Log_Ident`20`20`20`20`20`20`20`20`20`20`20`20`20=`201
X$`20Log_Selected`20`20`20`20`20`20`20`20`20`20=`201
X$`20Log_Processing`20`20`20`20`20`20`20`20=`201
X$`20Log_RenameParts`20`20`20`20`20`20`20=`201
X$`20Log_PackageIndex`20`20`20`20`20`20=`201
X$
X$!`20Version`20check
X$`20if`20VMSx`20.ges.`20Min_VMS`20then`20$`20goto`20VMS_ok
X$`20em`20"-E-OLD,`20Need`20at`20least`20VMS`20''Min_VMS'`20to`20run.`20Current
Vly`20running`20VMS`20''VMSx'"
X$`20goto`20abort
X$!`20From`20here,`20we`20can`20use`20block-IF`20stuff`20as`20we`20are`20on`20t
Vhe`20right`20version
X$VMS_ok:
X$!`0C
X$!`20Set`20up`20abort`20handling
X$`20on`20control_y`20then`20$`20goto`20abort
X$
X$!`20Parse`20parameters
X$`20gosub`20Get_Default_Parameters
X$`20gosub`20Parse_Command_Line
X$`20gosub`20Break_Out_Parameters
X$`20gosub`20Break_Out_Options
X$`20gosub`20Check_Parameters
X$
X$`20if`20logging`20.ge.`20Log_Ident`20then`20$`20em`20"-I-IDENT,`20",`20f$fao(
V"!AS`20Version`20!AS`20-`20!AS`20!%D",Facility,Version,f$cvtime(,,"WEEKDAY"),0
V)
X$
X$!`20Write`20parameters`20to`20the`20parameter`20file,`20so`20the`20packing
V`20code`20can`20pick`20them`20up
X$`20gosub`20Create_Parameter_File
X$`20if`20FileCount`20.eq.`200
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-NOFILES,`20No`20files`20selected."
X$`20`20`20`20`20goto`20abort
X$`20endif
X$
X$`20gosub`20PackFiles`09`09`09!`20Go`20pack`20the`20files`20into`20the`20archi
Vve
X$`20gosub`20Rename_Parts`09`09`09!`20Generate`20part`20type`20of`20".nnn-of-mm
Vm"
X$`20gosub`20Create_Package_Index`09`09!`20Create`20the`20xxx.$PACKAGE`20index
V`20file
X$`20
X$!`20Clean`20up`20and`20exit
X$`20status`20=`20ss$_normal
X$abort:
X$`20if`20f$trnlnm("SHARE_PARAMS")`20`20.nes.`20""`20then`20$`20close`20SHARE_P
VARAMS
X$`20if`20f$trnlnm("SHARE_PACKIDX")`20.nes.`20""`20then`20$`20close`20SHARE_PAC
VKIDX
X$`20if`20f$search(Tempfile)`20.nes.`20""`20then`20$`20delete`20`26TempFile;*
X$`20v=f$verify(v)
X$`20exit`20status
X$
X$
X$!`0C
X$!`20-------------------------------------------------------------------------
V--
X$!`20GET`20DEFAULT`20PARAMETERS
X$!
X$!`20`20`20Defaults`20are`20set`20by`20logical`20names.`20If`20no`20logical
V`20exists,`20then`20the
X$!`20`20`20built-in`20system`20default`20is`20used.
X$!
X$!`20-------------------------------------------------------------------------
V--
X$Get_Default_Parameters:
X$!`20Get`20parameters`20from`20logical`20names/system;`20normally`20these`20wi
Vll`20set`20defaults
X$`20Compression=f$edit(f$trnlnm("SHARE_COMPRESS"),`20`20`20`20`20`20"TRIM")
X$`20Confirm`20`20`20=`20f$edit(f$trnlnm("SHARE_CONFIRM"),`20`20`20`20`20`20
V`20"TRIM")
X$`20Debugging`20=`20f$edit(f$trnlnm("SHARE_DEBUG"),`20`20`20`20`20`20`20`20
V`20"TRIM")
X$`20DirKeep`20`20`20=`20f$edit(f$trnlnm("SHARE_DIRECTORY"),`20`20`20`20`20"TRI
VM")
X$`20Exclude`20`20`20=`20f$edit(f$trnlnm("SHARE_EXCLUDE"),`20`20`20`20`20`20
V`20"TRIM,UPCASE")
X$`20Logging`20`20`20=`20f$edit(f$trnlnm("SHARE_LOG"),`20`20`20`20`20`20`20`20
V`20`20`20"TRIM")
X$`20LongLines`20=`20f$edit(f$trnlnm("SHARE_LONGLINES"),`20`20`20`20`20"TRIM")
X$`20PackageIdx=`20f$edit(f$trnlnm("SHARE_PACKAGE_INDEX"),`20"TRIM")
X$`20Part_Size`20=`20f$edit(f$trnlnm("SHARE_PART_SIZE"),`20`20`20`20`20"TRIM")
X$`20Real_Name`20=`20f$edit(f$trnlnm("SHARE_REAL_NAME"),`20`20`20`20`20"TRIM")
X$`20VersKeep`20`20=`20f$edit(f$trnlnm("SHARE_VERSION"),`20`20`20`20`20`20`20"T
VRIM")
X$`20TempFile`20`20=`20f$parse("SHARE_TEMP","SYS$SCRATCH:SHARE_TEMP."+f$getjpi(
V"","PID"))
X$`20TempFile`20`20=`20TempFile`20-`20f$parse(TempFile,,,"VERSION")
X$
X$!`20Get`20the`20exclusions;`20this`20is`20the`20old`20format`20and`20is`20(al
Vmost)`20redundant.
X$`20X_Files`20`20`20=`20f$edit(f$trnlnm("SHARE_EXCLUDE_FILES"),`20"TRIM,UPCASE
V")
X$`20X_Dirs`20`20`20`20=`20f$edit(f$trnlnm("SHARE_EXCLUDE_DIRS"),`20`20"TRIM,UP
VCASE")
X$`20X_Names`20`20`20=`20f$edit(f$trnlnm("SHARE_EXCLUDE_NAMES"),`20"TRIM,UPCASE
V")
X$`20X_Types`20`20`20=`20f$edit(f$trnlnm("SHARE_EXCLUDE_TYPES"),`20"TRIM,UPCASE
V")
X$
X$!`20------------------------------------------------------------------------
X$!`20Convert`20the`20`60old-style'`20exclusion`20clauses`20to`20the`20new`20fo
Vrmat
X$!`20------------------------------------------------------------------------
X$`20if`20X_Dirs`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20if`20Exclude`20.nes.`20""`20then`20$`20Exclude`20=`20Exclude
V`20+`20","
X$`20`20`20`20`20Exclude`20=`20Exclude`20+`20X_Dirs
X$`20endif
X$
X$`20if`20X_Names`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20if`20Exclude`20.nes.`20""`20then`20$`20Exclude`20=`20Exclude
V`20+`20","
X$`20`20`20`20`20Exclude`20=`20Exclude`20+`20X_Names
X$`20endif
X$
X$`20if`20X_Types`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20if`20Exclude`20.nes.`20""`20then`20$`20Exclude`20=`20Exclude
V`20+`20","
X$`20`20`20`20`20Exclude`20=`20Exclude`20+`20X_Types
X$`20endif
X$
X$`20if`20X_Files.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20if`20Exclude`20.nes.`20""`20then`20$`20Exclude`20=`20Exclude
V`20+`20","
X$`20`20`20`20`20Exclude`20=`20Exclude`20+`20X_Files
X$`20endif
X$
X$
X$!`20------------------------------------------------------------------------
X$!`20SET`20UP`20THE`20REAL`20NAME
X$!`20------------------------------------------------------------------------
X$`20if`20Real_Name`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20Real_Name`20=`20f$edit(f$getjpi("","USERNAME"),"TRIM")
X$`20`20`20else
X$`20`20`20`20`20Real_Name`20=`20f$edit(f$getjpi("","USERNAME"),"TRIM")`20+`20"
V`20("`20+`20Real_Name`20+`20")"
X$`20endif
X$
X$
X$!`20------------------------------------------------------------------------
X$!`20SET`20UP`20THE`20DEFAULT`20MAX`20LINE`20LENGTH`20AND`20MIN`20TPU`20VERSIO
VNS`20ALLOWED`20FOR`20UNPACKING
X$!`20------------------------------------------------------------------------
X$`20Min_VMS_To_Unpack`20`20`20=`20Min_VMS_For_TPU`09!`20Default`20allows`20any
V`20version`20of`20TPU
X$`20Max_TPU_Line_Length`20=`20Max_Line_OldTPU`20!`20...`20provided`20we`20stic
Vk`20to`20short`20lines
X$
X$
X$!`20------------------------------------------------------------------------
X$!`20DEFAULT`20FILE`20SELECTION`20DATES/CRITERIA
X$!`20------------------------------------------------------------------------
X$`20Since`20`20`20`20=`20""`09`09`09`09!`20Earliest`20date`20is`20anything
X$`20Before`20`20`20=`20""`09`09`09`09!`20Latest`20date`20is`20anything
X$`20Criteria`20=`20"RDT"`09`09`09!`20Revision`20(modification)`20is`20default
X$
X$`20return
X$
X$
X$!`0C
X$!`20-------------------------------------------------------------------------
V--
X$!`20PARSE`20COMMAND`20LINE
X$!
X$!`20`20`20`20Parse`20the`20parameter`20list`20and`20extract`20qualifiers`20an
Vd`20parameters
X$!
X$!`20-------------------------------------------------------------------------
V--
X$Parse_Command_Line:
X$`20Cmd_Line=f$edit(P1+"`20"+P2+"`20"+P3+"`20"+P4+"`20"+P5+"`20"+P6+"`20"+P7+"
V`20"+P8,"TRIM,COMPRESS")
X$`20P1`20=`20""
X$`20P2`20=`20""
X$`20P3`20=`20""
X$`20P4`20=`20""
X$`20P5`20=`20""
X$`20P6`20=`20""
X$`20P7`20=`20""
X$`20P8`20=`20""
X$
X$`20N=0
X$`20Qualifiers`20=`20""
X$Next_Param:
X$`20if`20f$length(Cmd_Line)`20.ne.`200
X$`20`20`20then
X$`20`20`20`20`20String`20=`20f$extract(0,f$locate("`20",Cmd_Line),Cmd_Line)
X$`20`20`20`20`20Cmd_Line`20=`20Cmd_Line`20-`20String`20-`20"`20"
X$`20`20`20`20`20Param`20=`20f$extract(0,f$locate("/",String),String)
X$`20`20`20`20`20String`20=`20String`20-`20Param
X$`20`20`20`20`20if`20Param`20.nes.`20""
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20N=N+1
X$`20`20`20`20`20`20`20`20`20P'N'`20=`20Param
X$`20`20`20`20`20endif
X$`20`20`20`20`20qualifiers`20=`20qualifiers`20+`20String
X$`20`20`20`20`20goto`20Next_Param
X$`20endif
X$`20
X$`20return
X$
X$
X$!`0C
X$!`20-------------------------------------------------------------------------
V--
X$!`20BREAK`20OUT`20PARAMETERS
X$!
X$!`20`20`20`20Check`20the`20parameters`20and`20break`20out`20those`20we`20want
V
X$!
X$!`20-------------------------------------------------------------------------
V--
X$Break_Out_Parameters:
X$`20FileSpec`20=`20P1
X$`20ShareFile=`20P2
X$
X$get_filespec:
X$`20filespec`20=`20f$edit(filespec,"TRIM,UPCASE")
X$`20if`20filespec`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20if`20f$mode()`20.nes.`20"INTERACTIVE"
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-MISREQPAR,`20Missing`20required`20paramet
Ver`20-`20list`20of`20files"
X$`20`20`20`20`20`20`20`20`20goto`20abort
X$`20`20`20`20`20endif
X$`20`20`20`20`20read/prompt="..`20Enter`20list`20of`20files`20to`20be`20packed
V`20:`20"`20sys$command`20filespec
X$`20`20`20`20`20goto`20get_filespec
X$`20endif
X$
X$get_share_file:
X$`20sharefile`20=`20f$edit(sharefile,"TRIM,UPCASE")
X$`20if`20sharefile`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20if`20f$mode()`20.nes.`20"INTERACTIVE"
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-MISREQPAR,`20Missing`20required`20paramet
Ver`20-`20output`20share`20file`20name"
X$`20`20`20`20`20`20`20`20`20goto`20abort
X$`20`20`20`20`20endif
X$`20`20`20`20`20read/prompt="..`20Enter`20name`20of`20share`20file`20`20`20
V`20`20`20`20`20`20:`20"`20sys$command`20sharefile
X$`20`20`20`20`20goto`20get_share_file
X$`20endif
X$
X$Check_Output_Dir:
X$`20if`20f$parse(sharefile)`20.eqs.`20""
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-INVOUT,`20invalid`20output`20file`20or`20non-existent
V`20output`20directory"
X$`20`20`20`20`20goto`20abort
X$`20endif
X$`20return
X$
X$
X$!`0C
X$!`20-------------------------------------------------------------------------
V--
X$!`20BREAK`20OUT`20OPTIONS
X$!
X$!`20`20Scan`20the`20qualifier`20string`20and`20set`20up`20the`20various`20opt
Vions`20selected`20by`20the
X$!`20`20user.`20Default`20values`20for`20each`20option`20should`20already`20ha
Vve`20been`20set`20up
X$!`20`20by`20the`20get_default_parameters`20routine.
X$!`20`20
X$!`20-------------------------------------------------------------------------
V--
X$Break_Out_Options:
X$`20if`20Qualifiers`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20ThisQual`20=`20Qualifiers`20-`20"/"
X$`20`20`20`20`20ThisQual`20=`20f$extract(0,f$locate("/",ThisQual),ThisQual)
X$`20`20`20`20`20Qualifiers`20=`20Qualifiers`20-`20"/"`20-`20ThisQual
X$
X$`20`20`20!`20First`20check`20for`20negated`20qualifiers`20and`20remember`20th
Ve`20status
X$`20`20`20`20`20if`20f$locate("NO",ThisQual)`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20ThisQual=ThisQual-"NO"
X$`20`20`20`20`20`20`20`20`20Value="FALSE"
X$`20`20`20`20`20`20`20else
X$`20`20`20`20`20`20`20`20`20Value="TRUE"
X$`20`20`20`20`20endif
X$
X$`20`20`20!`20Extract`20any`20equivalence`20value`20for`20parameters`20which
V`20expect`20them
X$`20`20`20`20`20Equiv`20`20`20`20=`20f$element(1,"=",ThisQual)
X$`20`20`20`20`20ThisQual`20=`20f$element(0,"=",ThisQual)
X$
X$!`20Detect`20ambiguous`20qualifier`20/B
X$`20`20`20`20`20if`20f$locate(ThisQual,"B")`20.eq.`200`20then`20$`20goto`20BOO
V_AmbigQual
X$
X$!`20/BACKUP
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("BACKUP"),ThisQual),"BACKUP
V")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20.not.`20Value`20then`20$`20goto`20BOO_NonNegQ
Vual
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20Criteria`20=`20"BDT"
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/BEFORE`5B=date`5D
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("BEFORE"),ThisQual),"BEFORE
V")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Before`20=`20""
X$`20`20`20`20`20`20`20`20`20if`20Value`20.and.`20Equiv`20.nes.`20"="`20then
V`20$`20Before`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20if`20Value`20.and.`20Equiv`20.eqs.`20"="`20then
V`20$`20Before`20=`20"TODAY"
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20Detect`20ambiguous`20qualifier`20/CO
X$`20`20`20`20`20if`20f$locate(ThisQual,"CO")`20.eq.`200`20then`20$`20goto`20BO
VO_AmbigQual
X$
X$!`20/COMPRESS`5B=n`5D
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("COMPRESS"),ThisQual),"COMP
VRESS")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Compression`20=`20Value
X$`20`20`20`20`20`20`20`20`20if`20Compression`20.and.`20Equiv`20.nes.`20"="`20t
Vhen`20$`20Compression`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/CONFIRM
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("CONFIRM"),ThisQual),"CONFI
VRM")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Confirm`20=`20Value
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/CREATED
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("CREATED"),ThisQual),"CREAT
VED")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20.not.`20Value`20then`20$`20goto`20BOO_NonNegQ
Vual
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20Criteria`20=`20"CDT"
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20Detect`20ambiguous`20qualifier`20/D
X$`20`20`20`20`20if`20f$locate(ThisQual,"D")`20.eq.`200`20then`20$`20goto`20BOO
V_AmbigQual
X$
X$!`20/DEBUG`5B=n`5D
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("DEBUG"),ThisQual),"DEBUG")
V`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Debugging`20=`20Value
X$`20`20`20`20`20`20`20`20`20if`20Debugging`20.and.`20Equiv`20.nes.`20"="`20the
Vn`20$`20Debugging`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/DIRECTORY
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("DIRECTORY"),ThisQual),"DIR
VECTORY")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20DirKeep`20=`20Value
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20Detect`20ambiguous`20qualifier`20/EX
X$`20`20`20`20`20if`20f$locate(ThisQual,"EX")`20.eq.`200`20then`20$`20goto`20BO
VO_AmbigQual
X$
X$!`20/EXCLUDE
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("EXCLUDE"),ThisQual),"EXCLU
VDE")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Exclude`20=`20""
X$`20`20`20`20`20`20`20`20`20if`20Value`20.and.`20Equiv`20.nes.`20"="`20then
V`20$`20Exclude`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/EXPIRED
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("EXPIRED"),ThisQual),"EXPIR
VED")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20.not.`20Value`20then`20$`20goto`20BOO_NonNegQ
Vual
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20Criteria`20=`20"EDT"
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20Detect`20ambiguous`20qualifier`20/LO
X$`20`20`20`20`20if`20f$locate(ThisQual,"LO")`20.eq.`200`20then`20$`20goto`20BO
VO_AmbigQual
X$
X$!`20/LOG`5B=n`5D
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("LOG"),ThisQual),"LOG")`20.
Veq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Logging`20=`20Value
X$`20`20`20`20`20`20`20`20`20if`20Logging`20.and.`20Equiv`20.nes.`20"="`20then
V`20$`20Logging=Equiv
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/LONGLINES
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("LONGLINES"),ThisQual),"LON
VGLINES")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20LongLines`20=`20Value
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/MODIFIED
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("MODIFIED"),ThisQual),"MODI
VFIED")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20.not.`20Value`20then`20$`20goto`20BOO_NonNegQ
Vual
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20Criteria`20=`20"RDT"
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20Detect`20ambiguous`20qualifier`20/PA
X$`20`20`20`20`20if`20f$locate(ThisQual,"PA")`20.eq.`200`20then`20$`20goto`20BO
VO_AmbigQual
X$
X$!`20/PACKAGE_INDEX
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("PACKAGE_INDEX"),ThisQual),
V"PACKAGE_INDEX")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20PackageIdx`20=`20Value
X$`20`20`20`20`20`20`20`20`20if`20PackageIdx`20.and.`20Equiv`20.nes.`20"="`20th
Ven`20$`20PackageIdx`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/PART_SIZE=nnn
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("PART_SIZE"),ThisQual),"PAR
VT_SIZE")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20.not.`20Value`20then`20$`20goto`20BOO_NonNegQ
Vual
X$`20`20`20`20`20`20`20`20`20if`20equiv`20.eqs.`20"="`20then`20$`20goto`20BOO_Q
Vual_Val_Required
X$`20`20`20`20`20`20`20`20`20Part_Size`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/SINCE`5B=date`5D
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("SINCE"),ThisQual),"SINCE")
V`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20Since`20=`20""
X$`20`20`20`20`20`20`20`20`20if`20Value`20.and.`20Equiv`20.nes.`20"="`20then
V`20$`20Since`20=`20Equiv
X$`20`20`20`20`20`20`20`20`20if`20Value`20.and.`20Equiv`20.eqs.`20"="`20then
V`20$`20Since`20=`20"TODAY"
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20/VERSION
X$`20`20`20`20`20if`20f$locate(f$extract(0,f$length("VERSION"),ThisQual),"VERSI
VON")`20.eq.`200
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20if`20Equiv`20.nes.`20"="`20then`20$`20goto`20BOO_Q
VualNoValue
X$`20`20`20`20`20`20`20`20`20VersKeep`20=`20Value
X$`20`20`20`20`20`20`20`20`20goto`20Break_Out_Options
X$`20`20`20`20`20endif
X$
X$!`20Something`20else`20..
X$`20`20`20`20`20em`20"-E-UNRECQUAL,`20Invalid`20qualifier`20specified"
X$`20`20`20`20`20if`20.not.`20Value`20then`20$`20ThisQual`20=`20"NO"`20+`20This
VQual
X$`20`20`20`20`20write`20sys$error`20"`20`20`5C",`20ThisQual,`20"`5C"
X$`20`20`20`20`20goto`20abort
X$`20endif
X$`20return
X$
X$
X$BOO_AmbigQual:
X$`20if`20.not.`20value`20then`20$`20ThisQual`20=`20"NO"`20+`20ThisQual
X$`20em`20"-E-AMBIG,`20/",`20ThisQual,`20"`20is`20an`20ambiguous`20qualifier"
X$`20goto`20abort
X$
X$BOO_NonNegQual:
X$`20em`20"-E-NONNEG,`20/NO",`20ThisQual,`20"`20is`20not`20a`20negatable`20qual
Vifier"
X$`20goto`20abort
X$
X$BOO_QualNoVal:
X$`20em`20"-E-NOTREQ,`20",`20ThisQual,`20"`20does`20not`20take`20a`20value`20sp
Vecification"
X$`20goto`20abort
X$
XBOO_Qual_Val_Required:
X$`20em`20"-E-VALREQ,`20",`20Thisqual,`20"`20requires`20a`20value`20specificati
Von"
X$`20goto`20abort
X$!`0C
X$!`20-------------------------------------------------------------------------
V--
X$!`20CHECK`20PARAMETERS
X$!
X$!`20`20`20Check`20that`20the`20user`20supplied`20parameters`20have`20reasonab
Vle`20values`20and
X$!`20`20`20give`20errors`20if`20not.`20In`20some`20cases,`20set`20up`20default
Vs.
X$!
X$!`20-------------------------------------------------------------------------
V--
X$Check_Parameters:
X$!`20CHECK`20THE`20LONG`20LINES`20OPTION;`20ONLY`20ALLOWED`20IF`20THIS`20VMS
V`20SUPPORTS`20IT
X$`20if`20LongLines
X$`20`20`20then
X$`20`20`20`20`20if`20VMSx`20.lts.`20Min_VMS_For_LongLines
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-NOLONG,`20Long`20lines`20not`20supported
V`20prior`20to`20VMS`20",`20Min_VMS_For_LongLines
X$`20`20`20`20`20`20`20`20`20goto`20abort
X$`20`20`20`20`20endif
X$`20`20`20`20`20Max_TPU_Line_Length`20=`20Max_Line_NewTPU
X$`20`20`20`20`20Min_VMS_To_Unpack`20`20`20=`20Min_VMS_For_LongLines
X$`20endif
X$
X$
X$!`20CHECK`20THE`20PART`20SIZE`20SPECIFICATION
X$`20if`20Part_Size`20.eqs.`20""`20then`20$`20Part_Size`20=`20Def_Part_Size
X$`20if`20f$type(Part_Size)`20.nes.`20"INTEGER"
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-NONNUMSIZE,`20Part`20size`20is`20not`20numeric"
X$`20`20`20`20`20goto`20abort
X$`20endif
X$`20if`20Part_Size`20.le.`200
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-NONPOSSIZE,`20Part`20size`20is`20not`20a`20positive
V`20value"
X$`20`20`20`20`20goto`20abort
X$`20endif
X$
X$
X$!`20MASSAGE`20THE`20SHARE`20FILE`20NAME
X$`20ShareFile`20=`20f$parse(ShareFile,"`5B`5D")`20-`20f$parse(ShareFile,,,"VER
VSION")
X$`20if`20f$parse(ShareFile,,,"TYPE")`20.nes.`20"."`20then`20$`20ShareFile`20=
V`20ShareFile`20+`20"_"
X$`20
X$
X$!`20CHECK`20THE`20PACKAGE`20INDEX`20SUFFIX`20SPECIFICATION
X$`20if`20f$extract(0,1,PackageIdx)`20.nes.`20"."
X$`20`20`20then
X$`20`20`20`20`20if`20PackageIdx
X$`20`20`20`20`20`20`20then`20PackageIdx`20=`20".$PACKAGE"`09!`20Set`20default
V`20suffix`20for`20"TRUE"`20value
X$`20`20`20`20`20`20`20else`20PackageIdx`20=`20""`09`09!`20Set`20no`20suffix
V`20for`20"FALSE"`20value
X$`20`20`20`20`20endif
X$`20`20`20else
X$`20`20`20`20`20if`20f$parse(PackageIdx,,,"TYPE")`20.nes.`20PackageIdx
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-INVSUFFIX,`20Invalid`20package`20index
V`20file`20suffix`20specification`20",`20PackageIdx
X$`20`20`20`20`20`20`20`20`20goto`20abort
X$`20`20`20`20`20endif
X$`20endif
X$
X$
X$!`20WE`20ALLOW`20DEBUGGING`20ONLY`20FOR`20SYSTEMS`20PEOPLE,`20WITH`20EITHER
V`20SYSPRV`20OR`20SETPRV
X$!`20AUTHORIZED`20(DOESN'T`20HAVE`20TO`20BE`20ENABLED,`20JUST`20AUTHORIZED)
X$`20x`20=`20f$getjpi("","AUTHPRIV")
X$`20l`20=`20f$length(x)
X$`20if`20f$locate("SYSPRV",x)`20.eq.`20l`20.and.`20f$locate("SETPRV",x)`20.eq.
V`20l`20then`20$`20Debugging`20=`20"FALSE"
X$
X$
X$!`20CONVERT`20COMPRESSION/LOGGING/DEBUGGING`20FLAGS`20TO`20SUITABLE`20INTEGER
V`20VALUES
X$!`20FALSE`20becomes`20numeric`200,`20TRUE`20becomes`20numeric`201;`20if`20int
Veger,`20use`20that`20value
X$`20Compression=`20f$integer(Compression)
X$`20Debugging`20`20=`20f$integer(Debugging)
X$`20Logging`20`20`20`20=`20f$integer(Logging)
X$`20if`20DirKeep`20`20.eqs.`20""`20then`20$`20DirKeep`20`20=`20"T"`09!`20Defau
Vlt`20is`20to`20keep`20them
X$`20Dirkeep`20`20`20`20=`20f$integer(DirKeep)
X$`20if`20Verskeep`20.eqs.`20""`20then`20$`20Verskeep`20=`20"T"`09!`20Default
V`20is`20to`20keep`20them
X$`20VersKeep`20`20`20=`20f$integer(VersKeep)
X$
X$
X$!`20CHECK`20COMPRESSION`20VALUE`20IS`20WITHIN`20LIMITS`20CURRENTLY`20SUPPORTE
VD
X$`20if`20Compression`20.lt.`200`20`20.or.`20Compression`20.gt.`202
X$`20`20`20then
X$`20`20`20`20`20em`20"-E-UNSUPCOM,`20Unsupported`20compression`20type"
X$`20`20`20`20`20goto`20abort
X$`20endif
X$
X$!`20CHECK`20THE`20BEFORE/SINCE`20DATE`20SPECIFICATIONS
X$`20if`20Before`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20Before`20=`20f$cvtime(Before,"COMPARISON")
X$`20`20`20`20`20if`20.not.`20$status
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-INVTIME,`20Bad`20/BEFORE`20time`20specifi
Vcation`20-`20",`20Before
X$`20`20`20`20`20`20`20`20`20goto`20abort
X$`20`20`20`20`20endif
X$`20endif
X$`20if`20Since`20.nes.`20""
X$`20`20`20then
X$`20`20`20`20`20Since`20`20=`20f$cvtime(Since,"COMPARISON")
X$`20`20`20`20`20if`20.not.`20$status
X$`20`20`20`20`20`20`20then
X$`20`20`20`20`20`20`20`20`20em`20"-E-INVTIME,`20Bad`20/SINCE`20time`20specific
Vation`20-`20",`20Since
X$`20`20`20`20`20`20`20`20`20goto`20abort
X$`20`20`20`20`20endif
X$`20endif
X$
X$
X$!`20CONFIRMATION`20OF`20EACH`20FILE`20SELECTED`20IS`20ONLY`20AVAILABLE`20IF
V`20INTERACTIVE`20AS`20WE
X$!`20CAN'T`20PROMPT`20ANYONE`20OTHERWISE.
X$`20if`20Confirm`20.and.`20f$mode()`20.nes.`20"INTERACTIVE"
X$`20`20`20then
X$`20`20`20`20`20`20em`20"-w-CONFNOTINT,`20/CONFIRM`20ignored`20-`20not`20inter
Vactive"
X$`20`20`20`20`20`20Confirm`20=`20"FALSE"
X$`20endif
X$`20return
X$!`0C
X$!`20-------------------------------------------------------------------------
V--
X$!`20CREATE`20PARAMETER`20FILE
X$!
X$!`20`20`20Write`20a`20file`20containing`20all`20the`20parameters,`20options
V`20and`20filenames`20which`20the
X$!`20`20`20Packing`20routine`20needs`20to`20process.
X$!
X$!`20-------------------------------------------------------------------------
V--
X$Create_Parameter_File:
X$`20IfDebug`20=`20"if`20debugging`20.ge.`20DEBUG_ShowParams`20then`20$`20"`20+
V`20em
X$`20create`20`26TempFile
X$`20if`20.not.`20$status`20then`20$`20goto`20CPF_error1
X$`20open/append/error=CPF_error2`20SHARE_PARAMS`20`26TempFile
X$`20write/error=CPF_error2`20SHARE_PARAMS`20Facility
X$`20IfDebug`20"-I-DBGPARAM,`20Facility`20`20`20`20`20`20`20`20`20`20`20=`20",
V`20Facility
X$`20write/error=CPF_error2`20SHARE_PARAMS`20Version
X$`20IfDebug`20"-I-DBGPARAM,`20Version`20`20`20`20`20`20`20`20`20`20`20`20=`20"
V,`20Version
X$`20write/error=CPF_error2`20SHARE_PARAMS`20Min_VMS_to_Unpack
X$`20IfDebug`20"-I-DBGPARAM,`20Min_VMS_To_Unpack`20`20=`20",`20Min_VMS_To_Unpac
+-+-+-+-+-+-+-+-  END  OF PART 1 +-+-+-+-+-+-+-+-
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