From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 10-AUG-1989 16:31
To:	MRGATE::"ARISIA::EVERHART"
Subj:	VMS_SHARE (7.1-004) 1/8

Message-Id:  <8908101949.AA05031@crdgw1.ge.com>
Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu, 10 AUG 89 11:47:39 PDT
Received: from NSFnet-Relay.AC.UK by KL.SRI.COM with TCP; Thu, 10 Aug 89 11:27:46 PDT
Received: from oak.cc.kcl.ac.uk by NSFnet-Relay.AC.UK   via Janet with NIFTP
           id aa09514; 10 Aug 89 18:17 BST
Date: 		Thu, 10 AUG 89 18:17:41 GMT
From: UDAA055%oak.cc.kcl.ac.uk@NSFnet-Relay.AC.UK
To: info-vax <@NSFnet-Relay.AC.UK:info-vax@kl.sri.com>
Subject:        VMS_SHARE (7.1-004) 1/8
Sender: "JANET UDAA055@UK.AC.KCL.CC.OAK" <UDAA055%oak.cc.kcl.ac.uk@NSFnet-Relay.AC.UK>
Mailer:         Janet_Mailshr V3.4 (23-May-1989)

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.1-004  3-AUG-1989
$!   On 10-AUG-1989 16:52:05.01   By user UDAA055 
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$!+ THIS PACKAGE DISTRIBUTED IN 8 PARTS, TO KEEP EACH PART
$!  BELOW 30 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;11
$!       2. PAKMAIL.HLP;7
$!       3. TEST.TXT;2
$!       4. VMS_SHARE.BUGS;11
$!       5. VMS_SHARE.COM;64
$!       6. VMS_SHARE.HLP;11
$!       7. VMS_SHARE.RELEASE_NOTES;17
$!       8. VMS_SHARE.TECHNICAL_INFO;11
$!       9. VMS_SHARE.USER_GUIDE;7
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ if f$getsyi("version") .ges. "V4.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
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete/nolog 'f'*
$ exit
$file_absent:
$ 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/nolog 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");
buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff))
;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:=
ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x=
"V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;
IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE;
ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD);
EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3))));
ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o);
ENDPROCEDURE;Unpacker;EXIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create/nolog 'f'
X$! Purpose:
X$!`009To mail out a series of files produced by VMS_SHARE to a series
X$!`009of recipients.
X$!
X$! Parameters:
X$!
X$!`009P1 = name (or list ) of recipient(s). Can be logical or distribution
X$!           list.
X$!
X$!`009`009If sending to a distribution list, it is necessary to define
X$!`009`009a logical pointing to the file and then give that logical as
X$!`009`009the recipient name.  This avoids problems with DCL's handling
X$!`009`009of quotes and '@' symbols.
X$!
X$!
X$!`009P2 = file spec of package - "`091directory`093file" without VMS_SHARE
V suffix!
X$!
X$!
X$!`009P3 = no of parts of the package
X$!
X$! `009`009This procedure adds the VMS_SHARE suffix and sends files
X$!`009`009called  "`091directory`093file''nn'"   nn from 1-> 'P3'
X$!
X$!`009P4 = Comment to add to mail subject line
X$!
X$!
X$! Privileges:
X$!`009Whatever is necessary to access e-mail and the relevant network.
X$!
X$!
X$! Environment:
X$!`009Nothing special.  VMS_SHARE must exist of course in order to
X$!`009produce the software package.
X$!
X$! Revision History:
X$!`0091.0`009Andy Harper`0096-DEC-1988`009Original version
X$!`0091.1`009Andy Harper`00919-DEC-1988`009Allow P4 to be mail subject
X$!`0091.2`009Andy Harper`0095-JAN-1989`009Return exit status
X$!`0091.3`009Andy Harper`00916-JUN-1989`009Remove "OF_''mm'" extension
X$!`0091.4`009Andy Harper`0093-AUG-1989`009use READ, check EOF status
X$!
X$!
X$
X$
X$! SET UP STANDARD EXIT CODES
X$ ss$_normal= 1
X$ ss$_abort = 44
X$
X$
X$! MAKE SURE WE HAVE ALL THE PARAMETERS
X$get_recipient:
X$ if P1 .nes. "" then $ goto end_get_recipient
X$ read/prompt="_mail address of recipient "/end=exit sys$command P1
X$ goto get_recipient
X$end_get_recipient:
X$
X$package_location:
X$ if P2 .nes. "" then $ goto end_package_location
X$ read/prompt="_Enter package directory and base filename "/end=exit sys$com
Vmand P2
X$ goto package_location
X$end_package_location:
X$ P2 = f$parse(P2,,,,"SYNTAX_ONLY") - f$parse(P2,,,"VERSION")
X$ if f$parse(P2,,,"TYPE") .nes. "." then $ P2 = P2 + "_"
X$
X$
X$get_parts:
X$ if P3 .nes. "" then $ goto end_get_parts
X$ read/prompt="_Enter number of parts "/end=exit sys$command P3
X$ goto get_parts
X$end_get_parts:
X$
X$
X$! SET UP USEFUL SYMBOLS
X$ em="write sys$error ""%" +f$parse(f$environment("PROCEDURE"),,,"NAME")+"""
V,"
X$ package = f$parse(P2,,,"NAME")
X$ l = f$length(P3)
X$
X$
X$! IS THERE A SET OF FILES THAT MATCHES THE SPECIFICATION??
X$ if f$search("''P2'*") .eqs. "" then $ goto nopackage
X$
X$
X$! DO A QUICK CHECK TO MAKE SURE ALL REQUIRED FILES ARE THERE!!!!!
X$ part = 0
X$ OK = "TRUE"
X$check:
X$   part = part+1
X$   if part .gt. P3 then $ goto end_check
X$   if f$search("''P2'''part'") .nes. "" then $ goto check
X$   em "-E-NOPART, Part ''part' of ''package' is missing!"
X$   OK = "FALSE"
X$   goto check
X$end_check:
X$
X$
X$! WERE ALL THE PARTS FOUND? IF NOT, NOW'S THE TIME TO FIND OUT!
X$ if .not. OK then $ goto abandon
X$
X$
X$! LOOP AROUND EACH PART AND SEND
X$ part = 0
X$loop:
X$   part = part+1
X$   if part .gt. P3 then $ exit ss$_normal
X$   n = f$fao("!#ZL",l,part)
X$   em "-I-SENDPART, sending part ", part, " of ", package
X$   mail/noedit/noself/subject="''package' ''P4' ''n'/''P3'" 'p2''part' 'P1'
X$   if $status then $ goto loop
X$   exit $status`009! Return status from mail if it failed
X$
X$
X$nopackage:
X$  em "-E-NOPACKAGE, Cant find any files for ''package'."
X$abandon:
X$  em "-E-ABANDON, One or more missing parts. Send abandoned."
X$exit:
X$  exit ss$_abort
$ CALL UNPACK PAKMAIL.COM;11 1598751947
$ create/nolog 'f'
X! Version 1.4
X!     -- Andy Harper, Kings College London, UK
X1 PAKMAIL
XSends a series of files produced by VMS_SHARE across the E-mail
Xsystem to a specified set of recipients.`032
X
XFormat:
X     $ PAKMAIL recipient filespec parts `091comment`093
X2 Errors
XThese errors can be returned from PAKMAIL.
X3 ABANDON
XOne or more of the parts of the package could not be found. Prior
Xmessages should give the specific parts that could not be found.
XSee NOPART.`032
X3 MAIL_errors
XPAKMAIL uses the MAIL utility to send the parts. Consequently
Xerrors may be issued by the MAIL utility under certain
Xconditions. Consult the MAIL reference manual and/or system
Xmessages reference manual for details of these.`032
X3 NOPACKAGE
XNo files could be found for the package at all so it is highly
Xprobable that the name of the package has been given incorrectly.
X3 NOPART
XIndicates that a particular part of the package cannot be found.
XGiven a filespec of '`091dir`093file.type', the parts of the package
Xshould exist as:`032
X   `091dir`093file.type_1
X   `091dir`093file.type_2
X   ...
X3 SENDPART
XAn informational message to indicate that a particular part of
Xthe package is being sent.`032
X2 Example
X     $ PAKMAIL FRED `091.TEST`093PACKAGE 25
X          Send all 25 parts of a VMS_SHARE created series of files
X          that comprise the package "PACKAGE". Files have a generic
X          prefix of "`091.TEST`093PACKAGE" and  each will have its TYPE
X          suffixed by the VMS_SHARE convention of 'nn'
X2 Filespec
XThe directory and fixed constant part of the files containing the
XVMS_SHARE'd package. The part number is appended to the TYPE part
Xof the name.`032
X
XFor instance, the name "`091.TEST`093BURBLE.SHAR" refers to the files:
X
X     `091.TEST`093BURBLE.SHAR_nn
X
X'nn' being the part number.
X2 Comment
XSpecifies an optional comment to be inserted into the MAIL /SUBJECT
Xheader line, between the package name and the number of
Xthe part.`032
X
XFor example, without this parameter, the /SUBJECT line looks like
Xthis:`032
X   Subject:   VMS_SHARE  1/4
X
XWith it set to the string "(Version 7 Pre-release)", the /SUBJECT
Xline looks like this:`032
X   Subject:   VMS_SHARE (Version 7 Pre-Release) 1/4
X2 Parts
XSpecifies the number of parts making up the complete package to
Xbe sent. This defines the total number of files to be sent.`032
X
XThere is no default for this.
X2 Recipient
XThe mail address of the recipient. This may be anything which can
Xbe used on the MAIL command line. Because of the way MAIL parses
Xaddresses and the way DCL treats @ symbols, care is needed when
Xspecifying addresses which are distribution lists (usually
Xprefixed by @) or which contain double quotes.`032
X3 Distribution_Lists
XUse of distribution lists directly on the MAIl command line does
Xnot work as DCL gets at the '@' symbol before MAIL does!  It must
Xbe done by pointing a logical name at the distribution list,
Xincluding the '@' and then using the logical name as the
Xrecipient.`032
X
XFor instance, to simulate:
X
X   $ PAKMAIL @FRIENDS   ....
X
XDo:
X
X   $ DEFINE FRIENDS "@FRIENDS.DIS"
X   $ CREATE FRIENDS.DIS
X   ..... insert friends here
X   `094Z
X   $ PAKMAIL FRIENDS .....
X3 Quoted_usernames
XUsernames must be specified in exactly the same form as they
Xwould be used on the MAIL command line, as in:`032
X
X   $ MAIL MESSAGE.TXT NET%"""FRED@MIT"""
X
XThis is important only when addresses containing double quotes
Xare used; essentially, individual quotes are doubled and a new
Xset placed around the lot.`032
X
XFor instance, to simulate:
X
X   $ PAKMAIL  EARN%"FRED@CARNEGIE"
X
XDo:
X   $ PAKMAIL  EARN%"""FRED@CARNEGIE"""
X
XAlternatively, define a logical name that contains the original
Xform of address:`032
X
X   $ DEFINE BROTHER EARN%"""FRED@CARNEGIE"""
X   $ PAKMAIL BROTHER   ...
X2 VMS_SHARE
XVMS_SHARE packages a series of files into the special format. See
Xthe help on that utility for specific information.`032
$ CALL UNPACK PAKMAIL.HLP;7 1650067911
$ create/nolog 'f'
X    `009`009`009V M S _ S H A R E     TEST FILE
X
X---------------------------------------- Test printable characters
Xabcdefghijklmnopqrstuvwxyz`009! All lower case letter, in order
XABCDEFGHIJKLMNOPQRSTUVWXYZ`009! All upper case letters, in order
X0123456789`009`009`009! All digits in order
X`096  ! Backwords quote
X`126  ! Tilde
X!  ! Exclamation mark
X@  ! at sign
X#  ! Hash or pound sign
X$  ! Dollar sign
X%  ! Percent sign
X`094  ! Caret
X&  ! Ampersand
X*  ! asterisk
X(  ! Left round bracket
X)  ! Right round bracket
X-  ! minus
X+  ! plus
X=  ! equals
X`123  ! left brace
X`125  ! right brace
X`091  ! left square bracket
X`093  ! right square bracket
X:  ! colon
X"  ! Double quote
X`124  ! vertical bar
X;  ! semicolon
X'  ! single quote
X\  ! backslash
X>  ! greater than
X<  ! less than
X,  ! comma
X.  ! period
X?  ! question mark
X/  ! slash
X---------------------------------------- Test single blank line
X
X---------------------------------------- Test trailing blanks, non split lin
Ves
XHere are some lines with trailing blanks      `032
Xand another    `032
X---------------------------------------- Test trailing blanks, split lines
X1234567890123456789012345678901234567890123456789012345678901234567890123456
V78901234567890123456789012345678901234567890123456789012345678901234567890
X1234567890    x     x     x     x     x     x     x     x     x     x     x
V     x     x    `032
X1234567890   x     x     x     x     x     x     x     x     x     x     x
V     x     x    `032
X1234567890  x     x     x     x     x     x     x     x     x     x     x
V     x     x      `032
X1234567890 x     x     x     x     x     x     x     x     x     x     x
V     x     x     `032
X1234567890x     x     x     x     x     x     x     x     x     x     x
V     x     x     `032
X
X
X    `009`009END OF  V M S _ S H A R E  TEST FILE
$ CALL UNPACK TEST.TXT;2 942494529
$ create/nolog 'f'
X`009`009V M S _ S H A R E   B U G   F I X E S
X
X    `009`009`009 Version 7.1-004
X
X
X
X
X1. INTRODUCTION
X
XThis document is an addendum to the main release notes for VMS_SHARE`032
Xdescribing all the bugs fixed since the last major release 7.1-001
X
X
X
X2. BUG FIX DESCRIPTIONS
X
X2.1 Verification`009`009`009`009`009(7.1-002)
X
XVMS_SHARE now turns verification of the DCL code on or off based on the`032
Xdefinition of the logical name SHARE_VERIFY. Previously no attempt was made
V to`032
Xalter the verification setting. The environment is restored on exit.
X
XIf SHARE_VERIFY is defined as TRUE (or 1 or YES etc.) then verification is`0
V32
Xenabled. If defined as FALSE (or 0 or NO etc.) or is not defined at all,`032
Xverification is disabled.
X
XNote that this logical defines verification both for VMS_SHARE itself and fo
Vr`032
Xany unpack operations performed on the created archive.
X
XNote also that if the user has no READ access to the procedure (recommended)
V`032
Xthen verification is always disabled.
X
XThe .HLP file has been updated to include a reference to this logical and it
Vs`032
Xdefinitions.
X
XNOTE that the Version 7.1 release notes contain a comment that this logical`
V032
Xname has been removed. This was true with release 7.1-001 of VMS_SHARE but t
Vhe`032
Xlogical has been reinstated with release 7.1-002
X
X
X
X2.2 Symbol Redefinition`009`009`009`009`009(7.1-002)
X
XVMS_SHARE now uses the SET SYMBOL command to insulate itself from any symbol
V`032
Xdefinitions made by the user. Both local and global definitions of any DCL
Xsymbols are ignored.  If VMS_SHARE exits normally then the original setting
V is`032
Xrestored. However, an abnormal exit may cause the new settings to be retaine
Vd.`032
XThis may cause confusion if a user is unaware of what has happened.
X
XPreviously any external symbol definitions matching commands used internally
V`032
+-+-+-+-+-+-+-+-  END  OF PART 1 +-+-+-+-+-+-+-+-

