C******************************************************************************
C AK.INC
C
C	  Include file for Accounting package.
C
C	Written by : M. Serrer  DME/NRC  Systems Lab.
C	Date       : March 1984
C
C******************************************************************************
C
	IMPLICIT INTEGER (A-Z)
	INCLUDE '($ACRDEF)'
C------------------------------------------------------------------------------
	INTEGER*2 MAX_USR,BUF_LEN
	INTEGER*2 UAF_FIL,DSK_FIL,RAW_FIL,O_TOT_FIL,N_TOT_FIL

	PARAMETER (MAX_USR=200
     &	          ,BUF_LEN=256
     &	          ,UAF_FIL=100
     &	          ,DSK_FIL=101
     &	          ,RAW_FIL=102
     &	          ,O_TOT_FIL=103
     &	          ,N_TOT_FIL=104
     &	          ,FORM_REPORT=0
     &	          ,FORM_REPAIR=1
     &	          ,EOF = -1 )

C------------------------------------------------------------------------------
	LOGICAL*1 DUMMY_LOG(128),RET_STATUS
	LOGICAL*1 AK$ACC_REC(256),AK$AKREC_TYP0,AK$AKREC_TYP1
C
	CHARACTER DUMMY_STR*128,START_STR*24,END_STR*24
	CHARACTER AK$USR_NAM*12,AK$USR_ACC*8,HEADER_STR*80
	CHARACTER*128 AK$SUMMARY(MAX_USR),AK$HEADER,AK$RECORD
	CHARACTER AK$LST_LOG*11
C
	INTEGER*2 TOT_USR,AK$USR_GRP,AK$USR_MEM
C
	INTEGER*4 MORN_HR,MORN_MIN,AFT_HR,AFT_MIN,P1,P2
	INTEGER*4 AK$START_DATE(2),AK$END_DATE(2)
C
	REAL*4    AK$CHARGE
	INTEGER*4 AK$DSK_BLK,AK$VOL_MNT
     &	         ,AK$PRT_JOB,AK$PRT_PAG
     &	         ,AK$LOG_CNT,AK$LOG_FAL
     &	         ,AK$P_CON_TIM,AK$P_INT_TIM,AK$P_BAT_TIM
     &	         ,AK$N_CON_TIM,AK$N_INT_TIM,AK$N_BAT_TIM
     &	         ,AK$DIR_IO,AK$BUF_IO
     &	         ,AK$PAG_FLT
C------------------------------------------------------------------------------
	COMMON/MISC/AK$SUMMARY,TOT_USR
     &	           ,MORN_HR,MORN_MIN,AFT_HR,AFT_MIN,P1,P2,HEADER_STR
     &	           ,TOTAL_RECORDS,PRCDEL_COUNT,IMGDEL_COUNT
     &	           ,SYSINIT_COUNT,LOGFAIL_COUNT,PRINT_COUNT
     &	           ,USER_COUNT

C------------------------------------------------------------------------------
	COMMON/HEADER/AK$AKREC_TYP1,AK$START_DATE,AK$END_DATE
	EQUIVALENCE (AK$AKREC_TYP1,AK$HEADER)
C------------------------------------------------------------------------------
	COMMON/RECORD/AK$AKREC_TYP0
     &	              ,AK$USR_NAM,AK$USR_GRP,AK$USR_MEM,AK$USR_ACC
     &	              ,AK$DSK_BLK,AK$VOL_MNT
     &	              ,AK$PRT_JOB,AK$PRT_PAG
     &	              ,AK$LOG_CNT,AK$LOG_FAL
     &	              ,AK$P_CON_TIM,AK$P_INT_TIM,AK$P_BAT_TIM
     &	              ,AK$N_CON_TIM,AK$N_INT_TIM,AK$N_BAT_TIM
     &	              ,AK$DIR_IO,AK$BUF_IO
     &	              ,AK$PAG_FLT,AK$CHARGE,AK$LST_LOG
	EQUIVALENCE (AK$AKREC_TYP0,AK$RECORD)
C------------------------------------------------------------------------------
	REAL*4 CHG_RATE,TOTAL_REPLACEMENT_COST,YEARLY_MAINTENANCE
	REAL*4 P_CNT_TIM_RATE,N_CNT_TIM_RATE
	REAL*4 P_CPU_TIM_RATE,N_CPU_TIM_RATE
	REAL*4 P_BAT_TIM_RATE,N_BAT_TIM_RATE
	REAL*4 PRT_PAG_RATE,PRT_JOB_RATE,VOL_MNT_RATE
	REAL*4 BUF_IO_RATE,DIR_IO_RATE,PAG_FLT_RATE,DSK_BLK_RATE
C
	COMMON/RATES/P_CNT_TIM_RATE,N_CNT_TIM_RATE
     &	            ,P_CPU_TIM_RATE,N_CPU_TIM_RATE
     &	            ,P_BAT_TIM_RATE,N_BAT_TIM_RATE
     &	            ,PRT_PAG_RATE,PRT_JOB_RATE,VOL_MNT_RATE
     &	            ,BUF_IO_RATE,DIR_IO_RATE,PAG_FLT_RATE,DSK_BLK_RATE
     &	            ,CHG_RATE,TOTAL_REPLACEMENT_COST,YEARLY_MAINTENANCE
C------------------------------------------------------------------------------
C
	VOLATILE QUIT_FLAG,NO_KILL_FLAG
	LOGICAL*1 PAGE_FLAG,RATE_TABLE_FLAG,BEGIN_FLAG,END_FLAG
	LOGICAL*1 SUMMARY_FLAG,INPUT_FLAG,OUTPUT_FLAG,BATCH_FLAG
	LOGICAL*1 TOTAL_FLAG,LINE_PRINTER_FLAG,ACCOUNT_FLAG,SORT_FLAG
	LOGICAL*1 ASCEND_FLAG,LAST_LOGIN_FLAG,NEW_FILE_FLAG
	LOGICAL*1 FIX_FLAG,AUTO_FIX_FLAG,HELP_FLAG,EDIT_FLAG
	LOGICAL*1 HEADER_FLAG,EXIT_FLAG,QUIT_FLAG,USER_FLAG
	LOGICAL*1 NO_KILL_FLAG
	INTEGER*4 BEGIN_DATE(2),END_DATE(2),OUT_DEV,ACC_NAME_LEN
	CHARACTER AKCOUNT_FILENAME*40,OUTPUT_FILENAME*40
	CHARACTER ACCOUNT_NAME*20,SORT_TYPE*20
	COMMON/FLAGS/PAGE_FLAG,RATE_TABLE_FLAG,BEGIN_FLAG,END_FLAG
     &	            ,SUMMARY_FLAG,INPUT_FLAG,OUTPUT_FLAG,BATCH_FLAG
     &	            ,TOTAL_FLAG,LINE_PRINTER_FLAG,ACCOUNT_FLAG
     &	            ,SORT_FLAG,ASCEND_FLAG,LAST_LOGIN_FLAG
     &	            ,FIX_FLAG,AUTO_FIX_FLAG,HELP_FLAG,EDIT_FLAG
     &	            ,USER_FLAG,NO_KILL_FLAG
     &	            ,HEADER_FLAG,EXIT_FLAG,QUIT_FLAG,NEW_FILE_FLAG
     &	            ,OUT_DEV,ACC_NAME_LEN
     &	            ,BEGIN_DATE,END_DATE
     &	            ,AKCOUNT_FILENAME,OUTPUT_FILENAME
     &	            ,ACCOUNT_NAME,SORT_TYPE
C------------------------------------------------------------------------------
C
	INTEGER END_FISCAL_DAY,END_FISCAL_MONTH
	COMMON/FISCAL/END_FISCAL_DAY,END_FISCAL_MONTH
C------------------------------------------------------------------------------
