C C THIS PROGRAM IS SIMPLY AN EXAMPLE OF HOW TO OPEN THE C USAGE.DAT FILE CREATED BY THE APR 79 NEW ORLEANS VERSION C OF [355,2]USAGE.MAC. I SPENT SOME TIME TRYING TO FIGURE C OUT HOW TO OPEN THE USAGE.DAT FILE, AND I HOPE THAT I C CAN SAVE SOME OTHER POOR UNKNOWLEDGEABLE BUFFOON THE TIME C AND EFFORT WHICH I SPENT. C C THIS VERSION IS USED TO SET GREEDY LIMITS FOR ANY RECORDS C IN USAGE.DAT WITH A UIC OF ZERO OR A GIC OF LESS THAN C OCTAL 100 C IMPLICIT INTEGER*2 (A-Z) BYTE UID,GID BYTE NAME(12) C CALL ERRSET(39,,.FALSE.,,.FALSE.,) C C OPEN USAGE.DAT OPEN(UNIT=1,NAME='USAGE.DAT',TYPE='OLD', 1 NOSPANBLOCKS,FORM='UNFORMATTED',ACCESS='DIRECT', 2 ASSOCIATEVARIABLE=IMREC) C C READ RECORDS AND OUTPUT TO TTY IMREC = 1 100 READ(1'IMREC,ERR=999) UID,GID,MAX,USF,ALF,FLF,NAME WRITE(5,110) GID,UID,MAX,NAME 110 FORMAT(' [',O3,1H,,O3,'] ',I5,3X,12A1,2X,$) C C SKIP RE-WRITE IF UIC NON-ZERO AND NON-SYSTEM ACCT IF(UID .NE. 0 .AND. GID .GT. "77) GOTO 100 READ(5,120,END=200)MAX 120 FORMAT(I5) C 200 IMREC = IMREC-1 WRITE(1'IMREC)UID,GID,MAX,USF,ALF,FLF,NAME GOTO 100 C 999 CALL EXIT END