COMPILATION LISTING OF SEGMENT compute_bill Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 07/13/88 1024.3 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 16 /****^ HISTORY COMMENTS: 17* 1) change(86-10-15,Parisek), approve(87-06-17,MCR7570), 18* audit(87-06-15,Hirneisen), install(87-08-06,MR12.1-1066): 19* Suppress error reporting of non existent pdt for a renamed project. 20* END HISTORY COMMENTS */ 21 22 23 24 compute_bill: procedure options (variable); 25 26 /* daily billing program. 27* 28* This program computes the usage charge for each project and places it in the reqfile. 29* 30* inputs: 31* . "sat" copy of system administrator's table 32* . Proj.pdt copy of each project's pdt 33* . "reqfile" per-account requisition info 34* . "projfile" per-project disk and misc charges and supervisor name 35* . "miscfile" misc charges detail info for the month 36* output: 37* . "reqfile" per account chg_mo replaced 38* 39* When called at the update_pdts_from reqfile entry, it copies each projects 40* reqfile entry and projfile entry into its PDT header. 41* 42* 43* THVV 11/69 - KAW 6/71 44* Modified by T. casey April 1976 to zero projfiletab.dir_disk_use for new projfile entry. 45* Modified by John Gintell May 1977 to add update_pdts_from_reqfile. 46* Modified Feb 1980 by M. B. Armstrong to implement multiple rate structures. 47* Mdified 1984-07-11 BIM for versions in projfile and reqfile. 48**/ 49 50 dcl dn char (168) aligned, /* segment names */ 51 en char (32) aligned, /* ... */ 52 pdtdir char (168) aligned, 53 wdir char (168) aligned, 54 pdtename char (32) aligned, 55 uproj char (12) aligned, 56 ec fixed bin (17), /* file-system error code */ 57 ap ptr, 58 al fixed bin, 59 arg char (al) based (ap), 60 (sati, pdti, proji, j, reqi) fixed bin (17), /* counters */ 61 (req_notfound, proj_notfound) bit (1), 62 dum (0: 7) float bin, /* Dummy. Don't need these prices */ 63 u1 float bin, 64 compute bit (1) init ("1"b), /* on for compute_bill , off for update_pdts_from reqfile */ 65 command_name char (32), 66 satp ptr, /* ptr to sat */ 67 satep ptr, /* ptr to sat entry */ 68 satstuff based bit (52*36) aligned, /* mess of stuff based to copy from sat entry */ 69 pdtp ptr, /* ptr to pdt */ 70 pdtep ptr, /* ptr to pdt entry for user */ 71 pp ptr, /* ptr to "projfile" */ 72 miscfilep ptr, /* ptr to "miscfile" */ 73 qp ptr, /* ptr to "reqfile" */ 74 nproj fixed bin (17), /* number of projects */ 75 nreq fixed bin (17), /* number of accounts */ 76 proj_usage float bin (63); 77 dcl (addr, clock, hbound, null, rtrim, unspec, abs) builtin; 78 dcl crank_cant_run condition; 79 dcl 1 pdp (1000) based (pdp_ptr), /* temporary to hold disk prices */ 80 2 disk_price float bin, 81 2 price_set bit (1); /* off when allocated; on if disk_price has been set */ 82 /* need price_set as a disk_price of "0" is valid */ 83 dcl pdp_ptr ptr; 84 dcl rs_number fixed bin; 85 dcl rs_name char (32); 86 dcl 1 prices (0:9), /* holds all possible prices */ 87 2 disk_price float bin, 88 2 reg_price float bin; 89 90 /* procedures called by this program */ 91 92 dcl ioa_ ext entry options (variable), /* output routine */ 93 cu_$arg_ptr ext entry (fixed bin, ptr, fixed bin, fixed bin), 94 expand_pathname_ entry (char (*), char (*) aligned, char (*) aligned, fixed bin), 95 absolute_pathname_ entry (char (*), char (*) aligned, fixed bin), 96 system_info_$rs_name entry (fixed bin, char (*), fixed bin), 97 system_info_$prices_rs ext entry (fixed bin, 98 (0: 7) float bin, (0: 7) float bin, (0: 7) float bin, (0: 7) float bin, float bin, float bin), 99 100 get_wdir_ entry () returns (char (168) aligned), 101 com_err_ entry options (variable), 102 hcs_$terminate_noname entry (ptr, fixed bin), 103 hcs_$make_seg entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin), 104 hcs_$initiate entry (char (*) aligned, char (*) aligned, char (*) aligned, 105 fixed bin (1), fixed bin (2), ptr, fixed bin); 106 1 1 /* BEGIN INCLUDE FILE ... user_attributes.incl.pl1 TAC 10/79 */ 1 2 1 3 1 4 /****^ HISTORY COMMENTS: 1 5* 1) change(86-12-11,Brunelle), approve(87-07-13,MCR7741), 1 6* audit(87-04-19,GDixon), install(87-08-04,MR12.1-1056): 1 7* Add incl for abs_attributes.incl.pl1 to automatically include absentee 1 8* attribute switches. 1 9* 2) change(87-04-19,GDixon), approve(87-07-13,MCR7741), 1 10* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 1 11* A) Add USER_ATTRIBUTE_NAMES arrays. attribute_names.incl.pl1 can thereby 1 12* be deleted. 1 13* B) Add constants identifying attributes that can be changed by user at 1 14* login, etc. 1 15* END HISTORY COMMENTS */ 1 16 1 17 1 18 /* Modified 82-01-03 E. N. Kittlitz. to declare a complete level-1 structure */ 1 19 1 20 /* format: style4 */ 1 21 dcl 1 user_attributes aligned based, /* the user user_attributes */ 1 22 (2 administrator bit (1), /* 1 system administrator privileges */ 1 23 2 primary_line bit (1), /* 2 user has primary-line privileges */ 1 24 2 nobump bit (1), /* 2 user cannot be bumped */ 1 25 2 guaranteed_login bit (1), /* 4 user has guaranteed login privileges */ 1 26 2 anonymous bit (1), /* 5 used only in SAT. project may have anon.users */ 1 27 2 nopreempt bit (1), /* 6 used only in PDT. user not preemptable by others 1 28* . of same project (distinct from "nobump") */ 1 29 2 nolist bit (1), /* 7 don't list user on "who" */ 1 30 2 dialok bit (1), /* 8 user may have multiple consoles */ 1 31 2 multip bit (1), /* 9 user may have several processes */ 1 32 2 bumping bit (1), /* 10 in SAT. Can users in project bump each other? */ 1 33 2 brief bit (1), /* 11 no login or logout message */ 1 34 2 vinitproc bit (1), /* 12 user may change initial procedure */ 1 35 2 vhomedir bit (1), /* 13 user may change homedir */ 1 36 2 nostartup bit (1), /* 14 user does not want start_up.ec */ 1 37 2 sb_ok bit (1), /* 15 user may be standby */ 1 38 2 pm_ok bit (1), /* 16 user may be primary */ 1 39 2 eo_ok bit (1), /* 17 user may be edit_only */ 1 40 2 daemon bit (1), /* 18 user may login as daemon */ 1 41 2 vdim bit (1), /* 19 * OBSOLETE * user may change outer mdle */ 1 42 2 no_warning bit (1), /* 20 no warning message */ 1 43 2 igroup bit (1), /* 21 in SAT: this project may give its users individual groups 1 44* . in PDT: this user has an individual load control group */ 1 45 2 save_pdir bit (1), /* 22 save pdir after fatal process error */ 1 46 2 disconnect_ok bit (1), /* 23 ok to save user's disconnected processes */ 1 47 2 save_on_disconnect bit (1), /* 24 save them unless -nosave login arg is given */ 1 48 2 pad bit (12)) unaligned; 1 49 1 50 dcl USER_ATTRIBUTE_NAMES (0:24) char (20) int static options (constant) init 1 51 ("none", /* 0 */ 1 52 "administrator", /* 1 */ 1 53 "primary_line", /* 2 */ 1 54 "nobump", /* 3 */ 1 55 "guaranteed_login", /* 4 */ 1 56 "anonymous", /* 5 */ 1 57 "nopreempt", /* 6 */ 1 58 "nolist", /* 7 */ 1 59 "dialok", /* 8 */ 1 60 "multip", /* 9 */ 1 61 "bumping", /* 10 */ 1 62 "brief", /* 11 */ 1 63 "vinitproc", /* 12 */ 1 64 "vhomedir", /* 13 */ 1 65 "nostartup", /* 14 */ 1 66 "no_secondary", /* 15 */ 1 67 "no_prime", /* 16 */ 1 68 "no_eo", /* 17 */ 1 69 "daemon", /* 18 */ 1 70 "", /* 19 vdim OBSOLETE */ 1 71 "no_warning", /* 20 */ 1 72 "igroup", /* 21 */ 1 73 "save_pdir", /* 22 */ 1 74 "disconnect_ok", /* 23 */ 1 75 "save_on_disconnect"); /* 24 */ 1 76 1 77 dcl ALT_USER_ATTRIBUTE_NAMES (0:24) char (20) int static options (constant) init 1 78 ("null", /* 0 */ 1 79 "admin", /* 1 */ 1 80 "", "", /* 2 - 3 */ 1 81 "guar", /* 4 */ 1 82 "anon", /* 5 */ 1 83 "", "", /* 6 - 7 */ 1 84 "dial", /* 8 */ 1 85 "multi_login", /* 9 */ 1 86 "preempting", /* 10 */ 1 87 "", /* 11 */ 1 88 "v_process_overseer", /* 12 */ 1 89 "v_home_dir", /* 13 */ 1 90 "no_start_up", /* 14 */ 1 91 "no_sec", /* 15 */ 1 92 "no_primary", /* 16 */ 1 93 "no_edit_only", /* 17 */ 1 94 "op_login", /* 18 */ 1 95 "", /* 19 */ 1 96 "nowarn", /* 20 */ 1 97 "", "", "", /* 21 - 23 */ 1 98 "save"); /* 24 */ 1 99 1 100 dcl USER_ATTRIBUTES_always_allowed bit (36) aligned int static 1 101 options(constant) init("000000000010000000010000000000000000"b); 1 102 /* SAT/PDT attributes not needed for user to give (brief, no_warning) */ 1 103 1 104 dcl USER_ATTRIBUTES_default_in_pdt bit (36) aligned int static 1 105 options(constant) init("000000000010000000010000000000000000"b); 1 106 /* PDT value for (brief, no_warning) is default */ 1 107 1 108 dcl USER_ATTRIBUTES_settable_by_user bit (36) aligned int static 1 109 options(constant) init("000100000110010000010000000000000000"b); 1 110 /* user MIGHT set (bump, ns, brief, guar, no_warning) */ 1 111 2 1 /* BEGIN INCLUDE FILE ... user_abs_attributes.incl.pl1 */ 2 2 2 3 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 4 /* */ 2 5 /* This include file describes the attributes of an absentee job. It is */ 2 6 /* used by user_table_entry.incl.pl1, abs_message_format.incl.pl1 */ 2 7 /* and PIT.incl.pl1. */ 2 8 /* */ 2 9 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 10 2 11 /****^ HISTORY COMMENTS: 2 12* 1) change(86-12-08,GDixon), approve(87-07-13,MCR7741), 2 13* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 2 14* Separated abs_attributes from the request structure 2 15* (abs_message_format.incl.pl1) so that the identical structure could be 2 16* used in the ute structure (user_table_entry.incl.pl1). 2 17* 2) change(87-04-19,GDixon), approve(87-07-13,MCR7741), 2 18* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 2 19* Added ABS_ATTRIBUTE_NAMES array. 2 20* 3) change(87-11-11,Parisek), approve(88-02-11,MCR7849), 2 21* audit(88-03-22,Lippard), install(88-07-13,MR12.2-1047): 2 22* Added the no_start_up flag. SCP6367 2 23* END HISTORY COMMENTS */ 2 24 2 25 dcl 1 user_abs_attributes aligned based, 2 26 2 restartable bit (1) unaligned, /* 1 if request may be started over from the beginning */ 2 27 2 user_deferred_until_time bit (1) unaligned, /* 1 if request was specified as deferred */ 2 28 2 proxy bit (1) unaligned, /* 1 if request submitted for someone else */ 2 29 2 set_bit_cnt bit (1) unaligned, /* 1 if should set bit count after every write call */ 2 30 2 time_in_gmt bit (1) unaligned, /* 1 if deferred_time is in GMT */ 2 31 2 user_deferred_indefinitely bit (1) unaligned, /* 1 if operator is to say when to run it */ 2 32 2 secondary_ok bit (1) unaligned, /* 1 if ok to log in as secondary foreground user */ 2 33 2 truncate_absout bit (1) unaligned, /* 1 if .absout is to be truncated */ 2 34 2 restarted bit (1) unaligned, /* 1 if job is restarted */ 2 35 2 no_start_up bit (1) unaligned, /* 1 if requested -ns */ 2 36 2 attributes_pad bit (26) unaligned; 2 37 2 38 dcl ABS_ATTRIBUTE_NAMES (10) char (28) varying int static options(constant) init( 2 39 "restartable", 2 40 "user_deferred_until_time", 2 41 "proxy", 2 42 "set_bit_cnt", 2 43 "time_in_gmt", 2 44 "user_deferred_indefinitely", 2 45 "secondary_ok", 2 46 "truncate_absout", 2 47 "restarted", 2 48 "no_start_up"); 2 49 2 50 /* END INCLUDE FILE ... user_abs_attributes.incl.pl1 */ 2 51 1 112 1 113 1 114 /* END INCLUDE FILE ... user_attributes.incl.pl1 */ 107 3 1 /* BEGIN INCLUDE FILE ... sat.incl.pl1 */ 3 2 3 3 3 4 3 5 3 6 /****^ HISTORY COMMENTS: 3 7* 1) change(86-09-05,Parisek), approve(87-06-17,MCR7570), 3 8* audit(87-06-15,Hirneisen), install(87-08-06,MR12.1-1066): 3 9* Expand comment line of project.state to include the renamed state (state = 3 10* 3). 3 11* END HISTORY COMMENTS */ 3 12 3 13 3 14 3 15 /* Modified 740723 by PG to add AIM info */ 3 16 /* Modified 750604 by T. Casey to add priority scheduler parameters */ 3 17 /* Modified May 1976 by T. Casey to add project cutoff limits */ 3 18 /* Modified May 1978 by T. Casey to add pdir_quota */ 3 19 /* Modified November 1978 by T. Casey to add max_(fore back)ground and abs_foreground_cpu_limit */ 3 20 /* Modified July 1979 by J. N. R. Barnecut to support multiple rate structures. (UNCA) */ 3 21 /* Modified January 1982 by E. N. Kittlitz for user_attributes.incl.pl1 changes */ 3 22 /* Modified 1984-07-05 BIM range of authorizations, version 3 */ 3 23 3 24 dcl (SAT_version init (3), /* version 2 of this declaration */ 3 25 3 26 SAT_header_lth init (466), /* length in words of SAT header */ 3 27 SAT_entry_lth init (80), /* length in words of SAT entry */ 3 28 3 29 SAT_project_name_length init (9) /* proper length of project.project_id */ 3 30 ) fixed bin internal static options (constant); 3 31 3 32 dcl 1 sat based (satp) aligned, 3 33 4 1 /* BEGIN INCLUDE FILE author.incl.pl1 */ 4 2 4 3 /* the "author" items must always be the first ones in the table. The 4 4* module which moves the converted table to the System Control process 4 5* fills in these data items and assumes them to be at the head of the segment 4 6* regardless of the specific table's actual declaration. The variables 4 7* "lock" and "last_install_time" used to be "process_id" and "ev_channel" 4 8* respectively. For tables installed in multiple processes, these 4 9* are to be used to lock out multiple installations. */ 4 10 4 11 /* Lock should be used as a modification lock. Since, in general, 4 12* entries may not be moved in system tables, even by installations, 4 13* it is sufficient for only installers and programs that change threads 4 14* to set or respect the lock. Simply updating data in an entry 4 15* requires no such protection. 4 16* 4 17* Last_install_time is used by readers of system tables to detect 4 18* installations or other serious modifications. By checking it before 4 19* and after copying a block of data, they can be protected against 4 20* modifications. 4 21* 4 22* Modules that set the lock should save proc_group_id, and then 4 23* put their group id there for the time they hold the lock. 4 24* if they do not actually install the, they should restore the group id. 4 25**/ 4 26 4 27 2 author aligned, /* validation data about table's author */ 4 28 3 proc_group_id char (32), /* process-group-id (personid.projectid.tag) */ 4 29 3 lock bit (36), /* installation lock */ 4 30 3 update_attributes bit (1) unal, /* update/add/delete attributes */ 4 31 3 update_authorization bit (1) unal, /* update only authorizations */ 4 32 3 deferral_notified bit (1) unal, /* installer notified of deferral of installation */ 4 33 3 pad bit (33) unaligned, 4 34 3 last_install_time fixed bin (71), 4 35 3 table char (4), /* name of table, e.g., SAT MGT TTT RTDT PDT etc. */ 4 36 3 w_dir char (64), /* author's working directory */ 4 37 4 38 /* END INCLUDE FILE author.incl.pl1 */ 3 34 3 35 2 max_size fixed bin, /* max number of entries table can grow */ 3 36 2 current_size fixed bin, /* current size of table (in entries) */ 3 37 2 version fixed bin, /* version number of table (word 32) */ 3 38 2 freep fixed bin, /* free chain ptr. 0 if no free entries */ 3 39 2 n_projects fixed bin, /* number of entries actually used */ 3 40 2 pad_was_max_users bit (36) aligned, 3 41 2 max_units fixed bin, /* maximum number of login-units per session */ 3 42 2 pad_was_max_prim bit (36) aligned, 3 43 2 uwt_size fixed bin, /* size of User Weight Table */ 3 44 2 uwt (24) aligned, /* User Weight Table */ 3 45 3 initproc char (64) unaligned, /* user's initial procedure */ 3 46 3 units fixed bin, /* weight of initial procedure */ 3 47 2 system_admin (2) char (32) unal, /* system administrator ID */ 3 48 2 pad1 (4) fixed bin, /* padding to 466 wds */ 3 49 2 project (3258), /* The SAT entries. 255K segment. */ 3 50 3 pad (80) fixed bin; /* each entry is 80 words long */ 3 51 3 52 3 53 dcl 1 project based (satep) aligned, /* declaration of a single SAT entry */ 3 54 2 state fixed bin, /* state 1 = normal, 0 = free, 2 = deleted, 3 = renamed */ 3 55 2 project_id char (12) unaligned, /* project's name */ 3 56 2 project_dir char (64) unaligned, /* project's directory */ 3 57 2 pdt_ptr pointer, /* pointer to current PDT */ 3 58 2 max_users fixed bin, /* maximum number of users from project */ 3 59 2 n_users fixed bin, /* current number */ 3 60 2 at like user_attributes aligned, /* include user_attributes.incl.pl1 */ 3 61 2 admin (4) aligned, /* list of project's administrators */ 3 62 3 userid char (30) unal, /* administrator's user-id (personid.projectid) */ 3 63 3 pad char (2) unal, 3 64 2 cutoff char (1), /* if project is cut off, why. */ 3 65 2 min_ring fixed bin, /* lowest ring for project */ 3 66 2 max_ring fixed bin, /* highest ring for project */ 3 67 2 alias char (8) unal, /* project alias */ 3 68 2 group char (8) unal, /* default group for this project */ 3 69 2 grace_max fixed bin, /* maximum bump grace */ 3 70 2 audit bit (36), /* audit flags for project */ 3 71 2 project_authorization (2) bit (72), /* authorization of this project */ 3 72 2 groups (2) char (8) unal, /* authorized groups for this project */ 3 73 2 days_to_cutoff fixed bin (17) unaligned, /* these figures are as of last running of daily_summary */ 3 74 2 pct_balance fixed bin (17) unaligned, /* they are used for warning message printing only */ 3 75 2 dollars_to_cutoff float bin, /* and are not to be taken as up-to-date figures */ 3 76 2 pdir_quota fixed bin (17) unaligned, /* max pdir quota allowed for project */ 3 77 2 max_foreground fixed bin (9) unsigned unaligned, /* max simultaneous foreground and background */ 3 78 2 max_background fixed bin (9) unsigned unaligned, /* processes that a user on this project can have */ 3 79 2 abs_foreground_cpu_limit fixed bin (17) unaligned, /* time limit on foreground absentee jobs */ 3 80 2 rs_number fixed bin (9) unsigned unaligned, /* rate structure number (0=default rates ) */ 3 81 2 satpad1 fixed bin (9) unsigned unaligned, 3 82 2 satpad (1) bit (36) aligned, /* pad to 80 words */ 3 83 2 chain fixed bin; /* if free entry, chain */ 3 84 3 85 /* END INCLUDE FILE ... sat.incl.pl1 */ 108 5 1 /* BEGIN INCLUDE FILE ... pdt.incl.pl1 */ 5 2 /* Requires user_attributes.incl.pl1 */ 5 3 5 4 /* Modified 740723 by PG to add AIM info */ 5 5 /* Modified 750604 by T. Casey to add priority scheduler parameters */ 5 6 /* Modified May 1976 by T. Casey to add cutoff warning thresholds and change version to 3 */ 5 7 /* Modified May 1977 by John Gintell to add reqfile, projfile, and SAT to header */ 5 8 /* Modified May 1978 by T. Casey to add pdir_quota to user entry */ 5 9 /* Modified June 1978 by T. Casey to add rel ptr to pdt hash table */ 5 10 /* Modified November 1978 by T. Casey to add max_(fore back)ground, n_(fore back)ground and abs_foreground_cpu_limit */ 5 11 /* Modified October 1979 by T. Casey to add counters for interactive and disconnected processes. */ 5 12 /* Modified Feb 1980 by M. B. Armstrong to implement multiple rate structures (UNCA). */ 5 13 /* Modified May 1980 by R. McDonald to use iod cpu time field for page charging (UNCA) */ 5 14 /* Modified December 1981 by E. N. Kittlitz for user_warn fields */ 5 15 /* Modified January 1982 by E. N. Kittlitz for user_attributes.incl.pl1 changes */ 5 16 /* Modified September 1982 by E. N. Kittlitz for default ring. */ 5 17 /* Modified 1984-07-05 BIM for min authorization, version to 4 */ 5 18 5 19 dcl (PDT_version init (4), /* version of this declaration */ 5 20 PDT_header_lth init (256), /* length in words of PDT head */ 5 21 PDT_entry_lth init (256), /* length in words of PDT entry */ 5 22 5 23 PDT_project_name_length init (9), /* proper length of pdt.project_name */ 5 24 PDT_person_id_length init (22) /* proper length of user.person_id */ 5 25 ) fixed bin internal static options (constant); 5 26 5 27 dcl 1 pdt based (pdtp) aligned, 5 28 6 1 /* BEGIN INCLUDE FILE author.incl.pl1 */ 6 2 6 3 /* the "author" items must always be the first ones in the table. The 6 4* module which moves the converted table to the System Control process 6 5* fills in these data items and assumes them to be at the head of the segment 6 6* regardless of the specific table's actual declaration. The variables 6 7* "lock" and "last_install_time" used to be "process_id" and "ev_channel" 6 8* respectively. For tables installed in multiple processes, these 6 9* are to be used to lock out multiple installations. */ 6 10 6 11 /* Lock should be used as a modification lock. Since, in general, 6 12* entries may not be moved in system tables, even by installations, 6 13* it is sufficient for only installers and programs that change threads 6 14* to set or respect the lock. Simply updating data in an entry 6 15* requires no such protection. 6 16* 6 17* Last_install_time is used by readers of system tables to detect 6 18* installations or other serious modifications. By checking it before 6 19* and after copying a block of data, they can be protected against 6 20* modifications. 6 21* 6 22* Modules that set the lock should save proc_group_id, and then 6 23* put their group id there for the time they hold the lock. 6 24* if they do not actually install the, they should restore the group id. 6 25**/ 6 26 6 27 2 author aligned, /* validation data about table's author */ 6 28 3 proc_group_id char (32), /* process-group-id (personid.projectid.tag) */ 6 29 3 lock bit (36), /* installation lock */ 6 30 3 update_attributes bit (1) unal, /* update/add/delete attributes */ 6 31 3 update_authorization bit (1) unal, /* update only authorizations */ 6 32 3 deferral_notified bit (1) unal, /* installer notified of deferral of installation */ 6 33 3 pad bit (33) unaligned, 6 34 3 last_install_time fixed bin (71), 6 35 3 table char (4), /* name of table, e.g., SAT MGT TTT RTDT PDT etc. */ 6 36 3 w_dir char (64), /* author's working directory */ 6 37 6 38 /* END INCLUDE FILE author.incl.pl1 */ 5 29 5 30 2 max_size fixed bin, /* max number of entries table can grow */ 5 31 2 current_size fixed bin, /* current size of table (in entries) */ 5 32 2 version fixed bin, /* table version */ 5 33 2 freep fixed bin, /* relptr to begin of free chain */ 5 34 2 n_users fixed bin, /* number of entries actually used */ 5 35 2 project_name char (28), /* name of project */ 5 36 2 project_dir char (64), /* treename of project's directory */ 5 37 2 projfile_version fixed bin, 5 38 2 projentry bit (66*36), 5 39 2 pad3 (5) bit (36) aligned, 5 40 2 reqfile_version fixed bin, 5 41 2 reqentry bit (40*36), 5 42 2 pad4 (9) fixed bin, 5 43 2 sat_version fixed bin, 5 44 2 satentry bit (52*36), /* everything in sat.project from project.at on */ 5 45 2 pad5 (4) bit (36) aligned, 5 46 2 date_reqfile_copied fixed bin (71), 5 47 2 rs_number fixed bin (9) unsigned unaligned, /* rate structure number, easier than looking in satentry */ 5 48 2 pad2l bit (27) unaligned, 5 49 2 pad2 (16) fixed bin, /* make header 256 words long */ 5 50 2 ht_relp fixed bin (18) aligned, /* if nonzero, pdt has hash table at that loc */ 5 51 2 user (1019) aligned, /* the project definition table entries */ 5 52 3 pad (256) bit (36) aligned; /* each entry is 256 words long */ 5 53 5 54 /* The hash table, if there is one, is right after the last user, and is described in hashst.incl.pl1 */ 5 55 5 56 5 57 5 58 dcl 1 user based (pdtep) aligned, /* declaration of a single PDT entry */ 5 59 2 state fixed bin, /* 1 = normal, 2 = deleted 0 = free */ 5 60 2 lock bit (36), /* update lock */ 5 61 2 person_id char (24) aligned, /* login name of user */ 5 62 2 now_in fixed bin, /* count of users logged in on this entry */ 5 63 2 password char (8) aligned, /* password for anonymous user */ 5 64 2 at like user_attributes aligned, /* include user_attributes.incl.pl1 */ 5 65 2 initial_procedure char (64) aligned, /* initproc and subsystem name packed into one string */ 5 66 2 home_dir char (64) aligned, /* user's default working directory */ 5 67 2 bump_grace fixed bin, /* number of minutes he is protected */ 5 68 2 high_ring fixed bin, /* highest ring user may use */ 5 69 2 default_ring fixed bin (17) unal, /* ring user will start in */ 5 70 2 low_ring fixed bin (17) unal, /* lowest ring user may use */ 5 71 2 outer_module char (32), /* outer module used if user is interactive */ 5 72 2 lot_size fixed bin, /* size of linkage offset table */ 5 73 2 kst_size fixed bin, /* size of known segment table */ 5 74 2 cls_size fixed bin, /* size of combined linkage */ 5 75 2 uflags, /* various flags */ 5 76 3 dont_call_init_admin bit (1) unal, /* call overseer direct */ 5 77 3 ip_given bit (1) unal, /* ip_len gives length of initproc packed in initial_procedure */ 5 78 3 ss_given bit (1) unal, /* subsystem name is packed in initial_procedure */ 5 79 3 flagpad bit (33) unal, 5 80 2 ip_len fixed bin (17) unal, /* length of initproc name packed in initial_procedure */ 5 81 2 ss_len fixed bin (17) unal, /* length of subsystem name packed in initial_procedure */ 5 82 2 dollar_limit float bin, 5 83 2 dollar_charge float bin, /* total dollars spent this month */ 5 84 2 shift_limit (0: 7) float bin, 5 85 2 daton fixed bin (71), /* date user added to system */ 5 86 2 datof fixed bin (71), /* date user deleted */ 5 87 2 last_login_time fixed bin (71), /* time of last login */ 5 88 2 last_login_unit char (4), /* terminal id last used */ 5 89 2 last_login_type fixed bin (17) unal, /* terminal type */ 5 90 2 last_login_line_type fixed bin (17) unal, /* terminal line type */ 5 91 2 time_last_bump fixed bin (71), /* for bump-wait */ 5 92 2 last_update fixed bin (71), /* time of last transaction */ 5 93 2 logins fixed bin, /* number of logins */ 5 94 2 crashes fixed bin, /* sessions abnormally terminated */ 5 95 2 interactive (0: 7), /* interactive use, shifts 0-7 */ 5 96 3 charge float bin, /* total dollar charge this shift */ 5 97 3 xxx fixed bin, 5 98 3 cpu fixed bin (71), /* cpu usage in microseconds */ 5 99 3 core fixed bin (71), /* core demand in page-microseconds */ 5 100 3 connect fixed bin (71), /* total console time in microseconds */ 5 101 3 io_ops fixed bin (71), /* total i/o ops on terminal */ 5 102 2 absentee (4), /* absentee use, queues 1-4 */ 5 103 3 charge float bin, /* dollar charge this queue */ 5 104 3 jobs fixed bin, /* number of jobs submitted */ 5 105 3 cpu fixed bin (71), /* total cpu time in microseconds */ 5 106 3 memory fixed bin (71), /* total memory demand */ 5 107 2 iod (4), /* io daemon use, queues 1-4 */ 5 108 3 charge float bin, /* dollar charge this queue */ 5 109 3 pieces fixed bin, /* pieces of output requested */ 5 110 3 pad fixed bin (35), 5 111 3 pages fixed bin (35), /* number of pages output */ 5 112 3 lines fixed bin (71), /* total record count of output */ 5 113 2 devices (16) float bin, /* device charges */ 5 114 2 time_last_reset fixed bin (71), /* time PDT last updated */ 5 115 2 absolute_limit float bin, /* Limit, not reset monthly */ 5 116 2 absolute_spent float bin, /* Spending against this */ 5 117 2 absolute_cutoff fixed bin (71), /* Spending will be reset on this date */ 5 118 2 absolute_increm fixed bin, /* .. time increment code. 0 = don't reset */ 5 119 2 pad_was_authorization bit (72) aligned, 5 120 2 group char (8), /* group for this user (if at.igroup = "1"b) */ 5 121 2 warn_days fixed bin (17) unaligned, /* warn user if less than this many days to cutoff */ 5 122 2 warn_pct fixed bin (17) unaligned, /* warn user if less than this percent of funds left */ 5 123 2 warn_dollars float bin, /* warn user if less than this amount of funds left */ 5 124 2 n_foreground fixed bin (9) unsigned unaligned, /* number of foreground and background processes */ 5 125 2 n_background fixed bin (9) unsigned unaligned, /* that this user has. see limits just below */ 5 126 2 max_foreground fixed bin (9) unsigned unaligned, /* max simultaneous foreground and */ 5 127 2 max_background fixed bin (9) unsigned unaligned, /* background processes that this user can have */ 5 128 2 n_interactive fixed bin (9) unsigned unaligned, /* number of interactive processes that user has */ 5 129 2 n_disconnected fixed bin (9) unsigned unaligned, /* number of disconnected processes that user has */ 5 130 2 pdtupad1 fixed bin (18) unsigned unaligned, 5 131 2 user_warn_days fixed bin (17) unaligned, /* warn user if less than this many days to user cutoff */ 5 132 2 user_warn_pct fixed bin (17) unaligned, /* warn user if less than this percent of user funds left */ 5 133 2 user_warn_dollars float bin, /* warn user if less than this amount of user funds left */ 5 134 2 user_authorization (2) bit (72) aligned, /* range */ 5 135 2 pdtupad (5) fixed bin, 5 136 2 abs_foreground_cpu_limit fixed bin (17) unaligned, /* time limit (sec) on foreground absentee jobs */ 5 137 2 pdir_quota fixed bin (17) unaligned, /* quota to put on user's pdir (0 => use default) */ 5 138 2 chain fixed bin; /* free chain */ 5 139 5 140 /* END INCLUDE FILE ... pdt.incl.pl1 */ 109 7 1 /* BEGIN INCLUDE FILE .. projfile.incl.pl1 */ 7 2 /* Modified by T. Casey April 1976 to change disk_infs (obsolete) to dir_disk_use */ 7 3 /* Modified 1984-07-09 BIM for dir_disk_quota, version */ 7 4 /* Modified 1984-09-14 BIM for reasonable array size */ 7 5 7 6 dcl 1 projfile based (pp) aligned, /* Project history file */ 7 7 2 nproj fixed bin (35), /* number of entries */ 7 8 2 version fixed bin, 7 9 2 projfilexx0 (6) bit (36) aligned, 7 10 2 projfiletab (3000), /* in seg limit */ 7 11 3 id char (12) unal, /* project ID */ 7 12 3 title char (52) unal, /* project title */ 7 13 3 inv char (32) unal, /* name of principal investigator */ 7 14 3 inv_addr char (32) unal, /* address */ 7 15 3 sup char (32) unal, /* name of supervisor */ 7 16 3 sup_addr char (32) unal, /* address */ 7 17 3 sup_phone char (16) unal, /* telephone */ 7 18 3 on fixed bin (71), /* date on */ 7 19 3 off fixed bin (71), /* date off */ 7 20 3 disk_psec fixed bin (71), /* project disk page-seconds */ 7 21 3 disk_quota fixed bin (35), /* project disk quota */ 7 22 3 dir_disk_quota fixed bin (35), /* project dir disk quota */ 7 23 3 disk_use fixed bin (35), /* total segment pages used */ 7 24 3 dir_disk_use fixed bin (35), /* total directory pages used */ 7 25 3 misc_charges float bin, /* manuals, etc */ 7 26 3 n_misc fixed bin, /* number of entries */ 7 27 3 processed fixed bin, /* temp for usage-report */ 7 28 3 pad bit (36) aligned; /* out to even number of words */ 7 29 7 30 dcl loph int static fixed bin (17) options (constant) init (8), /* lth of projfile header */ 7 31 lope int static fixed bin (17) options (constant) init (66); /* lth of projflile entry */ 7 32 7 33 dcl PROJFILE_VERSION fixed bin init (3) int static options (constant); 7 34 7 35 /* END INCLUDE FILE ... projfile.incl.pl1 */ 110 8 1 /* Requisition file declaration */ 8 2 /* Modified BIM 1984-07-10 for unaligned strings */ 8 3 /* Modified BIM 1984-09-14 foor 3000 size-array */ 8 4 8 5 dcl 1 reqfile based (qp) aligned, /* MIT accounting data */ 8 6 2 nacts fixed, 8 7 2 version fixed bin, 8 8 2 pad (6) bit (36) aligned, 8 9 2 reqfiletab (3000), /* one entry per Multics account */ 8 10 /* same size as projfile */ 8 11 3 acctid char (12) unal, /* account id. usually same as Proj */ 8 12 3 mitacct char (12) unal, /* MIT account no. */ 8 13 3 reqno char (12) unal, /* requisition or PO no. */ 8 14 3 qflag char (8), /* class & activity */ 8 15 3 procssd fixed bin, /* temp for usage report */ 8 16 3 qdn fixed bin (71), /* date on for account */ 8 17 3 qdf fixed bin (71), /* date off */ 8 18 3 billing_name char (32) unal, /* where to send bill */ 8 19 3 billing_addr char (32) unal, 8 20 3 chg_mo float bin (63), /* charges this month */ 8 21 3 chg_tr float bin (63), /* charges this req */ 8 22 3 req_amt float bin (63), /* req face value */ 8 23 3 cutoff fixed bin (71); /* term date for req */ 8 24 8 25 dcl loqh int static fixed bin (17) init (8), /* length of reqfile head */ 8 26 loqe int static fixed bin (17) init (40); /* lth of reqfile entry */ 8 27 8 28 declare REQFILE_VERSION fixed bin init (2) int static options (constant); 8 29 8 30 /* End include file reqfile.incl.pl1 */ 111 9 1 /* declaration of the misc charges file */ 9 2 9 3 dcl 1 misc_file based (miscfilep) aligned, 9 4 2 misc_ents fixed bin, 9 5 2 padmisc (7) fixed bin, 9 6 2 misctab (100), 9 7 3 mdate fixed bin (71), 9 8 3 mproj char (12), 9 9 3 mamt float bin, 9 10 3 mpad fixed bin (71), 9 11 3 mdesc char (64); 9 12 9 13 /* end miscfile */ 112 113 114 command_name = "compute_bill"; 115 go to START; 116 117 update_pdts_from_reqfile: entry; 118 119 command_name = "update_pdts_from_reqfile"; 120 compute = ""b; 121 START: 122 call cu_$arg_ptr (1, ap, al, ec); /* First arg is pathname of SAT */ 123 if ec ^= 0 then do; 124 ER1: call com_err_ (ec, command_name, ""); 125 return; 126 end; 127 call expand_pathname_ (arg, dn, en, ec); 128 if ec ^= 0 then do; 129 ER2: call com_err_ (ec, command_name, arg); 130 return; 131 end; 132 call hcs_$initiate (dn, en, "", 0, 1, satp, ec); /* Initiate sat. */ 133 if satp = null then do; 134 ERR: call com_err_ (ec, command_name, en); 135 return; 136 end; 137 138 call cu_$arg_ptr (2, ap, al, ec); /* second arg is pathname of PDT dir */ 139 if ec ^= 0 then go to ER1; 140 call absolute_pathname_ (arg, pdtdir, ec); 141 if ec ^= 0 then go to ER2; 142 143 en = "reqfile"; /* Now get requisition file. */ 144 wdir = get_wdir_ (); 145 call hcs_$initiate (wdir, en, "", 0, 1, qp, ec); /* Initiate reqfile. */ 146 if qp = null then go to ERR; 147 nreq = reqfile.nacts; /* ... */ 148 if nreq = 0 then do; 149 ABORT: call ioa_ ("^a: ^a is empty. FATAL ERROR", command_name, en); 150 signal condition (crank_cant_run); 151 end; 152 153 en = "projfile"; /* Now get project file. */ 154 call hcs_$initiate (wdir, en, "", 0, 1, pp, ec); /* Initiate projfile. */ 155 if pp = null then go to ERR; 156 nproj = projfile.nproj; /* Get number of entries. */ 157 if nproj = 0 then do; 158 go to ABORT; 159 end; 160 161 if compute then do; 162 en = "miscfile"; /* Now get misc charges journal */ 163 call hcs_$initiate (wdir, en, "", 0, 1, miscfilep, ec); 164 if miscfilep = null then go to ERR; 165 166 en = "[pd]>proj_prices"; 167 call hcs_$make_seg ("", "proj_prices", "", 1010b, pdp_ptr, ec); /* get a temporary seg */ 168 if pdp_ptr = null then goto ERR; 169 do rs_number = 0 to hbound (prices, 1); /* now get all the prices */ 170 call system_info_$rs_name (rs_number, rs_name, ec); /* is this a valid number? */ 171 if ec ^= 0 then prices (rs_number) = prices (0); 172 else call system_info_$prices_rs (rs_number, dum, dum, dum, dum, prices (rs_number).disk_price, 173 prices (rs_number).reg_price); 174 end; 175 176 do reqi = 1 to nreq; /* clear charges this month in reqfile */ 177 reqfile.chg_mo (reqi) = 0e0; 178 reqfile.procssd (reqi) = 0; 179 end; 180 end; 181 182 183 /* Loop through SAT to find all current projects. */ 184 185 do sati = 1 to sat.current_size; 186 satep = addr (sat.project (sati)); 187 if project.state = 0 | project.state = 3 then go to SKIP_PROJ; 188 /* skip renamed projects so com_err_ isn't called */ 189 pdtename = rtrim (project.project_id) || ".pdt"; 190 call hcs_$initiate (pdtdir, pdtename, "", 0, 1, pdtp, ec); 191 if pdtp = null then do; 192 call com_err_ (ec, command_name, "^a", pdtename); 193 go to SKIP_PROJ; 194 end; 195 196 call findreq; 197 198 if compute then do; 199 pdp (reqi).disk_price = prices (project.rs_number).disk_price; /* save what we know when we know it */ 200 pdp (reqi).price_set = "1"b; /* and mark it as being saved */ 201 proj_usage = 0e0; 202 203 do pdti = 1 to pdt.current_size; 204 pdtep = addr (pdt.user (pdti)); 205 if user.state ^= 0 then 206 proj_usage = proj_usage + user.dollar_charge + prices (project.rs_number).reg_price; 207 end; 208 209 /* End of loop on users in project. Place total into reqfile */ 210 211 212 if reqfile.mitacct (reqi) ^= "nonbill" then /* Check for non-billable account. */ 213 reqfile.chg_mo (reqi) = reqfile.chg_mo (reqi) + proj_usage; /* add project charge into reqfile */ 214 end; 215 else do; 216 uproj = project.project_id; /* implicit argument to findproj */ 217 pdt.date_reqfile_copied = clock (); 218 call findproj; 219 if proj_notfound then projfile_version = 0; 220 else do; 221 pdt.projfile_version = projfile.version; 222 pdt.projentry = unspec (projfiletab (proji)); 223 end; 224 if req_notfound then reqfile_version = 0; 225 else do; 226 pdt.reqfile_version = reqfile.version; 227 pdt.reqentry = unspec (reqfiletab (reqi)); 228 end; 229 if sat.version ^= SAT_version then pdt.sat_version = -1; 230 else do; 231 pdt.sat_version = sat.version; 232 pdt.satentry = addr (project.at) -> satstuff; /* sorry about this */ 233 end; 234 pdt.rs_number = project.rs_number; /* guarantee rs_number is up-to-date */ 235 end; 236 237 /* On to next project. */ 238 239 call hcs_$terminate_noname (pdtp, ec); 240 SKIP_PROJ: end; 241 242 call hcs_$terminate_noname (satp, ec); 243 244 /* Loop through reqfile updating disk charges from projfile */ 245 246 if compute then do; 247 do reqi = 1 to nreq; 248 if reqfile.acctid (reqi) = "" then go to SKIP_REQ; 249 uproj = reqfile.acctid (reqi); 250 proj_usage = 0e0; 251 call findproj; 252 253 /* charge for disk usage-disk_psec should only be until termination */ 254 255 if pdp (reqi).price_set then proj_usage = proj_usage 256 +pdp (reqi).disk_price * projfile.disk_psec (proji); /* the price saved above */ 257 else proj_usage = proj_usage+prices (0).disk_price * projfile.disk_psec (proji); /* use default */ 258 259 if projfile.n_misc (proji) > 0 then do; /* any misc charges? */ 260 u1 = 0; /* Yes. */ 261 do j = 1 to misc_ents; /* search journal */ 262 if mproj (j) = uproj then do; 263 u1 = u1 + mamt (j); /* add amount of all misc charges */ 264 end; 265 end; 266 if abs (u1 - projfile.misc_charges (proji)) > .01e0 then /* file consistency check. */ 267 call ioa_ ("^a: ^a misc charges ^.2f in projfile, ^.2f in miscfile", command_name, 268 uproj, projfile.misc_charges (proji), u1); 269 proj_usage = proj_usage + u1; /* increase proj total by misc chgs */ 270 end; 271 272 if reqfile.mitacct (reqi) ^= "nonbill" /* charges should not be added to nonbill accts */ 273 then reqfile.chg_mo (reqi) = reqfile.chg_mo (reqi)+proj_usage; /* add disk and misc charges to reqfile */ 274 SKIP_REQ: end; 275 276 projfile.nproj = nproj; /* May have added dummy project. */ 277 end; 278 call hcs_$terminate_noname (pp, ec); /* Terminate projfile. */ 279 if compute then do; 280 reqfile.nacts = nreq; /* May have added dummy req. */ 281 call hcs_$terminate_noname (miscfilep, ec); /* terminate miscfile */ 282 call hcs_$terminate_noname (pdp_ptr, ec); /* terminate disk prices seg */ 283 end; 284 call hcs_$terminate_noname (qp, ec); /* Terminate reqfile. */ 285 286 /* Internal procedures to look up entries in reqfile and projfile */ 287 /* findreq finds reqfile entry corresponding to project.project_id 288* findproj finds projfile entry corresponding to uproj */ 289 290 findreq: proc; 291 292 do reqi = 1 to nreq while (project.project_id ^= reqfile.acctid (reqi));end; /* look up account in file */ 293 req_notfound = ""b; 294 if reqi = nreq + 1 then do; /* not found, add it */ 295 if ^compute then do; 296 req_notfound = "1"b; 297 return; 298 end; 299 call ioa_ ("^a: reqfile entry for ^a missing. Dummy created.", command_name, project.project_id); 300 nreq = reqi; /* not in "reqfile", add */ 301 reqi = nreq; 302 303 reqfile.acctid (reqi) = project.project_id; /* Fill in new entry. */ 304 reqfile.mitacct (reqi), reqfile.reqno (reqi), 305 reqfile.billing_name (reqi), reqfile.billing_addr (reqi) = "(unknown)"; 306 reqfile.chg_tr (reqi), reqfile.req_amt (reqi), reqfile.chg_mo (reqi) = 0e0; 307 reqfile.cutoff (reqi) = 0; 308 reqfile.qdf (reqi) = 0; 309 reqfile.qdn (reqi) = clock (); 310 end; 311 end findreq; 312 313 findproj: proc; 314 do proji = 1 to nproj while (uproj ^= projfile.id (proji)); end; /* find project entry in "projfile" */ 315 proj_notfound = ""b; 316 if proji = nproj + 1 then do; /* missing, add it */ 317 if ^compute then do; 318 proj_notfound = "1"b; 319 return; 320 end; 321 nproj = proji; 322 call ioa_ ("^a: projfile entry for ^a missing. Dummy created.", command_name, uproj); 323 projfile.id (proji) = uproj; /* initialize entry */ 324 projfile.title (proji), projfile.inv (proji), projfile.sup (proji), projfile.inv_addr (proji), 325 projfile.sup_addr (proji), projfile.sup_phone (proji) = "(unknown)"; 326 projfile.misc_charges (proji) = 0e0; 327 projfile.disk_quota (proji), projfile.disk_use (proji), projfile.dir_disk_use (proji) = 0; 328 projfile.disk_psec (proji) = 0; 329 projfile.off (proji) = 0; 330 projfile.on (proji) = clock (); 331 projfile.n_misc (proji) = 0; 332 end; 333 end findproj; 334 end compute_bill; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/13/88 0941.0 compute_bill.pl1 >special_ldd>install>MR12.2-1047>compute_bill.pl1 107 1 08/06/87 0913.6 user_attributes.incl.pl1 >ldd>include>user_attributes.incl.pl1 1-112 2 07/13/88 0900.1 user_abs_attributes.incl.pl1 >special_ldd>install>MR12.2-1047>user_abs_attributes.incl.pl1 108 3 08/06/87 1416.6 sat.incl.pl1 >ldd>include>sat.incl.pl1 3-34 4 04/21/82 1211.8 author.incl.pl1 >ldd>include>author.incl.pl1 109 5 09/13/84 0921.6 pdt.incl.pl1 >ldd>include>pdt.incl.pl1 5-29 6 04/21/82 1211.8 author.incl.pl1 >ldd>include>author.incl.pl1 110 7 09/20/84 0925.7 projfile.incl.pl1 >ldd>include>projfile.incl.pl1 111 8 09/20/84 0925.7 reqfile.incl.pl1 >ldd>include>reqfile.incl.pl1 112 9 05/06/74 1742.4 miscfile.incl.pl1 >ldd>include>miscfile.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. SAT_version constant fixed bin(17,0) initial dcl 3-24 ref 229 abs builtin function dcl 77 ref 266 absolute_pathname_ 000016 constant entry external dcl 92 ref 140 acctid 10 based char(12) array level 3 packed packed unaligned dcl 8-5 set ref 248 249 292 303* addr builtin function dcl 77 ref 186 204 232 al 000324 automatic fixed bin(17,0) dcl 50 set ref 121* 127 127 129 129 138* 140 140 ap 000322 automatic pointer dcl 50 set ref 121* 127 129 138* 140 arg based char packed unaligned dcl 50 set ref 127* 129* 140* at 30 based structure level 2 dcl 3-53 set ref 232 billing_addr 40 based char(32) array level 3 packed packed unaligned dcl 8-5 set ref 304* billing_name 30 based char(32) array level 3 packed packed unaligned dcl 8-5 set ref 304* chg_mo 50 based float bin(63) array level 3 dcl 8-5 set ref 177* 212* 212 272* 272 306* chg_tr 52 based float bin(63) array level 3 dcl 8-5 set ref 306* clock builtin function dcl 77 ref 217 309 330 com_err_ 000026 constant entry external dcl 92 ref 124 129 134 192 command_name 000346 automatic char(32) packed unaligned dcl 50 set ref 114* 119* 124* 129* 134* 149* 192* 266* 299* 322* compute 000345 automatic bit(1) initial packed unaligned dcl 50 set ref 50* 120* 161 198 246 279 295 317 crank_cant_run 000400 stack reference condition dcl 78 ref 150 cu_$arg_ptr 000012 constant entry external dcl 92 ref 121 138 current_size 36 based fixed bin(17,0) level 2 in structure "sat" dcl 3-32 in procedure "compute_bill" ref 185 current_size 36 based fixed bin(17,0) level 2 in structure "pdt" dcl 5-27 in procedure "compute_bill" ref 203 cutoff 56 based fixed bin(71,0) array level 3 dcl 8-5 set ref 307* date_reqfile_copied 354 based fixed bin(71,0) level 2 dcl 5-27 set ref 217* dir_disk_use 105 based fixed bin(35,0) array level 3 dcl 7-6 set ref 327* disk_price based float bin(27) array level 2 in structure "pdp" dcl 79 in procedure "compute_bill" set ref 199* 255 disk_price 000421 automatic float bin(27) array level 2 in structure "prices" dcl 86 in procedure "compute_bill" set ref 172* 199 257 disk_psec 100 based fixed bin(71,0) array level 3 dcl 7-6 set ref 255 257 328* disk_quota 102 based fixed bin(35,0) array level 3 dcl 7-6 set ref 327* disk_use 104 based fixed bin(35,0) array level 3 dcl 7-6 set ref 327* dn 000100 automatic char(168) dcl 50 set ref 127* 132* dollar_charge 75 based float bin(27) level 2 dcl 5-58 ref 205 dum 000334 automatic float bin(27) array dcl 50 set ref 172* 172* 172* 172* ec 000321 automatic fixed bin(17,0) dcl 50 set ref 121* 123 124* 127* 128 129* 132* 134* 138* 139 140* 141 145* 154* 163* 167* 170* 171 190* 192* 239* 242* 278* 281* 282* 284* en 000152 automatic char(32) dcl 50 set ref 127* 132* 134* 143* 145* 149* 153* 154* 162* 163* 166* expand_pathname_ 000014 constant entry external dcl 92 ref 127 get_wdir_ 000024 constant entry external dcl 92 ref 144 hbound builtin function dcl 77 ref 169 hcs_$initiate 000034 constant entry external dcl 92 ref 132 145 154 163 190 hcs_$make_seg 000032 constant entry external dcl 92 ref 167 hcs_$terminate_noname 000030 constant entry external dcl 92 ref 239 242 278 281 282 284 id 10 based char(12) array level 3 packed packed unaligned dcl 7-6 set ref 314 323* inv 30 based char(32) array level 3 packed packed unaligned dcl 7-6 set ref 324* inv_addr 40 based char(32) array level 3 packed packed unaligned dcl 7-6 set ref 324* ioa_ 000010 constant entry external dcl 92 ref 149 266 299 322 j 000330 automatic fixed bin(17,0) dcl 50 set ref 261* 262 263* mamt 15 based float bin(27) array level 3 dcl 9-3 ref 263 misc_charges 106 based float bin(27) array level 3 dcl 7-6 set ref 266 266* 326* misc_ents based fixed bin(17,0) level 2 dcl 9-3 ref 261 misc_file based structure level 1 dcl 9-3 miscfilep 000370 automatic pointer dcl 50 set ref 163* 164 261 262 263 281* misctab 10 based structure array level 2 dcl 9-3 mitacct 13 based char(12) array level 3 packed packed unaligned dcl 8-5 set ref 212 272 304* mproj 12 based char(12) array level 3 dcl 9-3 ref 262 n_misc 107 based fixed bin(17,0) array level 3 dcl 7-6 set ref 259 331* nacts based fixed bin(17,0) level 2 dcl 8-5 set ref 147 280* nproj 000374 automatic fixed bin(17,0) dcl 50 in procedure "compute_bill" set ref 156* 157 276 314 316 321* nproj based fixed bin(35,0) level 2 in structure "projfile" dcl 7-6 in procedure "compute_bill" set ref 156 276* nreq 000375 automatic fixed bin(17,0) dcl 50 set ref 147* 148 176 247 280 292 294 300* 301 null builtin function dcl 77 ref 133 146 155 164 168 191 off 76 based fixed bin(71,0) array level 3 dcl 7-6 set ref 329* on 74 based fixed bin(71,0) array level 3 dcl 7-6 set ref 330* pdp based structure array level 1 unaligned dcl 79 pdp_ptr 000406 automatic pointer dcl 83 set ref 167* 168 199 200 255 255 282* pdt based structure level 1 dcl 5-27 pdtdir 000162 automatic char(168) dcl 50 set ref 140* 190* pdtename 000306 automatic char(32) dcl 50 set ref 189* 190* 192* pdtep 000364 automatic pointer dcl 50 set ref 204* 205 205 pdti 000326 automatic fixed bin(17,0) dcl 50 set ref 203* 204* pdtp 000362 automatic pointer dcl 50 set ref 190* 191 203 204 217 219 221 222 224 226 227 229 231 232 234 239* pp 000366 automatic pointer dcl 50 set ref 154* 155 156 221 222 255 257 259 266 266 276 278* 314 323 324 324 324 324 324 324 326 327 327 327 328 329 330 331 price_set 1 based bit(1) array level 2 packed packed unaligned dcl 79 set ref 200* 255 prices 000421 automatic structure array level 1 unaligned dcl 86 set ref 169 171* 171 procssd 23 based fixed bin(17,0) array level 3 dcl 8-5 set ref 178* proj_notfound 000333 automatic bit(1) packed unaligned dcl 50 set ref 219 315* 318* proj_usage 000376 automatic float bin(63) dcl 50 set ref 201* 205* 205 212 250* 255* 255 257* 257 269* 269 272 project 722 based structure array level 2 in structure "sat" dcl 3-32 in procedure "compute_bill" set ref 186 project based structure level 1 dcl 3-53 in procedure "compute_bill" project_id 1 based char(12) level 2 packed packed unaligned dcl 3-53 set ref 189 216 292 299* 303 projentry 72 based bit(2376) level 2 dcl 5-27 set ref 222* projfile based structure level 1 dcl 7-6 projfile_version 71 based fixed bin(17,0) level 2 dcl 5-27 set ref 219* 221* projfiletab 10 based structure array level 2 dcl 7-6 set ref 222 proji 000327 automatic fixed bin(17,0) dcl 50 set ref 222 255 257 259 266 266 314* 314* 316 321 323 324 324 324 324 324 324 326 327 327 327 328 329 330 331 qdf 26 based fixed bin(71,0) array level 3 dcl 8-5 set ref 308* qdn 24 based fixed bin(71,0) array level 3 dcl 8-5 set ref 309* qp 000372 automatic pointer dcl 50 set ref 145* 146 147 177 178 212 212 212 226 227 248 249 272 272 272 280 284* 292 303 304 304 304 304 306 306 306 307 308 309 reg_price 1 000421 automatic float bin(27) array level 2 dcl 86 set ref 172* 205 req_amt 54 based float bin(63) array level 3 dcl 8-5 set ref 306* req_notfound 000332 automatic bit(1) packed unaligned dcl 50 set ref 224 293* 296* reqentry 202 based bit(1440) level 2 dcl 5-27 set ref 227* reqfile based structure level 1 dcl 8-5 reqfile_version 201 based fixed bin(17,0) level 2 dcl 5-27 set ref 224* 226* reqfiletab 10 based structure array level 2 dcl 8-5 set ref 227 reqi 000331 automatic fixed bin(17,0) dcl 50 set ref 176* 177 178* 199 200 212 212 212 227 247* 248 249 255 255 272 272 272* 292* 292* 294 300 301* 303 304 304 304 304 306 306 306 307 308 309 reqno 16 based char(12) array level 3 packed packed unaligned dcl 8-5 set ref 304* rs_name 000411 automatic char(32) packed unaligned dcl 85 set ref 170* rs_number 356 based fixed bin(9,0) level 2 in structure "pdt" packed packed unsigned unaligned dcl 5-27 in procedure "compute_bill" set ref 234* rs_number 000410 automatic fixed bin(17,0) dcl 84 in procedure "compute_bill" set ref 169* 170* 171 172* 172 172* rs_number 115(18) based fixed bin(9,0) level 2 in structure "project" packed packed unsigned unaligned dcl 3-53 in procedure "compute_bill" ref 199 205 234 rtrim builtin function dcl 77 ref 189 sat based structure level 1 dcl 3-32 sat_version 263 based fixed bin(17,0) level 2 dcl 5-27 set ref 229* 231* satentry 264 based bit(1872) level 2 dcl 5-27 set ref 232* satep 000360 automatic pointer dcl 50 set ref 186* 187 187 189 199 205 216 232 234 292 299 303 sati 000325 automatic fixed bin(17,0) dcl 50 set ref 185* 186* satp 000356 automatic pointer dcl 50 set ref 132* 133 185 186 229 231 242* satstuff based bit(1872) dcl 50 ref 232 state based fixed bin(17,0) level 2 in structure "user" dcl 5-58 in procedure "compute_bill" ref 205 state based fixed bin(17,0) level 2 in structure "project" dcl 3-53 in procedure "compute_bill" ref 187 187 sup 50 based char(32) array level 3 packed packed unaligned dcl 7-6 set ref 324* sup_addr 60 based char(32) array level 3 packed packed unaligned dcl 7-6 set ref 324* sup_phone 70 based char(16) array level 3 packed packed unaligned dcl 7-6 set ref 324* system_info_$prices_rs 000022 constant entry external dcl 92 ref 172 system_info_$rs_name 000020 constant entry external dcl 92 ref 170 title 13 based char(52) array level 3 packed packed unaligned dcl 7-6 set ref 324* u1 000344 automatic float bin(27) dcl 50 set ref 260* 263* 263 266 266* 269 unspec builtin function dcl 77 ref 222 227 uproj 000316 automatic char(12) dcl 50 set ref 216* 249* 262 266* 314 322* 323 user 400 based structure array level 2 in structure "pdt" dcl 5-27 in procedure "compute_bill" set ref 204 user based structure level 1 dcl 5-58 in procedure "compute_bill" user_attributes based structure level 1 dcl 1-21 version 37 based fixed bin(17,0) level 2 in structure "sat" dcl 3-32 in procedure "compute_bill" ref 229 231 version 1 based fixed bin(17,0) level 2 in structure "projfile" dcl 7-6 in procedure "compute_bill" ref 221 version 1 based fixed bin(17,0) level 2 in structure "reqfile" dcl 8-5 in procedure "compute_bill" ref 226 wdir 000234 automatic char(168) dcl 50 set ref 144* 145* 154* 163* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ABS_ATTRIBUTE_NAMES internal static varying char(28) initial array dcl 2-38 ALT_USER_ATTRIBUTE_NAMES internal static char(20) initial array packed unaligned dcl 1-77 PDT_entry_lth internal static fixed bin(17,0) initial dcl 5-19 PDT_header_lth internal static fixed bin(17,0) initial dcl 5-19 PDT_person_id_length internal static fixed bin(17,0) initial dcl 5-19 PDT_project_name_length internal static fixed bin(17,0) initial dcl 5-19 PDT_version internal static fixed bin(17,0) initial dcl 5-19 PROJFILE_VERSION internal static fixed bin(17,0) initial dcl 7-33 REQFILE_VERSION internal static fixed bin(17,0) initial dcl 8-28 SAT_entry_lth internal static fixed bin(17,0) initial dcl 3-24 SAT_header_lth internal static fixed bin(17,0) initial dcl 3-24 SAT_project_name_length internal static fixed bin(17,0) initial dcl 3-24 USER_ATTRIBUTES_always_allowed internal static bit(36) initial dcl 1-100 USER_ATTRIBUTES_default_in_pdt internal static bit(36) initial dcl 1-104 USER_ATTRIBUTES_settable_by_user internal static bit(36) initial dcl 1-108 USER_ATTRIBUTE_NAMES internal static char(20) initial array packed unaligned dcl 1-50 lope internal static fixed bin(17,0) initial dcl 7-30 loph internal static fixed bin(17,0) initial dcl 7-30 loqe internal static fixed bin(17,0) initial dcl 8-25 loqh internal static fixed bin(17,0) initial dcl 8-25 user_abs_attributes based structure level 1 dcl 2-25 NAMES DECLARED BY EXPLICIT CONTEXT. ABORT 000554 constant label dcl 149 ref 158 ER1 000225 constant label dcl 124 ref 139 ER2 000301 constant label dcl 129 ref 141 ERR 000376 constant label dcl 134 ref 146 155 164 168 SKIP_PROJ 001456 constant label dcl 240 ref 187 193 SKIP_REQ 001700 constant label dcl 274 ref 248 START 000204 constant label dcl 121 ref 115 compute_bill 000157 constant entry external dcl 24 findproj 002106 constant entry internal dcl 313 ref 218 251 findreq 001755 constant entry internal dcl 290 ref 196 update_pdts_from_reqfile 000172 constant entry external dcl 117 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2422 2460 2246 2432 Length 3042 2246 36 345 153 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME compute_bill 446 external procedure is an external procedure. findreq internal procedure shares stack frame of external procedure compute_bill. findproj internal procedure shares stack frame of external procedure compute_bill. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME compute_bill 000100 dn compute_bill 000152 en compute_bill 000162 pdtdir compute_bill 000234 wdir compute_bill 000306 pdtename compute_bill 000316 uproj compute_bill 000321 ec compute_bill 000322 ap compute_bill 000324 al compute_bill 000325 sati compute_bill 000326 pdti compute_bill 000327 proji compute_bill 000330 j compute_bill 000331 reqi compute_bill 000332 req_notfound compute_bill 000333 proj_notfound compute_bill 000334 dum compute_bill 000344 u1 compute_bill 000345 compute compute_bill 000346 command_name compute_bill 000356 satp compute_bill 000360 satep compute_bill 000362 pdtp compute_bill 000364 pdtep compute_bill 000366 pp compute_bill 000370 miscfilep compute_bill 000372 qp compute_bill 000374 nproj compute_bill 000375 nreq compute_bill 000376 proj_usage compute_bill 000406 pdp_ptr compute_bill 000410 rs_number compute_bill 000411 rs_name compute_bill 000421 prices compute_bill THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out return_mac signal_op shorten_stack ext_entry clock_mac THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_ com_err_ cu_$arg_ptr expand_pathname_ get_wdir_ hcs_$initiate hcs_$make_seg hcs_$terminate_noname ioa_ system_info_$prices_rs system_info_$rs_name NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 50 000152 24 000156 114 000165 115 000170 117 000171 119 000200 120 000203 121 000204 123 000223 124 000225 125 000246 127 000247 128 000277 129 000301 130 000325 132 000326 133 000372 134 000376 135 000417 138 000420 139 000437 140 000441 141 000465 143 000467 144 000472 145 000501 146 000545 147 000551 148 000553 149 000554 150 000600 153 000603 154 000606 155 000652 156 000656 157 000660 158 000661 161 000662 162 000664 163 000667 164 000733 166 000737 167 000742 168 001005 169 001011 170 001015 171 001035 172 001047 174 001071 176 001073 177 001103 178 001107 179 001111 185 001113 186 001123 187 001127 189 001133 190 001161 191 001226 192 001232 193 001261 196 001262 198 001263 199 001265 200 001300 201 001302 203 001304 204 001315 205 001320 207 001334 212 001336 214 001352 216 001353 217 001361 218 001364 219 001365 221 001372 222 001376 224 001404 226 001411 227 001415 229 001423 231 001433 232 001435 234 001441 239 001445 240 001456 242 001460 246 001471 247 001473 248 001503 249 001512 250 001520 251 001522 255 001523 257 001545 259 001556 260 001562 261 001564 262 001573 263 001603 265 001610 266 001612 269 001660 272 001663 274 001700 276 001702 278 001704 279 001715 280 001717 281 001721 282 001732 284 001743 334 001754 290 001755 292 001756 292 001775 293 001777 294 002000 295 002004 296 002006 297 002010 299 002011 300 002036 301 002040 303 002041 304 002053 306 002073 307 002077 308 002101 309 002102 311 002105 313 002106 314 002107 314 002126 315 002130 316 002131 317 002135 318 002137 319 002141 321 002142 322 002144 323 002170 324 002201 326 002231 327 002233 328 002236 329 002240 330 002241 331 002244 333 002245 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved