C****************************************************************************** SUBROUTINE AK$OLD_DSK_USG(ISTAT) C****************************************************************************** C AKOLDUSG.FOR C C written by: M. Serrer C date: March 1984 C modified: K. Trumbley, May 1984, This routine reads records from a disk C usage file created by an old DECUS C accounting program. C C Routine to get disk usage from OLD format C INCLUDE 'AK.INC/NOLIST' C CHARACTER IN_USER*80,USER_NAME*8,ASCII_BLK*12 INTEGER*4 BLK C 10 CONTINUE C C_Get next record from file 'DSKUSG.DAT;*' C READ(DSK_FIL,200,END=999,ERR=10) IN_USER 200 FORMAT(A80) C C_Separate USERNAME and disk usage from IN_USER string C IN_USER=IN_USER//'~' IND1=INDEX(IN_USER,CHAR(39))+1 IND2=INDEX(IN_USER(IND1:80),CHAR(39))-1 IND3=INDEX(IN_USER,'~')-1 USER_NAME=IN_USER(IND1:IND2) ASCII_BLK=IN_USER(IND2+2:IND3) ISTAT=LIB$CVT_DTB(%VAL(IND3-IND2-1),%REF(ASCII_BLK),BLK) IF (.NOT.ISTAT) CALL LIB$SIGNAL(%VAL(ISTAT)) TYPE*, 'USERNAME = ',USER_NAME,' BLK = ',BLK C C C_All other UIC's get the disk usage charged to the first USERNAME C_(alphabetically ordered) with the current UIC. C DO I=1,TOT_USR AK$RECORD=AK$SUMMARY(I) IF (USER_NAME.EQ.AK$USR_NAM) THEN AK$DSK_BLK=AK$DSK_BLK+BLK AK$SUMMARY(I)=AK$RECORD GOTO 10 END IF END DO C TYPE 210,USER_NAME,BLK 210 FORMAT('*** INFO, No match for USER ',A8, & 'in SYSUAF.DAT, # of DISK BLOCKS used =',I9) C GOTO 10 C 999 RETURN END