From ncr-sd!hp-sdd!ucsdhub!sdcsvax!ucbvax!rtpark.ge.COM!rlb Mon Jan 25 11:33:31 PST 1988 There have been a number of postings recently that were updates to various programs given in the form of differences. I am pleased that you are trying to save the net by shipping differences only, but I find it to be a real time burner to have to manually go through and apply this stuff if it looks worthwhile. For this very reason, I wrote a procedure which takes the pain out of the process. The idea is simple -- it really just automates what anyone can do manually. I submitted this goody back on 31 Dec 1987, but am posting it here again. This procedure, bundled inside of a shar file, is designed to generate the SUMSLP differences, set up a build procedure, and package the whole thing up using Michael Bednarek's VMS_SHAR utility. When differences have been packaged this way, the procedure for applying them is as follows: 1. @ the shar file, which unpackages the update procedure 2. @ the update procedure, supplying the file name to be updated and the file name for the result to go to. I originally wrote this for procedure for the purpose of shipping local modifications to DEC supplied software, so as not to violate the licensing agreement(s). It works just as well for shipping updates as differences. Please try this out and see what you think. If you have suggestions for enhancements, please send MAIL directly to me. ----------------------------------------------------------------- Bob Boyd Usenet: rlb@rtpark.rtp.ge.com GE Microelectronics Ctr. Voice: (919)549-3627 POB 13049, MS 7T3-01 GE DIALCOMM: 8*565-3627 RTP, NC 27709-3049 GE DECnet: RTPARK::RLB ....................... Cut between dotted lines and save ...................... $!.............................................................................. $! VAX/VMS archive file created by VMS_SHAR V-5.01 01-Oct-1987 $! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au) $! To unpack, simply save and execute (@) this file. $! $! This archive was created by RLB (rlb@rtpark.rtp.ge.com) $! on Thursday 31-DEC-1987 13:29:52.28 $! $! It contains the following 1 file: $! PACKAGE.COM $!============================================================================== $ Set Symbol/Scope=(NoLocal,NoGlobal) $ Version=F$GetSYI("VERSION") ! See what VMS version we have here: $ If Version.ges."V4.4" then goto Version_OK $ Write SYS$Output "Sorry, you are running VMS ",Version, - ", but this procedure requires V4.4 or higher." $ Exit 44 $Version_OK: CR[0,8]=13 $ Pass_or_Failed="failed!,passed." $ Goto Start $Convert_File: $ Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd $No_Error1: Define/User_Mode SYS$Output NL: $ Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' - VMS_SHAR_DUMMY.DUMMY f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f); o:=Get_Info(Command_Line,"Output_File");Set(Output_File,b,o); Position(Beginning_of(b));Loop x:=Erase_Character(1);Loop ExitIf x<>"V"; Move_Vertical(1);x:=Erase_Character(1);Append_Line; Move_Horizontal(-Current_Offset);EndLoop;Move_Vertical(1); ExitIf Mark(None)=End_of(b) EndLoop;Position(Beginning_of(b));Loop x:=Search("`",Forward,Exact);ExitIf x=0;Position(x);Erase_Character(1); If Current_Character='`' then Move_Horizontal(1);else Copy_Text(ASCII(INT(Erase_Character(3))));EndIf;EndLoop;Exit; $ Delete VMS_SHAR_DUMMY.DUMMY;* $ Checksum 'File_is $ Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR $ Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd $No_Error2: Return $Start: $ File_is="PACKAGE.COM" $ Check_Sum_is=458833704 $ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY X$! Procedure to build a kit to send out local edits to any vendor supplied X$! procedure(s). This way you only distribute your own contributions to the X$! procedure(s) -- This is especially useful for things that came in X$! SYS$EXAMPLES: or SYS$MANAGER: X$! X$! Parameters: X$! p1 -- MASTER/original file X$! p2 -- site modified version of MASTER file X$! p3 -- output file for shipment X$! X$! Author:`009Robert Boyd, GE Microelectronics Center, X$! Date:`00917-DEC-1987 X$! X$! You are free to distribute this as you please with the following X$! restrictions: X$! 1. Any charge must be a reasonable cost for the distribution only; and X$! 2. You keep the credits and this notice intact. X$ set noon X$!*** change this to point to your copy of VMS_SHAR by Michael Bednarek X$ vms_shar = "@UTL:VMS_SHAR" X$ write sys$output "Package up shippable revisions to standard DEC procedure" X$ inqk = "read sys$command ans" X$ if p1.eqs."" then $ inqk/prompt="Master/Original file name: "/end=EXIT X$ if p1.eqs."" then $ p1 = ans X$ if p2.eqs."" then $ inqk/prompt="Modified/Revised file name: "/end=EXIT X$ if p2.eqs."" then $ p2 = ans X$ p2 = f$parse(p2,p1) X$ if p1.eqs."" .or. p2.eqs."" then $ goto EXIT X$ p3 = f$parse(p3,".package",p2) X$ write sys$output "Building ",p3," from MASTER: ",p1,- X`009", locally revised to: ",p2 X$ tmp_file1 = f$parse(".tmp1",p3) X$ tmp_file2 = f$parse(".shipable",p3) X$! build the SUMSLP edit file X$ differences 'p1' 'p2'/SLP/output='tmp_file1'- X`009/ignore=(spacing,trailing_spaces,exact) X$! build preamble and setup SUMSLP edit X$ wt = "write tmp_com" X$ open/write tmp_com 'p3' X$ wt "$! Procedure to convert ",p1," to ",p2 X$ wt "$! p1 -- output file name" X$ wt "$! X$ wt "$! Execute this file with @ X$ wt "$! generated by ",f$getjpi("","username")," at ",f$time() X$ wt "$! X$ wt "$ set noon" X$ wt "$ if p1.eqs."""" then inquire p1 ""Output file name""" X$ wt "$ write sys$Output ""Updating ",p1," to produce "",p1,""" X$ wt "$ edit/sum ",p1,"/update=sys$Input:/output='p1'" X$ wt "$ DECK/dollars=""$*EOD*SUM""" X$ close tmp_com X$! put the edit deck together now X$ append 'tmp_file1' 'p3' X$ open/append tmp_com 'p3' X$ wt "$*EOD*SUM" X$ wt "$ write sys$output ""Completed Conversion""" X$ close tmp_com X$! prepare the whole thing for shipment over Internet X$ vms_shar 'p3' 'tmp_file2' X$ rename 'tmp_file2' 'p3' X$! clean house a bit X$ purge 'p3'/keep=1 X$ delete 'tmp_file1' X$EXIT: X$ exit X$!Last Modified: 17-DEC-1987 11:30:49.31, By: RLB $ GoSub Convert_File $ Exit