From:	CRDGW2::CRDGW2::MRGATE::"SMTP::YMIR.CLAREMONT.EDU::POSTMAST"  4-DEC-1990 01:13:04.59
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	(3.2-5) Repost of 3.2-5 in VMS_SHARE format...

Received:  by crdgw1.ge.com (5.57/GE 1.80)
	 id AA08209; Mon, 3 Dec 90 23:24:41 EST
Resent-From: postmast@YMIR.CLAREMONT.EDU
Resent-Message-Id:  <9012040424.AA08209@crdgw1.ge.com>
Received: from HMCVAX.CLAREMONT.EDU by YMIR.CLAREMONT.EDU with PMDF#10000; Mon,
 3 Dec 1990 17:30 PST
Resent-Date: Mon, 3 Dec 1990 20:13 PST
Date: Mon, 3 Dec 1990 17:29 PST
From: "Ned Freed, Postmaster" <NED@HMCVAX.CLAREMONT.EDU>
Subject: (3.2-5) Repost of 3.2-5 in VMS_SHARE format...
To: INFO-PMDF@YMIR.CLAREMONT.EDU
Errors-To: postmast@YMIR.CLAREMONT.EDU
Message-Id: <4CDACC8164E009A3@HMCVAX.CLAREMONT.EDU>
X-Vms-To: ipmdf

Bill Sherman has reported a problem with DELIVER as shipped with PMDF V3.2.
The problem is that DELIVER uses the /NOTRAN qualifer to VMS MAIL, and this
qualifier did not exist prior to VMS 5.0. I've added conditional code so
that this qualifer will be omitted when running under old versions of VMS.

Although this is not a patch to PMDF proper, I'm assigning it the number 3.2-5.

				Ned

The patches are encoded in VMS_SHARE format below.

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.2-007  22-FEB-1990
$!   On  3-DEC-1990 17:26:11.70   By user NED 
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$! 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. 32-4.DIFF;1
$!       2. 32-4.PATCH;1
$!
$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 = "!"
$ 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
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete '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 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ if .not. f$verify() then $ 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");b:=
CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);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 IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
"output_file"));ENDPROCEDURE;Unpacker;QUIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create 'f'
X************
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78
X   93  `20
X   94         2-Dec-1990, Ned Freed, Innosoft International, Inc.
X   95   `20
X   96           Omit the /NOTRAN qualifer when operating with VMS versions p
Vrior
X   97           to 5.0 -- it is illegal. This problem was reported by Bill S
Vherman.
X   98   *)
X******
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
X   93   *)
X************
X************
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78
X 1006                      if MAIL$C_PROT_MAJOR > 1 then
X 1007                        write (message_file,
X 1008                               '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ')
X 1009                      else write (message_file,
X 1010                                  '$ MAIL/NOSELF/SUBJECT="(From: ');
X 1011                      write (message_file, '''''QFROM'') ''''QSUBJECT''
V"');
X******
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
X 1001                      write (message_file,
X 1002                             '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ');
X 1003                      write (message_file, '''''QFROM'') ''''QSUBJECT''
V"');
X************
X************
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78
X 1031                      if MAIL$C_PROT_MAJOR > 1 then
X 1032                        write (message_file,
X 1033                               '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ')
X 1034                      else write (message_file,
X 1035                                  '$ MAIL/NOSELF/SUBJECT="(From: ');
X 1036                      write (message_file, '''''QFROM'') ''''QSUBJECT''
V"');
X******
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
X 1023                      write (message_file,
X 1024                             '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ');
X 1025                      write (message_file, '''''QFROM'') ''''QSUBJECT''
V"');
X************
X************
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78
X 1079                      if MAIL$C_PROT_MAJOR > 1 then
X 1080                        write (message_file, '$ MAIL/NOTRAN/NOSELF')
X 1081                      else write (message_file, '$ MAIL/NOSELF');
X 1082                      write (message_file,
X 1083                             '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QS
VUBJECT''"');
X 1084                      write (message_file, ' ''MESSAGE_FILE'' "_');
X******
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
X 1068                      write (message_file, '$ MAIL/NOTRAN/NOSELF',
X 1069                       '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT
V''"');
X 1070                      write (message_file, ' ''MESSAGE_FILE'' "_');
X************
X************
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78
X 1127                      if MAIL$C_PROT_MAJOR > 1 then
X 1128                        write (message_file, '$ MAIL/NOTRAN/NOSELF')
X 1129                      else write (message_file, '$ MAIL/NOSELF');
X 1130                      write (message_file,
X 1131                             '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QS
VUBJECT''"');
X 1132                      writeln (message_file, ' ''MESSAGE_FILE'' ',
X******
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
X 1113                      write (message_file, '$ MAIL/NOTRAN/NOSELF',
X 1114                        '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJEC
VT''"');
X 1115                      writeln (message_file, ' ''MESSAGE_FILE'' ',
X************
X************
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78
X 1161         if MAIL$C_PROT_MAJOR > 1 then
X 1162           write (message_file, '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: '
V)
X 1163         else write (message_file, '$ MAIL/NOSELF/SUBJECT="(From: ');
X 1164         writeln (message_file, '''''QFROM'') ''''QSUBJECT''" ''MESSAGE
V_FILE'' _',
X******
XFile PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
X 1144         write (message_file, '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ');
X 1145         writeln (message_file, '''''QFROM'') ''''QSUBJECT''" ''MESSAGE
V_FILE'' _',
X************
X
XNumber of difference sections found: 6
XNumber of difference records found: 28
X
XDIFFERENCES /IGNORE=()/MERGED=1
X    PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;78-
X    PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;75
$ CALL UNPACK 32-4.DIFF;1 623404458
$ create 'f'
X*** PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;-0
X--- PMDF_ROOT:`5BDELIVER`5DDELIVER.PAS;
X**************
X*** 90,96
X          Added code to set symbol DELIVER_STATUS in the 'bad_msg' case of
X          MAIL_IO_WRITE.  Without this, one could end up with DELIVER_STATUS
X          set to SS$_NORMAL, and yet have an error in DELIVER_MESSAGE.
X- *)
X `20
X  `5Binherit ('SYS$LIBRARY:STARLET')`5D module deliver (output);
X `20
X--- 90,95 -----
X          Added code to set symbol DELIVER_STATUS in the 'bad_msg' case of
X          MAIL_IO_WRITE.  Without this, one could end up with DELIVER_STATUS
X          set to SS$_NORMAL, and yet have an error in DELIVER_MESSAGE.
X `20
X        2-Dec-1990, Ned Freed, Innosoft International, Inc.
X  `20
X**************
X*** 92,97
X          set to SS$_NORMAL, and yet have an error in DELIVER_MESSAGE.
X  *)
X `20
X  `5Binherit ('SYS$LIBRARY:STARLET')`5D module deliver (output);
X `20
X  const
X--- 91,102 -----
X          MAIL_IO_WRITE.  Without this, one could end up with DELIVER_STATUS
X          set to SS$_NORMAL, and yet have an error in DELIVER_MESSAGE.
X `20
X+       2-Dec-1990, Ned Freed, Innosoft International, Inc.
X+ `20
X+         Omit the /NOTRAN qualifer when operating with VMS versions prior
X+         to 5.0 -- it is illegal. This problem was reported by Bill Sherman
V.
X+ *)
X+`20
X  `5Binherit ('SYS$LIBRARY:STARLET')`5D module deliver (output);
X `20
X  const
X**************
X*** 998,1005
X                   end; (* create, copy *)
X            (* deliver *)
X            'D'  : begin
X!                    write (message_file,
X!                           '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ');
X                     write (message_file, '''''QFROM'') ''''QSUBJECT''"');
X                     write (message_file, ' ''MESSAGE_FILE'' "_');
X                     write (message_file,
X--- 1003,1013 -----
X                   end; (* create, copy *)
X            (* deliver *)
X            'D'  : begin
X!                    if MAIL$C_PROT_MAJOR > 1 then
X!                      write (message_file,
X!                             '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ')
X!                    else write (message_file,
X!                                '$ MAIL/NOSELF/SUBJECT="(From: ');
X                     write (message_file, '''''QFROM'') ''''QSUBJECT''"');
X                     write (message_file, ' ''MESSAGE_FILE'' "_');
X                     write (message_file,
X**************
X*** 1020,1027
X                   end; (* execute *)
X            (* forward *)
X            'F'  : begin
X!                    write (message_file,
X!                           '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ');
X                     write (message_file, '''''QFROM'') ''''QSUBJECT''"');
X                     writeln (message_file, ' ''MESSAGE_FILE'' ',
X                              parameters`5Bargument_parameter`5D, error := C
VONTINUE);
X--- 1028,1038 -----
X                   end; (* execute *)
X            (* forward *)
X            'F'  : begin
X!                    if MAIL$C_PROT_MAJOR > 1 then
X!                      write (message_file,
X!                             '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ')
X!                    else write (message_file,
X!                                '$ MAIL/NOSELF/SUBJECT="(From: ');
X                     write (message_file, '''''QFROM'') ''''QSUBJECT''"');
X                     writeln (message_file, ' ''MESSAGE_FILE'' ',
X                              parameters`5Bargument_parameter`5D, error := C
VONTINUE);
X**************
X*** 1065,1073
X                              error := CONTINUE);
X                     if status (message_file) > 0 then
X                       LIB$SIGNAL (DELIVER__MESWRTERR, 1, status (message_fi
Vle));
X!                    write (message_file, '$ MAIL/NOTRAN/NOSELF',
X!                     '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT''"');
X!                    write (message_file, ' ''MESSAGE_FILE'' "_');
X                     write (message_file,
X                       substr (user_list_scan`5E.username, 1,
X                               user_list_scan`5E.user_length));
X--- 1076,1084 -----
X                              error := CONTINUE);
X                     if status (message_file) > 0 then
X                       LIB$SIGNAL (DELIVER__MESWRTERR, 1, status (message_fi
Vle));
X!                    if MAIL$C_PROT_MAJOR > 1 then
X!                      write (message_file, '$ MAIL/NOTRAN/NOSELF')
X!                    else write (message_file, '$ MAIL/NOSELF');
X                     write (message_file,
X                            '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT
V''"');
X                     write (message_file, ' ''MESSAGE_FILE'' "_');
X**************
X*** 1069,1074
X                      '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT''"');
X                     write (message_file, ' ''MESSAGE_FILE'' "_');
X                     write (message_file,
X                       substr (user_list_scan`5E.username, 1,
X                               user_list_scan`5E.user_length));
X                     writeln (message_file, '"', error := CONTINUE);
X--- 1080,1088 -----
X                       write (message_file, '$ MAIL/NOTRAN/NOSELF')
X                     else write (message_file, '$ MAIL/NOSELF');
X                     write (message_file,
X+                           '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT
V''"');
X+                    write (message_file, ' ''MESSAGE_FILE'' "_');
X+                    write (message_file,
X                       substr (user_list_scan`5E.username, 1,
X                               user_list_scan`5E.user_length));
X                     writeln (message_file, '"', error := CONTINUE);
X**************
X*** 1110,1117
X                              error := CONTINUE);
X                     if status (message_file) > 0 then
X                       LIB$SIGNAL (DELIVER__MESWRTERR, 1, status (message_fi
Vle));
X!                    write (message_file, '$ MAIL/NOTRAN/NOSELF',
X!                      '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT''"')
V;
X                     writeln (message_file, ' ''MESSAGE_FILE'' ',
X                              parameters`5Bargument_parameter`5D, error := C
VONTINUE);
X                     if status (message_file) > 0 then
X--- 1124,1134 -----
X                              error := CONTINUE);
X                     if status (message_file) > 0 then
X                       LIB$SIGNAL (DELIVER__MESWRTERR, 1, status (message_fi
Vle));
X!                    if MAIL$C_PROT_MAJOR > 1 then
X!                      write (message_file, '$ MAIL/NOTRAN/NOSELF')
X!                    else write (message_file, '$ MAIL/NOSELF');
X!                    write (message_file,
X!                           '/PROTOCOL=DELIVER_MAILSHR/SUBJECT="''''QSUBJECT
V''"');
X                     writeln (message_file, ' ''MESSAGE_FILE'' ',
X                              parameters`5Bargument_parameter`5D, error := C
VONTINUE);
X                     if status (message_file) > 0 then
X**************
X*** 1141,1147
X `20
X      if not somehavematched then begin
X        if DEBUG_OUT then writeln ('  No rules matched, just deliver it.');
X!       write (message_file, '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ');
X        writeln (message_file, '''''QFROM'') ''''QSUBJECT''" ''MESSAGE_FILE'
V' _',
X                 substr (user_list_scan`5E.username, 1,
X                         user_list_scan`5E.user_length), error := CONTINUE);
X--- 1158,1166 -----
X `20
X      if not somehavematched then begin
X        if DEBUG_OUT then writeln ('  No rules matched, just deliver it.');
X!       if MAIL$C_PROT_MAJOR > 1 then
X!         write (message_file, '$ MAIL/NOTRAN/NOSELF/SUBJECT="(From: ')
X!       else write (message_file, '$ MAIL/NOSELF/SUBJECT="(From: ');
X        writeln (message_file, '''''QFROM'') ''''QSUBJECT''" ''MESSAGE_FILE'
V' _',
X                 substr (user_list_scan`5E.username, 1,
X                         user_list_scan`5E.user_length), error := CONTINUE);
$ CALL UNPACK 32-4.PATCH;1 103221832
$ v=f$verify(v)
$ EXIT
