COMPILATION LISTING OF SEGMENT ibm3270_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1644.4 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* IBM3270_: An I/O module for controling multi-station 3270 controllers */ 12 13 /* Written September 1977 by Larry Johnson */ 14 15 ibm3270_: proc; 16 17 /* Parameters */ 18 19 dcl arg_iocbp ptr; 20 dcl arg_option (*) char (*) var; /* Options for attach */ 21 dcl arg_sw bit (1); /* Com_err_ switch for attach */ 22 dcl arg_code fixed bin (35); 23 dcl arg_mode fixed bin; /* The open mode */ 24 dcl arg_event_call_infop ptr; 25 26 /* Automatic */ 27 28 dcl com_err_sw bit (1); /* Set if com_err_ sould be called on attach error */ 29 dcl i fixed bin; 30 dcl code fixed bin (35); 31 dcl iocbp ptr; 32 dcl mask bit (36) aligned; /* For setting ips mask */ 33 dcl state fixed bin; 34 dcl ch char (1); 35 dcl 1 my_area_info aligned like area_info automatic; 36 37 dcl 1 mode_data aligned, 38 2 req_len fixed bin, 39 2 req char (256); 40 41 dcl 1 event_info aligned, 42 2 channel_id fixed bin (71), 43 2 message fixed bin (71), 44 2 sender bit (36), 45 2 origon, 46 3 dev_signal bit (18) unal, 47 3 ring bit (18) unal, 48 2 channel_index fixed bin (17); 49 50 dcl event_call_infop ptr; 51 dcl 1 event_call_info aligned based (event_call_infop), 52 2 channel_id fixed bin (71), 53 2 message fixed bin (71), 54 2 sender bit (36), 55 2 origon, 56 3 dev_signal bit (18) unal, 57 3 ring bit (18) unal, 58 2 data_ptr ptr; 59 60 dcl 1 rw_status aligned, /* For read_status and write_status */ 61 2 channel fixed bin (71), 62 2 flag bit (1); 63 64 dcl 1 poll_addr aligned, 65 2 length fixed bin, 66 2 data char (4); 67 68 dcl dial_msg_chan char (6); /* Variables for dial manager */ 69 dcl dial_msg_module char (32); 70 dcl dial_msg_ndialed fixed bin; 71 72 dcl 1 dma aligned, 73 2 version fixed bin, 74 2 dial_qual char (22), 75 2 event_channel fixed bin (71), 76 2 channel_name char (32); 77 78 dcl 1 dial_msg_flags aligned, 79 2 dialed_up bit (1) unal, 80 2 hung_up bit (1) unal, 81 2 control bit (1) unal, 82 2 pad bit (33) unal; 83 84 /* Constants */ 85 86 dcl iomodule_name char (8) int static options (constant) init ("ibm3270_"); 87 88 /* External stuff */ 89 90 dcl define_area_ entry (ptr, fixed bin (35)); 91 dcl release_area_ entry (ptr); 92 dcl ipc_$create_ev_chn entry (fixed bin (71), fixed bin (35)); 93 dcl ipc_$delete_ev_chn entry (fixed bin (71), fixed bin (35)); 94 dcl ipc_$decl_ev_call_chn entry (fixed bin (71), entry, ptr, fixed bin, fixed bin (35)); 95 dcl ipc_$decl_ev_wait_chn entry (fixed bin (71), fixed bin (35)); 96 dcl ipc_$drain_chn entry (fixed bin (71), fixed bin (35)); 97 dcl convert_ipc_code_ entry (fixed bin (35)); 98 dcl timer_manager_$reset_alarm_wakeup entry (fixed bin (71)); 99 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 100 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 101 dcl iox_$propagate entry (ptr); 102 dcl com_err_ entry options (variable); 103 dcl ipc_$block entry (ptr, ptr, fixed bin (35)); 104 dcl hcs_$wakeup entry (bit (36) aligned, fixed bin (71), fixed bin (71), fixed bin (35)); 105 dcl get_process_id_ entry returns (bit (36) aligned); 106 dcl dial_manager_$privileged_attach entry (ptr, fixed bin (35)); 107 dcl convert_dial_message_ entry (bit (72) aligned, char (*), char (*), fixed bin, 1 like dial_msg_flags aligned, 108 fixed bin (35)); 109 dcl hcs_$tty_attach entry (char (*), fixed bin (71), fixed bin, fixed bin, fixed bin (35)); 110 dcl hcs_$tty_detach entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); 111 dcl hcs_$tty_order entry (fixed bin, char (*), ptr, fixed bin, fixed bin (35)); 112 dcl ibm3270_control_$control ext entry; 113 dcl ibm3270_control_$timer_handler ext entry; 114 dcl ibm3270_control_$wakeup_handler ext entry; 115 116 dcl (addr, hbound, length, null, rtrim, string, unspec) builtin; 117 118 dcl sys_info$max_seg_size ext fixed bin (35); 119 dcl error_table_$bad_mode ext fixed bin (35); 120 dcl error_table_$line_status_pending ext fixed bin (35); 121 dcl error_table_$not_detached ext fixed bin (35); 122 dcl error_table_$wrong_no_of_args ext fixed bin (35); 123 dcl error_table_$badopt ext fixed bin (35); 124 dcl error_table_$action_not_performed ext fixed bin (35); 125 dcl error_table_$request_pending ext fixed bin (35); 126 dcl error_table_$noarg ext fixed bin (35); 127 128 dcl conversion condition; 129 130 131 132 1 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 1 2 /* format: style2 */ 1 3 1 4 dcl 1 iocb aligned based, /* I/O control block. */ 1 5 2 version character (4) aligned, 1 6 2 name char (32), /* I/O name of this block. */ 1 7 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 8 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 9 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 10 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 11 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 12 2 reserved bit (72), /* Reserved for future use. */ 1 13 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 14 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 15 /* open(p,mode,not_used,s) */ 1 16 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 17 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 18 /* get_line(p,bufptr,buflen,actlen,s) */ 1 19 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 20 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 21 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 22 /* put_chars(p,bufptr,buflen,s) */ 1 23 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 24 /* modes(p,newmode,oldmode,s) */ 1 25 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 26 /* position(p,u1,u2,s) */ 1 27 2 control entry (ptr, char (*), ptr, fixed (35)), 1 28 /* control(p,order,infptr,s) */ 1 29 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 30 /* read_record(p,bufptr,buflen,actlen,s) */ 1 31 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 32 /* write_record(p,bufptr,buflen,s) */ 1 33 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 34 /* rewrite_record(p,bufptr,buflen,s) */ 1 35 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 36 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 37 /* seek_key(p,key,len,s) */ 1 38 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 39 /* read_key(p,key,len,s) */ 1 40 2 read_length entry (ptr, fixed (21), fixed (35)); 1 41 /* read_length(p,len,s) */ 1 42 1 43 declare iox_$iocb_version_sentinel 1 44 character (4) aligned external static; 1 45 1 46 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 133 134 2 1 /* Begin include file ..... iox_modes.incl.pl1 */ 2 2 2 3 /* Written by C. D. Tavares, 03/17/75 */ 2 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 2 5 2 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 2 7 ("stream_input", "stream_output", "stream_input_output", 2 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 2 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 2 10 "direct_input", "direct_output", "direct_update"); 2 11 2 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 2 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 2 14 2 15 dcl (Stream_input initial (1), 2 16 Stream_output initial (2), 2 17 Stream_input_output initial (3), 2 18 Sequential_input initial (4), 2 19 Sequential_output initial (5), 2 20 Sequential_input_output initial (6), 2 21 Sequential_update initial (7), 2 22 Keyed_sequential_input initial (8), 2 23 Keyed_sequential_output initial (9), 2 24 Keyed_sequential_update initial (10), 2 25 Direct_input initial (11), 2 26 Direct_output initial (12), 2 27 Direct_update initial (13)) fixed bin int static options (constant); 2 28 2 29 /* End include file ..... iox_modes.incl.pl1 */ 135 136 137 3 1 /* BEGIN INCLUDE FILE area_info.incl.pl1 12/75 */ 3 2 3 3 dcl area_info_version_1 fixed bin static init (1) options (constant); 3 4 3 5 dcl area_infop ptr; 3 6 3 7 dcl 1 area_info aligned based (area_infop), 3 8 2 version fixed bin, /* version number for this structure is 1 */ 3 9 2 control aligned like area_control, /* control bits for the area */ 3 10 2 owner char (32) unal, /* creator of the area */ 3 11 2 n_components fixed bin, /* number of components in the area (returned only) */ 3 12 2 size fixed bin (18), /* size of the area in words */ 3 13 2 version_of_area fixed bin, /* version of area (returned only) */ 3 14 2 areap ptr, /* pointer to the area (first component on multisegment area) */ 3 15 2 allocated_blocks fixed bin, /* number of blocks allocated */ 3 16 2 free_blocks fixed bin, /* number of free blocks not in virgin */ 3 17 2 allocated_words fixed bin (30), /* number of words allocated in the area */ 3 18 2 free_words fixed bin (30); /* number of words free in area not in virgin */ 3 19 3 20 dcl 1 area_control aligned based, 3 21 2 extend bit (1) unal, /* says area is extensible */ 3 22 2 zero_on_alloc bit (1) unal, /* says block gets zerod at allocation time */ 3 23 2 zero_on_free bit (1) unal, /* says block gets zerod at free time */ 3 24 2 dont_free bit (1) unal, /* debugging aid, turns off free requests */ 3 25 2 no_freeing bit (1) unal, /* for allocation method without freeing */ 3 26 2 system bit (1) unal, /* says area is managed by system */ 3 27 2 pad bit (30) unal; 3 28 3 29 /* END INCLUDE FILE area_info.incl.pl1 */ 138 139 4 1 /* BEGIN INCLUDE FILE .... bisync_line_data.incl.pl1 */ 4 2 /* Written: October 1977 by Larry Johnson */ 4 3 /* Modified: November 1979 by Larry Johnson and Gary Palter for HASP */ 4 4 4 5 /* Structures and codes for doing line_control and line_status operations on bisync lines */ 4 6 4 7 /* For line_control order */ 4 8 4 9 dcl 1 line_ctl aligned, 4 10 2 op fixed binary (17) unaligned, /* indicates action being performed */ 4 11 2 val (3) fixed binary (17) unaligned; /* optional arguments with some ops */ 4 12 4 13 dcl 1 valchar based (addr (line_ctl.val (1))), /* character overlay of line_ctl.val */ 4 14 2 data_len fixed binary (9) unaligned unsigned, 4 15 2 data character (5) unaligned; 4 16 4 17 4 18 /* Values for line_ctl.op */ 4 19 4 20 dcl (SET_BID_LIMIT initial (1), 4 21 ACCEPT_BID initial (2), 4 22 CONFIGURE initial (3), /* val(1): 0 = non-transparent ASCII, 1 = not-tranparent EBCDIC, 4 23* 2 = transparent ASCII, 3 = transparent EBCDIC */ 4 24 SET_TTD_PARAMS initial (4), /* val(1): ttd_time; val(2): ttd_limit */ 4 25 REPORT_WRITE_STATUS initial (5), /* Request FNP to report on output buffers */ 4 26 SET_3270_MODE initial (6), 4 27 SET_POLLING_ADDR initial (7), 4 28 START_POLL initial (8), 4 29 SET_SELECT_ADDR initial (9), 4 30 STOP_AUTO_POLL initial (10), 4 31 SET_MASTER_SLAVE_MODE initial (11), /* val(1): 0 = slave (host), 1 = master (workstation) */ 4 32 SET_HASP_MODE initial (12), 4 33 SET_NAK_LIMIT initial (13), /* val(1): maximum # of NAKs allowed in a row */ 4 34 SET_HASP_TIMERS initial (14)) /* val(1): initial connect timeout; val(2): receive timeout; 4 35* val(3): transmit timeout */ 4 36 fixed binary static options (constant); 4 37 4 38 4 39 /* For line status order */ 4 40 4 41 dcl 1 line_stat aligned, 4 42 2 op fixed binary (17) unaligned, /* contains reason for status */ 4 43 2 val (3) fixed binary (17) unaligned; 4 44 4 45 4 46 /* Values for line_stat.op */ 4 47 4 48 dcl (BID_FAILED initial (1), 4 49 BAD_BLOCK initial (2), 4 50 REVERSE_INTERRUPT initial (3), 4 51 TOO_MANY_NAKS initial (4), 4 52 FNP_WRITE_STATUS initial (5), 4 53 IBM3270_WRITE_COMPLETE initial (6), 4 54 IBM3270_WACK_MESSAGE initial (7), 4 55 IBM3270_WRITE_EOT initial (8), 4 56 IBM3270_WRITE_ABORT initial (9), 4 57 IBM3270_SELECT_FAILED initial (10), 4 58 IBM3270_WACK_SELECT initial (11), 4 59 IBM3270_NAK_OUTPUT initial (12), 4 60 HASP_INIT_COMPLETE initial (13)) 4 61 fixed binary static options (constant); 4 62 4 63 /* END INCLUDE FILE ..... bisync_line_data.incl.pl1 */ 140 141 5 1 /* Begin include file ..... ibm3270_attach_data.incl.pl1 */ 5 2 5 3 /* Attach data block for the ibm3270_ I/O module */ 5 4 /* Written October 1977 by Larry Johnson */ 5 5 5 6 dcl adp ptr; 5 7 5 8 dcl 1 ad aligned based (adp), 5 9 2 work_areap ptr, /* Pointer to work area containing this structure */ 5 10 2 device char (6), /* Name of channel attached */ 5 11 2 tty_index fixed bin, /* Ring0 name for channel */ 5 12 2 attach_description char (256) var, 5 13 2 open_description char (24) var, 5 14 2 wait_list aligned, 5 15 3 nchan fixed bin, /* Number of channels to block on */ 5 16 3 user_channel fixed bin (71), /* The channel */ 5 17 2 attach_channel fixed bin (71), /* For talking to ansering service */ 5 18 2 io_channel fixed bin (71), /* Channel used by ring 0 */ 5 19 2 timer_channel fixed bin (71), /* Channel for error recovery timer */ 5 20 2 controller fixed bin, /* Address of controller, usually 0 */ 5 21 2 open_in_progress bit (1), /* Indicates we are blockig during open */ 5 22 2 close_in_progress bit (1), /* In process of closing switch, be careful of wakeups */ 5 23 2 open_wakeup_occured bit (1), /* Got answering service wakeup at open */ 5 24 2 open_event_message fixed bin (71), /* Temp copy of open event message */ 5 25 2 ascii bit (1), /* Set if running in ascii mode */ 5 26 2 async bit (1), /* Indicates the I/O module must not block ever */ 5 27 2 eot char (1), /* Some char codes */ 5 28 2 stx char (1), 5 29 2 etx char (1), 5 30 2 etb char (1), 5 31 2 soh char (1), 5 32 2 esc char (1), 5 33 2 sf char (1), /* Start field */ 5 34 2 sba char (1), /* Set buffer address */ 5 35 2 ic char (1), /* Insert cursor */ 5 36 2 pt char (1), /* Program tab */ 5 37 2 ra char (1), /* Repeat to address */ 5 38 2 eua char (1), /* Erase unprotected to address */ 5 39 2 bit6_char (0:63) char (1) unal, /* Maps 6 bit codes into ebcdic characters */ 5 40 2 first_read_infop ptr, /* First input block */ 5 41 2 last_read_infop ptr, /* Last input block */ 5 42 2 header_data, /* Header is build here */ 5 43 3 header_buf_ptr ptr, /* Addr of start of header */ 5 44 3 header_buf_len fixed bin, /* Lemgth of header buffer */ 5 45 3 header_len fixed bin, /* Length of data */ 5 46 2 text_data, /* Text is built here */ 5 47 3 text_buf_ptr ptr, /* Addr of start of text */ 5 48 3 text_buf_len fixed bin, /* Length of text_buffer */ 5 49 3 text_len fixed bin, /* Length of real data */ 5 50 2 input_buf_ptr ptr, /* Address of input buffer */ 5 51 2 input_buf_len fixed bin, /* Its length */ 5 52 2 unscanned_data_ptr ptr, /* Addr of next char in inpput buffer to scan */ 5 53 2 unscanned_data_len fixed bin, /* Number of chars remaining */ 5 54 2 input_state fixed bin, /* Current state of text scan */ 5 55 2 output_buf_ptr ptr, /* Buffer for building output messages */ 5 56 2 output_buf_len fixed bin, /* Its length */ 5 57 2 polling_in_progress bit (1), /* Set during polling operation */ 5 58 2 device_responded bit (1), /* Set if polling resulted in real data coming back */ 5 59 2 general_poll bit (1), /* User is doing general_poll */ 5 60 2 first_poll_reqp ptr, /* Pointer to first queued poll request */ 5 61 2 last_poll_reqp ptr, /* Pointer to last polled request */ 5 62 2 wakeup_needed bit (1), /* Set if caller needes wakeup when data available */ 5 63 2 last_device_polled fixed bin, /* Last poll address sent to fnp */ 5 64 2 last_device_selected fixed bin, /* Last select address sent to fnp */ 5 65 2 cur_out_reqp ptr, /* Current output request */ 5 66 2 output_in_progress bit (1), /* Set while doing output */ 5 67 2 per_dev (0:31), /* Data on output to each device */ 5 68 3 first_out_reqp ptr, /* Addr of first request in its queue */ 5 69 3 last_out_reqp ptr, /* Addr of last request in its queue */ 5 70 3 pend_time fixed bin (71), /* Time at which output should be retryed */ 5 71 2 min_dev fixed bin, /* Index of lowest device which currently has output pended */ 5 72 2 max_dev fixed bin, /* Index of highest device */ 5 73 2 pend_interval fixed bin (71), /* Time interval for retrying otput */ 5 74 2 retry_limit fixed bin, /* Times to retry output to non-ready devices */ 5 75 2 input_line_status fixed bin, /* Input error code */ 5 76 2 output_line_status fixed bin, /* Output error code */ 5 77 2 processid bit (36); 5 78 5 79 dcl work_area area based (ad.work_areap); 5 80 dcl header_buf char (ad.header_buf_len) based (ad.header_buf_ptr); /* Header built here */ 5 81 dcl header_data char (ad.header_len) based (ad.header_buf_ptr); 5 82 dcl text_buf char (ad.text_buf_len) based (ad.text_buf_ptr); /* Text built here */ 5 83 dcl text_data char (ad.text_len) based (ad.text_buf_ptr); 5 84 dcl input_buf char (ad.input_buf_len) based (ad.input_buf_ptr); /* Raw data read here */ 5 85 dcl unscanned_data char (ad.unscanned_data_len) based (ad.unscanned_data_ptr); /* Unprocessed part of input_buf */ 5 86 dcl output_buf char (ad.output_buf_len) based (ad.output_buf_ptr); 5 87 5 88 /* The following array maps any 6-bit code into the ebcdic character needed to transmit it */ 5 89 /* The first 32 elements are used for device addresses (poll and select) and controller address (poll only) */ 5 90 /* The second 32 elements are used for controller addresses (select only) */ 5 91 /* A more useable character form of this array is kept in ad.bit6_char */ 5 92 5 93 dcl address_mapping (0:63) bit (8) unal int static options (constant) init ( 5 94 "40"b4, "c1"b4, "c2"b4, "c3"b4, "c4"b4, "c5"b4, "c6"b4, "c7"b4, 5 95 "c8"b4, "c9"b4, "4a"b4, "4b"b4, "4c"b4, "4d"b4, "4e"b4, "4f"b4, 5 96 "50"b4, "d1"b4, "d2"b4, "d3"b4, "d4"b4, "d5"b4, "d6"b4, "d7"b4, 5 97 "d8"b4, "d9"b4, "5a"b4, "5b"b4, "5c"b4, "5d"b4, "5e"b4, "5f"b4, 5 98 "60"b4, "61"b4, "e2"b4, "e3"b4, "e4"b4, "e5"b4, "e6"b4, "e7"b4, 5 99 "e8"b4, "e9"b4, "6a"b4, "6b"b4, "6c"b4, "6d"b4, "6e"b4, "6f"b4, 5 100 "f0"b4, "f1"b4, "f2"b4, "f3"b4, "f4"b4, "f5"b4, "f6"b4, "f7"b4, 5 101 "f8"b4, "f9"b4, "7a"b4, "7b"b4, "7c"b4, "7d"b4, "7e"b4, "7f"b4); 5 102 5 103 /* End include file ..... ibm3270_attach_data.incl.pl1 */ 142 143 144 /* Attach entry point */ 145 146 ibm3270_attach: entry (arg_iocbp, arg_option, arg_sw, arg_code); 147 148 iocbp = arg_iocbp; 149 com_err_sw = arg_sw; 150 arg_code = 0; 151 152 area_infop = addr (my_area_info); 153 area_info.version = area_info_version_1; 154 string (area_info.control) = "0"b; 155 area_info.extend = "1"b; 156 area_info.zero_on_free = "1"b; 157 area_info.owner = iomodule_name; 158 area_info.size = sys_info$max_seg_size; 159 area_info.areap = null; 160 adp = null; 161 162 if iocbp -> iocb.attach_descrip_ptr ^= null then do; 163 code = error_table_$not_detached; 164 call abort_attach ("^a", iocbp -> iocb.name); 165 end; 166 167 call define_area_ (area_infop, code); 168 if code ^= 0 then call abort_attach ("Unable to allocate temp area.", ""); 169 allocate ad in (area_info.areap -> work_area); 170 unspec (ad) = "0"b; 171 ad.work_areap = area_info.areap; 172 ad.processid = get_process_id_ (); 173 174 /* Process options */ 175 176 if hbound (arg_option, 1) < 1 then do; /* Must be exactly one */ 177 code = error_table_$wrong_no_of_args; 178 call abort_attach ("Bad attach description.", ""); 179 end; 180 181 ad.device = arg_option (1); 182 183 do i = 2 to hbound (arg_option, 1); 184 if arg_option (i) = "-ebcdic" then ad.ascii = "0"b; 185 else if arg_option (i) = "-ascii" then ad.ascii = "1"b; 186 else if arg_option (i) = "-async" then ad.async = "1"b; 187 else if arg_option (i) = "-retry_limit" then do; /* Times to retry i/o */ 188 i = i + 1; /* Check next arg */ 189 if i > hbound (arg_option, 1) then do; 190 code = error_table_$noarg; 191 call abort_attach ("^a", "After -retry_limit"); 192 end; 193 on conversion begin; /* In case bad arg */ 194 code = 0; 195 call abort_attach ("Invalid retry limit: ^a", (arg_option (i))); 196 end; 197 ad.retry_limit = bin (arg_option (i)); 198 revert conversion; 199 if ad.retry_limit < 0 then ad.retry_limit = 0; 200 end; 201 else do; 202 code = error_table_$badopt; 203 call abort_attach ("^a", (arg_option (i))); 204 end; 205 end; 206 207 ad.nchan = 1; 208 call create_channel (ad.user_channel); 209 call create_channel (ad.io_channel); 210 call create_channel (ad.attach_channel); 211 call create_channel (ad.timer_channel); 212 213 /* Now mask and complete the iocb */ 214 215 ad.attach_description = iomodule_name; 216 do i = 1 to hbound (arg_option, 1); 217 ad.attach_description = ad.attach_description || " "; 218 ad.attach_description = ad.attach_description || arg_option (i); 219 end; 220 call hcs_$set_ips_mask ("0"b, mask); 221 iocbp -> iocb.attach_descrip_ptr = addr (ad.attach_description); 222 iocbp -> iocb.attach_data_ptr = adp; 223 iocbp -> iocb.open = ibm3270_open; 224 iocbp -> iocb.control = ibm3270_control_$control; 225 iocbp -> iocb.detach_iocb = ibm3270_detach; 226 call iox_$propagate (iocbp); 227 call hcs_$reset_ips_mask (mask, mask); 228 attach_return: 229 return; 230 231 232 /* Internal procedure to handle attach errors */ 233 234 abort_attach: proc (str1, str2); 235 236 dcl (str1, str2) char (*) aligned; 237 238 if com_err_sw then call com_err_ (code, iomodule_name, str1, str2); 239 if code = 0 then code = error_table_$badopt; 240 arg_code = code; 241 242 if adp ^= null then do; 243 if ad.user_channel ^= 0 then call ipc_$delete_ev_chn (ad.user_channel, code); 244 end; 245 if area_info.areap ^= null then call release_area_ (area_info.areap); 246 go to attach_return; 247 248 end abort_attach; 249 250 /* Internal procedure used by attach to create event channels */ 251 252 create_channel: proc (ch); 253 254 dcl ch fixed bin (71); 255 256 call ipc_$create_ev_chn (ch, code); 257 if code = 0 then return; 258 call convert_ipc_code_ (code); 259 call abort_attach ("Creating event channel.", ""); 260 261 end create_channel; 262 263 /* Detach entry point */ 264 265 ibm3270_detach: entry (arg_iocbp, arg_code); 266 267 iocbp = arg_iocbp; 268 arg_code = 0; 269 270 adp = iocbp -> iocb.attach_data_ptr; 271 272 call hcs_$set_ips_mask ("0"b, mask); 273 iocbp -> iocb.attach_descrip_ptr = null; 274 call iox_$propagate (iocbp); 275 call hcs_$reset_ips_mask (mask, mask); 276 277 call ipc_$delete_ev_chn (ad.user_channel, code); 278 call ipc_$delete_ev_chn (ad.timer_channel, code); 279 call ipc_$delete_ev_chn (ad.attach_channel, code); 280 call ipc_$delete_ev_chn (ad.io_channel, code); 281 call release_area_ (addr (work_area)); 282 283 return; 284 285 /* Open entry point */ 286 287 ibm3270_open: entry (arg_iocbp, arg_mode, arg_sw, arg_code); 288 289 iocbp = arg_iocbp -> iocb.actual_iocb_ptr; 290 arg_code = 0; 291 adp = iocbp -> iocb.attach_data_ptr; 292 293 if arg_mode ^= Stream_input_output then do; 294 code = error_table_$bad_mode; 295 go to report_open_code; 296 end; 297 298 /* See if we are completing a previously started open */ 299 300 if ad.open_in_progress then do; 301 if ad.open_wakeup_occured then do; /* Got the wakeup */ 302 ad.open_in_progress, ad.open_wakeup_occured = "0"b; 303 go to complete_open; 304 end; 305 code = error_table_$request_pending; /* Still not done */ 306 go to report_open_code; 307 end; 308 309 /* Get bisync channel from answering service. */ 310 311 dma.version = 1; /* Setup dial manager data structure */ 312 dma.event_channel = ad.attach_channel; 313 dma.channel_name = ad.device; 314 dma.dial_qual = ""; 315 call dial_manager_$privileged_attach (addr (dma), code); 316 if code = error_table_$action_not_performed then go to maybe_mine_already; 317 if code ^= 0 then go to report_open_code; 318 319 /* Make ansering service call us back when line is ready */ 320 321 call ipc_$decl_ev_call_chn (ad.attach_channel, open_wakeup_handler, iocbp, 1, code); 322 if code ^= 0 then do; 323 call convert_ipc_code_ (code); 324 go to report_open_code; 325 end; 326 327 ad.open_in_progress = "1"b; 328 if ad.async then do; /* Cant block here */ 329 code = error_table_$request_pending; 330 go to report_open_code; 331 end; 332 call block; /* Wait for answering service */ 333 ad.open_in_progress, ad.open_wakeup_occured = "0"b; 334 if code ^= 0 then go to report_open_code; 335 336 complete_open: 337 call convert_dial_message_ (unspec (ad.open_event_message), dial_msg_chan, dial_msg_module, 338 dial_msg_ndialed, dial_msg_flags, code); 339 if code ^= 0 then go to report_open_code; 340 maybe_mine_already: 341 342 /* Attach the device */ 343 344 call hcs_$tty_attach ((ad.device), ad.io_channel, ad.tty_index, state, code); 345 if code ^= 0 then go to report_open_code; 346 retry_modes: 347 mode_data.req_len = length (mode_data.req); 348 mode_data.req = "rawi,rawo"; 349 call hcs_$tty_order (ad.tty_index, "modes", addr (mode_data), state, code); 350 if code = error_table_$line_status_pending then do; 351 call flush_line_status; 352 if code = 0 then go to retry_modes; 353 end; 354 if code ^= 0 then go to report_open_code; 355 356 retry_message_size: 357 i = 256; 358 call hcs_$tty_order (ad.tty_index, "set_input_message_size", addr (i), state, code); 359 if code = error_table_$line_status_pending then do; 360 call flush_line_status; 361 if code = 0 then go to retry_message_size; 362 end; 363 if code ^= 0 then go to report_open_code; 364 365 call line_control (SET_3270_MODE, 0); 366 if code ^= 0 then go to report_open_code; 367 call line_control (SET_BID_LIMIT, 3); 368 if code ^= 0 then go to report_open_code; 369 call line_control (CONFIGURE, 1); 370 if code ^= 0 then go to report_open_code; 371 call line_control2 (SET_TTD_PARAMS, 2, 2); 372 if code ^= 0 then go to report_open_code; 373 374 375 call ipc_$decl_ev_call_chn (ad.io_channel, ibm3270_control_$wakeup_handler, iocbp, 1, code); 376 if code ^= 0 then do; 377 call convert_ipc_code_ (code); 378 go to report_open_code; 379 end; 380 381 call ipc_$decl_ev_call_chn (ad.timer_channel, ibm3270_control_$timer_handler, iocbp, 1, code); 382 if code ^= 0 then do; 383 call convert_ipc_code_ (code); 384 go to report_open_code; 385 end; 386 387 /* Initialize attach data variables */ 388 389 ad.first_read_infop = null; 390 ad.last_read_infop = null; 391 ad.header_buf_len = 16; 392 allocate header_buf in (work_area); 393 ad.input_buf_len = 4096; 394 allocate input_buf in (work_area); 395 ad.text_buf_len = 4096; 396 allocate text_buf in (work_area); 397 ad.output_buf_len = 56*40; /* FNPs arbitrary limit */ 398 allocate output_buf in (work_area); 399 ad.header_len, ad.text_len, ad.unscanned_data_len = 0; 400 ad.input_state = 1; 401 ad.last_device_polled = -2; /* Set to invalid number */ 402 ad.last_device_selected = -2; 403 ad.cur_out_reqp = null; /* No output */ 404 ad.first_out_reqp (*) = null; 405 ad.last_out_reqp (*) = null; 406 ad.min_dev, ad.max_dev = -1; 407 ad.pend_interval = 30000000; /* 30 seconds */ 408 ad.pend_time (*) = 0; 409 ad.close_in_progress = "0"b; 410 ad.output_in_progress = "0"b; 411 ad.input_line_status, ad.output_line_status = 0; 412 ad.general_poll, ad.polling_in_progress = "0"b; 413 ad.device_responded = "0"b; 414 ad.first_poll_reqp, ad.last_poll_reqp = null; 415 416 unspec (ad.stx) = "002"b3; 417 unspec (ad.etx) = "003"b3; 418 unspec (ad.soh) = "001"b3; 419 unspec (ad.sf) = "035"b3; 420 unspec (ad.sba) = "021"b3; 421 unspec (ad.ic) = "023"b3; 422 unspec (ad.eua) = "022"b3; 423 if ad.ascii then do; 424 unspec (ad.etb) = "027"b3; 425 unspec (ad.eot) = "004"b3; 426 unspec (ad.pt) = "011"b3; 427 unspec (ad.ra) = "024"b3; 428 unspec (ad.esc) = "033"b3; 429 end; 430 else do; 431 unspec (ad.etb) = "046"b3; 432 unspec (ad.eot) = "067"b3; 433 unspec (ad.pt) = "005"b3; 434 unspec (ad.ra) = "074"b3; 435 unspec (ad.esc) = "047"b3; 436 end; 437 438 do i = 0 to 63; /* Set up usavble form of address_mapping array */ 439 unspec (ch) = "0"b || address_mapping (i); 440 ad.bit6_char (i) = ch; 441 end; 442 443 ad.open_description = rtrim (iox_modes (arg_mode)); 444 445 call hcs_$set_ips_mask ("0"b, mask); 446 iocbp -> iocb.close = ibm3270_close; 447 iocbp -> iocb.control = ibm3270_control_$control; 448 iocbp -> iocb.open_descrip_ptr = addr (ad.open_description); 449 call iox_$propagate (iocbp); 450 call hcs_$reset_ips_mask (mask, mask); 451 code = 0; 452 report_open_code: 453 arg_code = code; 454 return; 455 456 /* This entry is the event call handeler for the attach channel during opens */ 457 458 open_wakeup_handler: entry (arg_event_call_infop); 459 460 event_call_infop = arg_event_call_infop; 461 iocbp = event_call_info.data_ptr; 462 adp = iocbp -> iocb.attach_data_ptr; 463 464 if ^ad.open_in_progress then return; /* Came at bad time */ 465 ad.open_event_message = event_call_info.message; /* Save the message */ 466 ad.open_wakeup_occured = "1"b; 467 call hcs_$wakeup (ad.processid, ad.user_channel, 0, code); 468 return; 469 470 /* Close entry point */ 471 472 ibm3270_close: entry (arg_iocbp, arg_code); 473 474 iocbp = arg_iocbp -> iocb.actual_iocb_ptr; 475 arg_code = 0; 476 adp = iocbp -> iocb.attach_data_ptr; 477 478 ad.close_in_progress = "1"b; 479 call line_control (STOP_AUTO_POLL, 0); 480 call hcs_$tty_detach (ad.tty_index, 0, state, code); 481 call ipc_$decl_ev_wait_chn (ad.io_channel, code); 482 call ipc_$decl_ev_wait_chn (ad.attach_channel, code); 483 call ipc_$decl_ev_wait_chn (ad.timer_channel, code); 484 485 call hcs_$set_ips_mask ("0"b, mask); 486 iocbp -> iocb.open_descrip_ptr = null; 487 iocbp -> iocb.open = ibm3270_open; 488 iocbp -> iocb.detach_iocb = ibm3270_detach; 489 call iox_$propagate (iocbp); 490 call hcs_$reset_ips_mask (mask, mask); 491 492 call ipc_$drain_chn (ad.user_channel, code); 493 call ipc_$drain_chn (ad.io_channel, code); 494 call ipc_$drain_chn (ad.attach_channel, code); 495 call timer_manager_$reset_alarm_wakeup (ad.timer_channel); 496 call ipc_$drain_chn (ad.timer_channel, code); 497 498 free header_buf; 499 free text_buf; 500 free input_buf; 501 free output_buf; 502 503 return; 504 505 /* Control/* Internal procedure to block */ 506 507 block: proc; 508 509 call ipc_$block (addr (ad.wait_list), addr (event_info), code); 510 if code ^= 0 then call convert_ipc_code_ (code); 511 return; 512 513 end block; 514 515 /* Procedure to do a line control order */ 516 517 line_control: proc (op, val1); 518 519 dcl (op, val1, val2) fixed bin; 520 521 line_ctl.val = 0; 522 line_control_join: 523 line_ctl.val (1) = val1; 524 line_ctl.op = op; 525 retry_line_control: 526 call hcs_$tty_order (ad.tty_index, "line_control", addr (line_ctl), state, code); 527 if code = error_table_$line_status_pending then do; 528 call flush_line_status; 529 if code = 0 then go to retry_line_control; 530 end; 531 return; 532 533 line_control2: entry (op, val1, val2); 534 535 line_ctl.val = 0; 536 line_ctl.val (2) = val2; 537 go to line_control_join; 538 539 end line_control; 540 541 flush_line_status: proc; 542 543 call hcs_$tty_order (ad.tty_index, "line_status", addr (line_stat), state, code); 544 return; 545 546 end flush_line_status; 547 548 549 end ibm3270_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1506.4 ibm3270_.pl1 >dumps>old>recomp>ibm3270_.pl1 133 1 07/28/81 1333.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 135 2 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.incl.pl1 138 3 06/11/76 1043.4 area_info.incl.pl1 >ldd>include>area_info.incl.pl1 140 4 09/02/80 1523.7 bisync_line_data.incl.pl1 >ldd>include>bisync_line_data.incl.pl1 142 5 07/24/78 1704.7 ibm3270_attach_data.incl.pl1 >ldd>include>ibm3270_attach_data.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. CONFIGURE constant fixed bin(17,0) initial dcl 4-20 set ref 369* SET_3270_MODE constant fixed bin(17,0) initial dcl 4-20 set ref 365* SET_BID_LIMIT constant fixed bin(17,0) initial dcl 4-20 set ref 367* SET_TTD_PARAMS constant fixed bin(17,0) initial dcl 4-20 set ref 371* STOP_AUTO_POLL 000017 constant fixed bin(17,0) initial dcl 4-20 set ref 479* Stream_input_output constant fixed bin(17,0) initial dcl 2-15 ref 293 actual_iocb_ptr 12 based pointer level 2 dcl 1-4 ref 289 474 ad based structure level 1 dcl 5-8 set ref 169 170* addr builtin function dcl 116 ref 152 221 281 281 315 315 349 349 358 358 448 509 509 509 509 525 525 543 543 address_mapping 000000 constant bit(8) initial array unaligned dcl 5-93 ref 439 adp 000326 automatic pointer dcl 5-6 set ref 160* 169* 170 171 172 181 184 185 186 197 199 199 207 208 209 210 211 215 217 217 218 218 221 222 242 243 243 270* 277 278 279 280 281 281 291* 300 301 302 302 312 313 321 327 328 333 333 336 336 340 340 340 349 358 375 381 389 390 391 392 392 392 392 393 394 394 394 394 395 396 396 396 396 397 398 398 398 398 399 399 399 400 401 402 403 404 405 406 406 407 408 409 410 411 411 412 412 413 414 414 416 417 418 419 420 421 422 423 424 425 426 427 428 431 432 433 434 435 440 443 448 462* 464 465 466 467 467 476* 478 480 481 482 483 492 493 494 495 496 498 498 498 499 499 499 500 500 500 501 501 501 509 509 525 543 area_control based structure level 1 dcl 3-20 area_info based structure level 1 dcl 3-7 area_info_version_1 constant fixed bin(17,0) initial dcl 3-3 ref 153 area_infop 000320 automatic pointer dcl 3-5 set ref 152* 153 154 155 156 157 158 159 167* 169 171 245 245 areap 16 based pointer level 2 dcl 3-7 set ref 159* 169 171 245 245* arg_code parameter fixed bin(35,0) dcl 22 set ref 146 150* 240* 265 268* 287 290* 452* 472 475* arg_event_call_infop parameter pointer dcl 24 ref 458 460 arg_iocbp parameter pointer dcl 19 ref 146 148 265 267 287 289 472 474 arg_mode parameter fixed bin(17,0) dcl 23 ref 287 293 443 arg_option parameter varying char array dcl 20 ref 146 176 181 183 184 185 186 187 189 195 197 203 216 218 arg_sw parameter bit(1) unaligned dcl 21 ref 146 149 287 ascii 136 based bit(1) level 2 dcl 5-8 set ref 184* 185* 423 async 137 based bit(1) level 2 dcl 5-8 set ref 186* 328 attach_channel 122 based fixed bin(71,0) level 2 dcl 5-8 set ref 210* 279* 312 321* 482* 494* attach_data_ptr 16 based pointer level 2 dcl 1-4 set ref 222* 270 291 462 476 attach_descrip_ptr 14 based pointer level 2 dcl 1-4 set ref 162 221* 273* attach_description 5 based varying char(256) level 2 dcl 5-8 set ref 215* 217* 217 218* 218 221 bit6_char 154 based char(1) array level 2 packed unaligned dcl 5-8 set ref 440* ch parameter fixed bin(71,0) dcl 254 in procedure "create_channel" set ref 252 256* ch 000110 automatic char(1) unaligned dcl 34 in procedure "ibm3270_" set ref 439* 440 channel_name 12 000266 automatic char(32) level 2 dcl 72 set ref 313* close 36 based entry variable level 2 dcl 1-4 set ref 446* close_in_progress 132 based bit(1) level 2 dcl 5-8 set ref 409* 478* code 000102 automatic fixed bin(35,0) dcl 30 set ref 163* 167* 168 177* 190* 194* 202* 238* 239 239* 240 243* 256* 257 258* 277* 278* 279* 280* 294* 305* 315* 316 317 321* 322 323* 329* 334 336* 339 340* 345 349* 350 352 354 358* 359 361 363 366 368 370 372 375* 376 377* 381* 382 383* 451* 452 467* 480* 481* 482* 483* 492* 493* 494* 496* 509* 510 510* 525* 527 529 543* com_err_ 000040 constant entry external dcl 102 ref 238 com_err_sw 000100 automatic bit(1) unaligned dcl 28 set ref 149* 238 control 66 based entry variable level 2 in structure "iocb" dcl 1-4 in procedure "ibm3270_" set ref 224* 447* control 1 based structure level 2 in structure "area_info" dcl 3-7 in procedure "ibm3270_" set ref 154* conversion 000312 stack reference condition dcl 128 ref 193 198 convert_dial_message_ 000052 constant entry external dcl 107 ref 336 convert_ipc_code_ 000026 constant entry external dcl 97 ref 258 323 377 383 510 cur_out_reqp 236 based pointer level 2 dcl 5-8 set ref 403* data_ptr 6 based pointer level 2 dcl 51 ref 461 define_area_ 000010 constant entry external dcl 90 ref 167 detach_iocb 26 based entry variable level 2 dcl 1-4 set ref 225* 488* device 2 based char(6) level 2 dcl 5-8 set ref 181* 313 340 device_responded 224 based bit(1) level 2 dcl 5-8 set ref 413* dial_manager_$privileged_attach 000050 constant entry external dcl 106 ref 315 dial_msg_chan 000252 automatic char(6) unaligned dcl 68 set ref 336* dial_msg_flags 000310 automatic structure level 1 dcl 78 set ref 336* dial_msg_module 000254 automatic char(32) unaligned dcl 69 set ref 336* dial_msg_ndialed 000264 automatic fixed bin(17,0) dcl 70 set ref 336* dial_qual 1 000266 automatic char(22) level 2 dcl 72 set ref 314* dma 000266 automatic structure level 1 dcl 72 set ref 315 315 eot 140 based char(1) level 2 dcl 5-8 set ref 425* 432* error_table_$action_not_performed 000104 external static fixed bin(35,0) dcl 124 ref 316 error_table_$bad_mode 000072 external static fixed bin(35,0) dcl 119 ref 294 error_table_$badopt 000102 external static fixed bin(35,0) dcl 123 ref 202 239 error_table_$line_status_pending 000074 external static fixed bin(35,0) dcl 120 ref 350 359 527 error_table_$noarg 000110 external static fixed bin(35,0) dcl 126 ref 190 error_table_$not_detached 000076 external static fixed bin(35,0) dcl 121 ref 163 error_table_$request_pending 000106 external static fixed bin(35,0) dcl 125 ref 305 329 error_table_$wrong_no_of_args 000100 external static fixed bin(35,0) dcl 122 ref 177 esc 145 based char(1) level 2 dcl 5-8 set ref 428* 435* etb 143 based char(1) level 2 dcl 5-8 set ref 424* 431* etx 142 based char(1) level 2 dcl 5-8 set ref 417* eua 153 based char(1) level 2 dcl 5-8 set ref 422* event_call_info based structure level 1 dcl 51 event_call_infop 000250 automatic pointer dcl 50 set ref 460* 461 465 event_channel 10 000266 automatic fixed bin(71,0) level 2 dcl 72 set ref 312* event_info 000240 automatic structure level 1 dcl 41 set ref 509 509 extend 1 based bit(1) level 3 packed unaligned dcl 3-7 set ref 155* first_out_reqp 242 based pointer array level 3 dcl 5-8 set ref 404* first_poll_reqp 226 based pointer level 2 dcl 5-8 set ref 414* first_read_infop 174 based pointer level 2 dcl 5-8 set ref 389* general_poll 225 based bit(1) level 2 dcl 5-8 set ref 412* get_process_id_ 000046 constant entry external dcl 105 ref 172 hbound builtin function dcl 116 ref 176 183 189 216 hcs_$reset_ips_mask 000034 constant entry external dcl 100 ref 227 275 450 490 hcs_$set_ips_mask 000032 constant entry external dcl 99 ref 220 272 445 485 hcs_$tty_attach 000054 constant entry external dcl 109 ref 340 hcs_$tty_detach 000056 constant entry external dcl 110 ref 480 hcs_$tty_order 000060 constant entry external dcl 111 ref 349 358 525 543 hcs_$wakeup 000044 constant entry external dcl 104 ref 467 header_buf based char unaligned dcl 5-80 ref 392 498 header_buf_len 202 based fixed bin(17,0) level 3 dcl 5-8 set ref 391* 392 392 498 498 header_buf_ptr 200 based pointer level 3 dcl 5-8 set ref 392* 498 header_data 200 based structure level 2 dcl 5-8 header_len 203 based fixed bin(17,0) level 3 dcl 5-8 set ref 399* i 000101 automatic fixed bin(17,0) dcl 29 set ref 183* 184 185 186 187 188* 188 189 195 197 203* 216* 218* 356* 358 358 438* 439 440* ibm3270_control_$control 000062 constant entry external dcl 112 ref 224 447 ibm3270_control_$timer_handler 000064 constant entry external dcl 113 ref 381 381 ibm3270_control_$wakeup_handler 000066 constant entry external dcl 114 ref 375 375 ic 150 based char(1) level 2 dcl 5-8 set ref 421* input_buf based char unaligned dcl 5-84 ref 394 500 input_buf_len 212 based fixed bin(17,0) level 2 dcl 5-8 set ref 393* 394 394 500 500 input_buf_ptr 210 based pointer level 2 dcl 5-8 set ref 394* 500 input_line_status 547 based fixed bin(17,0) level 2 dcl 5-8 set ref 411* input_state 217 based fixed bin(17,0) level 2 dcl 5-8 set ref 400* io_channel 124 based fixed bin(71,0) level 2 dcl 5-8 set ref 209* 280* 340* 375* 481* 493* iocb based structure level 1 dcl 1-4 iocbp 000104 automatic pointer dcl 31 set ref 148* 162 164 221 222 223 224 225 226* 267* 270 273 274* 289* 291 321* 375* 381* 446 447 448 449* 461* 462 474* 476 486 487 488 489* iomodule_name 000136 constant char(8) initial unaligned dcl 86 set ref 157 215 238* iox_$propagate 000036 constant entry external dcl 101 ref 226 274 449 489 iox_modes 000020 constant char(24) initial array dcl 2-6 ref 443 ipc_$block 000042 constant entry external dcl 103 ref 509 ipc_$create_ev_chn 000014 constant entry external dcl 92 ref 256 ipc_$decl_ev_call_chn 000020 constant entry external dcl 94 ref 321 375 381 ipc_$decl_ev_wait_chn 000022 constant entry external dcl 95 ref 481 482 483 ipc_$delete_ev_chn 000016 constant entry external dcl 93 ref 243 277 278 279 280 ipc_$drain_chn 000024 constant entry external dcl 96 ref 492 493 494 496 last_device_polled 233 based fixed bin(17,0) level 2 dcl 5-8 set ref 401* last_device_selected 234 based fixed bin(17,0) level 2 dcl 5-8 set ref 402* last_out_reqp 244 based pointer array level 3 dcl 5-8 set ref 405* last_poll_reqp 230 based pointer level 2 dcl 5-8 set ref 414* last_read_infop 176 based pointer level 2 dcl 5-8 set ref 390* length builtin function dcl 116 ref 346 line_ctl 000322 automatic structure level 1 dcl 4-9 set ref 525 525 line_stat 000324 automatic structure level 1 dcl 4-41 set ref 543 543 mask 000106 automatic bit(36) dcl 32 set ref 220* 227* 227* 272* 275* 275* 445* 450* 450* 485* 490* 490* max_dev 543 based fixed bin(17,0) level 2 dcl 5-8 set ref 406* message 2 based fixed bin(71,0) level 2 dcl 51 ref 465 min_dev 542 based fixed bin(17,0) level 2 dcl 5-8 set ref 406* mode_data 000136 automatic structure level 1 dcl 37 set ref 349 349 my_area_info 000112 automatic structure level 1 dcl 35 set ref 152 name 1 based char(32) level 2 dcl 1-4 set ref 164* nchan 116 based fixed bin(17,0) level 3 dcl 5-8 set ref 207* null builtin function dcl 116 ref 159 160 162 242 245 273 389 390 403 404 405 414 486 op 000322 automatic fixed bin(17,0) level 2 in structure "line_ctl" packed unaligned dcl 4-9 in procedure "ibm3270_" set ref 524* op parameter fixed bin(17,0) dcl 519 in procedure "line_control" ref 517 524 533 open 32 based entry variable level 2 dcl 1-4 set ref 223* 487* open_descrip_ptr 20 based pointer level 2 dcl 1-4 set ref 448* 486* open_description 106 based varying char(24) level 2 dcl 5-8 set ref 443* 448 open_event_message 134 based fixed bin(71,0) level 2 dcl 5-8 set ref 336 336 465* open_in_progress 131 based bit(1) level 2 dcl 5-8 set ref 300 302* 327* 333* 464 open_wakeup_occured 133 based bit(1) level 2 dcl 5-8 set ref 301 302* 333* 466* output_buf based char unaligned dcl 5-86 ref 398 501 output_buf_len 222 based fixed bin(17,0) level 2 dcl 5-8 set ref 397* 398 398 501 501 output_buf_ptr 220 based pointer level 2 dcl 5-8 set ref 398* 501 output_in_progress 240 based bit(1) level 2 dcl 5-8 set ref 410* output_line_status 550 based fixed bin(17,0) level 2 dcl 5-8 set ref 411* owner 2 based char(32) level 2 packed unaligned dcl 3-7 set ref 157* pend_interval 544 based fixed bin(71,0) level 2 dcl 5-8 set ref 407* pend_time 246 based fixed bin(71,0) array level 3 dcl 5-8 set ref 408* per_dev 242 based structure array level 2 dcl 5-8 polling_in_progress 223 based bit(1) level 2 dcl 5-8 set ref 412* processid 551 based bit(36) level 2 dcl 5-8 set ref 172* 467* pt 151 based char(1) level 2 dcl 5-8 set ref 426* 433* ra 152 based char(1) level 2 dcl 5-8 set ref 427* 434* release_area_ 000012 constant entry external dcl 91 ref 245 281 req 1 000136 automatic char(256) level 2 dcl 37 set ref 346 348* req_len 000136 automatic fixed bin(17,0) level 2 dcl 37 set ref 346* retry_limit 546 based fixed bin(17,0) level 2 dcl 5-8 set ref 197* 199 199* rtrim builtin function dcl 116 ref 443 sba 147 based char(1) level 2 dcl 5-8 set ref 420* sf 146 based char(1) level 2 dcl 5-8 set ref 419* size 13 based fixed bin(18,0) level 2 dcl 3-7 set ref 158* soh 144 based char(1) level 2 dcl 5-8 set ref 418* state 000107 automatic fixed bin(17,0) dcl 33 set ref 340* 349* 358* 480* 525* 543* str1 parameter char dcl 236 set ref 234 238* str2 parameter char dcl 236 set ref 234 238* string builtin function dcl 116 set ref 154* stx 141 based char(1) level 2 dcl 5-8 set ref 416* sys_info$max_seg_size 000070 external static fixed bin(35,0) dcl 118 ref 158 text_buf based char unaligned dcl 5-82 ref 396 499 text_buf_len 206 based fixed bin(17,0) level 3 dcl 5-8 set ref 395* 396 396 499 499 text_buf_ptr 204 based pointer level 3 dcl 5-8 set ref 396* 499 text_data 204 based structure level 2 dcl 5-8 text_len 207 based fixed bin(17,0) level 3 dcl 5-8 set ref 399* timer_channel 126 based fixed bin(71,0) level 2 dcl 5-8 set ref 211* 278* 381* 483* 495* 496* timer_manager_$reset_alarm_wakeup 000030 constant entry external dcl 98 ref 495 tty_index 4 based fixed bin(17,0) level 2 dcl 5-8 set ref 340* 349* 358* 480* 525* 543* unscanned_data_len 216 based fixed bin(17,0) level 2 dcl 5-8 set ref 399* unspec builtin function dcl 116 set ref 170* 336 336 416* 417* 418* 419* 420* 421* 422* 424* 425* 426* 427* 428* 431* 432* 433* 434* 435* 439* user_channel 120 based fixed bin(71,0) level 3 dcl 5-8 set ref 208* 243 243* 277* 467* 492* val 0(18) 000322 automatic fixed bin(17,0) array level 2 packed unaligned dcl 4-9 set ref 521* 522* 535* 536* val1 parameter fixed bin(17,0) dcl 519 ref 517 522 533 val2 parameter fixed bin(17,0) dcl 519 ref 533 536 version based fixed bin(17,0) level 2 in structure "area_info" dcl 3-7 in procedure "ibm3270_" set ref 153* version 000266 automatic fixed bin(17,0) level 2 in structure "dma" dcl 72 in procedure "ibm3270_" set ref 311* wait_list 116 based structure level 2 dcl 5-8 set ref 509 509 work_area based area(1024) dcl 5-79 set ref 169 281 281 392 394 396 398 work_areap based pointer level 2 dcl 5-8 set ref 171* 281 281 392 394 396 398 zero_on_free 1(02) based bit(1) level 3 packed unaligned dcl 3-7 set ref 156* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACCEPT_BID internal static fixed bin(17,0) initial dcl 4-20 BAD_BLOCK internal static fixed bin(17,0) initial dcl 4-48 BID_FAILED internal static fixed bin(17,0) initial dcl 4-48 Direct_input internal static fixed bin(17,0) initial dcl 2-15 Direct_output internal static fixed bin(17,0) initial dcl 2-15 Direct_update internal static fixed bin(17,0) initial dcl 2-15 FNP_WRITE_STATUS internal static fixed bin(17,0) initial dcl 4-48 HASP_INIT_COMPLETE internal static fixed bin(17,0) initial dcl 4-48 IBM3270_NAK_OUTPUT internal static fixed bin(17,0) initial dcl 4-48 IBM3270_SELECT_FAILED internal static fixed bin(17,0) initial dcl 4-48 IBM3270_WACK_MESSAGE internal static fixed bin(17,0) initial dcl 4-48 IBM3270_WACK_SELECT internal static fixed bin(17,0) initial dcl 4-48 IBM3270_WRITE_ABORT internal static fixed bin(17,0) initial dcl 4-48 IBM3270_WRITE_COMPLETE internal static fixed bin(17,0) initial dcl 4-48 IBM3270_WRITE_EOT internal static fixed bin(17,0) initial dcl 4-48 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 2-15 REPORT_WRITE_STATUS internal static fixed bin(17,0) initial dcl 4-20 REVERSE_INTERRUPT internal static fixed bin(17,0) initial dcl 4-48 SET_HASP_MODE internal static fixed bin(17,0) initial dcl 4-20 SET_HASP_TIMERS internal static fixed bin(17,0) initial dcl 4-20 SET_MASTER_SLAVE_MODE internal static fixed bin(17,0) initial dcl 4-20 SET_NAK_LIMIT internal static fixed bin(17,0) initial dcl 4-20 SET_POLLING_ADDR internal static fixed bin(17,0) initial dcl 4-20 SET_SELECT_ADDR internal static fixed bin(17,0) initial dcl 4-20 START_POLL internal static fixed bin(17,0) initial dcl 4-20 Sequential_input internal static fixed bin(17,0) initial dcl 2-15 Sequential_input_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_update internal static fixed bin(17,0) initial dcl 2-15 Stream_input internal static fixed bin(17,0) initial dcl 2-15 Stream_output internal static fixed bin(17,0) initial dcl 2-15 TOO_MANY_NAKS internal static fixed bin(17,0) initial dcl 4-48 header_data based char unaligned dcl 5-81 iox_$iocb_version_sentinel external static char(4) dcl 1-43 poll_addr automatic structure level 1 dcl 64 rw_status automatic structure level 1 dcl 60 short_iox_modes internal static char(4) initial array dcl 2-12 text_data based char unaligned dcl 5-83 unscanned_data based char unaligned dcl 5-85 valchar based structure level 1 packed unaligned dcl 4-13 NAMES DECLARED BY EXPLICIT CONTEXT. abort_attach 003016 constant entry internal dcl 234 ref 164 168 178 191 195 203 259 attach_return 001215 constant label dcl 228 ref 246 block 003202 constant entry internal dcl 507 ref 332 complete_open 001541 constant label dcl 336 ref 303 create_channel 003135 constant entry internal dcl 252 ref 208 209 210 211 flush_line_status 003352 constant entry internal dcl 541 ref 351 360 528 ibm3270_ 000306 constant entry external dcl 15 ibm3270_attach 000321 constant entry external dcl 146 ibm3270_close 002536 constant entry external dcl 472 ref 446 ibm3270_detach 001222 constant entry external dcl 265 ref 225 488 ibm3270_open 001366 constant entry external dcl 287 ref 223 487 line_control 003235 constant entry internal dcl 517 ref 365 367 369 479 line_control2 003330 constant entry internal dcl 533 ref 371 line_control_join 003252 constant label dcl 522 ref 537 maybe_mine_already 001604 constant label dcl 340 ref 316 open_wakeup_handler 002471 constant entry external dcl 458 ref 321 321 report_open_code 002463 constant label dcl 452 ref 295 306 317 324 330 334 339 345 354 363 366 368 370 372 378 384 retry_line_control 003260 constant label dcl 525 ref 529 retry_message_size 001715 constant label dcl 356 ref 361 retry_modes 001642 constant label dcl 346 ref 352 NAME DECLARED BY CONTEXT OR IMPLICATION. bin builtin function ref 197 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4162 4274 3460 4172 Length 4660 3460 112 347 501 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ibm3270_ 528 external procedure is an external procedure. on unit on line 193 86 on unit abort_attach 84 internal procedure is called during a stack extension. create_channel internal procedure shares stack frame of external procedure ibm3270_. block internal procedure shares stack frame of external procedure ibm3270_. line_control internal procedure shares stack frame of external procedure ibm3270_. flush_line_status internal procedure shares stack frame of external procedure ibm3270_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ibm3270_ 000100 com_err_sw ibm3270_ 000101 i ibm3270_ 000102 code ibm3270_ 000104 iocbp ibm3270_ 000106 mask ibm3270_ 000107 state ibm3270_ 000110 ch ibm3270_ 000112 my_area_info ibm3270_ 000136 mode_data ibm3270_ 000240 event_info ibm3270_ 000250 event_call_infop ibm3270_ 000252 dial_msg_chan ibm3270_ 000254 dial_msg_module ibm3270_ 000264 dial_msg_ndialed ibm3270_ 000266 dma ibm3270_ 000310 dial_msg_flags ibm3270_ 000320 area_infop ibm3270_ 000322 line_ctl ibm3270_ 000324 line_stat ibm3270_ 000326 adp ibm3270_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out call_int_this_desc call_int_other_desc return tra_ext enable shorten_stack ext_entry ext_entry_desc int_entry int_entry_desc any_to_any_tr alloc_based free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ convert_dial_message_ convert_ipc_code_ define_area_ dial_manager_$privileged_attach get_process_id_ hcs_$reset_ips_mask hcs_$set_ips_mask hcs_$tty_attach hcs_$tty_detach hcs_$tty_order hcs_$wakeup ibm3270_control_$control ibm3270_control_$timer_handler ibm3270_control_$wakeup_handler iox_$propagate ipc_$block ipc_$create_ev_chn ipc_$decl_ev_call_chn ipc_$decl_ev_wait_chn ipc_$delete_ev_chn ipc_$drain_chn release_area_ timer_manager_$reset_alarm_wakeup THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed error_table_$bad_mode error_table_$badopt error_table_$line_status_pending error_table_$noarg error_table_$not_detached error_table_$request_pending error_table_$wrong_no_of_args sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 15 000305 146 000313 148 000337 149 000343 150 000350 152 000351 153 000353 154 000355 155 000356 156 000360 157 000362 158 000365 159 000367 160 000371 162 000372 163 000375 164 000377 167 000415 168 000426 169 000447 170 000455 171 000460 172 000463 176 000472 177 000477 178 000502 181 000521 183 000540 184 000550 185 000573 186 000604 187 000615 188 000622 189 000623 190 000626 191 000631 193 000655 194 000671 195 000673 196 000740 197 000742 198 000766 199 000767 200 000771 202 000772 203 000775 204 001025 205 001026 207 001030 208 001033 209 001041 210 001050 211 001057 215 001066 216 001074 217 001105 218 001115 219 001142 220 001144 221 001157 222 001163 223 001164 224 001170 225 001174 226 001177 227 001205 228 001215 265 001216 267 001232 268 001236 270 001237 272 001241 273 001254 274 001257 275 001266 277 001276 278 001310 279 001322 280 001334 281 001346 283 001360 287 001361 289 001376 290 001403 291 001404 293 001406 294 001411 295 001414 300 001415 301 001417 302 001421 303 001423 305 001424 306 001427 311 001430 312 001432 313 001434 314 001437 315 001442 316 001455 317 001461 321 001463 322 001510 323 001512 324 001521 327 001522 328 001525 329 001527 330 001532 332 001533 333 001534 334 001537 336 001541 339 001602 340 001604 345 001640 346 001642 348 001644 349 001647 350 001704 351 001710 352 001711 354 001713 356 001715 358 001717 359 001755 360 001761 361 001762 363 001764 365 001766 366 001771 367 001773 368 001777 369 002001 370 002005 371 002007 372 002014 375 002016 376 002044 377 002046 378 002055 381 002056 382 002104 383 002106 384 002115 389 002116 390 002121 391 002122 392 002124 393 002135 394 002137 395 002150 396 002152 397 002163 398 002165 399 002176 400 002201 401 002203 402 002205 403 002206 404 002210 405 002224 406 002240 407 002243 408 002245 409 002261 410 002262 411 002263 412 002265 413 002267 414 002270 416 002273 417 002275 418 002277 419 002301 420 002303 421 002305 422 002307 423 002311 424 002313 425 002315 426 002317 427 002321 428 002323 429 002325 431 002326 432 002330 433 002332 434 002334 435 002336 438 002340 439 002344 440 002353 441 002360 443 002362 445 002415 446 002430 447 002435 448 002441 449 002444 450 002452 451 002462 452 002463 454 002465 458 002466 460 002476 461 002502 462 002504 464 002506 465 002510 466 002512 467 002514 468 002533 472 002534 474 002546 475 002553 476 002554 478 002556 479 002560 480 002563 481 002602 482 002614 483 002626 485 002640 486 002653 487 002656 488 002662 489 002665 490 002674 492 002704 493 002716 494 002730 495 002742 496 002752 498 002764 499 002772 500 003000 501 003006 503 003014 234 003015 238 003036 239 003066 240 003074 242 003075 243 003101 245 003115 246 003132 252 003135 256 003137 257 003150 258 003153 259 003162 261 003201 507 003202 509 003203 510 003223 511 003234 517 003235 521 003237 522 003252 524 003255 525 003260 527 003320 528 003324 529 003325 531 003327 533 003330 535 003332 536 003345 537 003351 541 003352 543 003353 544 003412 ----------------------------------------------------------- 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