1 
 2 /* BEGIN INCLUDE FILE ...   cobol_eln_put.incl.pl1 */
 3 /* * * *  elnm_put - This include file is the put routine for the multics external line number table * * * */
 4 /*        1) Set elnp_sw = "1"b first time in.  */
 5 /*        2) Takes table index from c_l_n.  */
 6 /*        3) Creates the external file number and line number.  */
 7 
 8 
 9 dcl (code, last_line, c_x_l, copy_fileno, cur_fileno, save_c_x_l) fixed bin (17) static;
10 dcl 1 source1 based (  cobol_current),
11     2 fwd_link ptr,
12     2 back_link ptr,
13     2 rep_link ptr,
14     2 l_info bit (8),
15     2 size fixed bin (17),
16 /*[*/    2 fill1 fixed bin(17), /*]*/
17     2 fill char (1),
18     2 sm bit (1),
19     2 copy bit (1),
20     2 sln bit (22),
21     2 type fixed bin (17);
22 
23 
24           if   cobol_elnp_sw = "1"b then
25                do;
26                  cobol_elnp_sw = "0"b;
27                last_line = 0;
28                copy_fileno = 0;
29                save_c_x_l = 0;
30                c_x_l = 0;
31           end;
32           if source1.copy = "1"b then
33                do;
34                if last_line = 1 then
35                     do;
36                     last_line = 0;
37                     save_c_x_l = c_x_l - 1;
38                     c_x_l = 0;
39                     copy_fileno = copy_fileno + 1;
40                     cur_fileno = copy_fileno;
41                end;
42                if substr(source1.l_info, 1, 1) = "1"b then c_x_l = c_x_l - 1;
43           end;
44           else do;
45                if last_line = 0 then
46                     do;
47                     last_line = 1;
48                     cur_fileno = 0;
49                     c_x_l = save_c_x_l;
50                end;
51           end;
52           eln_tab.fno (  cobol_c_l_n) = cur_fileno;
53           c_x_l = c_x_l + 1;
54           eln_tab.lno (  cobol_c_l_n) = c_x_l;
55           statement_info.start(  cobol_c_l_n) = statement_start;
56           statement_info.length(  cobol_c_l_n) =   cobol_cards.column - 1;      /* Do not include new_line_char. */
57           statement_start = statement_start +   cobol_cards.column +   cobol_cards.tblanks;
58 
59 /* * * *  end  elnm_put  * * * */
60 /* END INCLUDE FILE ...   cobol_eln_put.incl.pl1 */
61