From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 24-OCT-1989 19:13
To:	MRGATE::"ARISIA::EVERHART"
Subj:	AKCOUNT resource accounting package.

Received: From UGW.UTCS.UTORONTO.CA by CRVAX.SRI.COM with TCP; Tue, 24 OCT 89 13:53:11 PDT
Received: from VM.NRC.CA (stdin) by ugw.utcs.utoronto.ca with BSMTP id 57414; Tue, 24 Oct 89 16:53:35 EDT
Received: from NRCNET.NRC.CA by VM.NRC.CA (Mailer R2.04) with BSMTP id 7075;
 Tue, 24 Oct 89 16:51:14 EDT
Date: 	Tue, 24 Oct 89 17:40:00 EDT
From: Martin Serrer - Systems Manager <SERRER@NRCM3.NRC.CA>
Subject: AKCOUNT resource accounting package.
To: INFO-VAX@SRI.COM
X-Vms-To: NRCNET::IN%"INFO-VAX@SRI.COM"
Message-Id: <89Oct24.165335edt.57414@ugw.utcs.utoronto.ca>

Hello again,

  Several people have contacted me wrt problems VMS V5.x brought to the AKCOUNT
package. Here is a list of mods required to make things whole again.
                                Martin
------------------------------cut here------------------------------------------

          These modifications are required by the AKCOUNT package.
        Make these mods then rebuild the package with AKBUILD.COM
        and restart.

        Source:  Martin Serrer  DME/NRC Systems Lab.
        Date:    Oct/89


********************************************************************************
File AKRUN.COM

          Change manner in which device name is extracted, so that the
        name can be more that 5 characters long. Fix for cluster devices.

--------------------------------Old-Version-------------------------------------
$LOOP:
$       READ/END=XLOOP/ERR=XLOOP DISK_LIST LINE
$       L1:='F$LOCATE(":",LINE)
$       DEVICE:='F$EXTRACT(L1-4,5,LINE)            !**** Change this line ****!
$       DEV_MNT:='F$GETDVI(DEVICE,"MNT")'
$       IF DEV_MNT .EQS. "FALSE" THEN GOTO LOOP
--------------------------------New-Version-------------------------------------
$LOOP:
$       READ/END=XLOOP/ERR=XLOOP DISK_LIST LINE
$       L1:='F$LOCATE(":",LINE)
$       DEVICE:='F$EXTRACT(0,L1+1,LINE)            !**** Changed line ****!
$       DEV_MNT:='F$GETDVI(DEVICE,"MNT")'
$       IF DEV_MNT .EQS. "FALSE" THEN GOTO LOOP
--------------------------------------------------------------------------------
********************************************************************************
File AKPCTTIM.FOR

          Make the variable 'S1' real so that percentage of prime time
        is calculated properly.

--------------------------------Old-Version-------------------------------------
        INCLUDE 'AK.INC/NOLIST'
C
        INTEGER*4 PRC_START(2),PRC_END(2)
        INTEGER*4 TIM_DIF(2),CON_TIM,WEEKDAY
        REAL*4 PCT_TIM                             !**** Change this line ****!
C
        D1=24*60
--------------------------------New-Version-------------------------------------
        INCLUDE 'AK.INC/NOLIST'
C
        INTEGER*4 PRC_START(2),PRC_END(2)
        INTEGER*4 TIM_DIF(2),CON_TIM,WEEKDAY
        REAL*4 PCT_TIM, S1                         !**** Changed line ****!
C
        D1=24*60
********************************************************************************
File AKGETREC.FOR

          Fix for VMS V5.x missing ACR$K_FILE_FL record

--------------------------------Old-Version-------------------------------------
          ELSE
            TYPE*,'*** ERROR, Problem in MK$GET_INFO'
            GOTO 10
          END IF
        END IF

C
C_Find entry in AK$SUMMARY for owner of current record
C
        DO USER=1,TOT_USR
          AK$RECORD=AK$SUMMARY(USER)
          CALL STRIP(AK$USR_NAM,N1)
          CALL STRIP(MK$USR_NAM,N2)
          IF (AK$USR_NAM(1:N1).EQ.MK$USR_NAM(1:N2)) GOTO 20
        END DO
--------------------------------New-Version-------------------------------------

          ELSE
            TYPE*,'*** ERROR, Problem in MK$GET_INFO'
            GOTO 10
          END IF
        END IF

C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C_ As of VMS version 5.x the record ACR$K_FILE_FL is no longer written when the
C_DCL command  $ SET ACCOUNTING/NEW_FILE is issued. Therefore to make sure that
C_we get an end date in our file so that the report writer doesn't die we do
C_the following. Since the accounting file is written in cronological order the
C_last pass through this routine will pick up the record with a time stamp of
C_no greater than what would have been in ACR$K_FILE_FL.
C
C  Modified: Oct/89
C  By:  M. Serrer   NRC/DME  Systems Lab.
C
        AK$END_DATE(1)=MK$SYS_TIM(1)
        AK$END_DATE(2)=MK$SYS_TIM(2)
        ISTAT=SYS$ASCTIM(,END_STR,AK$END_DATE,)
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C_Find entry in AK$SUMMARY for owner of current record
C
        DO USER=1,TOT_USR
          AK$RECORD=AK$SUMMARY(USER)
          CALL STRIP(AK$USR_NAM,N1)
          CALL STRIP(MK$USR_NAM,N2)
          IF (AK$USR_NAM(1:N1).EQ.MK$USR_NAM(1:N2)) GOTO 20
        END DO
********************************************************************************

+------------------------------------------------------------------------------+
|  Martin Serrer     -    Systems Munger   |     |     |   +---+   /----\      |
|  Systems Laboratory,  Bldg. M-3 RM.118   |     |\    |   |   |  |      \     |
|  Division of Mechanical Engineering      |     | \   |   |   |  |            |
|  National Research Council of Canada     |     |  \  |   |---+  |            |
|  Ottawa, Ontario, Canada    K1A-0R6      |     |   \ |   | \    |            |
|  serrer@syslab.nrc.ca   (BITNET)         |     |    \|   |  \   |      /     |
|  (613) 993-9442         (Bell)           |     |     |   |   \   \----/      |
+------------------------------------------------------------------------------+
+          Software Rusts...               Rust never Sleeps...                +
+------------------------------------------------------------------------------+


