Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OMG look where he's put that IOSB It's going to explode!

105 views
Skip to first unread message

Richard Maher

unread,
Aug 24, 2015, 6:46:53 PM8/24/15
to
A couple of important bits I missed: -

$ ty LDR_LINK_ITEM.LIB
*+
* Record description for individual client from link database.
*-
01 link_item.
03 link_data.
05 link_net_chan pic s9(4) comp.
05 link_file_chan pic s9(4) comp.
05 link_unit pic s9(4) comp.
05 link_method pic s9(4) comp.
05 link_last_block pic s9(9) comp.
05 link_residual pic s9(9) comp.
05 link_status pic s9(9) comp.
05 link_ref_cnt pic s9(9) comp.
05 link_iosb.
07 link_cond pic s9(4) comp.
07 link_bytes pic s9(4) comp.
07 link_reason pic s9(9) comp.
05 link_buff pic x(1024).
05 link_filenames redefines
link_buff.
07 link_xab_item_list pic x(16).
07 link_directory pic 9(9) comp.
07 link_fna pic x(255).
07 link_esa pic x(255).
05 link_user.
07 link_unit_txt pic x(8).
07 link_node_len pic 9(4) comp.
07 link_node_addr_len pic 9(4) comp.
07 link_host_addr pic x(4).
07 link_socket pic s9(9) comp.
07 link_node pic x(63).
07 link_node_addr pic x(15).
*-


Look, LOOK! It's an EXTERNAL PSECT! What is the Compiler going to do
with that? We're all doomed :-(

$ ty SOCKET_AREA.LIB
*
01 socket_area external.
03 listen_chan pic s9(4) comp.
03 accept_chan pic s9(4) comp.
03 listen_iosb.
05 accept_cond pic s9(4) comp.
05 pic x(6).
03 rem_sock_name.
05 addr_dom pic s9(4) comp.
05 port_number.
07 high_byte pic x(1).
07 low_byte pic x(1).
05 host_addr.
07 ha1 pic x(1).
07 ha2 pic x(1).
07 ha3 pic x(1).
07 ha4 pic x(1).
05 pic x(8).
03 rsn_len pic s9(9) comp.
*


$ ty T3$APP_LDR.COM
$! Copyright (c) Tier3 Software Ltd. All rights reserved.
$ on warning then goto fini
$ set default t3$applet_root:[000000]
$ set process/privileges=(noall,netmbx,tmpmbx,sysprv)
$! SYSPRV is turned-off once the Applet Loader is initialized
$ run sys$system:t3$app_ldr
$!
$fini:
$ exit '$status



$ ty T3$STRTLDR.COB
************************************************************************************
*
*
* 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$strtldr with ident "V3.1".

data division.
working-storage section.
01 creprc_flags pic s9(9) comp value
external creprc_flags.
01 iss$m_create_authpriv pic s9(9) comp value
external iss$m_create_authpriv.
01 t3$_nonodnam pic s9(9) comp value
external t3$_nonodnam.
01 t3$_ivportno pic s9(9) comp value
external t3$_ivportno.
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 in_cmd pic x(255).
01 port_len pic 9(4) comp.
01 in_port pic 9(9) comp.
*
01 prcnam.
03 pic x(11) value
"T3$APP_LDR_".
03 prcnam_port pic x(4).
*
01 app_ldr_log pic x(37).
01 app_ldr_log_len pic s9(4) comp.
01 out_pid pic s9(9) comp.
01 out_status pic s9(9) comp.
*
01 tier3_username pic x(12) value
"TIER3$SERVER".
*
01 uai_item_list.
03 item_def_priv.
05 pic s9(4) comp value 8.
05 pic s9(4) comp value
external uai$_def_priv.
05 pointer value
reference def_priv.
05 pic 9(9) comp.
03 item_maxdetach.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_maxdetach.
05 pointer value
reference maxdetach.
05 pic 9(9) comp.
03 item_maxjobs.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_maxjobs.
05 pointer value
reference maxjobs.
05 pic 9(9) comp.
03 item_pbytlm.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_pbytlm.
05 pointer value
reference pbytlm.
05 pic 9(9) comp.
03 item_shrfillm.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_shrfillm.
05 pointer value
reference shrfillm.
05 pic 9(9) comp.
03 item_pri.
05 pic s9(4) comp value 1.
05 pic s9(4) comp value
external uai$_pri.
05 pointer value
reference base_priority.
05 pic 9(9) comp.
03 item_astlm.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_astlm.
05 pointer value
reference qd_astlm.
05 pic s9(9) comp.
03 item_biolm.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_biolm.
05 pointer value
reference qd_biolm.
05 pic s9(9) comp.
03 item_bytlm.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_bytlm.
05 pointer value
reference qd_bytlm.
05 pic s9(9) comp.
03 item_cputim.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_cputim.
05 pointer value
reference qd_cpulm.
05 pic s9(9) comp.
03 item_diolm.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_diolm.
05 pointer value
reference qd_diolm.
05 pic s9(9) comp.
03 item_enqlm.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_enqlm.
05 pointer value
reference qd_enqlm.
05 pic s9(9) comp.
03 item_fillm.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_fillm.
05 pointer value
reference qd_fillm.
05 pic s9(9) comp.
03 item_jtquota.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_jtquota.
05 pointer value
reference qd_jtquota.
05 pic s9(9) comp.
03 item_pqflquota.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_pgflquota.
05 pointer value
reference qd_pgflquota.
05 pic s9(9) comp.
03 item_prccnt.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_prccnt.
05 pointer value
reference qd_prclm.
05 pic s9(9) comp.
03 item_tqcnt.
05 pic s9(4) comp value 2.
05 pic s9(4) comp value
external uai$_tqcnt.
05 pointer value
reference qd_tqelm.
05 pic s9(9) comp.
03 item_dfwscnt.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_dfwscnt.
05 pointer value
reference qd_wsdefault.
05 pic s9(9) comp.
03 item_wsextent.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_wsextent.
05 pointer value
reference qd_wsextent.
05 pic s9(9) comp.
03 item_wsquota.
05 pic s9(4) comp value 4.
05 pic s9(4) comp value
external uai$_wsquota.
05 pointer value
reference qd_wsquota.
05 pic s9(9) comp.
03 pic s9(9) comp.
*
01 creprc_ws external.
03 creprc_quota_def.
05 pic x.
05 qd_astlm pic 9(4) comp.
05 pic xx.
05 pic x.
05 qd_biolm pic 9(4) comp.
05 pic xx.
05 pic x.
05 qd_bytlm pic 9(9) comp.
05 pic x.
05 qd_cpulm pic 9(9) comp.
05 pic x.
05 qd_diolm pic 9(4) comp.
05 pic xx.
05 pic x.
05 qd_enqlm pic 9(4) comp.
05 pic xx.
05 pic x.
05 qd_fillm pic 9(4) comp.
05 pic xx.
05 pic x.
05 qd_jtquota pic 9(9) comp.
05 pic x.
05 qd_pgflquota pic 9(9) comp.
05 pic x.
05 qd_prclm pic 9(9) comp.
05 pic x.
05 qd_tqelm pic 9(4) comp.
05 pic xx.
05 pic x.
05 qd_wsdefault pic 9(9) comp.
05 pic x.
05 qd_wsextent pic 9(9) comp.
05 pic x.
05 qd_wsquota pic 9(9) comp.
05 pic x.
03 pic s9(9) comp.
*
01 creprc_prib pic s9(4) comp.
01 uai_prib redefines
creprc_prib.
03 base_priority pic x.
*
01 maxdetach pic s9(4) comp.
01 maxjobs pic s9(4) comp.
01 pbytlm pic s9(9) comp.
01 shrfillm pic s9(4) comp.
01 def_priv pic s9(18) comp.
01 creprc_persona pic 9(9) comp.
01 restore_persona pic 9(9) comp value 1.
*
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 node_name.
05 pointer value
reference node_name_len.
03 pic s9(9) comp.
*
01 syi_iosb.
03 syi_cond pic s9(9) comp.
03 pic x(4).
01 node_name pic x(6).
01 node_name_len pic 9(4) comp.
*-
01 msgvec_addr pointer.
01 cresrv_msgvec.
03 pic s9(4) comp value 4.
03 pic s9(4) comp value 15.
03 pic s9(9) comp value
external t3$_ldrstrt.
03 pic s9(9) comp value 2.
03 cresrv_port pic s9(9) comp.
03 cresrv_pid pic s9(9) comp.
01 crefail_msgvec.
03 pic s9(4) comp value 4.
03 pic s9(4) comp value 15.
03 pic s9(9) comp value
external t3$_ldrfail.
03 pic s9(9) comp value 1.
03 crefail_port pic s9(9) comp.
03 crefail_status pic s9(9) comp.
*
procedure division.
kick_off section.
00.
call "lib$get_foreign"
using by descriptor in_cmd
by value 0
by reference port_len
by value 0
giving sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9001, sys_status.

if port_len > 1 and < 5 and in_cmd(1:port_len) numeric
move in_cmd(1:port_len) to in_port.

if in_port < 1 or > 32767
call "lib$stop" using by value t3$_ivportno.

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, 9016, sys_status.
if node_name_len = zeros
call "lib$stop" using by value t3$_nonodnam, 0, sys_status.

call "sys$getuai"
using by value 0, 0
by descriptor tier3_username
by reference uai_item_list
by value 0, 0, 0
giving sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9007, sys_status.

call "sys$persona_create"
using by reference creprc_persona
by descriptor tier3_username
by value iss$m_create_authpriv
giving sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9008, sys_status.

call "sys$persona_assume"
using by reference creprc_persona
by value 0
giving sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9014, sys_status.
*
perform create_server.

call "sys$persona_assume"
using by reference restore_persona
by value 0
giving sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9015, sys_status.

call "sys$persona_delete" using creprc_persona giving sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9013, sys_status.
*-
stop run.
*
create_server section.
00.
call "ots$cvt_l_tz"
using by reference in_port
by descriptor prcnam_port
by value 4, 2
giving sys_status.
if sys_status not = ss$_normal call "lib$stop" using by value
t3$_sysreqerr, 1, 9002, sys_status.

string "T3$MANAGER:", prcnam, "_",
node_name(1:node_name_len), ".LOG"
delimited by size
into app_ldr_log.
add 31, node_name_len giving app_ldr_log_len.

call "sys$creprc"
using by reference out_pid
by descriptor "sys$system:loginout.exe"
by descriptor "sys$system:t3$app_ldr.com"
by descriptor app_ldr_log(1:app_ldr_log_len)
by value 0
by reference def_priv, creprc_quota_def
by descriptor prcnam
by value creprc_prib, 0, 0, creprc_flags
giving out_status.

if out_status not = ss$_normal
move out_status to crefail_status
move in_port to crefail_port
set msgvec_addr to reference crefail_msgvec
else
set msgvec_addr to reference cresrv_msgvec
move in_port to cresrv_port
move out_pid to cresrv_pid.

call "sys$putmsg" using by value msgvec_addr, 0, 0, 0 giving
sys_status.
if sys_status not = ss$_normal
call "lib$stop" using by value t3$_sysreqerr, 1, 9011, sys_status.
*
fini.
*
end program t3$strtldr.

0 new messages