COMPILATION LISTING OF SEGMENT cobol_get_num_code Compiled by: Multics PL/I Compiler, Release 31b, of April 24, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 05/24/89 0950.2 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1989 * 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 /****^ HISTORY COMMENTS: 16* 1) change(89-04-23,Zimmerman), approve(89-04-23,MCR8060), 17* audit(89-05-05,RWaters), install(89-05-24,MR12.3-1048): 18* MCR8060 cobol_get_num_code.pl1 Reformatted code to new Cobol standard. 19* END HISTORY COMMENTS */ 20 21 22 /*{*/ 23 /* format: style3 */ 24 cobol_get_num_code: 25 proc (token_ptr, token_typecode); 26 27 /* 28*This procedure maps a data name tokne for a numeric data 29*item into a code, according to the following table: 30* 31*numeric data type | type code (returned) 32*--------------------------------------------- 33*unpacked decimal | 1 34*packed decimal | 2 35*short binary | 3 36*long binary | 4 37*overpunch decimal | 5 38*--------------------------------------------- 39* 40**/ 41 42 /* DECLARATION OF THE PARAMETERS */ 43 44 dcl token_ptr ptr; 45 dcl token_typecode fixed bin; 46 47 /* DESCRIPTION OF THE PARAMETERS */ 48 49 /* 50*PARAMETER DESCRIPTION 51*token_ptr Pointer to the numeric data name token 52* which is to be mapped into a type code.(input) 53*token_typecode Variable in which the typecode is 54* returned. (output) The output value 55* is described above. 56**/ 57 /*}*/ 58 59 60 /* DECLARATIONS OF INTERNAL VARIABLES */ 61 62 dcl dn_ptr ptr; /* referenced in type9 include file, but not declared there!!! */ 63 64 start: 65 if token_ptr -> data_name.sign_separate 66 | (token_ptr -> data_name.numeric & token_ptr -> data_name.display 67 & token_ptr -> data_name.sign_type = "000"b /* not specified */ 68 & token_ptr -> data_name.item_signed = "0"b) /* Probably an unsigned, pooled constant */ 69 then token_typecode = 1; /* unpacked decimal */ 70 71 else if token_ptr -> data_name.ascii_packed_dec 72 then token_typecode = 2; 73 74 else if token_ptr -> data_name.bin_18 75 then token_typecode = 3; 76 77 else if token_ptr -> data_name.bin_36 78 then token_typecode = 4; 79 80 else token_typecode = 5; /* MUST BE OVERPUNCH!! */ 81 82 83 /* INCLUDE FILES USED BY THIS PROCEDURE */ 84 85 86 /***** Declaration for builtin function *****/ 87 88 dcl (substr, mod, binary, fixed, addr, addrel, rel, length, string, unspec, null, index) 89 builtin; 90 91 /***** End of declaration for builtin function *****/ 92 1 1 1 2 /* BEGIN INCLUDE FILE ... cobol_type9.incl.pl1 */ 1 3 /* Last modified on 11/19/76 by ORN */ 1 4 1 5 /* 1 6*A type 9 data name token is entered into the name table by the data 1 7*division syntax phase for each data name described in the data division. 1 8*The replacement phase subsequently replaces type 8 user word references 1 9*to data names in the procedure division minpral file with the corresponding 1 10*type 9 tokens from the name table. 1 11**/ 1 12 1 13 /* dcl dn_ptr ptr; */ 1 14 1 15 /* BEGIN DECLARATION OF TYPE9 (DATA NAME) TOKEN */ 1 16 dcl 1 data_name based (dn_ptr), 2 1 2 2 /* begin include file ... cobol_TYPE9.incl.pl1 */ 2 3 /* Last modified on 06/19/77 by ORN */ 2 4 /* Last modified on 12/28/76 by FCH */ 2 5 2 6 /* header */ 2 7 2 size fixed bin, 2 8 2 line fixed bin, 2 9 2 column fixed bin, 2 10 2 type fixed bin, 2 11 /* body */ 2 12 2 string_ptr ptr, 2 13 2 prev_rec ptr, 2 14 2 searched bit (1), 2 15 2 duplicate bit (1), 2 16 2 saved bit (1), 2 17 2 debug_ind bit (1), 2 18 2 filler2 bit (3), 2 19 2 used_as_sub bit (1), 2 20 2 def_line fixed bin, 2 21 2 level fixed bin, 2 22 2 linkage fixed bin, 2 23 2 file_num fixed bin, 2 24 2 size_rtn fixed bin, 2 25 2 item_length fixed bin(24), 2 26 2 places_left fixed bin, 2 27 2 places_right fixed bin, 2 28 /* description */ 2 29 2 file_section bit (1), 2 30 2 working_storage bit (1), 2 31 2 constant_section bit (1), 2 32 2 linkage_section bit (1), 2 33 2 communication_section bit (1), 2 34 2 report_section bit (1), 2 35 2 level_77 bit (1), 2 36 2 level_01 bit (1), 2 37 2 non_elementary bit (1), 2 38 2 elementary bit (1), 2 39 2 filler_item bit (1), 2 40 2 s_of_rdf bit (1), 2 41 2 o_of_rdf bit (1), 2 42 2 bin_18 bit (1), 2 43 2 bin_36 bit (1), 2 44 2 pic_has_l bit (1), 2 45 2 pic_is_do bit (1), 2 46 2 numeric bit (1), 2 47 2 numeric_edited bit (1), 2 48 2 alphanum bit (1), 2 49 2 alphanum_edited bit (1), 2 50 2 alphabetic bit (1), 2 51 2 alphabetic_edited bit (1), 2 52 2 pic_has_p bit (1), 2 53 2 pic_has_ast bit (1), 2 54 2 item_signed bit(1), 2 55 2 sign_separate bit (1), 2 56 2 display bit (1), 2 57 2 comp bit (1), 2 58 2 ascii_packed_dec_h bit (1), /* as of 8/16/76 this field used for comp8. */ 2 59 2 ascii_packed_dec bit (1), 2 60 2 ebcdic_packed_dec bit (1), 2 61 2 bin_16 bit (1), 2 62 2 bin_32 bit (1), 2 63 2 usage_index bit (1), 2 64 2 just_right bit (1), 2 65 2 compare_argument bit (1), 2 66 2 sync bit (1), 2 67 2 temporary bit (1), 2 68 2 bwz bit (1), 2 69 2 variable_length bit (1), 2 70 2 subscripted bit (1), 2 71 2 occurs_do bit (1), 2 72 2 key_a bit (1), 2 73 2 key_d bit (1), 2 74 2 indexed_by bit (1), 2 75 2 value_numeric bit (1), 2 76 2 value_non_numeric bit (1), 2 77 2 value_signed bit (1), 2 78 2 sign_type bit (3), 2 79 2 pic_integer bit (1), 2 80 2 ast_when_zero bit (1), 2 81 2 label_record bit (1), 2 82 2 sign_clause_occurred bit (1), 2 83 2 okey_dn bit (1), 2 84 2 subject_of_keyis bit (1), 2 85 2 exp_redefining bit (1), 2 86 2 sync_in_rec bit (1), 2 87 2 rounded bit (1), 2 88 2 ad_bit bit (1), 2 89 2 debug_all bit (1), 2 90 2 overlap bit (1), 2 91 2 sum_counter bit (1), 2 92 2 exp_occurs bit (1), 2 93 2 linage_counter bit (1), 2 94 2 rnm_01 bit (1), 2 95 2 aligned bit (1), 2 96 2 not_user_writable bit (1), 2 97 2 database_key bit (1), 2 98 2 database_data_item bit (1), 2 99 2 seg_num fixed bin, 2 100 2 offset fixed bin(24), 2 101 2 initial_ptr fixed bin, 2 102 2 edit_ptr fixed bin, 2 103 2 occurs_ptr fixed bin, 2 104 2 do_rec char(5), 2 105 2 bitt bit (1), 2 106 2 byte bit (1), 2 107 2 half_word bit (1), 2 108 2 word bit (1), 2 109 2 double_word bit (1), 2 110 2 half_byte bit (1), 2 111 2 filler5 bit (1), 2 112 2 bit_offset bit (4), 2 113 2 son_cnt bit (16), 2 114 2 max_red_size fixed bin(24), 2 115 2 name_size fixed bin, 2 116 2 name char(0 refer(data_name.name_size)); 2 117 2 118 2 119 2 120 /* end include file ... cobol_TYPE9.incl.pl1 */ 2 121 1 17 1 18 /* END DECLARATION OF TYPE9 (DATA NAME) TOKEN */ 1 19 1 20 /* END INCLUDE FILE ... cobol_type9.incl.pl1 */ 1 21 93 94 95 96 end cobol_get_num_code; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/24/89 0831.2 cobol_get_num_code.pl1 >spec>install>MR12.3-1048>cobol_get_num_code.pl1 93 1 03/27/82 0439.9 cobol_type9.incl.pl1 >ldd>include>cobol_type9.incl.pl1 1-17 2 11/11/82 1712.7 cobol_TYPE9.incl.pl1 >ldd>include>cobol_TYPE9.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. ascii_packed_dec 21(30) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 71 bin_18 21(13) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 74 bin_36 21(14) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 77 data_name based structure level 1 unaligned dcl 1-16 display 21(27) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 64 item_signed 21(25) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 64 numeric 21(17) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 64 sign_separate 21(26) based bit(1) level 2 packed packed unaligned dcl 1-16 ref 64 sign_type 22(13) based bit(3) level 2 packed packed unaligned dcl 1-16 ref 64 token_ptr parameter pointer dcl 44 ref 24 64 64 64 64 64 71 74 77 token_typecode parameter fixed bin(17,0) dcl 45 set ref 24 64* 71* 74* 77* 80* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 88 addrel builtin function dcl 88 binary builtin function dcl 88 dn_ptr automatic pointer dcl 62 fixed builtin function dcl 88 index builtin function dcl 88 length builtin function dcl 88 mod builtin function dcl 88 null builtin function dcl 88 rel builtin function dcl 88 string builtin function dcl 88 substr builtin function dcl 88 unspec builtin function dcl 88 NAMES DECLARED BY EXPLICIT CONTEXT. cobol_get_num_code 000006 constant entry external dcl 24 start 000013 constant label dcl 64 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 112 122 64 122 Length 320 64 10 162 26 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cobol_get_num_code 64 external procedure is an external procedure. THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac ext_entry NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 24 000002 64 000013 71 000036 74 000044 77 000052 80 000060 96 000062 ----------------------------------------------------------- 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