[Info-vax] $QIO Volatile my arse

maherrj at googlemail.com maherrj at googlemail.com
Sun Aug 23 08:14:44 EDT 2015


Ok, TL;DR that ridiculous thread :-(

Can I please have "Water-Boy" and "Where's Gezelter now?" tell me what's wrong with the following? They always talk a good fight but are a bit shy when it comes to actual code as an example of "What's right". Sure I can pontificate with the best man about what I WOULDN'T DO but ask them to tell you what they WOULD DO and they run away :-(

Change the ampersands to spaces: -

************************************************************************************
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*
*&&&&&&&&&&&&COPYRIGHT&(c)&BY&TIER3&SOFTWARE&LTD.&ALL&RIGHTS&RESERVED.&&&&&&&&&&&&&*
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*
*&&&&THIS&SOFTWARE&IS&FURNISHED&UNDER&A&LICENSE&AND&MAY&BE&USED&AND&COPIED&ONLY&&&&*
*&&&&IN&ACCORDANCE&&WITH&THE&TERMS&AND&CONDITIONS&OF&SUCH&LICENSE&AND&&WITH&THE&&&&*
*&&&&THE&INCLUSION&&OF&THE&ABOVE&COPYRIGHT&NOTICE.&&THIS&SOFTWARE&&OR&ANY&OTHER&&&&*
*&&&&COPIES&&THEREOF&MAY&NOT&&BE&PROVIDED&&OR&OTHERWISE&MADE&AVAILABLE&&TO&&ANY&&&&*
*&&&&OTHER&&PERSON.&&NO&&TITLE&TO&&AND&OWNERSHIP&&OF&&THE&&SOFTWARE&&IS&&HEREBY&&&&*
*&&&&TRANSFERRED.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*
*&&&&THE&INFORMATION&&IN&THIS&SOFTWARE&&IS&SUBJECT&TO&CHANGE&WITHOUT&NOTICE&AND&&&&*
*&&&&SHOULD&NOT&BE&CONSTRUED&AS&A&COMMITMENT&BY&TIER3&SOFTWARE&LTD.&&&&&&&&&&&&&&&&*
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*
************************************************************************************
identification&division.
program-id.&&&&t3$app_ldr&&&&with&ident&"V3.1".
author.&&&&&&&&Richard&Maher.

data&division.
working-storage&section.
01&&io_block_size&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io_block_size.
01&&lnm$m_case_blind&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&lnm$m_case_blind.
01&&lib$k_vm_freq_sizes&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&lib$k_vm_freq_sizes.
01&&lib$k_vm_fixed&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&lib$k_vm_fixed.
01&&psl$c_user&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&psl$c_user.
01&&psl$c_exec&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&psl$c_exec.
01&&io$_setmode&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_setmode.&&&&
01&&t3$_nonodnam&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_nonodnam.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&t3$_noxport&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_noxport.
01&&ss$_nolognam&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_nolognam.
01&&ss$_bufferovf&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_bufferovf.
01&&ss$_nosuchdev&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_nosuchdev.
01&&ss$_protocol&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_protocol.
01&&ss$_wasset&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_wasset.
01&&ss$_wasclr&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_wasclr.
01&&ss$_exquota&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_exquota.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&error_oper&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_ntwork.
01&&bytes_1_to_3&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&redefines
&&&&error_oper&&&&&&&&&&&&&&&&&&&&&&pic&x(3).
*
01&&sndopr_msgbuf&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&external.
&&&&03&&opc$b_ms_type&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&opc$b_ms_target&&&&&&&&&&&&&pic&x(3).
&&&&03&&opc$l_ms_rqstid&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&oper_text&&&&&&&&&&&&&&&&&&&pic&x(255).
*
copy&"socket_area".
copy&"ldr_link_item".
*
01&&t3$ldr_zone&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&t3$io_zone&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&zone_flags&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&idle_limit&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&idle_delta&&&&&&&&&&&&&&&&&&&&&&pic&s9(11)v9(7)&comp&&&&external.
01&&lookup_chan&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp&&&&external.
01&&buffer_size&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
01&&page_size&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
01&&parent_node&&&&&&&&&&&&&&&&&&&&&pic&x(6)&&&&&&&&&&&&&&&&external.
01&&link_desc&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&external.
&&&&03&&bytes_reqd&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&buff_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
01&&ldr_max_query_size&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&log_status&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&external.
*
01&&look_aside_count&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&&5.
01&&ldr_extend_size&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&32.
01&&ldr_initial_size&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&64.
01&&ldr_block_size&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&&8.
01&&ldr_zone_alignment&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&&8.
01&&io_hdr_size&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&16.
01&&io_extend_size&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&&2.
01&&io_initial_size&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&&4.
01&&io_zone_alignment&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&&16.
*
01&&recv_quota&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
01&&send_quota&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&create_socket.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_tcp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&inet_protyp$c_stream.
*
01&&local_sock_desc.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&16.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&local_addr.
01&&local_addr.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_af_inet.
&&&&03&&local_port_number.
&&&&&&&&05&&low_byte&&&&&&&&&&&&&&&&pic&x(1).
&&&&&&&&05&&high_byte&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_inaddr_any.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(8).
*
01&&probe_idle&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&150.
01&&drop_idle&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&300.
*
01&&multinet_loop&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&88&&deja_vu&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&value&&&1.
*
01&&sock_opt_desc.
&&&&03&&sock_opt_len&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&48.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_sockopt.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&sock_opt.
01&&sock_opt.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_reuseaddr.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&opt_on.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_oobinline.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&opt_off.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_sndbuf.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&send_quota.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_rcvbuf.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&recv_quota.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&8.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_linger.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&linger_time.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_full_duplex_close.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&opt_on.
*
01&&tcp_opt_desc.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&24.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_tcpopt.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&tcp_opt.
01&&tcp_opt.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_tcp_nodelay.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&opt_on.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_tcp_probe_idle.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&probe_idle.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_tcp_drop_idle.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&drop_idle.
*
01&&opt_on&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&1.
01&&opt_off&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&0.
01&&linger_time.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&1.
&&&&03&&linger_secs&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&5.
*
01&&iosb.
&&&&03&&cond_val&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(6).
*
01&&jpi_item_list.
&&&&03&&item_process_name.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&15.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&jpi$_prcnam.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&process_name.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&process_name_len.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&jpi_iosb.
&&&&03&&jpi_cond&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(4).
01&&process_name.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(11).
&&&&03&&ldr_port_hex&&&&&&&&&&&&&&&&pic&x(4).
01&&process_name_len&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp.
*&&&&&&&&&&&&&&&&&&&&&&&&
01&&ldr_port_bin&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
01&&ldr_port_swap&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&redefines&
&&&&ldr_port_bin.
&&&&03&&high_byte&&&&&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&low_byte&&&&&&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
*
01&&syi_item_list.
&&&&03&&item_nodename.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&6.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&syi$_nodename.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&parent_node.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&parent_node_len.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.&&&&&&&&&&&&&&&&&
*
01&&parent-node_len&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp.
*
01&&syi_iosb.
&&&&03&&syi_cond&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(4).
*
01&&lnm_ldr_operator_list.
&&&&03&&item_string.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&2.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&lnm$_string.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&lnm_ldr_operator.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&lnm_ldr_operator_len.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&lnm_ldr_operator&&&&&&&&&&&&&&&&pic&x(2).
01&&lnm_ldr_operator_len&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
01&&ldr_operator&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
01&&lnm_ldr_logging_list.
&&&&03&&item_string.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&1.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&lnm$_string.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&lnm_ldr_logging.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&lnm_ldr_logging_len.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&lnm_ldr_logging&&&&&&&&&&&&&&&&&pic&x(1).
01&&lnm_ldr_logging_len&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
*
01&&lnm_ldr_page_size_list.
&&&&03&&item_string.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&2.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&lnm$_string.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&lnm_page_size.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&lnm_page_size_len.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&lnm_page_size&&&&&&&&&&&&&&&&&&&pic&x(5).
01&&lnm_page_size_len&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
*
01&&port_listen_msg.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(19)&&&&&&&&&&&&&&&value&&&"Listening&port#&&=&".
&&&&03&&out_port&&&&&&&&&&&&&&&&&&&&pic&z(4)9.
*
01&&page_size_msg.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(19)&&&&&&&&&&&&&&&value&&&"Using&page&size&&=&".
&&&&03&&out_page_size&&&&&&&&&&&&&&&pic&z9.
*
01&&user_oper_table.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper1.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper2.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper3.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper4.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper5.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper6.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper7.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper8.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper9.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper10.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper11.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&opc$m_nm_oper12.
*
01&&user_oper_array&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&redefines&&&&&&&&&&&&&&&user_oper_table.
&&&&03&&user_oper&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&occurs&&12.
*
01&&alive_and_kicking.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(43)&&&&&&&&&&&&&&&value
"Applet&Loader&Alive&and&Listening&on&Port".
&&&&03&&oper_port&&&&&&&&&&&&&&&&&&pic&z(4)9.
*
01&&sysprv.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&external&&&&&&&&prv$m_sysprv.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
procedure&division.
kick_off&section.
00.
&&&&call&"log_event"&using&by&descriptor&"Initializing.&.&.".

&&&&call&"sys$trnlnm"&
&&&&&&&&using&&&by&reference&&lnm$m_case_blind
&&&&&&&&&&&&&&&&by&descriptor&"lnm$system_table",&"t3$ldr_operator"
&&&&&&&&&&&&&&&&by&reference&&psl$c_exec,&lnm_ldr_operator_list
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&when&&&&ss$_normal&&&&&&if&lnm_ldr_operator(1:lnm_ldr_operator_len)&is&numeric
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&if&function&numval&(lnm_ldr_operator(1:lnm_ldr_operator_len))&>&0&and&<&13
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&move&lnm_ldr_operator(1:lnm_ldr_operator_len)&to&ldr_operator
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&end-if
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&end-if
&&&&&&&&when&&&&ss$_nolognam&&&&
&&&&&&&&when&&&&ss$_bufferovf&&&continue
&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8001,&sys_status
&&&&end-evaluate.

&&&&if&ldr_operator&not&=&zeros&add&user_oper&(ldr_operator)&to&error_oper.
&&&&move&bytes_1_to_3&to&opc$b_ms_target.

&&&&call&"sys$trnlnm"&
&&&&&&&&using&&&by&reference&&lnm$m_case_blind
&&&&&&&&&&&&&&&&by&descriptor&"lnm$system_table",&"t3$ldr_logging"
&&&&&&&&&&&&&&&&by&reference&&psl$c_exec,&lnm_ldr_logging_list
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&when&&&&ss$_bufferovf&&&
&&&&&&&&when&&&&ss$_normal&&&&&&if&function&upper-case&(lnm_ldr_logging)&=&"Y"&or&"T"&or&"O"&or&"1"
                                &&&&call&"log_event"&using&by&descriptor&"Event&logging&is&ON"
                                &&&&move&"Y"&to&log_status
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&end-if
&&&&&&&&when&&&&ss$_nolognam&&&&continue
&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8063,&sys_status
&&&&end-evaluate.

&&&&call&"sys$trnlnm"&
&&&&&&&&using&&&by&reference&&lnm$m_case_blind
&&&&&&&&&&&&&&&&by&descriptor&"lnm$system_table",&"t3$ldr_page_size"
&&&&&&&&&&&&&&&&by&reference&&psl$c_exec,&lnm_ldr_page_size_list
&&&&&&&&giving&&sys_status.

&&&&move&1&to&page_size.
&&&&evaluate&&&&sys_status
&&&&&&&&when&&&&ss$_normal&&&&&&if&lnm_page_size(1:lnm_page_size_len)&is&numeric
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&if&function&numval&(lnm_page_size(1:lnm_page_size_len))&>&0&and&<&64
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&move&lnm_page_size(1:lnm_page_size_len)&to&page_size
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&end-if
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&end-if
&&&&&&&&when&&&&ss$_nolognam&&&&
&&&&&&&&when&&&&ss$_bufferovf&&&continue
&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8060,&sys_status
&&&&end-evaluate.

&&&&move&page_size&to&out_page_size.
&&&&call&"log_event"&using&by&descriptor&page_size_msg.
&&&&multiply&page_size&by&512&giving&buffer_size.

&&&&multiply&buffer_size&by&4&giving&send_quota.
&&&&if&send_quota&>&61440
&&&&&&&&move&buffer_size&to&send_quota.

&&&&move&function&length&(link_item)&to&bytes_reqd.
&&&&move&function&length&(link_buff)&to&ldr_max_query_size,&recv_quota.
&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&call&"lib$create_vm_zone"
        using   by&reference    t3$ldr_zone,&
                                lib$k_vm_freq_sizes,&
                                look_aside_count,&
                                zone_flags,
                                ldr_extend_size,
                                ldr_initial_size,
                                ldr_block_size,
                                ldr_zone_alignment,
                                omitted,&omitted
                by&descriptor   "T3$LDR_ZONE",
                                omitted,&omitted
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8043,&sys_status.

&&&&call&"lib$create_vm_zone"&&&&
        using   by&reference    t3$io_zone,&
                                lib$k_vm_fixed,&
                                io_hdr_size,&
                                zone_flags,
                                io_extend_size,
                                io_initial_size,
                                io_block_size,
                                io_zone_alignment,
                                omitted,&omitted
                by&descriptor   "T3$IO_ZONE",
                                omitted,&omitted
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8044,&sys_status.

&&&&call&"sys$getjpiw"
&&&&&&&&using&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&jpi_item_list,&jpi_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&jpi_cond&to&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8002,&sys_status.

&&&&call&"ots$cvt_tz_l"
&&&&&&&&using&&&by&descriptor&ldr_port_hex
&&&&&&&&&&&&&&&&by&reference&&ldr_port_bin&
&&&&&&&&&&&&&&&&by&value&&&&&&4,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8003,&sys_status.

&&&&call&"sys$getsyiw"
&&&&&&&&using&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&syi_item_list,&syi_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&syi_cond&to&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8004,&sys_status.

&&&&if&parent_node_len&=&zeros&call&"lib$stop"&using&by&value&t3$_nonodnam,&0,&sys_status.
&&&&if&parent_node_len&<&6&move&spaces&to&parent_node((parent_node_len&+&1):(6&-&parent_node_len)).
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&call&"sys$setast"&using&by&value&0&giving&sys_status.
&&&&if&sys_status&not&=&ss$_wasset&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8006,&sys_status.

&&&&call&"sys$setprv"
        using   by&value        opt_on
                by&reference    sysprv
                by&value        0,&0
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8061,&sys_status.

&&&&perform&tcp_ip_init.

&&&&call&"sys$setprv"
        using   by&value        opt_off
                by&reference    sysprv
                by&value        0,&0
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8062,&sys_status.

&&&&call&"set_listen".

&&&&move&alive_and_kicking&to&oper_text.
&&&&call&"sys$sndopr"&
&&&&&&&&using&&&by&descriptor&&&sndopr_msgbuf(1:(function&length(alive_and_kicking)&+&8))
&&&&&&&&&&&&&&&&by&value&&&&&&&&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8007,&sys_status.

&&&&call&"log_event"&using&by&descriptor&"Initialization&Complete&-&Hibernating&zzzzzz".

&&&&call&"sys$setast"&using&by&value&1&giving&sys_status.
&&&&if&sys_status&not&=&ss$_wasclr&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8008,&sys_status.

&&&&call&"sys$hiber".

&&&&call&"log_event"&using&by&descriptor&"Image&Exit".

&&&&stop&run.
*
tcp_ip_init&section.
00.
&&&&call&"sys$assign"&
&&&&&&&&using&&&by&descriptor&"_BG:"
&&&&&&&&&&&&&&&&by&reference&&listen_chan
&&&&&&&&&&&&&&&&by&value&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal
&&&&&&&&if&sys_status&=&ss$_nosuchdev
&&&&&&&&&&&&call&"lib$stop"&
&&&&&&&&&&&&&&&&using&&&by&value&&&&&&&&t3$_noxport,&2
&&&&&&&&&&&&&&&&&&&&&&&&by&descriptor&&&"TCP/IP",&""
&&&&&&&&else
&&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8009,&sys_status.

&&&&move&ldr_port_bin&to&out_port,&oper_port.
&&&&call&"log_event"&using&by&descriptor&port_listen_msg.

&&&&move&corr&ldr_port_swap&to&local_port_number.

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&listen_chan,&io$_setmode
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&by&reference&&&&create_socket
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8010,&sys_status.
*
multinet_fix.
*
&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&listen_chan,&io$_setmode
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0,&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&sock_opt_desc
&&&&&&&&&&&&&&&&by&value&&&&&&&&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sys_status.
*
&&&&if&sys_status&=&ss$_protocol&and&not&deja_vu
&&&&&&&&subtract&8&from&sock_opt_len
&&&&&&&&set&deja_vu&to&true
&&&&&&&&go&to&multinet_fix.
*
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8072,&sys_status.

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&listen_chan,&io$_setmode
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&local_sock_desc
&&&&&&&&&&&&&&&&by&value&&&&&&&&1024
&&&&&&&&&&&&&&&&by&reference&&&&tcp_opt_desc
&&&&&&&&&&&&&&&&by&value&&&&&&&&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8011,&sys_status.

&&&&call&"sys$assign"&
&&&&&&&&using&&&by&descriptor&"_BG:"
&&&&&&&&&&&&&&&&by&reference&&lookup_chan
&&&&&&&&&&&&&&&&by&value&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8012,&sys_status.
*
end&program&t3$app_ldr.
identification&division.
program-id.&&&&net_event_ast.

environment&division.
configuration&section.
special-names.
symbolic&characters
&&&&carriage_return&is&14
&&&&line_feed&&&&&&&is&11.

data&division.
working-storage&section.
01&&acp_gethostbyaddr&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&acp_gethostbyaddr.
01&&io$_acpcontrol&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_acpcontrol.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&t3$_badnetmsg&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_badnetmsg.
01&&ss$_bufferovf&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_bufferovf.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_linkabort&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkabort.
01&&ss$_wasset&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_wasset.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_endoffile&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_endoffile.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_reject&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_reject.
01&&ss$_exquota&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_exquota.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&log_status&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&external.
01&&t3$ldr_zone&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&sndopr_msgbuf&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&external.
&&&&03&&opc$b_ms_type&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&opc$b_ms_target&&&&&&&&&&&&&pic&x(3).
&&&&03&&opc$l_ms_rqstid&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&oper_text&&&&&&&&&&&&&&&&&&&pic&x(255).
*
copy&"socket_area".
copy&"ldr_link_item".
*
01&&lookup_chan&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&external.
01&&link_desc&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&external.
&&&&03&&bytes_reqd&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&buff_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
01&&dvi_item_list.
&&&&03&&item_unit.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&dvi$_unit.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&link_unit.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&dvi_iosb.
&&&&03&&dvi_status&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&iosb.
&&&&03&&cond_val&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(6).
*
01&&port_swap.
&&&&03&&low_byte&&&&&&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&high_byte&&&&&&&&&&&&&&&&&&&pic&x(1).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
01&&port_swap_bin&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&redefines
&&&&port_swap&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
01&&eof_node&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1).
*
01&&y&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&"Y".
01&&n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&"N".
*
01&&net_shut_msg&&&&&&&&&&&&&&&&&&&&pic&x(45)&&&&&&&&&&&&&&&&value&&&"Received&TCP/IP&Network&Shutdown&Notification".
*
01&&tcp_ip_accept_msg.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(29)&&&&&&&&&&&&&&&value&&&"Connection&established&with:-".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&carriage-return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&line-feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(30)&&&&&&&&&&&&&&&value&&&"&&&&&&&&&&&&&&&&&&&&&&&&&Node&".
&&&&03&&accept_node&&&&&&&&&&&&&&&&&pic&x(31).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&carriage-return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&line-feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(30)&&&&&&&&&&&&&&&value&&&"&&&&&&&&&&&&&&Network&Address&".
&&&&03&&accept_addr&&&&&&&&&&&&&&&&&pic&x(15).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&carriage-return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&line-feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(30)&&&&&&&&&&&&&&&value&&&"&&&&&&&&&&&&&&&&&&Port&Number&".
&&&&03&&accept_port&&&&&&&&&&&&&&&&&pic&z(4)9.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&carriage-return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&&&&&value&&&line-feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(30)&&&&&&&&&&&&&&&value&&&"&&&&&&&&&&&&&&&&&&&&&&&&&Unit&".
&&&&03&&accept_unit&&&&&&&&&&&&&&&&&pic&x(8).
*
01&&tcp_ip_node_name&&&&&&&&&&&&&&&&pic&x(2048).
*
procedure&division.
kick_off&section.
00.
&&&&evaluate&&&&&&&&accept_cond
&&&&&&&&&&&&when&&&&ss$_normal&&&&&&perform&connect_accept_tcp_ip
&&&&&&&&&&&&when&&&&ss$_reject
&&&&&&&&&&&&when&&&&ss$_linkabort
&&&&&&&&&&&&when&&&&ss$_connecfail
&&&&&&&&&&&&when&&&&ss$_timeout
&&&&&&&&&&&&when&&&&ss$_exquota&&&&&call&"sys$dassgn"
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&using&&&by&value&&&accept_chan
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&giving&&sys_status
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&if&sys_status&not&=&ss$_normal
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8014,&sys_status
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&end-if
&&&&&&&&&&&&when&&&&ss$_shut&&&&&&&&perform&server_shutdown
&&&&&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&using&&&by&value&&&&&&&&t3$_badnetmsg,&2
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&by&descriptor&&&"TCP/IP"
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&by&value&&&&&&&&accept_cond
&&&&end-evaluate.

&&&&if&accept_cond&not&=&ss$_shut&call&"set_listen".

&&&&exit&program.
*
connect_accept_tcp_ip&section.
00.
&&&&call&"lib$get_vm"&using&bytes_reqd,&buff_addr,&t3$ldr_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8018,&sys_status.

&&&&move&accept_chan&to&link_net_chan.

&&&&if&log_status&=&"Y"
        perform&log_connection
&&&&&&&&if&sys_status&=&ss$_shut
        &&&&go&to&fini.
*
&&&&call&"lib$scopy_dxdx"
&&&&&&&&using   by&descriptor   link_item
                by&reference    link_desc
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8020,&sys_status.

&&&&call&"read_http"&using&by&value&buff_addr.
*
fini.
*
log_connection&section.
00.
&&&&call&"sys$fao"
&&&&&&&&using&&&by&descriptor&&&"!@UB.!@UB.!@UB.!@UB"
&&&&&&&&&&&&&&&&by&reference&&&&link_node_addr_len
&&&&&&&&&&&&&&&&by&descriptor&&&link_node_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&by&reference&&&&ha1,&ha2,&ha3,&ha4
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8015,&sys_status.

&&&&move&link_node_addr(1:link_node_addr_len)&to&accept_addr.

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&lookup_chan,&io$_acpcontrol
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&&&&&&&&&by&descriptor&&&acp_gethostbyaddr,&host_addr
&&&&&&&&&&&&&&&&by&reference&&&&link_node_len
&&&&&&&&&&&&&&&&by&descriptor&&&tcp_ip_node_name
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sys_status.

&&&&if&link_node_len&>&31&move&31&to&link_node_len.
*
&&&&evaluate&&&&&&&&sys_status
&&&&&&&&&&&&when&&&&ss$_bufferovf
&&&&&&&&&&&&when&&&&ss$_normal&&&&&&&move&n&to&eof_node
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&move&tcp_ip_node_name(1:link_node_len)&to&link_node
&&&&&&&&&&&&when&&&&ss$_endoffile&&&&move&y&to&eof_node
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&move&"Unknown&Node"&to&link_node
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&move&12&to&link_node_len&
&&&&&&&&&&&&when&&&&ss$_shut&&&&&&&&&go&to&fini
&&&&&&&&&&&&when&&&&other&&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8016,&sys_status
&&&&end-evaluate.

&&&&move&link_node(1:link_node_len)&&&&&&&&&&&&&&&to&accept_node.
&&&&move&host_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&to&link_host_addr.
&&&&move&corr&port_number&in&rem_sock_name&&&&&&&&to&port_swap.&&&&&&&
&&&&move&port_swap_bin&&&&&&&&&&&&&&&&&&&&&&&&&&&&to&link_socket,&accept_port.
*
&&&&call&"sys$getdviw"&
&&&&&&&&using&&&by&value&&&&&&&0,&accept_chan,&0
&&&&&&&&&&&&&&&&by&reference&&&dvi_item_list,&dvi_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&dvi_status&to&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8017,&sys_status.

&&&&move&spaces&to&accept_unit&in&tcp_ip_accept_msg.
&&&&call&"sys$fao"
&&&&&&&&using&&&by&descriptor&&&"_BG!ZW:",&omitted,&accept_unit&in&tcp_ip_accept_msg
&&&&&&&&&&&&&&&&by&value&&&&&&&&link_unit&
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8064,&sys_status.

&&&&call&"log_event"&using&by&descriptor&tcp_ip_accept_msg.

&&&&move&accept_unit&in&tcp_ip_accept_msg&to&link_unit_txt.
*
fini.
*
server_shutdown&section.
00.
&&&&call&"log_event"&using&by&descriptor&net_shut_msg.&

&&&&call&"sys$setast"&using&by&value&0&giving&sys_status.
&&&&if&sys_status&not&=&ss$_wasset&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8018,&sys_status.

&&&&call&"sys$wake"&using&by&value&0,0&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8019,&sys_status.
*
end&program&net_event_ast.
identification&division.
program-id.&&&&read_http.
data&division.
working-storage&section.
01&&cancel_read_ast&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&cancel_read_ast.
01&&stop_timer_ast&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&stop_timer_ast.
01&&io$_readvblk&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_readvblk.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_badparam&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_badparam.&&
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&ldr_max_query_size&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&idle_delta&&&&&&&&&&&&&&&&&&&&&&pic&s9(11)v9(7)&comp&&&&value&&&-10.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
00.
&&&&call&"sys$qio"
&&&&&&&&using&&&by&value&&&&&&&&0,&link_net_chan,&io$_readvblk
&&&&&&&&&&&&&&&&by&reference&&&&link_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&stop_timer_ast
&&&&&&&&&&&&&&&&by&reference&&&&link_item,&link_buff
&&&&&&&&&&&&&&&&by&value&&&&&&&&ldr_max_query_size,&0,&0,&0,&0
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&&&&&sys_status
&&&&&&&&&&&&when&&&&ss$_abort&
&&&&&&&&&&&&when&&&&ss$_cancel&
&&&&&&&&&&&&when&&&&ss$_timeout&&&&&
&&&&&&&&&&&&when&&&&ss$_connecfail&&
&&&&&&&&&&&&when&&&&ss$_badparam
&&&&&&&&&&&&when&&&&ss$_linkdiscon&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&ss$_shut&&&&&&&&
&&&&&&&&&&&&when&&&&ss$_normal&&&&&&continue
&&&&&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8021,&sys_status
&&&&end-evaluate.&

&&&&if&sys_status&=&ss$_normal
&&&&&&&&call&"sys$setimr"
                using   by&value&&&&&&&&0
        &&&&&&&&&&&&&&&&by&reference&&&&idle_delta
        &&&&&&&&&&&&&&&&by&value&&&&&&&&cancel_read_ast
        &&&&&&&&&&&&&&&&by&reference&&&&link_item
        &&&&&&&&&&&&&&&&by&value&&&&&&&&0
                giving&&sys_status
        if&sys_status&not&=&ss$_normal&
        &&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8065,&sys_status.

&&&&exit&program.
*
end&program&read_http.
identification&division.
program-id.&&&&stop_timer_ast.
data&division.
working-storage&section.
01&&read_http_ast&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&read_http_ast.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
00.
&&&&call&"sys$cantim"&using&link_item,&omitted&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8066,&sys_status.
*+
*&Queue&the&next&bit&(and&a&potential&destruction&of&link_item)
*&behind&any&already-queued&cancel_read_ast.
*-
&&&&call&"sys$dclast"
        using   by&value        read_http_ast
                by&reference    link_item
                by&value        0
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8067,&sys_status.

&&&&exit&program.
*
end&program&stop_timer_ast.
identification&division.
program-id.&&&&cancel_read_ast.
data&division.
working-storage&section.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&log_status&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&external.
01&&cxn_timeout_msg.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(25)&&&&&&&&&&&&&&&value&&&"Connection&timed&out&for".
&&&&03&&timeout_unit&&&&&&&&&&&&&&&&pic&x(8).
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
00.
&&&&if&log_status&=&"Y"&&&&&&&&
&&&&&&&&move&link_unit_txt&to&timeout_unit
&&&&&&&&call&"log_event"&using&by&descriptor&cxn_timeout_msg.

&&&&call&"sys$cancel"&using&by&value&link_net_chan&giving&sys_status.&
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8068,&sys_status.

&&&&exit&program.
*
end&program&cancel_read_ast.
identification&division.
program-id.&&&&read_http_ast.

environment&division.
configuration&section.
special-names.

symbolic&characters
&&&&carriage_return&is&14
&&&&line_feed&&&&&&&is&11.

data&division.
working-storage&section.
01&&close_ast&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&close_ast.
01&&acp_gethostentbyname&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&acp_gethostentbyname.
01&&io$_writevblk&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_writevblk.
01&&fab$c_bln&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&fab$c_bln.
01&&nam$c_bln&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&nam$c_bln.
01&&nam$c_maxrss&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&nam$c_maxrss.
01&&xab$c_fhclen&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&xab$c_fhclen.
01&&xab$c_itmlen&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&xab$c_itmlen.
01&&rms$_pending&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_pending.
01&&ots$_inpconerr&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ots$_inpconerr.
01&&ucx$c_af_inet&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_af_inet.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_endoffile&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_endoffile.
01&&ss$_suspended&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_suspended.
01&&ss$_badparam&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_badparam.&&
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&log_status&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&external.
01&&t3$ldr_zone&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&lookup_chan&&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&external.
*
01&&iosb.
&&&&03&&cond_val&&&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(6).
*
01&&reply_ast&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
01&&reply_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
01&&reply_len&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
01&&cr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.
01&&lf&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
*
01&&cmd_bytes&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&http_params_pos&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&http_method&&&&&&&&&&&&&&&&&&&&&pic&x(10).
01&&http_method_len&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&http_path&&&&&&&&&&&&&&&&&&&&&&&pic&x(255).
01&&http_path_len&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.&&&&&&&&&&&&&&&&&
01&&http_field_cnt&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&path_index&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&http_cmd&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1024).
01&&item_start&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
01&&http_file_name&&&&&&&&&&&&&&&&&&pic&x(255).
01&&http_file_name_len&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&http_sub_dir&&&&&&&&&&&&&&&&&&&&pic&x(255).
01&&http_sub_dir_len&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
01&&fab_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
01&&nam_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
01&&xab_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
01&&itm_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
01&&xab_item_list.
&&&&09&&xabitm_len&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&4.
&&&&09&&xabitm_code&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp&&&&value&&&external&&&&&&&&xab$_uchar_directory.
&&&&09&&xabitm_dir&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
&&&&09&&xabitm_outlen&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
&&&&09&&xabitm_terminator&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
01&&reply_buffer&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
01&&reply_length&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
*
01&&bad_request.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(24)&&&&&&&&&&&&&&&value&&&"HTTP/1.0&400&Bad&Request".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.&&&&&&
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
*
01&&not_implemented.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(28)&&&&&&&&&&&&&&&value&&&"HTTP/1.0&501&Not&Implemented".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.&&&&&&
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
*
01&&forbidden.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(22)&&&&&&&&&&&&&&&value&&&"HTTP/1.0&403&Forbidden".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.&&&&&&
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
*&&&&&&&&
01&&invalid_cmd_msg.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(26)&&&&&&&&&&&&&&&value&&&"Invalid&HTTP&command&from".
&&&&03&&invalid_cmd_unit&&&&&&&&&&&&pic&x(8).
*&&&&&&&&
01&&name_too_big_msg.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(22)&&&&&&&&&&&&&&&value&&&"Filename&too&big&from".
&&&&03&&too_big_unit&&&&&&&&&&&&&&&&pic&x(8).
*
01&&request_mask.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(26)&&&&&&&&&&&&&&&value&&&"Received&!AS&request&from".
&&&&03&&request_unit&&&&&&&&&&&&&&&&pic&x(8).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(2)&&&&&&&&&&&&&&&&value&&&"!/".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(9)&&&&&&&&&&&&&&&&value&&&"Path:&!AS".
*
01&&request_msg&&&&&&&&&&&&&&&&&&&&&pic&x(350).
01&&request_msg_len&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
kick_off&section.
00.
&&&&move&link_cond&to&sys_status.
&&&&evaluate&&&&&&&&sys_status
&&&&&&&&&&&&when&&&&ss$_abort&
&&&&&&&&&&&&when&&&&ss$_cancel&
&&&&&&&&&&&&when&&&&ss$_timeout&&&&&
&&&&&&&&&&&&when&&&&ss$_connecfail&&
&&&&&&&&&&&&when&&&&ss$_badparam&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&when&&&&ss$_linkdiscon&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&ss$_suspended&&&call&"read_http"&using&link_item
&&&&&&&&&&&&when&&&&ss$_shut&&&&&&&&
&&&&&&&&&&&&when&&&&ss$_normal&&&&&&continue
&&&&&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8022,&sys_status
&&&&end-evaluate.&
&&&&if&sys_status&not&=&ss$_normal&go&to&fini.

&&&&move&zeros&to&cmd_bytes.
&&&&inspect&link_buff(1:link_bytes)&tallying&cmd_bytes&for&characters&before&initial&lf.
&&&&if&cmd_bytes&=&link_bytes&
&&&&&&&&if&log_status&=&"Y"&
&&&&&&&&&&&&move&link_unit_txt&to&invalid_cmd_unit
&&&&&&&&&&&&call&"log_event"&using&by&descriptor&invalid_cmd_msg
&&&&&&&&end-if
&&&&&&&&call&"link_fini"&using&link_item,&ss$_abort
&&&&&&&&go&to&fini.

&&&&move&zeros&to&http_field_cnt.
&&&&move&1&to&http_params_pos.
&&&&move&link_buff(1:cmd_bytes)&to&http_cmd.
&&&&unstring&&&&http_cmd
&&&&&&&&&&&&&&&&delimited&by&&&&&&&&&&&&all&spaces
&&&&&&&&into&&&&http_method&&&&&&&&&&&&&count&in&http_method_len,
&&&&&&&&&&&&&&&&http_path&&&&&&&&&&&&&&&count&in&http_path_len
&&&&&&&&with&&&&pointer&&&&&&&&&&&&&&&&&http_params_pos
&&&&&&&&&&&&&&&&tallying&in&&&&&&&&&&&&&http_field_cnt
&&&&end-unstring.

&&&&if&http_field_cnt&<&2&
&&&&&&&&if&log_status&=&"Y"&
&&&&&&&&&&&&move&link_unit_txt&to&invalid_cmd_unit
&&&&&&&&&&&&call&"log_event"&using&by&descriptor&invalid_cmd_msg
&&&&&&&&end-if
&&&&&&&&move&function&length&(bad_request)&to&reply_length
&&&&&&&&set&reply_buffer&to&reference&bad_request
&&&&&&&&perform&non_comprendo
&&&&&&&&go&to&fini.

&&&&evaluate    http_method(1:http_method_len)&
        when    "GET"   move&1&to&link_method
        when    "HEAD"  move&2&to&link_method
        when    other   move&function&length&(not_implemented)&to&reply_length
                        set&reply_buffer&to&reference&not_implemented
                        perform&non_comprendo
                        go&to&fini.

&&&&if&http_path_len&>&function&length&(http_path)
&&&&&&&&if&log_status&=&"Y"&
&&&&&&&&&&&&move&link_unit_txt&to&too_big_unit
&&&&&&&&&&&&call&"log_event"&using&by&descriptor&name_too_big_msg
&&&&&&&&end-if
&&&&&&&&move&function&length&(bad_request)&to&reply_length
&&&&&&&&set&reply_buffer&to&reference&bad_request
&&&&&&&&perform&non_comprendo
&&&&&&&&go&to&fini.

&&&&if&log_status&=&"Y"
&&&&&&&&perform&show_request.

&&&&if&http_path&(1:1)&=&"/"
        move&http_path(2:)&to&http_path
        subtract&1&from&http_path_len.

&&&&move&1&to&item_start.
&&&&move&spaces&to&http_sub_dir,
&&&&&&&&&&&&&&&&&&&http_file_name.
&&&&move&zeros&to&path_index,&
                &&http_sub_dir_len.

&&&&perform&until&path_index&=&http_path_len&&&&
&&&&&&&&inspect&http_path&(item_start:http_path_len)&tallying&path_index&for&characters&before&initial&"/"
        if&path_index&not&=&http_path_len&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&add&1&to&http_sub_dir_len
&&&&&&&&&&&&move&"."&to&http_sub_dir(http_sub_dir_len:1)&&&
&&&&&&&&&&&&move&http_path&(item_start:path_index)&to&http_sub_dir&((http_sub_dir_len&+&1):path_index)
&&&&&&&&&&&&add&path_index&to&http_sub_dir_len
&&&&&&&&&&&&add&1&to&path_index&
&&&&&&&&&&&&add&path_index&to&item_start
&&&&&&&&&&&&subtract&path_index&from&http_path_len
&&&&&&&&&&&&move&zeros&to&path_index
&&&&&&&&end-if
&&&&end-perform.
*+
*&Don't&allow&directory&listings
*-
&&&&if&http_path_len&=&zeros
        move&function&length&(forbidden)&to&reply_length
&&&&&&&&set&reply_buffer&to&reference&forbidden
        perform&non_comprendo
        go&to&fini.

&&&&string
        "[",&http_sub_dir(1:http_sub_dir_len),&"]",&
        http_path&(item_start:http_path_len)&
&&&&&&&&delimited&by&size
&&&&into
        http_file_name
&&&&on&overflow
        continue
&&&&end-string.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

&&&&add&http_sub_dir_len,&2,&http_path_len&giving&http_file_name_len.
&&&&perform&open_file.
*
fini.
&&&&exit&program.
*
non_comprendo&section.
00.
&&&&call&"sys$qio"
&&&&&&&&using&&&by&value&&&&&&&&0,&link_net_chan,&io$_writevblk
&&&&&&&&&&&&&&&&by&reference&&&&link_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&close_ast
&&&&&&&&&&&&&&&&by&reference&&&&link_item
&&&&&&&&&&&&&&&&by&value&&&&&&&&reply_buffer,&reply_length,&0,&0,&0,&0
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8030,&sys_status
&&&&end-evaluate.
*
open_file&section.
00.
&&&&call&"lib$get_vm"&using&fab$c_bln,&fab_addr,&t3$ldr_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8034,&sys_status.

&&&&call&"lib$get_vm"&using&nam$c_bln,&nam_addr,&t3$ldr_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8057,&sys_status.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&call&"lib$get_vm"&using&xab$c_fhclen,&xab_addr,&t3$ldr_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8058,&sys_status.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&call&"lib$get_vm"&using&xab$c_itmlen,&itm_addr,&t3$ldr_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8071,&sys_status.

&&&&move&http_file_name&(1:http_file_name_len)&to&link_fna.
&&&&set&xabitm_dir&to&reference&link_directory.
&&&&move&xab_item_list&to&link_xab_item_list.

&&&&call&"t3$$open_file"
        using   by&value        fab_addr,&
                                nam_addr,&
                                xab_addr,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&itm_addr
&&&&&&&&&&&&&&&&by&reference&&&&link_esa,&&&&&&
                                link_fna
                by&value        http_file_name_len
                by&reference    link_xab_item_list,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&link_item
        giving  sys_status.

&&&&if&sys_status&not&=&rms$_pending&
        call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8035,&sys_status.
*
show_request&section.
00.
&&&&move&link_unit_txt&to&request_unit.

&&&&call&"sys$fao"
        using   by&descriptor   request_mask
                by&reference    request_msg_len
                by&descriptor   request_msg,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&http_method(1:http_method_len),
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&http_path(1:http_path_len)
        giving  sys_status.&&
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8069,&sys_status.

&&&&call&"log_event"&using&by&descriptor&request_msg(1:request_msg_len).
*
end&program&read_http_ast.
identification&division.
program-id.&&&&write_net.
data&division.
working-storage&section.
01&&write_net_ast&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&write_net_ast.
01&&io$_writevblk&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_writevblk.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
01&&io_header.
&&&&03&&iosb.
&&&&&&&&05&&io_cond&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&&&&&05&&bytes_read&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&io_buffer&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&io_link&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
procedure&division&using&link_item,&io_header.
kick_off&section.
00.&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&call&"sys$qio"
&&&&&&&&using&&&by&value&&&&&&&&0,&link_net_chan,&io$_writevblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&write_net_ast
&&&&&&&&&&&&&&&&by&reference&&&&io_header
&&&&&&&&&&&&&&&&by&value&&&&&&&&io_buffer,&bytes_read,&0,&0,&0,&0
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&add&1&to&link_ref_cnt
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue&
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&move&sys_status&to&link_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8032,&sys_status
&&&&end-evaluate.

&&&&exit&program.
*
end&program&write_net.
identification&division.
program-id.&&&&write_net_ast.
data&division.
working-storage&section.
01&&io_block_size&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io_block_size.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&t3$io_zone&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
*
01&&io_block_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
linkage&section.
01&&io_header.
&&&&03&&iosb.
&&&&&&&&05&&io_cond&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&&&&&05&&bytes_read&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&io_buffer&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&io_link&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
procedure&division&using&io_header.
00.
&&&&call&"write_net_body"
        using   by&value        io_link
                by&reference    io_header.

&&&&set&io_block_addr&to&reference&io_header.
&&&&call&"lib$free_vm"&using&io_block_size,&io_block_addr,&t3$io_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8056,&sys_status.

&&&&exit&program.
*
end&program&write_net_ast.
identification&division.
program-id.&&&&write_net_body.
data&division.
working-storage&section.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&t3$io_zone&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&page_size&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
*
linkage&section.
copy&"ldr_link_item".
*
01&&io_header.
&&&&03&&iosb.
&&&&&&&&05&&io_cond&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&&&&&05&&bytes_read&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&io_buffer&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&io_link&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
procedure&division&using&link_item,&io_header.
kick_off&section.
00.
&&&&if&link_ref_cnt&=&zeros
        call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8051,&ss$_abort
&&&&else
        subtract&1&from&link_ref_cnt.

&&&&call&"lib$free_vm_page"&using&page_size,&io_buffer&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8053,&sys_status.

&&&&if&link_status&=&zeros
&&&&&&&&move&io_cond&to&sys_status
&&&&&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&move&sys_status&to&link_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8037,&sys_status
&&&&&&&&end-evaluate.
*
fini.
&&&&if&zeros&=&link_status&and&link_residual&and&link_ref_cnt
&&&&&&&&move&ss$_normal&to&link_status
&&&&&&&&call&"flush_network"&using&link_item&&
&&&&else
&&&&&&&&if&link_status&not&=&zeros&and&link_ref_cnt&=&zeros
        &&&&call&"link_fini"&using&link_item,&link_status.

&&&&exit&program.
*
end&program&write_net_body.
identification&division.
program-id.&&&&file_opened.
data&division.
working-storage&section.
01&&close_ast&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&close_ast.
01&&get_file&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&get_file.
01&&io$_writevblk&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_writevblk.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&reply_hdr_mask.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(17)&&&&&&&&&&&&&&&value&&&"HTTP/1.0&200&OK!/".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(29)&&&&&&&&&&&&&&&value&&&"Server:&Tier3&Applet&Loader!/".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(19)&&&&&&&&&&&&&&&value&&&"Content-type:&!AS!/".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(19)&&&&&&&&&&&&&&&value&&&"Connection:&close!/".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(18)&&&&&&&&&&&&&&&value&&&"Pragma:&no-cache!/".
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(23)&&&&&&&&&&&&&&&value&&&"Content-Length:&!ZL!/!/".
*
01&&content_type&&&&&&&&&&&&&&&&&&&&pic&x(30).
01&&content_len&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
01&&hdr_ast&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
01&&reply_hdr_len&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
01&&open_success.
&&&&03&&file_chan&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&file_ffb&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&file_ebk&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&file_esl&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&type_len&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&type_offset&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
01&&extended_file_spec&&&&&&&&&&&&&&pic&x(255).
*
procedure&division&
&&&&using&&&&&link_item,
&&&&&&&&&&&&&&open_success,
&&&&&&&&&&&&&&extended_file_spec
&&&&giving&&&&sys_status.
*
kick_off&section.
00.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&move&file_chan&to&link_file_chan.
&&&&move&function&upper-case&(extended_file_spec(type_offset:type_len))&
&&&&&&to&extended_file_spec(type_offset:type_len).

&&&&DISPLAY&"Spec&is&*",&extended_file_spec(type_offset:type_len),&"*".

&&&&evaluate    extended_file_spec(type_offset:type_len)
        when    ".XML"&
        when    ".XHTML"&
        when    ".HTML"&move&"text/html"                &&&&&to&content_type
        when    ".CSS"&
        when    ".JS"&
        when    ".CONF"&
        when    ".TXT"  move&"text/plain"               &&&&&to&content_type
        when    ".GIF"  move&"image/gif"                &&&&&to&content_type
        when    ".JPG"  move&"image/jpeg"               &&&&&to&content_type
        when    ".PNG"  move&"image/png"                &&&&&to&content_type
        when    ".ZIP"  move&"application/zip"          &&&&&to&content_type
        when    ".JAR"  move&"application/java-archive"&&&&&&to&content_type
&&&&&&&&when&&&&".SWF"&&move&"application/x-shockwave-flash"&to&content_type
        when    other   move&"application/octet-stream" &&&&&to&content_type
&&&&end-evaluate.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&if&file_ffb&not&=&zeros
        subtract&1&from&file_ebk.

&&&&multiply&file_ebk&by&512&giving&content_len
&&&&add&file_ffb&to&content_len.

&&&&call&"sys$fao"
        using   by&descriptor   reply_hdr_mask
                by&reference    reply_hdr_len
                by&descriptor   link_buff,&content_type
                by&value        content_len
        giving  sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8036,&sys_status.

&&&&if&link_method&=&1
        move&get_file&to&hdr_ast
&&&&else
        move&close_ast&to&hdr_ast
&&&&&&&&call&"sys$dassgn"&using&by&value&link_file_chan&giving&sys_status
&&&&&&&&move&zeros&to&link_file_chan
&&&&&&&&if&sys_status&not&=&ss$_normal&
        &&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8041,&sys_status.
*
&&&&perform&send_reply.
*
&&&&exit&program.
*
send_reply&section.
00.
&&&&move&content_len&to&link_residual.

&&&&call&"sys$qio"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&using&&&by&value&&&&&&&&0,&link_net_chan,&io$_writevblk
&&&&&&&&&&&&&&&&by&reference&&&&link_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&hdr_ast
&&&&&&&&&&&&&&&&by&reference&&&&link_item,&link_buff
&&&&&&&&&&&&&&&&by&value&&&&&&&&reply_hdr_len,&0,&0,&0,&0
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8039,&sys_status
&&&&end-evaluate.
*
end&program&file_opened.
identification&division.
program-id.&&&&file_error.

environment&division.
configuration&section.
special-names.
symbolic&characters
&&&&carriage_return&is&14
&&&&line_feed&&&&&&&is&11.

data&division.
working-storage&section.
01&&close_ast&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&close_ast.
01&&io$_writevblk&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_writevblk.
01&&rms$_dnf&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_dnf.
01&&rms$_fnf&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_fnf.
01&&rms$_eof&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_eof.
01&&rms$_prv&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_prv.
01&&rms$_org&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_org.
01&&rms$_nod&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_nod.
01&&rms$_dev&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_dev.
01&&rms$_dir&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_dir.
01&&rms$_fnm&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_fnm.
01&&rms$_typ&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_typ.
01&&rms$_ver&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_ver.
01&&rms$_syn&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_syn.
01&&rms$_wld&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&rms$_wld.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
01&&log_status&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&external.
*
01&&error_response.
&&&&03&&error_header.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(9)&&&&&&&&&&&&&&&&value&&&"HTTP/1.0".
&&&&&&&&05&&header_error&&&&&&&&&&&&pic&x(20).
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.&&&&&&
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.&&&&&&
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
&&&&03&&error_body.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(76)&&&&&&&&&&&&&&&value&&&
'<html><h1&style="color:Turquoise;&font-family:&Georgia;&font-weight:&bold;">'.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(82)&&&&&&&&&&&&&&&value&&&
'Tier3&Applet&Uploader</h1><br><h2&style="color:&Black;&font-weight:&bold;">Error:'.
&&&&&&&&05&&body_error&&&&&&&&&&&&&&pic&x(20).
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(12)&&&&&&&&&&&&&&&value&&&"</h2></html>".&&&&
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.&&&&&&
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&carriage_return.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&value&&&line_feed.
*
01&&log_error_mask.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(14)&&&&&&&&&&&&&&&value&&&"Error&on&unit".
&&&&03&&log_error_unit&&&&&&&&&&&&&&pic&x(9).
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&x(20)&&&&&&&&&&&&&&&value&&&"processing&file&!AS".
01&&log_error_msg&&&&&&&&&&&&&&&&&&&pic&x(300).
01&&log_error_msg_len&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
*
01&&rms_vector.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&value&&&2.
&&&&03&&putmsg_sts&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
&&&&03&&putmsg_stv&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
01&&extended_file_spec&&&&&&&&&&&&&&pic&x(255).
01&&file_esl&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&err_sts&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
01&&err_stv&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
procedure&division&
&&&&using&&&&&link_item,
&&&&&&&&&&&&&&extended_file_spec,
&&&&&&&&&&&&&&file_esl,
&&&&&&&&&&&&&&err_sts,
&&&&&&&&&&&&&&err_stv
&&&&giving&&&&sys_status.
*
kick_off&section.
00.
&&&&if&log_status&=&"Y"
        perform&log_error.

&&&&evaluate    err_sts
        when    rms$_dnf
        when    rms$_fnf        move&"404&Not&Found"&&&&&&&to&header_error,&body_error
        when    rms$_eof        move&"204&No&Content"&&&&&&to&header_error,&body_error
        when    rms$_prv        move&"403&Forbidden"&&&&&&&to&header_error,&body_error
        when    rms$_org        move&"501&Not&Implemented"&to&header_error,&body_error
        when    rms$_nod
        when    rms$_dev
        when    rms$_dir
        when    rms$_fnm
        when    rms$_typ
        when    rms$_ver
        when    rms$_syn
        when    rms$_wld        move&"400&Bad&Request"&&&&&to&header_error,&body_error
        when    other           move&"500&Server&Error"&&&&to&header_error,&body_error
&&&&end-evaluate.

&&&&call&"sys$qio"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&using&&&by&value&&&&&&&&0,&link_net_chan,&io$_writevblk
&&&&&&&&&&&&&&&&by&reference&&&&link_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&close_ast
&&&&&&&&&&&&&&&&by&reference&&&&link_item,&error_response
&&&&&&&&&&&&&&&&by&value&&&&&&&&227,&0,&0,&0,&0
&&&&&&&&giving&&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8030,&sys_status
&&&&end-evaluate.
*
&&&&exit&program.
*
log_error&section.
00.
&&&&move&link_unit_txt&to&log_error_unit.

&&&&call&"sys$fao"
&&&&&&&&using&&&by&descriptor&&&log_error_mask
&&&&&&&&&&&&&&&&by&reference&&&&log_error_msg_len
&&&&&&&&&&&&&&&&by&descriptor&&&log_error_msg,&extended_file_spec&(1:file_esl)
&&&&&&&&giving&&sys_status
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8070,&sys_status.

&&&&call&"log_event"&using&by&descriptor&log_error_msg(1:log_error_msg_len).

&&&&move&err_sts&to&putmsg_sts.
&&&&move&err_stv&to&putmsg_stv.
&&&&call&"sys$putmsg"&using&rms_vector&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8042,&sys_status.
*
end&program&file_error.
identification&division.
program-id.&&&&close_ast.
data&division.
working-storage&section.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
kick_off&section.
00.
&&&&move&link_cond&to&sys_status.

&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&call&"flush_network"&using&link_item
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8038,&sys_status
&&&&end-evaluate.
*
fini.
&&&&exit&program.
*
end&program&close_ast.
identification&division.
program-id.&&&&get_file.
data&division.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
working-storage&section.
01&&io_block_size&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io_block_size.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_timeout&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_timeout.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_connecfail&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_connecfail.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&t3$io_zone&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&io_block_addr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
kick_off&section.
00.
&&&&move&link_cond&to&sys_status.
&&&&evaluate&&&&sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&continue
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_connecfail
&&&&&&&&&&&&when&&&&&&&&ss$_timeout&&&&&call&"link_fini"&using&link_item,&sys_status
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8040,&sys_status
&&&&end-evaluate.
&&&&if&sys_status&not&=&ss$_normal&go&to&fini.
*
&&&&call&"lib$get_vm"&using&io_block_size,&io_block_addr,&t3$io_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8045,&sys_status.

&&&&move&1&to&link_last_block.
&&&&call&"read_file"
        using   by&reference    link_item,
                by&value        io_block_addr.
*
fini.
&&&&exit&program.
*
end&program&get_file.
identification&division.
program-id.&&&&read_file.
data&division.
working-storage&section.
01&&read_file_ast&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&read_file_ast.
01&&io$_readvblk&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_readvblk.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&buffer_size&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
01&&page_size&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
*
01&&bytes_to_read&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
01&&io_header.
&&&&03&&iosb.
&&&&&&&&05&&io_cond&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&&&&&05&&bytes_read&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&io_buffer&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&io_link&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
procedure&division&using&link_item,&io_header.
kick_off&section.
00.
&&&&set&io_link&to&reference&link_item.

&&&&call&"lib$get_vm_page"&using&page_size,&io_buffer&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8046,&sys_status.

&&&&if&link_residual&<&buffer_size
        move&link_residual&to&bytes_to_read
&&&&else
        move&buffer_size&&&to&bytes_to_read.

&&&&call&"sys$qio"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&using&&&by&value&&&&&&&&0,&link_file_chan,&io$_readvblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&read_file_ast
&&&&&&&&&&&&&&&&by&reference&&&&io_header
&&&&&&&&&&&&&&&&by&value&&&&&&&&io_buffer,&bytes_to_read,&link_last_block,&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8047,&sys_status.

&&&&add&1&to&link_ref_cnt.

&&&&exit&program.
*
end&program&read_file.
identification&division.
program-id.&&&&read_file_ast.
data&division.
working-storage&section.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
*
01&&io_header.
&&&&03&&iosb.
&&&&&&&&05&&io_cond&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&&&&&05&&bytes_read&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&io_buffer&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&io_link&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
procedure&division&using&io_header.
kick_off&section.
00.
&&&&if&io_cond&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8048,&io_cond.

&&&&call&"read_file_body"
        using   by&value        io_link
                by&reference    io_header.

&&&&exit&program.
*
end&program&read_file_ast.
identification&division.
program-id.&&&&read_file_body.
data&division.
working-storage&section.
01&&io_block_size&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io_block_size.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&t3$io_zone&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&buffer_size&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
01&&page_size&&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp&&&&external.
*
01&&io_block_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
linkage&section.
copy&"ldr_link_item".
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
01&&io_header.
&&&&03&&iosb.
&&&&&&&&05&&io_cond&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&&&&&05&&bytes_read&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&pic&9(4)&&&&&&&&comp.
&&&&03&&io_buffer&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&io_link&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
procedure&division&using&link_item,&io_header.
kick_off&section.
00.
&&&&if&link_ref_cnt&=&zeros&&&&&&&&&&&&&&&&&
        call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8054,&ss$_abort
&&&&else
        subtract&1&from&link_ref_cnt.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&if&link_status&=&zeros&
&&&&&&&&subtract&bytes_read&from&link_residual
&&&&&&&&call&"write_net"&using&link_item,&io_header.

&&&&if&link_status&not&=&zeros&go&to&clean_up.
*
&&&&if&link_residual&=&zeros&go&to&fini.
*
&&&&call&"lib$get_vm"&using&io_block_size,&io_block_addr,&t3$io_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8055,&sys_status.

&&&&add&page_size&to&link_last_block.
&&&&call&"read_file"&
        using   by&reference    link_item
                by&value        io_block_addr.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&go&to&fini.
*
clean_up.
*
&&&&call&"lib$free_vm_page"&using&page_size,&io_buffer&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8053,&sys_status.

&&&&set&io_block_addr&to&reference&io_header.
&&&&call&"lib$free_vm"&using&io_block_size,&io_block_addr,&t3$io_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8052,&sys_status.

&&&&if&link_ref_cnt&=&zeros
&&&&&&&&call&"link_fini"&using&link_item,&link_status.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
fini.
&&&&exit&program.
*
end&program&read_file_body.
identification&division.&
program-id.&&&&log_event.&&&&&&
data&division.&
working-storage&section.&
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.&
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.&
*
01&&timestamp&&&&&&&&&&&&&&&&&&&&&&&pic&x(24).
01&&out_text&&&&&&&&&&&&&&&&&&&&&&&&pic&x(512).&
*&
linkage&section.&
*&
01&&msg_desc.
&&&&03&&msg_text_cl.&
&&&&&&&&05&&msg_text_len&&&&pic&s9(4)&&&&&&&comp.&
&&&&&&&&05&&msg_text_class&&pic&s9(4)&&&&&&&comp.&
&&&&03&&msg_text_addr&&&&&&&&&&&&&&&&&&&&&&&pointer.&
*
procedure&division&using&msg_desc.&
00.&
&&&&call&"lib$scopy_dxdx"&using&msg_desc&by&descriptor&out_text&giving&sys_status.&
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8025,&sys_status.
&
&&&&call&"lib$date_time"&using&by&descriptor&timestamp&giving&sys_status.&
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8026,&sys_status.

&&&&display&timestamp,&out_text(1:msg_text_len).&
&
&&&&exit&program.&
*&
end&program&log_event.
identification&division.
program-id.&&&&set_listen.
data&division.
working-storage&section.
01&&net_event_ast&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&net_event_ast.
01&&io_listen&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io_listen.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
copy&"socket_area".
*
01&&rem_sock_desc.
&&&&03&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&16.
&&&&03&&rem_sock_pntr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&rem_sock_name.
&&&&03&&rem_sock_len_pntr&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&value&&&reference&&&&&&&rsn_len.
*
procedure&division.
00.
&&&&call&"sys$assign"&
&&&&&&&&using&&&by&descriptor&"_BG:"
&&&&&&&&&&&&&&&&by&reference&&accept_chan
&&&&&&&&&&&&&&&&by&value&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8027,&sys_status.

&&&&call&"sys$qio"
&&&&&&&&using&&&by&value&&&&&&&&0,&listen_chan,&io_listen
&&&&&&&&&&&&&&&&by&reference&&&&listen_iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&net_event_ast,&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&rem_sock_desc,&accept_chan
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8013,&sys_status.

&&&&exit&program.
*
end&program&set_listen.
identification&division.
program-id.&&&&flush_network.
data&division.
working-storage&section.
01&&flush_ast&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&flush_ast.
01&&io$_deaccess&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io$_deaccess.
01&&io_close&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&io_close.
01&&ucx$c_dsc_rcv&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ucx$c_dsc_rcv.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
flush_tcp_ip&section.
00.
&&&&call&"sys$qio"
&&&&&&&&&&&&using&&&by&value&&&&&&&&0,&link_net_chan,&io_close
&&&&&&&&&&&&&&&&&&&&by&reference&&&&link_iosb
&&&&&&&&&&&&&&&&&&&&by&value&&&&&&&&flush_ast
&&&&&&&&&&&&&&&&&&&&by&reference&&&&link_item
&&&&&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0,&ucx$c_dsc_rcv,&0,&0
&&&&&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8028,&sys_status.

&&&&add&1&to&link_ref_cnt.

&&&&exit&program.
*
end&program&flush_network.
identification&division.
program-id.&&&&flush_ast.
data&division.
working-storage&section.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_linkdiscon&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_linkdiscon.
01&&ss$_nolinks&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_nolinks.
01&&ss$_cancel&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_cancel.
01&&ss$_abort&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_abort.
01&&ss$_shut&&&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_shut.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
procedure&division&using&link_item.
kick_off&section.
00.
&&&&if&link_ref_cnt&=&zeros&&&&&&&&&&&&&&&&&
        call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8059,&ss$_abort
&&&&else
        subtract&1&from&link_ref_cnt.

&&&&move&link_cond&to&sys_status.
&&&&evaluate&&&&        sys_status
&&&&&&&&&&&&when&&&&&&&&ss$_normal&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_shut&&&&&&&&
&&&&&&&&&&&&when&&&&&&&&ss$_abort
&&&&&&&&&&&&when&&&&&&&&ss$_cancel
&&&&&&&&&&&&when&&&&&&&&ss$_linkdiscon
&&&&&&&&&&&&when&&&&&&&&ss$_nolinks&&&&&move&sys_status&to&link_status&
&&&&&&&&&&&&when&&&&&&&&other&&&&&&&&&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8033,&sys_status
&&&&end-evaluate.

&&&&if&link_ref_cnt&=&zeros
&&&&&&&&call&"link_fini"&using&link_item,&link_status.

&&&&exit&program.
*
end&program&flush_ast.&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
identification&division.
program-id.&&&&link_fini.
data&division.
working-storage&section.
01&&t3$_sysreqerr&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&t3$_sysreqerr.
01&&ss$_normal&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&value&&&external&&&&&&&&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
01&&log_status&&&&&&&&&&&&&&&&&&&&&&pic&x(1)&&&&&&&&&&&&&&&&external.
01&&t3$ldr_zone&&&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp&&&&external.
01&&link_desc&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&external.
&&&&03&&bytes_reqd&&&&&&&&&&&&&&&&&&pic&9(9)&&&&&&&&comp.
&&&&03&&buff_addr&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer.
*
01&&discon_msg&&&&&&&&&&&&&&&&&&&&&&pic&x(46).
01&&discon_msg_len&&&&&&&&&&&&&&&&&&pic&s9(4)&&&&&&&comp.
*
linkage&section.
copy&"ldr_link_item".
*
01&&logout_status&&&&&&&&&&&&&&&&&&&pic&s9(9)&&&&&&&comp.
*
procedure&division&using&link_item,&logout_status.
kick_off&section.
00.
&&&&if&log_status&=&"Y"
        perform&log_disconnect.

&&&&call&"sys$dassgn"&using&by&value&link_net_chan&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8024,&sys_status.

&&&&if&link_file_chan&not&=&zeros
&&&&&&&&call&"sys$dassgn"&using&by&value&link_file_chan&giving&sys_status
&&&&&&&&if&sys_status&not&=&ss$_normal&
        &&&&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8049,&sys_status.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&set&buff_addr&to&reference&link_item.&&&&&&&&&&&&&&&&&&&&&
&&&&call&"lib$free_vm"&using&bytes_reqd,&buff_addr,&t3$ldr_zone&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8029,&sys_status.

&&&&exit&program.
*
log_disconnect&section.
00.
&&&&call&"sys$fao"
&&&&&&&&using&&&by&descriptor&&&"Disconnection&-&Unit&_BG!ZW:&Status&!XL"
&&&&&&&&&&&&&&&&by&reference&&&&discon_msg_len
&&&&&&&&&&&&&&&&by&descriptor&&&discon_msg
&&&&&&&&&&&&&&&&by&value&&&&&&&&link_unit,&logout_status
&&&&&&&&giving&&sys_status
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop"&using&by&value&t3$_sysreqerr,&1,&8023,&sys_status.

&&&&call&"log_event"&using&by&descriptor&discon_msg(1:discon_msg_len).
*
end&program&link_fini.



More information about the Info-vax mailing list