Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!DGOGWDG5.BITNET!U0012 From: U0012@DGOGWDG5.BITNET ("GWDGV1::MOELLER") Newsgroups: comp.os.vms Subject: update for SHOMOD.COM Message-ID: <8805240321.AA00906@ucbvax.Berkeley.EDU> Date: 20 May 88 18:20:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 75 When I posted SHOMOD.COM on March 31, I asked > How do YOU find the system idle time? Now I learned it from LTL@CUGSBVAX (poster of CLOCK.FOR on April 20, which I received - on BITNET - on May 17), so here goes ... [ usage: $ EDIT/SUM SHOMOD.COM/UPDATE=SHOMOD.DIF ] ...................... 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 MOELLER $! on Friday 20-MAY-1988 20:00:35.34 $! $! It contains the following 1 file: $! SHOMOD.DIF $!============================================================================== $ 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="SHOMOD.DIF" $ Check_Sum_is=41829994 $ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY X- 4, 4 X- 8 X$! mod 20-may-1988 wjm: NULL phd is readable, get "nullticks" from there X$!`009`009`009(credit: LTL@CUGSBVAX's CLOCK program) X- 22 X$ sch$gl_nullpcb=%x800024a8 X$ pcb$l_phd=%x6c X$ phd$l_cputim=%x38 X$! X- 26, 59 X$!*****`009get performance data X$! X$ nullphd=f$cvui(0,32,f$fao("!AD",4,sch$gl_nullpcb+pcb$l_phd)) X$! X$ nullticks=f$cvui(0,32,f$fao("!AD",4,nullphd+phd$l_cputim)) X/ $ GoSub Convert_File $ Exit BTW: make sure your copy of this mail file does not contain TRAILING BLANKS so the checksum will come out right. Is there a version of VMS_SHAR which properly deals with TRAILING BLANKS? Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ... Bitnet/Earn: U0012@DGOGWDG5 Phone: +49 551 201516 | No claim intended