COMPILATION LISTING OF SEGMENT create_reqfile Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/09/85 1139.1 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 /* create_reqfile.pl1 -- minimal program to invent an empty reqfile. */ 7 /* format: style2 */ 8 /* BIM 1984-08-25 */ 9 create_reqfile: 10 procedure options (variable); 11 12 declare com_err_ entry () options (variable); 13 declare command_query_$yes_no entry () options (variable); 14 declare cu_$arg_count entry (fixed bin, fixed bin (35)); 15 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 16 declare expand_pathname_ entry (character (*), character (*), character (*), fixed binary (35)); 17 declare get_group_id_ entry () returns (char (32)); 18 declare get_wdir_ entry() returns(character (168)); 19 declare initiate_file_$create entry (character (*), character (*), bit (*), pointer, bit (1) aligned, 20 fixed binary (24), fixed binary (35)); 21 declare pathname_ entry (character (*), character (*)) returns (character (168)); 22 declare terminate_file_ entry (pointer, fixed binary (24), bit (*), fixed binary (35)); 23 24 declare error_table_$namedup fixed bin (35) ext static; 25 26 declare arg_count fixed bin; 27 declare ap pointer; 28 declare al fixed bin (21); 29 declare argument char (al) based (ap); 30 declare code fixed bin (35); 31 declare created bit (1) aligned; 32 declare dir_name char (168); 33 declare entryname char (32); 34 declare qp pointer; 35 declare yes_sw bit (1) aligned; 36 37 declare ME char (32) init ("create_reqfile") int static options (constant); 38 1 1 /* Requisition file declaration */ 1 2 /* Modified BIM 1984-07-10 for unaligned strings */ 1 3 /* Modified BIM 1984-09-14 foor 3000 size-array */ 1 4 1 5 dcl 1 reqfile based (qp) aligned, /* MIT accounting data */ 1 6 2 nacts fixed, 1 7 2 version fixed bin, 1 8 2 pad (6) bit (36) aligned, 1 9 2 reqfiletab (3000), /* one entry per Multics account */ 1 10 /* same size as projfile */ 1 11 3 acctid char (12) unal, /* account id. usually same as Proj */ 1 12 3 mitacct char (12) unal, /* MIT account no. */ 1 13 3 reqno char (12) unal, /* requisition or PO no. */ 1 14 3 qflag char (8), /* class & activity */ 1 15 3 procssd fixed bin, /* temp for usage report */ 1 16 3 qdn fixed bin (71), /* date on for account */ 1 17 3 qdf fixed bin (71), /* date off */ 1 18 3 billing_name char (32) unal, /* where to send bill */ 1 19 3 billing_addr char (32) unal, 1 20 3 chg_mo float bin (63), /* charges this month */ 1 21 3 chg_tr float bin (63), /* charges this req */ 1 22 3 req_amt float bin (63), /* req face value */ 1 23 3 cutoff fixed bin (71); /* term date for req */ 1 24 1 25 dcl loqh int static fixed bin (17) init (8), /* length of reqfile head */ 1 26 loqe int static fixed bin (17) init (40); /* lth of reqfile entry */ 1 27 1 28 declare REQFILE_VERSION fixed bin init (2) int static options (constant); 1 29 1 30 /* End include file reqfile.incl.pl1 */ 39 2 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 2 2* 2 3* Values for the "access mode" argument so often used in hardcore 2 4* James R. Davis 26 Jan 81 MCR 4844 2 5* Added constants for SM access 4/28/82 Jay Pattin 2 6* Added text strings 03/19/85 Chris Jones 2 7**/ 2 8 2 9 2 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 2 11 dcl ( 2 12 N_ACCESS init ("000"b), 2 13 R_ACCESS init ("100"b), 2 14 E_ACCESS init ("010"b), 2 15 W_ACCESS init ("001"b), 2 16 RE_ACCESS init ("110"b), 2 17 REW_ACCESS init ("111"b), 2 18 RW_ACCESS init ("101"b), 2 19 S_ACCESS init ("100"b), 2 20 M_ACCESS init ("010"b), 2 21 A_ACCESS init ("001"b), 2 22 SA_ACCESS init ("101"b), 2 23 SM_ACCESS init ("110"b), 2 24 SMA_ACCESS init ("111"b) 2 25 ) bit (3) internal static options (constant); 2 26 2 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 2 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 2 29 2 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 2 31 static options (constant); 2 32 2 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 2 34 static options (constant); 2 35 2 36 dcl ( 2 37 N_ACCESS_BIN init (00000b), 2 38 R_ACCESS_BIN init (01000b), 2 39 E_ACCESS_BIN init (00100b), 2 40 W_ACCESS_BIN init (00010b), 2 41 RW_ACCESS_BIN init (01010b), 2 42 RE_ACCESS_BIN init (01100b), 2 43 REW_ACCESS_BIN init (01110b), 2 44 S_ACCESS_BIN init (01000b), 2 45 M_ACCESS_BIN init (00010b), 2 46 A_ACCESS_BIN init (00001b), 2 47 SA_ACCESS_BIN init (01001b), 2 48 SM_ACCESS_BIN init (01010b), 2 49 SMA_ACCESS_BIN init (01011b) 2 50 ) fixed bin (5) internal static options (constant); 2 51 2 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 40 3 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 3 2 /* format: style2,^inddcls,idind32 */ 3 3 3 4 declare 1 terminate_file_switches based, 3 5 2 truncate bit (1) unaligned, 3 6 2 set_bc bit (1) unaligned, 3 7 2 terminate bit (1) unaligned, 3 8 2 force_write bit (1) unaligned, 3 9 2 delete bit (1) unaligned; 3 10 3 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 3 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 3 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 3 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 3 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 3 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 3 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 3 18 3 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 41 42 43 44 call cu_$arg_count (arg_count, code); 45 if code ^= 0 46 then do; 47 call com_err_ (code, ME); 48 return; 49 end; 50 51 if arg_count ^= 1 52 then do; 53 call com_err_ (0, ME, "Usage: ^a NEW_REQFILE_PN", ME); 54 return; 55 end; 56 57 qp = null (); 58 59 call cu_$arg_ptr (1, ap, al, (0)); 60 call expand_pathname_ (argument, dir_name, entryname, code); 61 if code ^= 0 62 then do; 63 call com_err_ (code, ME, "^a", argument); 64 return; 65 end; 66 67 call initiate_file_$create (dir_name, entryname, RW_ACCESS, qp, created, (0), code); 68 if code ^= 0 69 then do; 70 call com_err_ (code, ME, "^a", pathname_ (dir_name, entryname)); 71 return; 72 end; 73 74 if ^created 75 then do; 76 call command_query_$yes_no (yes_sw, error_table_$namedup, ME, 77 "The create_reqfile command will discard all information in an existing reqfile.^/ Answer ""no"" unless you are sure that you want to discard the information in this segment." 78 , "reqfile ""^a"" already exists. Do you wish to overwrite it.?", pathname_ (dir_name, entryname)); 79 if ^yes_sw 80 then do; 81 call terminate_file_ (qp, (0), TERM_FILE_TERM, (0)); 82 return; 83 end; 84 end; 85 86 reqfile.nacts = 0; 87 reqfile.pad = ""b; 88 reqfile.reqfiletab (*).acctid = ""; 89 reqfile.reqfiletab (*).reqno = ""; 90 reqfile.reqfiletab (*).mitacct = ""; 91 reqfile.reqfiletab (*).qflag = ""; 92 reqfile.version = REQFILE_VERSION; 93 call terminate_file_ (qp, 0, TERM_FILE_TERM, (0)); 94 return; 95 end create_reqfile; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/08/85 1133.4 create_reqfile.pl1 >spec>on>41-15>create_reqfile.pl1 39 1 09/20/84 0925.7 reqfile.incl.pl1 >ldd>include>reqfile.incl.pl1 40 2 04/09/85 1109.7 access_mode_values.incl.pl1 >spec>on>41-15>access_mode_values.incl.pl1 41 3 04/06/83 1239.4 terminate_file.incl.pl1 >ldd>include>terminate_file.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. ME 000002 constant char(32) initial unaligned dcl 37 set ref 47* 53* 53* 63* 70* 76* REQFILE_VERSION constant fixed bin(17,0) initial dcl 1-28 ref 92 RW_ACCESS 000001 constant bit(3) initial unaligned dcl 2-11 set ref 67* TERM_FILE_TERM 000000 constant bit(3) initial unaligned dcl 3-14 set ref 81* 93* acctid 10 based char(12) array level 3 packed unaligned dcl 1-5 set ref 88* al 000104 automatic fixed bin(21,0) dcl 28 set ref 59* 60 60 63 63 ap 000102 automatic pointer dcl 27 set ref 59* 60 63 arg_count 000100 automatic fixed bin(17,0) dcl 26 set ref 44* 51 argument based char unaligned dcl 29 set ref 60* 63* code 000105 automatic fixed bin(35,0) dcl 30 set ref 44* 45 47* 60* 61 63* 67* 68 70* com_err_ 000010 constant entry external dcl 12 ref 47 53 63 70 command_query_$yes_no 000012 constant entry external dcl 13 ref 76 created 000106 automatic bit(1) dcl 31 set ref 67* 74 cu_$arg_count 000014 constant entry external dcl 14 ref 44 cu_$arg_ptr 000016 constant entry external dcl 15 ref 59 dir_name 000107 automatic char(168) unaligned dcl 32 set ref 60* 67* 70* 70* 76* 76* entryname 000161 automatic char(32) unaligned dcl 33 set ref 60* 67* 70* 70* 76* 76* error_table_$namedup 000030 external static fixed bin(35,0) dcl 24 set ref 76* expand_pathname_ 000020 constant entry external dcl 16 ref 60 initiate_file_$create 000022 constant entry external dcl 19 ref 67 mitacct 13 based char(12) array level 3 packed unaligned dcl 1-5 set ref 90* nacts based fixed bin(17,0) level 2 dcl 1-5 set ref 86* pad 2 based bit(36) array level 2 dcl 1-5 set ref 87* pathname_ 000024 constant entry external dcl 21 ref 70 70 76 76 qflag 21 based char(8) array level 3 dcl 1-5 set ref 91* qp 000172 automatic pointer dcl 34 set ref 57* 67* 81* 86 87 88 89 90 91 92 93* reqfile based structure level 1 dcl 1-5 reqfiletab 10 based structure array level 2 dcl 1-5 reqno 16 based char(12) array level 3 packed unaligned dcl 1-5 set ref 89* terminate_file_ 000026 constant entry external dcl 22 ref 81 93 version 1 based fixed bin(17,0) level 2 dcl 1-5 set ref 92* yes_sw 000174 automatic bit(1) dcl 35 set ref 76* 79 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial unaligned dcl 2-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 2-33 E_ACCESS internal static bit(3) initial unaligned dcl 2-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 M_ACCESS internal static bit(3) initial unaligned dcl 2-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 N_ACCESS internal static bit(3) initial unaligned dcl 2-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 REW_ACCESS internal static bit(3) initial unaligned dcl 2-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 RE_ACCESS internal static bit(3) initial unaligned dcl 2-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 R_ACCESS internal static bit(3) initial unaligned dcl 2-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SA_ACCESS internal static bit(3) initial unaligned dcl 2-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 2-30 SMA_ACCESS internal static bit(3) initial unaligned dcl 2-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SM_ACCESS internal static bit(3) initial unaligned dcl 2-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 S_ACCESS internal static bit(3) initial unaligned dcl 2-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 TERM_FILE_BC internal static bit(2) initial unaligned dcl 3-12 TERM_FILE_DELETE internal static bit(5) initial unaligned dcl 3-17 TERM_FILE_FORCE_WRITE internal static bit(4) initial unaligned dcl 3-16 TERM_FILE_TRUNC internal static bit(1) initial unaligned dcl 3-11 TERM_FILE_TRUNC_BC internal static bit(2) initial unaligned dcl 3-13 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial unaligned dcl 3-15 W_ACCESS internal static bit(3) initial unaligned dcl 2-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 get_group_id_ 000000 constant entry external dcl 17 get_wdir_ 000000 constant entry external dcl 18 loqe internal static fixed bin(17,0) initial dcl 1-25 loqh internal static fixed bin(17,0) initial dcl 1-25 terminate_file_switches based structure level 1 packed unaligned dcl 3-4 NAME DECLARED BY EXPLICIT CONTEXT. create_reqfile 000135 constant entry external dcl 9 NAME DECLARED BY CONTEXT OR IMPLICATION. null builtin function ref 57 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1060 1112 731 1070 Length 1344 731 32 215 127 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME create_reqfile 277 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME create_reqfile 000100 arg_count create_reqfile 000102 ap create_reqfile 000104 al create_reqfile 000105 code create_reqfile 000106 created create_reqfile 000107 dir_name create_reqfile 000161 entryname create_reqfile 000172 qp create_reqfile 000174 yes_sw create_reqfile THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ command_query_$yes_no cu_$arg_count cu_$arg_ptr expand_pathname_ initiate_file_$create pathname_ terminate_file_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$namedup LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000134 44 000142 45 000152 47 000154 48 000171 51 000172 53 000175 54 000230 57 000231 59 000233 60 000253 61 000303 63 000305 64 000337 67 000340 68 000402 70 000404 71 000453 74 000454 76 000457 79 000542 81 000545 82 000574 86 000575 87 000576 88 000607 89 000625 90 000643 91 000661 92 000677 93 000701 94 000730 ----------------------------------------------------------- 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