! The following define some DTR structures for processing ! RSX-11M-Plus System Accounting Information. ! ! If there is no comment, then the structure should be fairly self-explanitory ! (for example, the title of the report should indicate what the report ! is for). There are also quite a few variations on task accounting ! reports, and quite frankly I don't remember exactly what I was looking ! for in each instance, but I left them all in to show how you can easily ! tailor the reports to suit your needs. ! ! B. Z. Lederman ! DELETE AM; DEFINE DOMAIN AM OF BASE_AM, CODES USING ! ! Collect together Allocate, Mount, De-allocate and Dismount Records. ! B. Z. Lederman ! 01 AM OCCURS FOR BASE_AM WITH CODE=12,13,14,15. 10 TYPES OCCURS FOR CODES WITH KEY=CODE. 20 TYPE FROM CODES. 10 DEPT FROM BASE_AM. 10 NBR FROM BASE_AM. 10 TERMINAL FROM BASE_AM. 10 ACNT FROM BASE_AM. 10 DATE FROM BASE_AM. 10 TIM FROM BASE_AM. 10 TIMR FROM BASE_AM. 10 TIME FROM BASE_AM. 10 DEVICE FROM BASE_AM. 10 LABEL FROM BASE_AM. ; ! The following are domains to read the data after it has been processed ! into an indexed file. ! B. Z. Lederman DELETE BASE; DEFINE DOMAIN BASE USING BASE_REC ON ACCOUNT.DOM; DELETE BASE_AM; DEFINE DOMAIN BASE_AM USING BASE_AM_REC ON ACCOUNT.DOM; DELETE BASE_CRASH; DEFINE DOMAIN BASE_CRASH USING BASE_CRASH_REC ON ACCOUNT.DOM; DELETE BASE_DEVICE; DEFINE DOMAIN BASE_DEVICE USING BASE_DEVICE_REC ON ACCOUNT.DOM; DELETE BASE_INV; DEFINE DOMAIN BASE_INV USING BASE_INV_REC ON ACCOUNT.DOM; DELETE BASE_LOGIN; DEFINE DOMAIN BASE_LOGIN USING BASE_LOGIN_REC ON ACCOUNT.DOM; DELETE BASE_PRINT; DEFINE DOMAIN BASE_PRINT USING BASE_PRINT_REC ON ACCOUNT.DOM; DELETE BASE_RESET; DEFINE DOMAIN BASE_RESET USING BASE_RESET_REC ON ACCOUNT.DOM; DELETE BASE_START; DEFINE DOMAIN BASE_START USING BASE_START_REC ON ACCOUNT.DOM; DELETE BASE_SYSTEM; DEFINE DOMAIN BASE_SYSTEM USING BASE_SYSTEM_REC ON ACCOUNT.DOM; DELETE BASE_TASK; DEFINE DOMAIN BASE_TASK USING BASE_TASK_REC ON ACCOUNT.DOM; DELETE BASE_TIME; DEFINE DOMAIN BASE_TIME USING BASE_TIME_REC ON ACCOUNT.DOM; DELETE BASE_USER; DEFINE DOMAIN BASE_USER USING BASE_USER_REC ON ACCOUNT.DOM; DELETE BI; DEFINE DOMAIN BI USING BASE_INV_REC ON ACCOUNT.DOM; DELETE CHARGE; DEFINE DOMAIN CHARGE USING CHARGE_REC ON ACCOUNT.DOM; DELETE CODES; DEFINE DOMAIN CODES USING CODES_REC ON CODES.DOM; DELETE DEVICE_SUM; DEFINE DOMAIN DEVICE_SUM USING DEVICE_SUM_REC ON DEVSUM.SEQ; DELETE INVALID; DEFINE DOMAIN INVALID OF BASE_INV USING ! ! A view to retrieve Invalid Login Attempts (without memorizing the ! code for that type of record). ! ! B. Z. Lederman ! 01 INV_REC OCCURS FOR BASE_INV WITH CODE=10. 10 DEVICE FROM BASE_INV. 10 DATE FROM BASE_INV. 10 TIM FROM BASE_INV. 10 TIMR FROM BASE_INV. 10 TIME FROM BASE_INV. 10 TEXT FROM BASE_INV. 10 UIC FROM BASE_INV. ; DELETE LOGIN; DEFINE DOMAIN LOGIN OF BASE_LOGIN USING ! ! A view to retrieve valid Logins. ! ! B. Z. Lederman ! 01 LOGIN_REC OCCURS FOR BASE_LOGIN WITH CODE=19. 10 FI FROM BASE_LOGIN. 10 NAME FROM BASE_LOGIN. 10 DEPT FROM BASE_LOGIN. 10 NBR FROM BASE_LOGIN. 10 DEVICE FROM BASE_LOGIN. 10 ACC FROM BASE_LOGIN. 10 UIC FROM BASE_LOGIN. 10 DATE FROM BASE_LOGIN. 10 TIM FROM BASE_LOGIN. 10 TIMR FROM BASE_LOGIN. 10 TIME FROM BASE_LOGIN. ; DELETE QUEUE; DEFINE DOMAIN QUEUE OF BASE_PRINT USING ! ! A view to retrieve Queue submissions ! ! B. Z. Lederman ! 01 QUEUE OCCURS FOR BASE_PRINT WITH CODE=16. 10 DEPT FROM BASE_PRINT. 10 NBR FROM BASE_PRINT. 10 TERMINAL FROM BASE_PRINT. 10 ACNT FROM BASE_PRINT. 10 DATE FROM BASE_PRINT. 10 TIM FROM BASE_PRINT. 10 TIMR FROM BASE_PRINT. 10 TIME FROM BASE_PRINT. 10 JOB FROM BASE_PRINT. 10 PAGES FROM BASE_PRINT. 10 FILES FROM BASE_PRINT. 10 DEVICE FROM BASE_PRINT. 10 FORMS FROM BASE_PRINT. 10 PRI FROM BASE_PRINT. ; DELETE REDUCED_DEVICE; DEFINE DOMAIN REDUCED_DEVICE USING REDUCED_DEVICE_REC ON DEVDAT.SEQ; DELETE REDUCED_TASK; DEFINE DOMAIN REDUCED_TASK USING REDUCED_TASK_REC ON TASK.SEQ; DELETE USER; DEFINE DOMAIN USER OF BASE_USER USING ! ! A view to retrieve User Accounting Records ! ! B. Z. Lederman ! 01 USER_REC OCCURS FOR BASE_USER WITH CODE=02. 10 DEPT FROM BASE_USER. 10 NBR FROM BASE_USER. 10 DEVICE FROM BASE_USER. 10 ACNT FROM BASE_USER. 10 UIC FROM BASE_USER. 10 LOGIN_DATE FROM BASE_USER. 10 LITIM FROM BASE_USER. 10 LITMR FROM BASE_USER. 10 LOGIN_TIME FROM BASE_USER. 10 LOGOUT_DATE FROM BASE_USER. 10 LOTIM FROM BASE_USER. 10 LOTMR FROM BASE_USER. 10 LOGOUT_TIME FROM BASE_USER. 10 BILLING_DATE FROM BASE_USER. 10 BITIM FROM BASE_USER. 10 BITMR FROM BASE_USER. 10 BILLING_TIME FROM BASE_USER. 10 CPU_TIME FROM BASE_USER. 10 TASKS_ACTIVE FROM BASE_USER. 10 TASKS_RUN FROM BASE_USER. 10 DIRECTIVES FROM BASE_USER. 10 QIOS FROM BASE_USER. ; DELETE AM_REPORT; DEFINE PROCEDURE AM_REPORT ! ! Report all device manipulations. ! ! B. Z. Lederman ! READY AM REPORT AM SORTED BY DATE ON AM.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME="Allocate / Mount"/"De-allocate / Dismount" PRINT TYPES, DEPT, TERMINAL, DATE, DEVICE, LABEL END_REPORT FINISH END-PROCEDURE ! DELETE CHANGE_TIME; DEFINE PROCEDURE CHANGE_TIME READY BASE_TASK MODIFY FOR BASE_TASK WITH CODE = 03 AND ET < BT MODIFY USING BEGIN EH = EH + 5 EM = EM + 37 ES = ES + 50 END FINISH END-PROCEDURE DELETE CHARGE2_REPORT; DEFINE PROCEDURE CHARGE2_REPORT ! ! Sample user charge-back report: this one gives totals only ! ! B. Z. Lederman ! READY CHARGE REPORT CHARGE WITH CODE=02 SORTED BY DEPT, UIC ON CHARGE2.RPT SET COLUMNS_PAGE=78 SET REPORT_NAME = "System Charges by Department"/"and User" AT BOTTOM OF UIC PRINT "USER", SPACE 1, UIC(" "), TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9., TOTAL(CHARGES) USING $$$,$$$,$$9.99, SKIP AT BOTTOM OF DEPT PRINT SKIP 1, "DEPT", SPACE 1, DEPT(" "), TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9., TOTAL(CHARGES) USING $$$,$$$,$$9.99, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE CHARGE_REPORT; DEFINE PROCEDURE CHARGE_REPORT ! ! Sample user charge-back report: this one gives details and totals. ! ! B. Z. Lederman ! READY CHARGE REPORT CHARGE WITH CODE=02 SORTED BY DEPT, UIC ON CHARGE.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "System Charges by Department"/"and User" AT BOTTOM OF UIC PRINT " Account", SPACE 1, UIC(" "), TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(TASKS_RUN) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9., TOTAL(CHARGES) USING $$$,$$$,$$9.99, SKIP AT BOTTOM OF DEPT PRINT SKIP 1, "Department", SPACE 1, DEPT(" "), TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(TASKS_RUN) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9., TOTAL(CHARGES) USING $$$,$$$,$$9.99, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE CRASH_REPORT; DEFINE PROCEDURE CRASH_REPORT ! ! This should be self-explanitory ! ! B. Z. Lederman ! READY BASE_CRASH REPORT BASE_CRASH WITH CODE=20 SORTED BY LAST_DATE ON CRASH.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME = "System Crash Record" PRINT LAST_DATE, LAST_TIME, SCAN_RATE, RESTART_DATE, RESTART_TIME, REASON END_REPORT FINISH END-PROCEDURE ! DELETE DEVICE_REPORT; DEFINE PROCEDURE DEVICE_REPORT ! ! A report of device statistics. ! ! B. Z. Lederman ! READY BASE_DEVICE REPORT BASE_DEVICE WITH (CODE=21 AND WORD_COUNT>0) SORTED BY DEVICE, DATE ON DEVICE.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Device Statistics" PRINT DATE, TIME, DEVICE, IO_COUNT, WORD_COUNT, SOFT_LIMIT, SOFT_COUNT, HARD_LIMIT, HARD_COUNT, CYL_CROSSED, FAIR_COUNT, FAIR_LIMIT AT BOTTOM OF DEVICE PRINT SKIP, "Maximums:", MAX(IO_COUNT), MAX(WORD_COUNT), SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE DEVICE_SUM_CREATE; DEFINE PROCEDURE DEVICE_SUM_CREATE ! ! This processes the stored device statistics and changes running counts ! to quantities for each measurement period. It may give an erronious ! value if you change the system date/time during the time System ! accounting is running (for the time period when the change takes ! place or for any periods which have duplicate date/times). ! ! B. Z. Lederman ! DECLARE IO PIC 9(9) USAGE COMP. DECLARE WORD PIC 9(9) USAGE COMP. DECLARE CYL PIC 9(9) USAGE COMP. DECLARE TEMP PIC 9(9) USAGE COMP. DECLARE OLDDEV PIC X(6). ! ! Initialize all fields ! IO = 0 WORD = 0 CYL = 0 OLDDEV=" " DEFINE FILE FOR DEVICE_SUM; ! will have all new data READY DEVICE_SUM WRITE READY REDUCED_DEVICE FOR REDUCED_DEVICE BEGIN ! transfer data STORE DEVICE_SUM USING BEGIN DATE = DATE TIME = TIME DEVICE = DEVICE IF (OLDDEV NE DEVICE) BEGIN ! re-set on new device IO = 0 WORD = 0 CYL = 0 END TEMP = IO_COUNT - IO ! check for device re-mounts IF TEMP LT 0 IO = 0 TEMP = WORD_COUNT - WORD IF TEMP LT 0 WORD = 0 TEMP = CYL_CROSSED - CYL IF TEMP LT 0 CYL = 0 IO_SUM = IO_COUNT - IO ! activity for last period WORD_SUM = WORD_COUNT - WORD CYL_SUM = CYL_CROSSED - CYL END IO = IO_COUNT WORD = WORD_COUNT CYL = CYL_CROSSED OLDDEV = DEVICE END FINISH RELEASE IO RELEASE WORD RELEASE CYL RELEASE OLDDEV END-PROCEDURE DELETE DEVICE_SUM_REPORT; DEFINE PROCEDURE DEVICE_SUM_REPORT ! ! Report the device statistics summaries produced after DTR processes ! the data. ! ! B. Z. Lederman ! READY DEVICE_SUM REPORT DEVICE_SUM WITH IO_SUM > 0 ON DEVSUM.RPT SET COLUMNS_PAGE = 78 SET REPORT_NAME = "Device Statistics Summary" AT TOP OF PAGE PRINT REPORT_HEADER, SKIP, "Device", SPACE 1, DEVICE, SKIP 1, COLUMN_HEADER AT TOP OF DEVICE PRINT NEW_PAGE PRINT DATE, TIME, IO_SUM, WORD_SUM, CYL_SUM AT BOTTOM OF DEVICE PRINT SKIP, "Maximums for",SPACE 1, DEVICE(" "), MAX(IO_SUM), MAX(WORD_SUM), MAX(CYL_SUM) END_REPORT FINISH END-PROCEDURE ! DELETE INVALID_REPORT; DEFINE PROCEDURE INVALID_REPORT READY BASE_INV REPORT BASE_INV WITH CODE=10 SORTED BY DATE ON INVALID.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME="Invalid Login Transaction" PRINT DEVICE, DATE, TIME, TEXT, UIC END_REPORT FINISH END-PROCEDURE DELETE LOGIN_REPORT; DEFINE PROCEDURE LOGIN_REPORT READY BASE_LOGIN REPORT BASE_LOGIN WITH CODE=19 SORTED BY DEPT, NAME, DATE, TIMR ON LOGIN.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME="Login Transaction" AT TOP OF NAME PRINT FI|NAME PRINT DEVICE, UIC, DATE, TIME USING 99,99,99 AT BOTTOM OF NAME PRINT SKIP, COL 1, "Number of logins for", SPACE 1, FI|NAME, SPACE 1, COUNT, SKIP AT BOTTOM OF DEPT PRINT SKIP, COL 1, "Number of logins for", SPACE 1, DEPT, SPACE 1, COUNT, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE LOGIN_SUMMARY; DEFINE PROCEDURE LOGIN_SUMMARY ! ! Like Login report, but only summary data. ! ! B. Z. Lederman ! READY BASE_LOGIN REPORT BASE_LOGIN WITH CODE=19 SORTED BY DEPT, NAME, DATE ON LOGINSUM.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME = "Login Summary" AT BOTTOM OF NAME PRINT "Number of logins for ", NAME, SPACE 1, COUNT AT BOTTOM OF DEPT PRINT SKIP, "Number of logins for Department ", DEPT, SPACE 1, COUNT, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE PRINT_REPORT; DEFINE PROCEDURE PRINT_REPORT READY BASE_PRINT REPORT BASE_PRINT WITH CODE=16 SORTED BY DEPT, DATE ON PRINT.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME = "Print Queue Jobs" AT TOP OF DEPT PRINT "Department", DEPT(" "), SKIP PRINT COL 1, TERMINAL, DATE, TIME, JOB, PAGES, FILES, FORMS, DEVICE AT BOTTOM OF DEPT PRINT SKIP, "Totals", TOTAL(PAGES), TOTAL(FILES), SKIP 2 END_REPORT FINISH END-PROCEDURE ! DELETE PRINT_TASK; DEFINE PROCEDURE PRINT_TASK ! ! Shorthand to get certain tasks to print out (those in the table) ! without having to type all the commands in. ! ! B. Z. Lederman ! FOR SHORT_TASK WITH TASK IN TASK_TAB PRINT TASK, BEGIN_DATE, ELAPSED_TIME, CPU_TIME, QIOS, CNXT, OVERLAYS END-PROCEDURE ! DELETE REDUCED_TASK_CREATE; DEFINE PROCEDURE REDUCED_TASK_CREATE ! ! Summarize task accounting data to make it easier to report summaries ! only. ! ! B. Z. Lederman ! READY REDUCED_TASK REPORT REDUCED_TASK WITH TASK IN TASK_TAB ON TSKSUM.SEQ SET LINES_PAGE = 255 AT TOP OF PAGE PRINT " " AT BOTTOM OF TASK PRINT COL 1, TASK(" "), SPACE 1, BEGIN-DATE, COL 23, COUNT USING 9(4), SPACE 1, PRI USING 999, SPACE 1, TOTAL(ELAPSED_TIME) USING 9(9), SPACE 1, TOTAL(CPU_TIME) USING 9(9), SPACE 1, TOTAL(DIRECTIVES) USING 9(9), SPACE 1, TOTAL(QIOS) USING 9(9), SPACE 1, TOTAL(CNXT) USING 9(9), SPACE 1, TOTAL(CHECKPOINTS) USING 9(9), SPACE 1, TOTAL(OVERLAYS) USING 9(9) END_REPORT FINISH END-PROCEDURE ! DELETE RESET_REPORT; DEFINE PROCEDURE RESET_REPORT READY BASE_RESET REPORT BASE_RESET WITH CODE=22 ON RESET.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Accounting Reset" PRINT OLD_FILE, OLD_SEQ, OLD_DEV, NEW_FILE, NEW_SEQ, NEW_DEV, OLD_SCAN, NEW_SCAN, OLD_STAT, NEW_STAT, OLD_EXT, NEW_EXT END_REPORT FINISH END-PROCEDURE ! DELETE S80; DEFINE PROCEDURE S80 SET COLUMNS_PAGE = 80 END-PROCEDURE DELETE STARTUP_REPORT; DEFINE PROCEDURE STARTUP_REPORT READY BASE_START REPORT BASE_START WITH CODE=09 SORTED BY DATE ON STARTUP.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME = "System Startup" PRINT DATE, TIME END_REPORT FINISH END-PROCEDURE DELETE SYS1_REPORT; DEFINE PROCEDURE SYS1_REPORT READY BASE_SYSTEM REPORT BASE_SYSTEM WITH CODE=01 SORTED BY START_DATE ON SYS1.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "System Account Block" PRINT START_DATE, START_TIME, END_DATE, END_TIME, STOP_CODE, FILE_ID, SEQ_NO, DEVICE, STAT_RATE, EXT_SIZE, LAST_DATE, LAST_TIME, SCAN_RATE END_REPORT FINISH END-PROCEDURE DELETE SYS2_REPORT; DEFINE PROCEDURE SYS2_REPORT READY BASE_SYSTEM REPORT BASE_SYSTEM WITH CODE=01 SORTED BY START_DATE ON SYS2.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "System Account Block" PRINT CPU_TIME, CPU_INT, TASKS, TOTAL_LOGGED_ON, CURRENT_LOGGED_ON, CHECK_POINTS, SHUFFLES, DIRECTIVES, QIOS END_REPORT FINISH END-PROCEDURE DELETE TASK1_REPORT; DEFINE PROCEDURE TASK1_REPORT READY BASE_TASK REPORT BASE_TASK WITH CODE=03 SORTED BY TASK, BEGIN_DATE ON TASK1.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Task Account Block"/"Task 1 Report" PRINT TASK, DEPT, TERM, CURRENT_UIC, PROTECT_UIC, BEGIN_DATE, BEGIN_TIME, END_DATE, END_TIME END_REPORT FINISH END-PROCEDURE DELETE TASK2_SUMMARY; DEFINE PROCEDURE TASK2_SUMMARY READY BASE_TASK REPORT BASE_TASK WITH CODE=03 SORTED BY NAME ON TASK2SUM.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Task Account Block"/"Task 2 Summary" AT TOP OF NAME PRINT SKIP 2, "Task", SPACE 1, NAME(" ") AT BOTTOM OF NAME PRINT SKIP, COL 1, "Totals for", NAME, TOTAL(CPU_TIME), TOTAL(DIRECTIVES), TOTAL(QIOS), TOTAL(CNXT), TOTAL(CHECKPOINTS), TOTAL(OVERLAYS), SKIP, COL 1, "Averages", AVERAGE(CPU_TIME), AVERAGE(DIRECTIVES), AVERAGE(QIOS), AVERAGE(CNXT), AVERAGE(CHECKPOINTS), AVERAGE(OVERLAYS) END_REPORT FINISH END-PROCEDURE DELETE TASK2_TASK; DEFINE PROCEDURE TASK2_TASK READY BASE_TASK REPORT BASE_TASK WITH CODE=03 SORTED BY NAME, BEGIN_DATE ON TASK2TSK.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Task Account Block"/"Task 2 Report" PRINT TASK, DEPT, CPU_TIME, TASKS_ACTIVE, DIRECTIVES, QIOS, PRI, CNXT, CHECKPOINTS, OVERLAYS AT BOTTOM OF NAME PRINT SKIP, "Total for", SPACE 1, NAME(" "), TOTAL(CPU_TIME), TOTAL(DIRECTIVES), TOTAL(QIOS), TOTAL(CNXT), TOTAL(CHECKPOINTS), TOTAL(OVERLAYS), SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE TASK3_SUMMARY; DEFINE PROCEDURE TASK3_SUMMARY READY BASE_TASK REPORT BASE_TASK WITH CODE=03 SORTED BY NAME, DEPT ON TASK3SUM.RPT SET COLUMNS_PAGE = 132 SET LINES_PAGE=55 SET REPORT_NAME = "Task Accounting Summary" AT TOP OF NAME PRINT SKIP 2, "Task", SPACE 1, NAME(" ") AT BOTTOM OF NAME PRINT SKIP, COL 1, "Totals", TOTAL(CPU_TIME), TOTAL(DIRECTIVES), TOTAL(QIOS), TOTAL(CNXT), TOTAL(CHECKPOINTS), TOTAL(OVERLAYS), SKIP, COL 1, "Averages", AVERAGE(CPU_TIME), AVERAGE(DIRECTIVES), AVERAGE(QIOS), AVERAGE(CNXT), AVERAGE(CHECKPOINTS), AVERAGE(OVERLAYS) END_REPORT FINISH END-PROCEDURE DELETE TASK_REPORT; DEFINE PROCEDURE TASK_REPORT ! ! Pull out certain tasks (those in the table) and print some ! statistics on them. ! ! B. Z. Lederman ! READY BASE_TASK REPORT BASE_TASK WITH CODE = 03 AND TASK IN TASK_TAB SORTED BY TASK ON TASK.RPT SET LINES_PAGE = 55 SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Selected Task Accounting" AT TOP OF TASK PRINT "Task", SPACE 1, TASK(" "), SPACE 1, "Priority", SPACE 1, PRI(" ") PRINT ELAPSED_TIME, CPU_TIME, DIRECTIVES, QIOS, CNXT, CHECKPOINTS, OVERLAYS AT BOTTOM OF TASK PRINT SKIP, COL 1, TASK(" "), SPACE 1, "totals", TOTAL(ELAPSED_TIME) USING ZZZ,ZZ9, TOTAL(CPU_TIME) USING ZZZ,ZZ9, TOTAL(DIRECTIVES) USING ZZZ,ZZ9, TOTAL(QIOS) USING ZZZ,ZZ9, TOTAL(CNXT) USING ZZZ,ZZ9, TOTAL(CHECKPOINTS) USING ZZZ,ZZ9, TOTAL(OVERLAYS) USING ZZZ,ZZ9, SKIP, COL 1, COUNT USING ZZ,ZZ9, SPACE 5, "run avg/sec", SPACE 15, AVERAGE(ELAPSED_TIME) USING ZZZ,ZZ9, SPACE 8, (AVERAGE(CPU_TIME) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 8, (AVERAGE(DIRECTIVES) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 7, (AVERAGE(QIOS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 7, (AVERAGE(CNXT) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 7, (AVERAGE(CHECKPOINTS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 7, (AVERAGE(OVERLAYS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE TASK_SUMMARY; DEFINE PROCEDURE TASK_SUMMARY READY BASE_TASK REPORT BASE_TASK WITH CODE = 03 AND TASK IN TASK_TAB SORTED BY DESC PRI, ASC TASK ON TASKSUM.RPT SET LINES-PAGE = 55 SET COLUMNS_PAGE = 80 SET REPORT_NAME = "Selected Task Accounting"/"Summary" AT BOTTOM OF TASK PRINT COL 1, TASK(" "), SKIP, COL 7, "totals", COL 19, PRI, COL 24, TOTAL(ELAPSED_TIME) USING ZZZ,ZZ9, SPACE 2, TOTAL(CPU_TIME) USING ZZZ,ZZ9, SPACE 2, TOTAL(DIRECTIVES) USING ZZZ,ZZ9, SPACE 2, TOTAL(QIOS) USING ZZZ,ZZ9, SPACE 2, TOTAL(CNXT) USING ZZZ,ZZ9, SPACE 2, SKIP, COL 1, COUNT USING ZZ9, COL 7, "run avg/sec", COL 24, AVERAGE(ELAPSED_TIME) USING ZZZ,ZZ9, SPACE 2, (AVERAGE(CPU_TIME) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 3, (AVERAGE(DIRECTIVES) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 4, (AVERAGE(QIOS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 2, (AVERAGE(CNXT) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9, SPACE 2, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE TASK_S_REPORT; DEFINE PROCEDURE TASK_S_REPORT READY REDUCED_TASK REPORT REDUCED_TASK WITH TASK IN TASK_TAB ON TASKS.RPT SET LINES_PAGE = 55 SET COLUMNS_PAGE = 132 SET REPORT_NAME = "Selected Task Accounting" AT TOP OF TASK PRINT "Task", SPACE 1, TASK(" "), SPACE 1, "Priority", SPACE 1, PRI(" ") PRINT COL 36, ELAPSED_TIME, CPU_TIME, DIRECTIVES, QIOS, CNXT, CHECKPOINTS, OVERLAYS AT BOTTOM OF TASK PRINT SKIP, COL 1, TASK(" "), SPACE 1, "totals", COL 36, TOTAL(ELAPSED_TIME) USING ZZZ,ZZ9, TOTAL(CPU_TIME) USING ZZZ,ZZ9, TOTAL(DIRECTIVES) USING ZZZ,ZZ9, TOTAL(QIOS) USING ZZZ,ZZ9, TOTAL(CNXT) USING ZZZ,ZZ9, TOTAL(CHECKPOINTS) USING ZZZ,ZZ9, TOTAL(OVERLAYS) USING ZZZ,ZZ9, SKIP, COL 1, COUNT USING ZZ,ZZ9, SPACE 5, "run avg/sec", COL 36, AVERAGE(ELAPSED_TIME) USING ZZZ,ZZ9.9, SPACE 8, (AVERAGE(CPU_TIME) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9.9, SPACE 6, (AVERAGE(DIRECTIVES) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9.9, SPACE 5, (AVERAGE(QIOS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9.9, SPACE 5, (AVERAGE(CNXT) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9.9, SPACE 5, (AVERAGE(CHECKPOINTS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9.9, SPACE 5, (AVERAGE(OVERLAYS) / AVERAGE(ELAPSED_TIME) ) USING ZZZ,ZZ9.9, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE TASK_S_SUMMARY; DEFINE PROCEDURE TASK_S_SUMMARY READY REDUCED_TASK REPORT REDUCED_TASK WITH TASK IN TASK_TAB SORTED BY DESC PRI, ASC TASK ON TASKSUMS.RPT SET LINES_PAGE = 55 SET COLUMNS_PAGE = 80 SET REPORT_NAME = "Selected Task Accounting"/"Summary" AT BOTTOM OF TASK PRINT COL 1, TASK(" "), SKIP, COL 7, "totals", COL 17, PRI, COL 22, TOTAL(ELAPSED_TIME) USING ZZZ,ZZ9, SPACE 2, TOTAL(CPU_TIME) USING ZZZ,ZZ9, SPACE 1, TOTAL(DIRECTIVES) USING ZZZ,ZZ9, SPACE 1, TOTAL(QIOS) USING ZZZ,ZZ9, SPACE 2, TOTAL(CNXT) USING ZZZ,ZZ9, SPACE 2, SKIP, COL 1, COUNT USING ZZ9, COL 7, "run avg/sec", COL 22, AVERAGE(ELAPSED_TIME) USING ZZZ,ZZ9.9, SPACE 2, (AVERAGE(CPU_TIME) / AVERAGE(ELAPSED_TIME) ) USING Z,ZZ9.9, SPACE 2, (AVERAGE(DIRECTIVES) / AVERAGE(ELAPSED_TIME) ) USING Z,ZZ9.9, SPACE 3, (AVERAGE(QIOS) / AVERAGE(ELAPSED_TIME) ) USING Z,ZZ9.9, SPACE 2, (AVERAGE(CNXT) / AVERAGE(ELAPSED_TIME) ) USING Z,ZZ9.9, SPACE 2, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE TIME_REPORT; DEFINE PROCEDURE TIME_REPORT READY BASE_TIME REPORT BASE_TIME WITH CODE=11 SORTED BY OLD_DATE ON TIME.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME="Time Change" PRINT OLD_DATE, OLD_TIME, NEW_DATE, NEW_TIME END_REPORT FINISH END-PROCEDURE DELETE USER1_REPORT; DEFINE PROCEDURE USER1_REPORT READY BASE_USER REPORT BASE_USER WITH CODE=02 SORTED BY UIC, LOGIN_DATE ON USER1.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME="Log Activity by User" PRINT UIC, DEVICE, DEPT, LOGIN_DATE, LOGIN_TIME, LOGOUT_DATE, LOGOUT_TIME, BILLING_DATE, BILLING_TIME AT BOTTOM OF UIC PRINT SKIP, COL 1, "Number of Sessions =", SPACE, COUNT USING ZZ9, SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE USER2_DEPT; DEFINE PROCEDURE USER2_DEPT READY BASE_USER REPORT BASE_USER WITH CODE=02 SORTED BY DEPT ON USER2SUM.RPT SET COLUMNS_PAGE = 80 SET REPORT_NAME="System Resources by Department"/"Summary" AT BOTTOM OF DEPT PRINT "Totals for department ", DEPT, TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(TASKS_RUN) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9 END_REPORT FINISH END-PROCEDURE DELETE USER2_REPORT; DEFINE PROCEDURE USER2_REPORT READY BASE_USER REPORT BASE_USER WITH CODE=02 SORTED BY DEPT, UIC ON USER2.RPT SET COLUMNS_PAGE = 132 SET REPORT_NAME="System Resources by Department"/"and User" PRINT DEPT, UIC, DEVICE, CPU_TIME, TASKS_ACTIVE, TASKS_RUN, DIRECTIVES, QIOS("QIOs") AT BOTTOM OF UIC PRINT SKIP 1, "Totals for this user", TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(TASKS_RUN) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9., SKIP AT BOTTOM OF DEPT PRINT "Totals for this department", TOTAL(CPU_TIME) USING ZZZ,ZZZ,ZZ9., TOTAL(TASKS_RUN) USING ZZZ,ZZZ,ZZ9., TOTAL(DIRECTIVES) USING ZZZ,ZZZ,ZZ9., TOTAL(QIOS) USING ZZZ,ZZZ,ZZ9., SKIP 2 END_REPORT FINISH END-PROCEDURE DELETE BASE_AM_REC; DEFINE RECORD BASE_AM_REC USING ALLOCATION IS LEFT_RIGHT ! ! Allocate, Mount, De-allocate, Dismount records. ! ! B. Z. Lederman ! 01 BASE_AM_REC. 10 CODE PIC 99 USAGE COMP. 10 DEPT PIC XXX. 10 NBR PIC X(7). 10 TERMINAL PIC X(6). 10 ACNT PIC 9(4) USAGE COMP. 10 DATE USAGE DATE EDIT_STRING IS DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 AH PIC 99 USAGE COMP. 20 AM PIC 99 USAGE COMP. 20 AS PIC 99 USAGE COMP. 10 TIME PIC 9(6) COMPUTED BY (AH * 10000) + (AM * 100) + AS EDIT_STRING 99,99,99. 10 DEVICE PIC X(6). 10 LABEL PIC X(12). 10 FILLER PIC X(68). ; DELETE BASE_CRASH_REC; DEFINE RECORD BASE_CRASH_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_CRASH_REC. 10 CODE PIC 99 USAGE COMP. 10 LAST_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 LTIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 LTIMR REDEFINES LTIM. 20 LSH PIC 99 USAGE COMP. 20 LSM PIC 99 USAGE COMP. 20 LSS PIC 99 USAGE COMP. 10 LAST_TIME PIC 9(6) COMPUTED BY (LSH * 10000) + (LSM * 100) + LSS EDIT_STRING 99,99,99. 10 SCAN_RATE PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 RESTART_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 RTIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 RTIMR REDEFINES RTIM. 20 TRH PIC 99 USAGE COMP. 20 TRM PIC 99 USAGE COMP. 20 TRS PIC 99 USAGE COMP. 10 RESTART_TIME PIC 9(6) COMPUTED BY (TRH * 10000) + (TRM * 100) + TRS EDIT_STRING 99,99,99. 10 REASON PIC X(60). 10 FILLER PIC X(28). ; DELETE BASE_DEVICE_REC; DEFINE RECORD BASE_DEVICE_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_DEVICE_REC. 10 CODE PIC 99 USAGE COMP. 10 DATE USAGE DATE EDIT_STRING IS DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 DSTHUR PIC 99 USAGE COMP. 20 DSTMIN PIC 99 USAGE COMP. 20 DSTSEC PIC 99 USAGE COMP. 10 TIME PIC 999999 COMPUTED BY (DSTHUR * 10000) + (DSTMIN * 100) + DSTSEC EDIT_STRING 99,99,99. 10 DEVICE PIC X(6). 10 IO_COUNT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 WORD_COUNT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 SOFT_LIMIT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 SOFT_COUNT PIC 99 USAGE COMP EDIT_STRING ZZ9. 10 HARD_LIMIT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 HARD_COUNT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 CYL_CROSSED PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 FAIR_COUNT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 FAIR_LIMIT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 FILLER PIC X(74). ; DELETE BASE_INV_REC; DEFINE RECORD BASE_INV_REC USING ALLOCATION IS LEFT_RIGHT ! ! Invalid login attempts ! 01 BASE_INV_REC. 10 CODE PIC 99 USAGE COMP. 10 DEVICE PIC X(6). 10 DATE USAGE DATE EDIT_STRING IS DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 INVHUR PIC 99 USAGE COMP. 20 INVMIN PIC 99 USAGE COMP. 20 INVSEC PIC 99 USAGE COMP. 10 TIME PIC 9(6) COMPUTED BY (INVHUR * 10000) + (INVMIN * 100) + INVSEC EDIT_STRING 99,99,99. 10 TEXT PIC X(14). 10 UIC PIC X(10). 10 FILLER PIC X(74). ; DELETE BASE_LOGIN_REC; DEFINE RECORD BASE_LOGIN_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_LOGIN_REC. 10 CODE PIC 99 USAGE COMP. 10 FI PIC XX . 10 NAME PIC X(14). 10 DEPT PIC XXX. 10 NBR PIC X(7). 10 DEVICE PIC X(6). 10 ACC PIC 9(4) USAGE COMP. 10 UIC PIC X(10). 10 DATE USAGE DATE EDIT_STRING IS DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 LH PIC 99 USAGE COMP. 20 LM PIC 99 USAGE COMP. 20 LS PIC 99 USAGE COMP. 10 TIME PIC 9(6) COMPUTED BY (LH * 10000) + (LM * 100) + LS EDIT_STRING 99,99,99. 10 FILLER PIC X(60). ; DELETE BASE_PRINT_REC; DEFINE RECORD BASE_PRINT_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_PRINT_REC. 10 CODE PIC 99 USAGE COMP. 10 DEPT PIC XXX. 10 NBR PIC X(7). 10 TERMINAL PIC X(6). 10 ACNT PIC 9(4) USAGE COMP. 10 DATE USAGE DATE EDIT_STRING IS DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 PH PIC 99 USAGE COMP. 20 PM PIC 99 USAGE COMP. 20 PS PIC 99 USAGE COMP. 10 TIME PIC 9(6) COMPUTED BY (( PH * 10000 ) + ( PM * 100 ) + PS) EDIT_STRING 99,99,99. 10 JOB PIC X(10). 10 PAGES PIC 9(4) USAGE COMP EDIT_STRING IS Z,ZZ9. 10 FILES PIC 9(4) USAGE COMP EDIT_STRING IS Z,ZZ9. 10 DEVICE PIC X(6). 10 FORMS PIC 999 USAGE COMP EDIT_STRING IS ZZ9. 10 PRI PIC 999 USAGE COMP EDIT_STRING IS ZZ9. 10 FILLER PIC X(62). ; DELETE BASE_REC; DEFINE RECORD BASE_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_REC. 03 CODE PIC 99 USAGE COMP. 03 FILLER PIC X(118). ; DELETE BASE_RESET_REC; DEFINE RECORD BASE_RESET_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_RESET_REC. 10 CODE PIC 99 USAGE COMP. 10 OLD_FILE PIC 9(4) USAGE COMP. 10 OLD_SEQ PIC 9(4) USAGE COMP. 10 OLD_DEV PIC X(6). 10 NEW_FILE PIC 9(4) USAGE COMP. 10 NEW_SEQ PIC 9(4) USAGE COMP. 10 NEW_DEV PIC X(6). 10 OLD_SCAN PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 NEW_SCAN PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 OLD_STAT PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 NEW_STAT PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 OLD_EXT PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 NEW_EXT PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 FILLER PIC X(86). ; DELETE BASE_START_REC; DEFINE RECORD BASE_START_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_START_REC. 10 CODE PIC 99 USAGE COMP. 10 DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 SH PIC 99 USAGE COMP. 20 SM PIC 99 USAGE COMP. 20 SS PIC 99 USAGE COMP. 10 TIME PIC 9(6) COMPUTED BY (SH * 10000) + (SM * 100) + SS EDIT_STRING 99,99,99. 10 FILLER PIC X(104). ; DELETE BASE_SYSTEM_REC; DEFINE RECORD BASE_SYSTEM_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_SYSTEM_REC. 10 CODE PIC 99 USAGE COMP. 10 START_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 STIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 STIMR REDEFINES STIM. 20 SH PIC 99 USAGE COMP. 20 SM PIC 99 USAGE COMP. 20 SS PIC 99 USAGE COMP. 10 START_TIME PIC 9(6) COMPUTED BY (SH * 10000) + (SM * 100) + SS EDIT_STRING 99,99,99. 10 END_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 ETIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 ETIMR REDEFINES ETIM. 20 EH PIC 99 USAGE COMP. 20 EM PIC 99 USAGE COMP. 20 ES PIC 99 USAGE COMP. 10 END_TIME PIC 9(6) COMPUTED BY (EH * 10000) + (EM * 100) + ES EDIT_STRING 99,99,99. 10 STOP_CODE PIC 99 USAGE COMP. 10 FILE_ID PIC 9(4) USAGE COMP. 10 SEQ_NO PIC 9(4) USAGE COMP. 10 DEVICE PIC X(6). 10 STAT_RATE PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 EXT_SIZE PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 LAST_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 LTIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 LTIMR REDEFINES LTIM. 20 LH PIC 99 USAGE COMP. 20 LM PIC 99 USAGE COMP. 20 LS PIC 99 USAGE COMP. 10 LAST_TIME PIC 9(6) COMPUTED BY (LH * 10000) + (LM * 100) + LS EDIT_STRING 99,99,99. 10 SCAN_RATE PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 CPU_TIME PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 CPU_INT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 TASKS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 TOTAL_LOGGED_ON PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 CURRENT_LOGGED_ON PIC 9(4) USAGE COMP EDIT_STRING Z,ZZ9. 10 CHECK_POINTS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 SHUFFLES PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 DIRECTIVES PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 QIOS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 FILLER PIC X(24). ; DELETE BASE_TASK_REC; DEFINE RECORD BASE_TASK_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_TASK_REC. 10 CODE PIC 99 USAGE COMP. 10 DEPT PIC XXX. 10 NBR PIC X(7). 10 TERM PIC X(6). 10 ACNT PIC 9(4) USAGE COMP. 10 CURRENT_UIC PIC X(10). 10 PROTECT_UIC PIC X(10). 10 TASK PIC X(10). 10 NAMES REDEFINES TASK. 20 NAME PIC XXX. 20 EXT PIC X(7). 10 BEGIN_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 BTIM. 20 FILLER PIC X(6). 10 BTIMR REDEFINES BTIM. 20 BH PIC 99 USAGE COMP. 20 BM PIC 99 USAGE COMP. 20 BS PIC 99 USAGE COMP. 10 BEGIN_TIME PIC 9(6) COMPUTED BY (BH * 10000) + (BM * 100) + BS EDIT_STRING 99,99,99. 10 BT PIC 9(6) USAGE COMP COMPUTED BY (BH * 3600) + (BM * 60) + BS. 10 END_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 ETIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 ETIMR REDEFINES ETIM. 20 EH PIC 99 USAGE COMP. 20 EM PIC 99 USAGE COMP. 20 ES PIC 99 USAGE COMP. 10 END_TIME PIC 9(6) COMPUTED BY (EH * 10000) + (EM * 100) * ES EDIT_STRING 99,99,99. 10 ET PIC 9(6) USAGE COMP COMPUTED BY (EH * 3600) + (EM * 60) + ES. 10 ELAPSED_TIME PIC 9(7) EDIT_STRING Z,ZZZ,ZZ9 COMPUTED BY (ET - BT). 10 CPU_TIME PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 TASKS_ACTIVE PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 DIRECTIVES PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 QIOS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 PRI PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 CNXT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 CHECKPOINTS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 OVERLAYS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 FILLER PIC X(12). ; DELETE BASE_TIME_REC; DEFINE RECORD BASE_TIME_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_TIME_REC. 10 CODE PIC 99 USAGE COMP. 10 OLD_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 OTIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 OTIMR REDEFINES OTIM. 20 OH PIC 99 USAGE COMP. 20 OM PIC 99 USAGE COMP. 20 OS PIC 99 USAGE COMP. 10 OLD_TIME PIC 9(6) COMPUTED BY (OH * 10000) + (OM * 100) + OS EDIT_STRING 99,99,99. 10 NEW_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 NTIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 NTIMR REDEFINES NTIM. 20 NH PIC 99 USAGE COMP. 20 NM PIC 99 USAGE COMP. 20 NS PIC 99 USAGE COMP. 10 NEW_TIME PIC 9(6) COMPUTED BY (NH * 10000) + (NM * 100) + NS EDIT_STRING 99,99,99. 10 FILLER PIC X(90). ; DELETE BASE_USER_REC; DEFINE RECORD BASE_USER_REC USING ALLOCATION IS LEFT_RIGHT 01 USER_REC. 10 CODE PIC 99 USAGE COMP. 10 DEPT PIC XXX. 10 NBR PIC X(7). 10 DEVICE PIC X(6). 10 ACNT PIC 9(4) USAGE COMP. 10 UIC PIC X(10). 10 LOGIN_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 LITIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 LITMR REDEFINES LITIM. 20 LIH PIC 99 USAGE COMP. 20 LIM PIC 99 USAGE COMP. 20 LIS PIC 99 USAGE COMP. 10 LOGIN_TIME PIC 999999 COMPUTED BY (LIH * 10000) + (LIM * 100) + LIS EDIT_STRING 99,99,99. 10 LOGOUT_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 LOTIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 LOTMR REDEFINES LOTIM. 20 LOH PIC 99 USAGE COMP. 20 LOM PIC 99 USAGE COMP. 20 LOS PIC 99 USAGE COMP. 10 LOGOUT_TIME PIC 999999 COMPUTED BY (LOH * 10000) + (LOM * 100) + LOS EDIT_STRING 99,99,99. 10 BILLING_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 BITIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 BITMR REDEFINES BITIM. 20 BIH PIC 99 USAGE COMP. 20 BIM PIC 99 USAGE COMP. 20 BIS PIC 99 USAGE COMP. 10 BILLING_TIME PIC 999999 COMPUTED BY (BIH * 10000) + (BIM * 100) + BIS EDIT_STRING 99,99,99. 10 CPU_TIME PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 TASKS_ACTIVE PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 TASKS_RUN PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 DIRECTIVES PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 QIOS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 FILLER PIC X(30). ; DELETE CHARGE_REC; DEFINE RECORD CHARGE_REC USING ALLOCATION IS LEFT_RIGHT 01 CHARGE_REC. ! ! This is the user accounting record, with a COMPUTED-BY field ! added to calculate an amount to charge for use of the system. ! The method of calculation can easily be changed here. ! ! B. Z. Lederman ! 10 CODE PIC 99 USAGE COMP. 10 DEPT PIC XXX. 10 NBR PIC X(7). 10 DEVICE PIC X(6). 10 ACNT PIC 9(4) USAGE COMP. 10 UIC PIC X(10). 10 LOGIN_DATE USAGE DATE. 10 LITIM. 20 FILLER PIC X(6). 10 LITMR REDEFINES LITIM. 20 LIH PIC 99 USAGE COMP. 20 LIM PIC 99 USAGE COMP. 20 LIS PIC 99 USAGE COMP. 20 LID PIC 9(18) COMPUTED BY (0.0000001 * LOGIN_DATE). 10 LOGIN_TIME PIC 9(6) COMPUTED BY (LIH * 10000) + (LIM * 100) + LIS EDIT_STRING 99,99,99. 10 LOGOUT_DATE USAGE DATE. 10 LOTIM. 20 FILLER PIC X(6). 10 LOTMR REDEFINES LOTIM. 20 LOH PIC 99 USAGE COMP. 20 LOM PIC 99 USAGE COMP. 20 LOS PIC 99 USAGE COMP. 10 LOGOUT_TIME PIC 9(6) COMPUTED BY (LOH * 10000) + (LOM * 100) + LOS EDIT_STRING 99,99,99. 10 BILLING_DATE USAGE DATE. 10 BITIM. 20 FILLER PIC X(6). 10 BITMR REDEFINES BITIM. 20 BIH PIC 99 USAGE COMP. 20 BIM PIC 99 USAGE COMP. 20 BIS PIC 99 USAGE COMP. 20 BID PIC 9(18) COMPUTED BY (0.0000001 * BILLING_DATE). 10 BILLING_TIME PIC 9(6) COMPUTED BY (BIH * 10000) + (BIM * 100) + BIS EDIT_STRING 99,99,99. 10 ELAPSED PIC 9(12) EDIT_STRING ZZZ,ZZ9 COMPUTED BY (BID - LID). 10 CPU_TIME PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 TASKS_ACTIVE PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 TASKS_RUN PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 DIRECTIVES PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 QIOS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 FILLER PIC X(30). ! ! This version charges 0.1 cent per CPU second, 0.03 cents per system ! directive, and 0.08 cents per QIO. These are completly arbitrary ! values for demonstration purposes only. Most people would want to ! charge based on CPU time and ELAPSED time (the time the person was ! logged on), though you can charge for resources used as is done here. ! 10 CHARGES PIC 99999V99 COMPUTED BY (CPU_TIME * 0.001) + (DIRECTIVES * 0.0003) + (QIOS * 0.0008) EDIT_STRING $$,$$$.Z9. ; DELETE CODES_REC; DEFINE RECORD CODES_REC USING ALLOCATION IS LEFT_RIGHT ! ! This is used to create a domain with a list of the accounting ! record codes, and their meaning. It's used in things like ! the AM view to change the code to english text. ! ! B. Z. Lederman ! 01 CODES_REC. 03 KEY PIC 99 USAGE COMP. 03 TYPE PIC X(16). ; DELETE DEVICE_SUM_REC; DEFINE RECORD DEVICE_SUM_REC USING ALLOCATION IS LEFT_RIGHT 01 DEVICE_SUM_REC. 10 DATE PIC X(9). 10 TIME PIC 9(6) EDIT_STRING 99,99,99. 10 DEVICE PIC X(6). 10 IO_SUM PIC 9(9) EDIT_STRING ZZZ,ZZZ,ZZ9 QUERY_HEADER "I/O COUNT". 10 WORD_SUM PIC 9(9) EDIT_STRING ZZZ,ZZZ,ZZ9 QUERY_HEADER "WORD COUNT". 10 CYL_SUM PIC 9(9) EDIT_STRING ZZZ,ZZZ,ZZ9 QUERY_HEADER "CYLINDERS"/"CROSSED". ; DELETE REDUCED_DEVICE_REC; DEFINE RECORD REDUCED_DEVICE_REC USING ALLOCATION IS LEFT_RIGHT 01 REDUCED_DEVICE_REC. 10 CODE PIC 99 USAGE COMP. 10 DATE USAGE DATE EDIT_STRING IS DD-MMM-YY. 10 TIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 TIMR REDEFINES TIM. 20 DSTHUR PIC 99 USAGE COMP. 20 DSTMIN PIC 99 USAGE COMP. 20 DSTSEC PIC 99 USAGE COMP. 10 TIME PIC 999999 COMPUTED BY (DSTHUR * 10000) + (DSTMIN * 100) + DSTSEC EDIT_STRING 99,99,99. 10 DEVICE PIC X(6). 10 IO_COUNT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 WORD_COUNT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 SOFT_LIMIT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 SOFT_COUNT PIC 99 USAGE COMP EDIT_STRING ZZ9. 10 HARD_LIMIT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 HARD_COUNT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 CYL_CROSSED PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 FAIR_COUNT PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 FAIR_LIMIT PIC 999 USAGE COMP EDIT_STRING ZZ9. ; DELETE REDUCED_TASK_REC; DEFINE RECORD REDUCED_TASK_REC USING ALLOCATION IS LEFT_RIGHT 01 BASE_TASK_REC. 10 TASK PIC X(10). 10 NAMES REDEFINES TASK. 20 NAME PIC XXX. 20 EXT PIC X(7). 10 BEGIN_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 BTIM. 20 FILLER PIC X(6). 10 BTIMR REDEFINES BTIM. 20 BH PIC 99 USAGE COMP. 20 BM PIC 99 USAGE COMP. 20 BS PIC 99 USAGE COMP. 10 BEGIN_TIME PIC 9(6) COMPUTED BY (BH * 10000) + (BM * 100) + BS EDIT_STRING 99,99,99. 10 BT PIC 9(6) USAGE COMP COMPUTED BY (BH * 3600) + (BM * 60) + BS. 10 END_DATE USAGE DATE EDIT_STRING DD-MMM-YY. 10 ETIM. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 20 FILLER PIC 99 USAGE COMP. 10 ETIMR REDEFINES ETIM. 20 EH PIC 99 USAGE COMP. 20 EM PIC 99 USAGE COMP. 20 ES PIC 99 USAGE COMP. 10 END_TIME PIC 9(6) COMPUTED BY (EH * 10000) + (EM * 100) * ES EDIT_STRING 99,99,99. 10 ET PIC 9(6) USAGE COMP COMPUTED BY (EH * 3600) + (EM * 60) + ES. 10 ELAPSED_TIME PIC 9(7) EDIT_STRING Z,ZZZ,ZZ9 COMPUTED BY (ET - BT). 10 CPU_TIME PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 DIRECTIVES PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 QIOS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 PRI PIC 999 USAGE COMP EDIT_STRING ZZ9. 10 CNXT PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 CHECKPOINTS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. 10 OVERLAYS PIC 9(9) USAGE COMP EDIT_STRING ZZZ,ZZZ,ZZ9. ; DELETE TASK_TAB; DEFINE TABLE TASK_TAB ! ! This table contains the names of tasks that you particularly want ! in certain of the proceedures given here. You will probably ! want to change this to suit your own system. ! ! B. Z. Lederman ! "MCR..." : 1, "BAP0 " : 1, "SHF..." : 1, "F11ACP" : 1 END_TABLE