1 
  2 /* STATIC DATA */
  3 
  4 dcl pr5_struct_ptr ptr static;
  5 
  6 dcl 1 iocb_arg static,
  7      2 pt ptr init(null()),   /* initialized to address of basic structure */
  8      2 zeros bit(144) init(""b);
  9 dcl 1 temp_arg static,
 10      2 pt ptr init(null()),   /* always null */
 11      2 type fixed bin init(3),
 12      2 zeros bit(108) init(""b);
 13 dcl 1 dl_arg static,
 14      2 pt ptr init(null()),   /* always null */
 15      2 type fixed bin init(1),
 16      2 zeros bit(108) init(""b);
 17 dcl 1 status_arg static,
 18      2 pt ptr init(null()),   /* always null */
 19      2 type fixed bin init(3),
 20      2 off1 fixed bin init(40),
 21      2 zeros bit(72) init(""b);
 22 dcl 1 buff_arg static,
 23      2 pt ptr init(null()),   /* set to pt to type 9 token for buffer */
 24      2 type fixed bin init(5),
 25      2 off1 fixed bin init(0),  /* not meaningful */
 26      2 off2 fixed bin init(42),  /* allocate ptr at sp|42 */
 27      2 bits bit(36) init("0000000000000000001000"b);  /* indirect */
 28 dcl 1 fsb_arg static,
 29      2 pt ptr init(null()),   /* always null */
 30      2 type fixed bin init(3),
 31      2 off1 fixed bin,        /* set each time to wd offset in fsb */
 32      2 off2 fixed bin init(0),  /* not used */
 33      2 bits bit(36) init("0000000000000000000001001"b);     /* pr1 */
 34 
 35 dcl 1 pr5_struct static,
 36      2 pr5 fixed bin init(5),
 37      2 pointer_no bit(3),
 38      2 lock fixed bin init(0),
 39      2 switch fixed bin init(0),
 40      2 segno fixed bin init(0),
 41      2 offset fixed bin init(0),
 42      2 reset fixed bin;
 43 dcl 1 x1_struct static,
 44      2 x1 fixed bin init(11),
 45      2 reg_no bit(4),
 46      2 lock fixed bin init(0),
 47      2 already_there fixed bin,
 48      2 contains fixed bin init(0),
 49      2 null_ptr ptr init(null()),
 50      2 fill bit(18) unaligned init((18)"0"b),
 51      2 literal bit(18) unaligned;
 52 dcl 1 aq_struct static,
 53      2 aq fixed bin init(3),
 54      2 reg_no bit(4),
 55      2 lock fixed bin init(0),
 56      2 already_there fixed bin,
 57      2 contains fixed bin init(0),
 58      2 null_ptr ptr init(null()),
 59      2 fill bit(18) unaligned init((18)"0"b),
 60      2 literal bit(18) unaligned;
 61 
 62 dcl 1 iocb_basic_struct static,
 63      2 type fixed bin init(1),
 64      2 operand_no fixed bin init(0),
 65      2 lock fixed bin init(0),
 66      2 seg fixed bin,
 67      2 off fixed bin,
 68      2 send_receive fixed bin init(0);
 69 
 70 dcl 1 mpout static,
 71      2 n fixed bin init(4),
 72      2 pt1 ptr,
 73      2 pt2 ptr,
 74      2 pt3 ptr,
 75      2 pt4 ptr;
 76 dcl file_key_desc char(40) based;
 77 dcl 1 num_type9 static,
 78      2 header (4) fixed bin init(112,0,0,9),
 79      2 repl_ptr (2) ptr init((2)null()),
 80      2 fill1  bit(108) init(""b),
 81      2 file_key_info,
 82           3 fb1 (3) fixed bin init(0,0,0),
 83           3 size fixed bin init(0),
 84           3 places_left fixed bin,
 85           3 places_right fixed bin init(0),
 86           3 flags1 bit(36) init("010000100100000001000000000100000000"b),
 87           3 flags2 bit(36) init(""b),
 88           3 seg fixed bin init(0),
 89           3 off fixed bin,
 90      2 fill2 (7) fixed bin init(0,0,0,0,0,0,0);
 91 dcl 1 alpha_type9 static,
 92      2 header (4) fixed bin init(112,0,0,9),
 93      2 repl_ptr (2) ptr init((2)null()),
 94      2 fill1  bit(108) init(""b),
 95      2 file_key_info,
 96           3 fb1 (3) fixed bin init(0,0,0),
 97           3 size fixed bin init(0),
 98           3 fb2 (2) fixed bin init(0,0),
 99           3 flags1 bit(36) init("010000100100000000010000000100000000"b),
100           3 flags2 bit(36) init(""b),
101           3 seg fixed bin init(0),
102           3 off fixed bin,
103      2 fill2 (7) fixed bin init(0,0,0,0,0,0,0);
104 dcl 1 trans_type9 static,
105      2 header (4) fixed bin init(112,0,0,9),
106      2 repl_ptr (2) ptr init((2)null()),
107      2 fill1  bit(108) init(""b),
108      2 file_key_info,
109           3 fb1 (3) fixed bin init(0,0,0),
110           3 size fixed bin init(0),
111           3 fb2 (2) fixed bin init(0,0),
112           3 flags1 bit(36) init("010000100100000000010000000100000000"b),
113           3 flags2 bit(36) init(""b),
114           3 seg fixed bin init(0),
115           3 off fixed bin,
116      2 fill2 (7) fixed bin init(0,0,0,0,0,0,0);
117 dcl 1 fkey_type9 static,
118      2 header (4) fixed bin init(112,0,0,9),
119      2 repl_ptr (2) ptr init((2)null()),
120      2 fill1  bit(108) init(""b),
121      2 file_key_info,
122           3 fb1 (3) fixed bin init(0,0,0),
123           3 size fixed bin init(0),
124           3 fb2 (2) fixed bin init(0,0),
125           3 flags1 bit(36) init(""b),
126           3 flags2 bit(36) init(""b),
127           3 seg fixed bin,
128           3 off fixed bin,
129      2 fill2 (7) fixed bin init(0,0,0,0,0,0,0);
130 dcl 1 type19 static,
131      2 size fixed bin init(38),
132      2 line fixed bin init(0),
133      2 column fixed bin init(0),
134      2 type fixed bin init(19),
135      2 verb fixed bin init(18),                   /* verb number */
136      2 e fixed bin init(1),
137      2 h fixed bin init(0),
138      2 i fixed bin init(0),
139      2 j fixed bin init(0),
140      2 a bit(3) init(""b),
141      2 b bit(1) init(""b),
142      2 c bit(1) init(""b),
143      2 d bit(2) init(""b),
144      2 f bit(2) init(""b),
145      2 g bit(2) init(""b),
146      2 k bit(5) init(""b);
147 
148 dcl 1 ioerror static,
149      2 cobol_code fixed bin,
150      2 retry_tag fixed bin,
151      2 is_tag fixed bin,
152      2 ns_tag fixed bin,
153      2 type1_ptr ptr,
154      2 mode fixed bin;
155 
156 dcl mcode_off fixed bin static init(40);
157 dcl fsb_keylen_sw fixed bin static init(24);      /* offset 6 */
158 dcl fsb_key fixed bin static init(28);            /* offset 7 */
159 dcl fsb_key_wdoff fixed bin static init(7);
160 dcl rewrite_errno fixed bin static init(31);      /* Unable to rewrite record */
161 dcl seek_errno fixed bin static init(32);         /* Unable to seek key for rewrite */
162 dcl rewrite_seq_errno fixed bin static init(33); /* Invalid rewrite attempted - previous I/O operation was not read */
163 dcl key_mismatch_errno fixed bin static init(34);
164                                         /* Invalid rewrite attempted - new key is not identical to old key */
165 dcl record_mismatch_errno fixed bin static init(35);
166                     /* Invalid rewrite attempted - new record length is not identical to old record length */
167 dcl output_errno fixed bin static init(43);
168                               /* Invalid I/O operation.  Attempt to rewrite in a file not opened as i-o */
169 
170 
171 /* EXTERNAL ENTRY NAMES */
172 
173 dcl cobol_trans_alphabet$io entry(ptr, ptr, fixed bin, fixed bin);
174 dcl cobol_ioop_util$set_icode entry;
175 dcl cobol_gen_ioerror$finish_up entry(ptr, ptr);
176 dcl cobol_reg_manager$after_op entry(fixed bin);
177 dcl cobol_gen_ioerror entry(ptr, ptr);
178 dcl cobol_call_op entry(fixed bin, fixed bin);
179 dcl cobol_ioop_util$lda_du entry(fixed bin);
180 dcl cobol_ioop_util$set_x5 entry(fixed bin);
181 dcl cobol_alloc$stack entry(fixed bin,fixed bin,fixed bin);
182 dcl cobol_read_ft entry(fixed bin,ptr);
183 dcl cobol_read_rand entry(fixed bin,char(5),ptr);
184 dcl cobol_define_tag entry(fixed bin);
185 
186 /* sub-generators */
187 dcl cobol_move_gen entry(ptr);
188 dcl cobol_set_pr entry(ptr, ptr);
189 dcl cobol_set_fsbptr entry(ptr);
190 dcl cobol_get_size entry(ptr,fixed bin,fixed bin);
191 dcl cobol_io_util$file_desc entry(fixed bin(24));
192 dcl cobol_io_util$t9dec_to_bin entry(bit(3) aligned,fixed bin,ptr);
193 dcl cobol_io_util$move_direct entry(bit(3) aligned,fixed bin,fixed bin,fixed bin,bit(18) aligned);
194 dcl cobol_io_util$bypass_error entry(fixed bin,fixed bin);
195 dcl cobol_io_util$bypass_mode_error entry(fixed bin,bit(2) aligned);
196 dcl cobol_io_util$bypass_seqerror entry(fixed bin);
197 dcl cobol_io_util$compare_word entry(fixed bin,bit(3) aligned,fixed bin,bit(3) aligned,fixed bin,fixed bin);
198 dcl cobol_io_util$compare_zero_word entry(fixed bin,bit(3) aligned,fixed bin,bit(3) aligned,fixed bin,fixed bin);
199 dcl cobol_io_util$compare_key entry(fixed bin,ptr);
200 dcl cobol_io_util$fsb_key_loc entry(fixed bin);
201 dcl cobol_io_util$set_fsb_loc entry;
202 
203 /* BUILTIN FUNCTIONS */
204 
205 dcl       (substr,mod,binary,fixed,addr,addrel,rel,length,
206           string,unspec,null,index)               builtin;
207 
208 %include cobol_file_table;
209 %include cobol_file_key;
210 %include cobol_type1;
211 %include cobol_type9;
212 %include cobol_type12;
213 %include cobol_type19;
214 %include cobol_;